From 65121dac0925f40dd9ffc69a053f38314043c0de Mon Sep 17 00:00:00 2001
From: Gaudenz Alder <gaudenz@jgraph.com>
Date: Sat, 11 Apr 2020 08:24:05 +0200
Subject: [PATCH] 12.9.11 release

---
 ChangeLog                                     |    5 +
 README.md                                     |    2 +-
 VERSION                                       |    2 +-
 etc/license-worker/license.js                 |   16 +-
 .../mxgraph/online/MSGraphAuthServlet.java    |    5 +-
 .../webapp/connect/att_common/att-editor.js   |  478 +++
 .../webapp/connect/bitbucket/connect-dev.json |   29 +
 src/main/webapp/connect/bitbucket/viewer.html |  200 ++
 .../common/images/reader/checkmark.gif        |  Bin 0 -> 891 bytes
 .../common/images/reader/closeLargeView.gif   |  Bin 0 -> 871 bytes
 .../connect/common/images/reader/edit.png     |  Bin 0 -> 271 bytes
 .../connect/common/images/reader/grid.gif     |  Bin 0 -> 56 bytes
 .../common/images/reader/largeView.png        |  Bin 0 -> 341 bytes
 .../connect/common/images/reader/remove.png   |  Bin 0 -> 215 bytes
 .../common/images/reader/zoomActual.png       |  Bin 0 -> 256 bytes
 .../connect/common/images/reader/zoomFit.gif  |  Bin 0 -> 916 bytes
 .../connect/common/images/reader/zoomIn.gif   |  Bin 0 -> 901 bytes
 .../connect/common/images/reader/zoomOut.gif  |  Bin 0 -> 898 bytes
 .../webapp/connect/common/js/mxProperties.js  |  115 +
 src/main/webapp/connect/common/js/mxReader.js |  827 +++++
 src/main/webapp/connect/common/message.txt    |   90 +
 src/main/webapp/connect/common/message_de.txt |   89 +
 .../common/styles/plugin/aui-buttons.css      |  536 +++
 .../common/styles/plugin/blueprint.css        |    0
 .../connect/common/styles/plugin/common.css   |  150 +
 .../common/styles/plugin/dropdown-menu.css    |    4 +
 .../connect/common/styles/plugin/explorer.css |   18 +
 .../common/styles/plugin/linkBrowser.css      |  296 ++
 .../common/styles/plugin/mx-editor.css        |   34 +
 .../common/styles/plugin/newDiagramDialog.css |   49 +
 .../connect/common/styles/plugin/reader.css   |   39 +
 .../connect/common/styles/plugin/search.css   |   84 +
 src/main/webapp/connect/common/viewer.txt     |    9 +
 src/main/webapp/connect/common/viewer_de.txt  |    9 +
 src/main/webapp/connect/confluence/admin.html |   61 +
 src/main/webapp/connect/confluence/admin.js   |  919 +++++
 .../webapp/connect/confluence/config.html     |  178 +
 src/main/webapp/connect/confluence/config.js  | 1696 ++++++++++
 .../connect/confluence/connect-dev.json       |  474 +++
 .../webapp/connect/confluence/connect.json    |  485 +++
 .../connect/confluence/connectUtils-1-4-8.js  | 2958 +++++++++++++++++
 .../webapp/connect/confluence/i18n/cs_CZ.json |   23 +
 .../webapp/connect/confluence/i18n/da_DK.json |   23 +
 .../webapp/connect/confluence/i18n/de_DE.json |   23 +
 .../webapp/connect/confluence/i18n/en.json    |   23 +
 .../webapp/connect/confluence/i18n/es_ES.json |   23 +
 .../webapp/connect/confluence/i18n/et_EE.json |   23 +
 .../webapp/connect/confluence/i18n/fi_FI.json |   23 +
 .../webapp/connect/confluence/i18n/fr_FR.json |   23 +
 .../webapp/connect/confluence/i18n/hu_HU.json |   23 +
 .../webapp/connect/confluence/i18n/is_IS.json |   23 +
 .../webapp/connect/confluence/i18n/it_IT.json |   23 +
 .../webapp/connect/confluence/i18n/ja_JP.json |   23 +
 .../webapp/connect/confluence/i18n/ko_KR.json |   23 +
 .../webapp/connect/confluence/i18n/nl_NL.json |   23 +
 .../webapp/connect/confluence/i18n/no_NO.json |   23 +
 .../webapp/connect/confluence/i18n/pl_PL.json |   23 +
 .../webapp/connect/confluence/i18n/pt_BR.json |   23 +
 .../webapp/connect/confluence/i18n/ro_RO.json |   23 +
 .../webapp/connect/confluence/i18n/ru_RU.json |   23 +
 .../webapp/connect/confluence/i18n/sk_SK.json |   23 +
 .../webapp/connect/confluence/i18n/sv_SE.json |   23 +
 .../webapp/connect/confluence/i18n/zh_CN.json |   23 +
 .../connect/confluence/includeDiagram.html    |  386 +++
 .../connect/confluence/includeDiagram.js      |  989 ++++++
 .../webapp/connect/confluence/initEditor.html |   79 +
 .../connect/confluence/macroEditor-1-4-8.html |  189 ++
 .../connect/confluence/macroEditor.html       |   25 +
 .../prism/bililiteRange.fancytext.js          |   91 +
 .../connect/confluence/prism/bililiteRange.js |  763 +++++
 .../confluence/prism/bililiteRange.undo.js    |  122 +
 .../confluence/prism/bililiteRange.util.js    |  272 ++
 .../webapp/connect/confluence/prism/prism.css |  234 ++
 .../webapp/connect/confluence/prism/prism.js  |    6 +
 .../connect/confluence/splashEditor.html      |   56 +
 .../webapp/connect/confluence/support.html    |  146 +
 .../connect/confluence/viewer-1-4-8.html      |   90 +
 src/main/webapp/connect/confluence/viewer.js  | 1485 +++++++++
 .../webapp/connect/confluence/viewer2.html    |  214 ++
 .../webapp/connect/gdrive_common/editor.js    |  477 +++
 src/main/webapp/connect/gdrive_common/gac.js  |  489 +++
 src/main/webapp/connect/gdriveconnector/ac.js |   44 +
 .../gdriveconnector/att-macroEditor.html      |  165 +
 .../connect/gdriveconnector/att-viewer.html   |   28 +
 .../connect/gdriveconnector/att-viewer.js     |  278 ++
 .../images/gdriveconnector.png                |  Bin 0 -> 1801 bytes
 .../images/gdriveconnector.svg                |    1 +
 .../connect/gdriveconnector/macroEditor.html  |  145 +
 .../gdriveconnector/od-macroEditor.html       |  144 +
 .../connect/gdriveconnector/od-viewer.html    |   29 +
 .../connect/gdriveconnector/od-viewer.js      |  350 ++
 .../connect/gdriveconnector/plugin.json       |  411 +++
 .../connect/gdriveconnector/spinner.gif       |  Bin 0 -> 1781 bytes
 .../connect/gdriveconnector/viewer.html       |   29 +
 .../webapp/connect/gdriveconnector/viewer.js  |  376 +++
 src/main/webapp/connect/jira/ac.js            |  372 +++
 src/main/webapp/connect/jira/connect-dev.json |   93 +
 src/main/webapp/connect/jira/connect.json     |  236 ++
 .../webapp/connect/jira/connectUtils-1-3-3.js |  354 ++
 .../webapp/connect/jira/editor-1-3-3.html     |   35 +
 src/main/webapp/connect/jira/editor.js        |  618 ++++
 src/main/webapp/connect/jira/editor2.html     |  427 +++
 src/main/webapp/connect/jira/embed.html       |  317 ++
 src/main/webapp/connect/jira/embedDiagram.js  |  449 +++
 .../connect/jira/fullScreenViewer-1-3-3.html  |  255 ++
 .../connect/jira/fullScreenViewer2.html       |  205 ++
 src/main/webapp/connect/jira/search.html      |  326 ++
 src/main/webapp/connect/jira/spinner.gif      |  Bin 0 -> 1781 bytes
 .../connect/jira/viewerPanel-1-3-3.html       |  108 +
 src/main/webapp/connect/jira/viewerPanel.js   |  892 +++++
 .../webapp/connect/jira/viewerPanel2.html     |  393 +++
 src/main/webapp/connect/new_common/cac.js     |  246 ++
 src/main/webapp/connect/office365/app.css     |  458 +++
 .../connect/office365/dev/manifest-dev.xml    |  374 +++
 src/main/webapp/connect/office365/drive.html  |   22 +
 .../function-file/function-file.html          |   31 +
 .../office365/function-file/function-file.js  |  286 ++
 .../connect/office365/function-file/msg.html  |  112 +
 .../webapp/connect/office365/img-viewer.html  |   50 +
 src/main/webapp/connect/office365/index.html  |  184 +
 src/main/webapp/connect/office365/js/app.js   |  587 ++++
 src/main/webapp/connect/office365/js/drive.js |  214 ++
 src/main/webapp/connect/office365/js/index.js | 1048 ++++++
 .../webapp/connect/office365/manifest.xml     |  374 +++
 src/main/webapp/connect/onedrive_common/ac.js |  742 +++++
 .../webapp/connect/onedrive_common/editor.js  |  469 +++
 .../connect/onedrivejira/connect-dev.json     |  103 +
 .../webapp/connect/onedrivejira/connect.json  |  106 +
 .../webapp/connect/onedrivejira/editor.html   |  365 ++
 .../onedrivejira/fullScreenViewer.html        |   52 +
 .../connect/onedrivejira/fullScreenViewer.js  |  266 ++
 .../onedrivejira/oneDriveFSViewer.html        |   29 +
 .../connect/onedrivejira/oneDriveFSViewer.js  |  128 +
 .../webapp/connect/onedrivejira/spinner.gif   |  Bin 0 -> 1781 bytes
 .../connect/onedrivejira/viewerPanel.html     |   55 +
 .../connect/onedrivejira/viewerPanel.js       |  807 +++++
 .../webapp/connect/trello/attSection.html     |   14 +
 src/main/webapp/connect/trello/editor.html    |   13 +
 .../trello/images/drawio-trello-ss.png        |  Bin 0 -> 105622 bytes
 src/main/webapp/connect/trello/index.html     |   14 +
 .../webapp/connect/trello/js/attSection.js    |  201 ++
 src/main/webapp/connect/trello/js/client.js   |   69 +
 src/main/webapp/connect/trello/js/common.js   |    8 +
 src/main/webapp/connect/trello/js/editor.js   |   29 +
 src/main/webapp/connect/trello/js/new.js      |  104 +
 src/main/webapp/connect/trello/manifest.json  |   19 +
 src/main/webapp/connect/trello/new.html       |   32 +
 src/main/webapp/connect/vsdx/importer.js      |   79 +
 src/main/webapp/js/app.min.js                 |  923 ++---
 src/main/webapp/js/diagramly/DriveClient.js   |    4 +-
 src/main/webapp/js/diagramly/EditorUi.js      |   32 +-
 src/main/webapp/js/diagramly/ElectronApp.js   |    4 +-
 src/main/webapp/js/diagramly/Extensions.js    |  248 +-
 src/main/webapp/js/diagramly/Trees.js         |    6 +-
 src/main/webapp/js/diagramly/vsdx/importer.js |  196 +-
 src/main/webapp/js/extensions.min.js          |  836 ++---
 src/main/webapp/js/mxgraph/Graph.js           |  254 +-
 src/main/webapp/js/viewer.min.js              | 2549 +++++++-------
 src/main/webapp/resources/dia_lt.txt          | 1000 +++---
 src/main/webapp/resources/dia_nl.txt          |  134 +-
 src/main/webapp/resources/dia_uk.txt          |  108 +-
 src/main/webapp/service-worker.js             |   10 +-
 src/main/webapp/styles/dark-default.xml       |    4 +
 src/main/webapp/styles/default.xml            |  164 +-
 164 files changed, 34684 insertions(+), 3034 deletions(-)
 create mode 100644 src/main/webapp/connect/att_common/att-editor.js
 create mode 100644 src/main/webapp/connect/bitbucket/connect-dev.json
 create mode 100644 src/main/webapp/connect/bitbucket/viewer.html
 create mode 100644 src/main/webapp/connect/common/images/reader/checkmark.gif
 create mode 100644 src/main/webapp/connect/common/images/reader/closeLargeView.gif
 create mode 100644 src/main/webapp/connect/common/images/reader/edit.png
 create mode 100644 src/main/webapp/connect/common/images/reader/grid.gif
 create mode 100644 src/main/webapp/connect/common/images/reader/largeView.png
 create mode 100644 src/main/webapp/connect/common/images/reader/remove.png
 create mode 100644 src/main/webapp/connect/common/images/reader/zoomActual.png
 create mode 100644 src/main/webapp/connect/common/images/reader/zoomFit.gif
 create mode 100644 src/main/webapp/connect/common/images/reader/zoomIn.gif
 create mode 100644 src/main/webapp/connect/common/images/reader/zoomOut.gif
 create mode 100644 src/main/webapp/connect/common/js/mxProperties.js
 create mode 100644 src/main/webapp/connect/common/js/mxReader.js
 create mode 100644 src/main/webapp/connect/common/message.txt
 create mode 100644 src/main/webapp/connect/common/message_de.txt
 create mode 100644 src/main/webapp/connect/common/styles/plugin/aui-buttons.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/blueprint.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/common.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/dropdown-menu.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/explorer.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/linkBrowser.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/mx-editor.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/newDiagramDialog.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/reader.css
 create mode 100644 src/main/webapp/connect/common/styles/plugin/search.css
 create mode 100644 src/main/webapp/connect/common/viewer.txt
 create mode 100644 src/main/webapp/connect/common/viewer_de.txt
 create mode 100644 src/main/webapp/connect/confluence/admin.html
 create mode 100644 src/main/webapp/connect/confluence/admin.js
 create mode 100644 src/main/webapp/connect/confluence/config.html
 create mode 100644 src/main/webapp/connect/confluence/config.js
 create mode 100644 src/main/webapp/connect/confluence/connect-dev.json
 create mode 100644 src/main/webapp/connect/confluence/connect.json
 create mode 100644 src/main/webapp/connect/confluence/connectUtils-1-4-8.js
 create mode 100644 src/main/webapp/connect/confluence/i18n/cs_CZ.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/da_DK.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/de_DE.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/en.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/es_ES.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/et_EE.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/fi_FI.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/fr_FR.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/hu_HU.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/is_IS.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/it_IT.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/ja_JP.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/ko_KR.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/nl_NL.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/no_NO.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/pl_PL.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/pt_BR.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/ro_RO.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/ru_RU.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/sk_SK.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/sv_SE.json
 create mode 100644 src/main/webapp/connect/confluence/i18n/zh_CN.json
 create mode 100644 src/main/webapp/connect/confluence/includeDiagram.html
 create mode 100644 src/main/webapp/connect/confluence/includeDiagram.js
 create mode 100644 src/main/webapp/connect/confluence/initEditor.html
 create mode 100644 src/main/webapp/connect/confluence/macroEditor-1-4-8.html
 create mode 100644 src/main/webapp/connect/confluence/macroEditor.html
 create mode 100644 src/main/webapp/connect/confluence/prism/bililiteRange.fancytext.js
 create mode 100644 src/main/webapp/connect/confluence/prism/bililiteRange.js
 create mode 100644 src/main/webapp/connect/confluence/prism/bililiteRange.undo.js
 create mode 100644 src/main/webapp/connect/confluence/prism/bililiteRange.util.js
 create mode 100644 src/main/webapp/connect/confluence/prism/prism.css
 create mode 100644 src/main/webapp/connect/confluence/prism/prism.js
 create mode 100644 src/main/webapp/connect/confluence/splashEditor.html
 create mode 100644 src/main/webapp/connect/confluence/support.html
 create mode 100644 src/main/webapp/connect/confluence/viewer-1-4-8.html
 create mode 100644 src/main/webapp/connect/confluence/viewer.js
 create mode 100644 src/main/webapp/connect/confluence/viewer2.html
 create mode 100644 src/main/webapp/connect/gdrive_common/editor.js
 create mode 100644 src/main/webapp/connect/gdrive_common/gac.js
 create mode 100644 src/main/webapp/connect/gdriveconnector/ac.js
 create mode 100644 src/main/webapp/connect/gdriveconnector/att-macroEditor.html
 create mode 100644 src/main/webapp/connect/gdriveconnector/att-viewer.html
 create mode 100644 src/main/webapp/connect/gdriveconnector/att-viewer.js
 create mode 100644 src/main/webapp/connect/gdriveconnector/images/gdriveconnector.png
 create mode 100644 src/main/webapp/connect/gdriveconnector/images/gdriveconnector.svg
 create mode 100644 src/main/webapp/connect/gdriveconnector/macroEditor.html
 create mode 100644 src/main/webapp/connect/gdriveconnector/od-macroEditor.html
 create mode 100644 src/main/webapp/connect/gdriveconnector/od-viewer.html
 create mode 100644 src/main/webapp/connect/gdriveconnector/od-viewer.js
 create mode 100644 src/main/webapp/connect/gdriveconnector/plugin.json
 create mode 100644 src/main/webapp/connect/gdriveconnector/spinner.gif
 create mode 100644 src/main/webapp/connect/gdriveconnector/viewer.html
 create mode 100644 src/main/webapp/connect/gdriveconnector/viewer.js
 create mode 100644 src/main/webapp/connect/jira/ac.js
 create mode 100644 src/main/webapp/connect/jira/connect-dev.json
 create mode 100644 src/main/webapp/connect/jira/connect.json
 create mode 100644 src/main/webapp/connect/jira/connectUtils-1-3-3.js
 create mode 100644 src/main/webapp/connect/jira/editor-1-3-3.html
 create mode 100644 src/main/webapp/connect/jira/editor.js
 create mode 100644 src/main/webapp/connect/jira/editor2.html
 create mode 100644 src/main/webapp/connect/jira/embed.html
 create mode 100644 src/main/webapp/connect/jira/embedDiagram.js
 create mode 100644 src/main/webapp/connect/jira/fullScreenViewer-1-3-3.html
 create mode 100644 src/main/webapp/connect/jira/fullScreenViewer2.html
 create mode 100644 src/main/webapp/connect/jira/search.html
 create mode 100644 src/main/webapp/connect/jira/spinner.gif
 create mode 100644 src/main/webapp/connect/jira/viewerPanel-1-3-3.html
 create mode 100644 src/main/webapp/connect/jira/viewerPanel.js
 create mode 100644 src/main/webapp/connect/jira/viewerPanel2.html
 create mode 100644 src/main/webapp/connect/new_common/cac.js
 create mode 100644 src/main/webapp/connect/office365/app.css
 create mode 100644 src/main/webapp/connect/office365/dev/manifest-dev.xml
 create mode 100644 src/main/webapp/connect/office365/drive.html
 create mode 100644 src/main/webapp/connect/office365/function-file/function-file.html
 create mode 100644 src/main/webapp/connect/office365/function-file/function-file.js
 create mode 100644 src/main/webapp/connect/office365/function-file/msg.html
 create mode 100644 src/main/webapp/connect/office365/img-viewer.html
 create mode 100644 src/main/webapp/connect/office365/index.html
 create mode 100644 src/main/webapp/connect/office365/js/app.js
 create mode 100644 src/main/webapp/connect/office365/js/drive.js
 create mode 100644 src/main/webapp/connect/office365/js/index.js
 create mode 100644 src/main/webapp/connect/office365/manifest.xml
 create mode 100644 src/main/webapp/connect/onedrive_common/ac.js
 create mode 100644 src/main/webapp/connect/onedrive_common/editor.js
 create mode 100644 src/main/webapp/connect/onedrivejira/connect-dev.json
 create mode 100644 src/main/webapp/connect/onedrivejira/connect.json
 create mode 100644 src/main/webapp/connect/onedrivejira/editor.html
 create mode 100644 src/main/webapp/connect/onedrivejira/fullScreenViewer.html
 create mode 100644 src/main/webapp/connect/onedrivejira/fullScreenViewer.js
 create mode 100644 src/main/webapp/connect/onedrivejira/oneDriveFSViewer.html
 create mode 100644 src/main/webapp/connect/onedrivejira/oneDriveFSViewer.js
 create mode 100644 src/main/webapp/connect/onedrivejira/spinner.gif
 create mode 100644 src/main/webapp/connect/onedrivejira/viewerPanel.html
 create mode 100644 src/main/webapp/connect/onedrivejira/viewerPanel.js
 create mode 100644 src/main/webapp/connect/trello/attSection.html
 create mode 100644 src/main/webapp/connect/trello/editor.html
 create mode 100644 src/main/webapp/connect/trello/images/drawio-trello-ss.png
 create mode 100644 src/main/webapp/connect/trello/index.html
 create mode 100644 src/main/webapp/connect/trello/js/attSection.js
 create mode 100644 src/main/webapp/connect/trello/js/client.js
 create mode 100644 src/main/webapp/connect/trello/js/common.js
 create mode 100644 src/main/webapp/connect/trello/js/editor.js
 create mode 100644 src/main/webapp/connect/trello/js/new.js
 create mode 100644 src/main/webapp/connect/trello/manifest.json
 create mode 100644 src/main/webapp/connect/trello/new.html
 create mode 100644 src/main/webapp/connect/vsdx/importer.js

diff --git a/ChangeLog b/ChangeLog
index f0c0f733c..e64ba24b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+11-APR-2020: 12.9.11
+
+- Fixes edge label default style
+- Improves Lucidchart import
+
 08-APR-2020: 12.9.10
 
 - Fixes toggle selection for cells in containers
diff --git a/README.md b/README.md
index 409334ca1..a04c4c4ba 100644
--- a/README.md
+++ b/README.md
@@ -27,4 +27,4 @@ The full packaged .war of the client and servlets is built when the project is t
 
 Supported Browsers
 ------------------
-diagrams.net supports IE 11, Chrome 32+, Firefox 38+, Safari 9.1.x, 10.1.x and 11.0.x, Opera 20+, Native Android browser 5.1.x+, the default browser in the current and previous major iOS versions (e.g. 11.2.x and 10.3.x) and Edge 23+.
+diagrams.net supports IE 11, Chrome 32+, Firefox 38+, Safari 9.1.x, 10.1.x and 11.0.x, Opera 20+, Native Android browser 5.1.x+, the default browser in the current and previous major iOS versions (e.g. 11.2.x and 10.3.x) and Edge 23+.
\ No newline at end of file
diff --git a/VERSION b/VERSION
index 2d313dade..a14641df8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.9.10
\ No newline at end of file
+12.9.11
\ No newline at end of file
diff --git a/etc/license-worker/license.js b/etc/license-worker/license.js
index 35c30e6d1..a350e5cbe 100644
--- a/etc/license-worker/license.js
+++ b/etc/license-worker/license.js
@@ -28,18 +28,16 @@ async function handleRequest(request)
 		domain = params.get('domain');
 	}
 	
-//	let email = params.get('email');
+	let email = params.get('email');
 //	let locale = params.get('lc');
 //	let displayName = params.get('ds');
 	
-	//TODO Add logging if needed
-//	if (email != null)
-//	{
-//		String msg = "GWE:" + email;
-//		msg += (displayName == null) ? "" : ",NAME:" + displayName;
-//		msg += (locale == null) ? "" : ",LOCALE:" + locale;
-//		log.log(Level.CONFIG, msg);
-//	}
+	if (email != null)
+	{
+		let msg = encodeURIComponent(('license:GWE:' + email));
+		let url = "https://log.draw.io/" + msg;
+		fetch(url);
+	}
 	
 	if (domain != null)
 	{
diff --git a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java
index 5325f2856..aec0872b3 100644
--- a/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java
+++ b/src/main/java/com/mxgraph/online/MSGraphAuthServlet.java
@@ -86,9 +86,10 @@ public class MSGraphAuthServlet extends AbsAuthServlet
 			res.append("	window.opener.onOneDriveCallback(authInfo, window);");
 			res.append("} else {");
 			res.append("	var authInfoStr = JSON.stringify(authInfo);");
-			res.append("	Office.initialize = function () { Office.context.ui.messageParent(authInfoStr);}");
+			res.append("	localStorage.setItem('tmpODAuth', authInfoStr);");
+			res.append("	Office.onReady(function () { Office.context.ui.messageParent(authInfoStr);});");
 			res.append("}");
-			res.append("</script></head><body></body></html>");
+			res.append("</script></head><body><div>Automatic login interrupted. Please close and select OneDrive again.</div></body></html>");
 		}
 
 		return res.toString();
diff --git a/src/main/webapp/connect/att_common/att-editor.js b/src/main/webapp/connect/att_common/att-editor.js
new file mode 100644
index 000000000..ef6466498
--- /dev/null
+++ b/src/main/webapp/connect/att_common/att-editor.js
@@ -0,0 +1,478 @@
+function AttViewerEditor(onSubmit, getFileInfoFn, idSuffix, notStandalone, drawioOnly)
+{
+	idSuffix = idSuffix || '';
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var isDrawio = false;
+	
+	var opts =
+	{
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	var spinner = new Spinner(opts);
+	this.spinner = spinner;
+	spinner.spin(AC.$('#spinner-container' + idSuffix));
+	
+	var head = document.getElementsByTagName('head')[0];
+	
+	// Handles timeouts
+	var acceptResponse = true;
+	
+	var timeoutHandler = function()
+	{
+		acceptResponse = false;
+		spinner.stop();
+		alert('The connection has timed out');
+	};
+	
+	var timeoutThread = window.setTimeout(timeoutHandler, 25000);
+	
+	var selectedFile = null, selFileContent = null, editedFile = null;
+	var curViewer = null;
+
+	function showError(elem, errMsg)
+	{
+		elem.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+			errMsg;
+	};
+	
+	function prevDrawioFile(doc, prevDiv, filename, aspect)
+	{
+		spinner.stop();
+		
+		var container = document.createElement('div');
+		// NOTE: Height must be specified with default value "auto" to force automatic fit in viewer
+		container.style.cssText = 'position:absolute;width:100%;height:auto;bottom:0px;top:0px;border:1px solid transparent;';
+		prevDiv.appendChild(container);
+
+		var pageId, layerIds;
+		
+		if (aspect != null)
+		{
+			var aspectArray = aspect.split(' ');
+			
+			if (aspectArray.length > 1)
+			{
+				pageId = aspectArray[0];
+				layerIds = aspectArray.slice(1);
+			}
+		}
+		
+		var viewer = new GraphViewer(container, doc.documentElement,
+				{highlight: '#3572b0', border: 8, 'auto-fit': true,
+				resize: false, nav: true, lightbox: false, title: filename,
+				'toolbar-nohide': true, 'toolbar-position': 'top', toolbar: 'pages layers',
+				pageId: pageId, layerIds: layerIds});
+
+		curViewer = viewer;
+		
+		AP.dialog.getButton('submit').enable();
+		var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+		
+		if (altSubmitBtn) altSubmitBtn.enable();
+	};
+	
+	function prevImageFile(url, prevDiv, success, error)
+	{
+		var img = new Image();
+		
+		img.onload = function()
+		{
+			var s = Math.min(prevDiv.offsetWidth / img.width, prevDiv.offsetHeight / img.height);
+			
+			if (s < 1)
+			{
+				img.width = s * img.width;
+				img.height = s * img.height;
+			}
+
+			img.style.verticalAlign = 'middle';
+			prevDiv.style.lineHeight = prevDiv.offsetHeight + 'px';
+			prevDiv.appendChild(img);								
+
+			AP.dialog.getButton('submit').enable();
+			var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+			
+			if (altSubmitBtn) altSubmitBtn.enable();
+			
+			spinner.stop();
+			
+			if (success)
+			{
+				success(img);
+			}
+		};
+		
+		img.onerror = function()
+		{
+			if (error)
+			{
+				error();
+			}
+			
+			spinner.stop();
+		};
+
+		img.src = url;
+		curViewer = null;
+	};
+	
+	function genericOnSubmit() 
+	{
+		var hasError = false;
+		//this cannot happen as the submit button is disabled until a file is selected
+		if (editedFile == null && selectedFile == null)
+		{
+			AC.$('#filenameError' + idSuffix).innerHTML = 'Please select a file';
+			hasError = true;
+		}
+		
+		var width = parseInt(AC.$('#width' + idSuffix).value);
+		var height = parseInt(AC.$('#height' + idSuffix).value);
+		var autoSize = AC.$('#autoSize' + idSuffix).checked;
+		
+		if (!autoSize && (isNaN(width) || width <= 0))
+		{
+			AC.$('#widthError' + idSuffix).innerHTML = 'Width must be greater than zero';
+			hasError = true;
+		}
+		
+		if (!autoSize && (isNaN(height) || height <= 0))
+		{
+			AC.$('#heightError' + idSuffix).innerHTML = 'Height must be greater than zero';
+			hasError = true;
+		}
+		
+		if (hasError)
+		{
+			return;
+		}
+
+		var aspect = null;
+		
+		if (curViewer != null)
+		{
+			var layerIds = [];
+			
+			var model = curViewer.graph.getModel();
+			var childCount = model.getChildCount(model.root);
+				
+			// Get visible layers
+			for (var i = 0; i < childCount; i++)
+			{
+				var layer = model.getChildAt(model.root, i);
+				
+				if (model.isVisible(layer))
+				{
+					layerIds.push(layer.id);
+				}
+			}
+				
+			aspect = curViewer.diagrams[curViewer.currentPage].getAttribute('id') + ' ' + layerIds.join(' ');
+		}
+		
+		AP.dialog.getButton('submit').disable();
+		var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+		
+		if (altSubmitBtn) altSubmitBtn.disable();
+		
+		spinner.spin(AC.$('#preview' + idSuffix));
+
+		onSubmit(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, function()
+		{
+			AP.dialog.getButton('submit').enable();
+			var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+			
+			if (altSubmitBtn) altSubmitBtn.enable();
+			
+			showError(AC.$('#errorMsg' + idSuffix), 'Uploading file failed');
+			spinner.stop();
+		});
+	}
+
+	this.doSubmit = genericOnSubmit;
+	
+	function main()
+	{
+		window.clearTimeout(timeoutThread);
+		spinner.stop();
+		
+		AC.$('#filePicker' + idSuffix).addEventListener('click', function(evt) 
+		{
+			AC.$('#fileupload' + idSuffix).click();
+			evt.preventDefault();
+		});
+		
+		AC.$('#fileupload' + idSuffix).addEventListener('change', function(evt) 
+		{
+			if (this.files != null)
+			{
+				var file = this.files[0];
+				
+				if (this.files.length == 1 && file != null)
+				{
+					AC.$('#filenameError' + idSuffix).innerHTML = '';
+					AC.$('#filename' + idSuffix).value = file.name;
+					
+					var prevDiv = AC.$('#preview' + idSuffix);
+					prevDiv.innerHTML = '';
+					spinner.spin(prevDiv);
+					
+					if (typeof convertVSDXtoMX != 'undefined' &&  /\.v(dx|sdx?)$/i.test(file.name))
+					{
+						convertVSDXtoMX(file, file.name, function(xml)
+						{
+							selFileContent = xml;
+							isDrawio = true;
+							prevDrawioFile(mxUtils.parseXml(xml), prevDiv, file.name);
+						}, function()
+						{
+							showError(prevDiv, 'Unsupported vsdx file');
+						});
+					}
+					else
+					{
+						var reader = new FileReader();
+						
+						reader.onload = function(e)
+						{
+							var data = e.target.result;
+							var potentialDraw = true;
+							var isImage = false; 
+							isDrawio = false;
+							
+							if (file.type == 'image/svg+xml' && data.substring(0, 26) == 'data:image/svg+xml;base64,')
+							{
+								var base64 = data.substring(data.indexOf(',') + 1);
+
+								// Workaround for invalid character error in Safari
+								data = (window.atob && !mxClient.IS_SF) ? atob(base64) : Base64.decode(base64, true);
+							}
+							else if (!drawioOnly && file.type.indexOf('image') == 0)
+							{
+								isImage = true;
+								var pngData = null;
+								
+								if (file.type == 'image/png')
+								{
+									pngData = AC.extractGraphModelFromPng(data);
+								}
+								
+								if (pngData == null)
+								{
+									potentialDraw = false;
+								}
+								else
+								{
+									data = pngData;
+								}
+							}
+							
+							selFileContent = data;
+							
+							if (potentialDraw)
+							{
+								try 
+								{
+									var doc = mxUtils.parseXml(data);
+		
+									if (new Editor().extractGraphModel(doc.documentElement) != null)
+									{
+										isDrawio = true;
+										isImage = false
+										prevDrawioFile(doc, prevDiv, file.name);
+									}
+								}
+								catch(e) {}
+							}
+	
+							if (isImage)
+							{
+								prevImageFile(data, prevDiv, null, function()
+								{
+									showError(prevDiv, 'Unsupported image file');
+									selectedFile = null;
+								});
+							}
+							else if (!isDrawio)
+							{
+								showError(prevDiv, 'Unsupported file format');
+								selectedFile = null;
+								spinner.stop();
+							}
+						}
+						
+						if (file.type.indexOf('image') == 0)
+						{
+							reader.readAsDataURL(file);
+						}
+						else
+						{
+							reader.readAsText(file);
+						}
+					}
+					
+					selectedFile = file;
+				}					
+				else
+				{
+					AC.$('#filenameError' + idSuffix).innerHTML = 'Please select a single file only';
+				}
+			}
+			
+			// Resets input to force change event for same file (type reset required for IE)
+			this.type = '';
+			this.type = 'file';
+			this.value = '';
+			evt.preventDefault();
+		});
+			
+		function removeErrMsg() 
+		{
+			AC.$('#' + this.id + 'Error' + idSuffix).innerHTML = '';
+		};
+		
+		AC.$('#width' + idSuffix).addEventListener('change', removeErrMsg);
+		AC.$('#height' + idSuffix).addEventListener('change', removeErrMsg);
+		
+		if (getFileInfoFn)
+		{
+			var prevDiv = AC.$('#preview' + idSuffix);
+			prevDiv.innerHTML = '';
+			spinner.spin(prevDiv);
+			
+			getFileInfoFn(function(fileInfo, fileContent)
+			{
+				var altSubmitBtn = AP.dialog.createButton({
+					  text: fileInfo? 'Save' : 'Insert',
+					  identifier: 'altSubmitBtn'
+				});
+				altSubmitBtn.bind(genericOnSubmit);
+				altSubmitBtn.disable();
+				var autoSize = true;
+				
+				if (fileInfo && fileInfo.attId)
+				{
+					autoSize = fileInfo.autoSize == '1';
+					AC.$('#width' + idSuffix).value = fileInfo.width;
+					AC.$('#height' + idSuffix).value = fileInfo.height;
+					AC.$('#filename' + idSuffix).value = fileInfo.filename;
+					
+					editedFile = fileInfo;
+					
+					if (fileInfo.isDrawio == '1')
+					{
+						if (fileInfo.mimeType == 'image/png')
+						{
+							fileContent = AC.extractGraphModelFromPng(fileContent);
+						}
+						
+						var doc = mxUtils.parseXml(fileContent);
+						
+						try
+						{
+							prevDrawioFile(doc, prevDiv, fileInfo.filename, fileInfo.aspect);
+						}
+						catch(e)
+						{
+							showError(prevDiv, 'Attachment file "' + fileInfo.filename + '" is corrupted');
+						}
+					}
+					else
+					{
+						prevImageFile(fileContent, prevDiv, null, function()
+						{
+							showError(prevDiv, 'Attachment file "' + fileInfo.filename + '" is corrupted');
+						});
+					}
+				}
+				else
+				{
+					spinner.stop();
+				}
+				
+				AC.$('#autoSize' + idSuffix).checked = autoSize;
+				autoSizeChanged(autoSize);
+			}, function(fileInfo)
+			{
+				if (fileInfo != null && fileInfo.filename == null)
+				{
+					prevDiv.innerHTML = '<a style="display:block;text-align:center;position:absolute;' +
+						'top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer">Choose a file...</button>'
+					
+					prevDiv.getElementsByTagName('a')[0].addEventListener('click', function(evt) 
+					{
+						document.getElementById('filePicker').click();
+						evt.preventDefault();
+					});
+				}
+				else
+				{
+					showError(prevDiv, fileInfo? 'Failed to load attachment file "' + fileInfo.filename + '"' : 'Unexpected Error');
+				}
+			});
+		}
+	};
+	
+	function autoSizeChanged(isChecked)
+	{
+		if(isChecked) 
+		{
+			AC.$('#width' + idSuffix).setAttribute('disabled', 'disabled');
+			AC.$('#height' + idSuffix).setAttribute('disabled', 'disabled');
+		}
+		else 
+		{
+			AC.$('#width' + idSuffix).removeAttribute('disabled');
+			AC.$('#height' + idSuffix).removeAttribute('disabled');
+		}	
+	};
+	
+	AC.$('#autoSize' + idSuffix).addEventListener('change', function(evt) 
+	{
+		autoSizeChanged(this.checked);
+	});
+	
+	function loadAtlassianApi() 
+	{
+		var script = document.createElement('script');
+
+		script.onload = function() 
+		{
+			AP.dialog.disableCloseOnSubmit();
+			
+			//TODO when conf bug of submit is fixed, re-enable this and remove the button above 
+			AP.dialog.getButton('submit').hide();
+			
+			AP.events.on('dialog.submit', genericOnSubmit);
+			AP.dialog.getButton('submit').disable();
+			main();
+		};
+		
+		script.src = 'https://connect-cdn.atl-paas.net/all.js';
+		script.setAttribute('data-options', 'resize:false;margin:false');
+		head.appendChild(script);
+	};
+	
+	// Loads APIs
+	if (!notStandalone)
+	{
+		loadAtlassianApi();
+	}
+	else
+	{
+		main();
+	}
+};
+
diff --git a/src/main/webapp/connect/bitbucket/connect-dev.json b/src/main/webapp/connect/bitbucket/connect-dev.json
new file mode 100644
index 000000000..b339020ca
--- /dev/null
+++ b/src/main/webapp/connect/bitbucket/connect-dev.json
@@ -0,0 +1,29 @@
+{
+  "key": "com.mxgraph.bitbucket.plugins.diagramly",
+  "name": "Draw.io Viewer",
+  "description": "Viewer for files created with draw.io",
+  "baseUrl": "https://8d3077df.ngrok.io",
+  "modules": {
+    "fileViews": [
+      {
+        "key": "diagram",
+        "name": {
+          "value": "Diagram"
+        },
+        "url": "/viewer.html?repo={repo_uuid}&cset={file_cset}&path={file_path}&name={file_name}",
+        "file_matches": {
+        	"extensions": ["xml"]
+        }
+      }
+    ],
+    "oauthConsumer": {
+      "clientId": "Ss8dQHwm4RaeMqCaak"
+    }
+  },
+  "scopes": [
+    "repository"
+  ],
+  "contexts": [
+    "personal"
+  ]
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/bitbucket/viewer.html b/src/main/webapp/connect/bitbucket/viewer.html
new file mode 100644
index 000000000..ff4b227e7
--- /dev/null
+++ b/src/main/webapp/connect/bitbucket/viewer.html
@@ -0,0 +1,200 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Draw.io Viewer</title>
+<script src="https://bitbucket.org/atlassian-connect/all.js"></script>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/logo-flat.png);
+	background-repeat:no-repeat;
+	background-position:center;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+// Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+
+// Overrides browser language with Confluence user language
+var lang = getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript">
+(function()
+{
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	var srcRawUrl = '/1.0/repositories/{}/' + RBR.queryParam('repo') +
+    	'/raw/' + RBR.queryParam('cset') +
+    	'/' + RBR.queryParam('path');  
+
+	var tbHeight = GraphViewer.prototype.toolbarHeight;
+	var border = 8;
+
+	document.body.style.backgroundImage = 'url(/images/ajax-loader.gif)';
+
+	function main()
+	{
+		//keeping the block of AP.require to minimize the number of changes!
+		{
+			AP.request(
+			{
+				url: srcRawUrl,
+				responseType: 'text/plain',
+			    success: function (xml)
+			    {                
+					
+					// LATER: Fix horizontal alignment ignored with 100% width of iframe
+					// LATER: Fix page scrolling on touch device if trigger event on diagram
+					// LATER: Hide toolbar after second container click for iOS
+					// LATER: Disable responsive resize while lightbox shows
+					var container = document.createElement('div');
+					container.style.cssText = 'position:absolute;box-sizing:border-box;' +
+						'max-width:100%;margin-bottom:' + tbHeight +'px;border:1px solid transparent;';
+					document.body.appendChild(container);
+					var doc = mxUtils.parseXml(xml);
+					
+					var viewer = new GraphViewer(container, doc.documentElement,
+						{highlight: '#3572b0', 'toolbar-position': 'top', nav: true,
+						'max-height': screen.height / 1.5,
+						toolbar: 'zoom layers lightbox', title: name, border: border});
+
+					// Handles resize of iframe after zoom
+					var graphDoResizeContainer = viewer.graph.doResizeContainer;
+					
+					function updateHeight()
+					{
+						AP.resize('100%', container.offsetHeight + tbHeight);
+					}
+					
+					viewer.graph.doResizeContainer = function(width, height)
+					{
+						graphDoResizeContainer.apply(this, arguments);
+						updateHeight();
+					};
+
+					// Updates the size of the iframe in responsive cases
+					viewer.updateContainerHeight = function(container, height)
+					{
+						updateHeight();
+					};
+					
+					updateHeight();
+					
+					viewer.showLightbox = function()
+					{
+		                dialog.create(
+		                {
+		                    header: name,
+		                	key: 'lightbox',
+		                    size: 'fullscreen',
+		                    customData: {id: id, name: name},
+		                    chrome: true
+		                });
+					};
+					
+					
+			    },
+			    error: function(err)
+			    {
+					document.body.innerHTML = 'Failed to load source file from Bitbucket. (' +
+						JSON.stringify(err) + ')';
+			    }
+			});
+			
+		};
+	};
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	var validSize = document.documentElement.offsetWidth > 0;
+
+	function mainBarrier()
+	{
+		if (validSize && bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	// Workaround for collapsed side panel is to delay main until size is not 0
+	if (!validSize)
+	{
+		var listener = function()
+		{
+			if (document.documentElement.offsetWidth > 0)
+			{
+				window.removeEventListener('resize', listener);
+				validSize = true;
+				mainBarrier();
+			}
+		};
+		
+		window.addEventListener('resize', listener);
+	}
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+
+	script.src = baseUrl + '/atlassian-connect/all.js';
+	script.setAttribute('data-options', 'sizeToParent:true;');
+	document.getElementsByTagName('head')[0].appendChild(script);
+})();
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/common/images/reader/checkmark.gif b/src/main/webapp/connect/common/images/reader/checkmark.gif
new file mode 100644
index 0000000000000000000000000000000000000000..3a40c089dca161df6fca4a63bd7b4d47f8b5bb3f
GIT binary patch
literal 891
zcmZ?wbhEHb6lD-)_|5<VX=!OiMMX6=HEnHeGiJ;<apJ`N`}ZF`di3PUlb0`FzJ2@l
z)2B~gzI^%i?c0wZKYsoC_4n^zu)a}ZGz5lx2q^w!VPs(V&!7YH2`Eo6a6~Zt=ali-
zu;5@bhp<-6i46;#82M#{L>L?zTpC3fWByDxY;xgXWyq-U*ucm*Q9v%tXJtZz2Rn}|
nm%)UIjm{GpUGyfra8PMrkrw2z*bu02W|7BatynEX1qN#X*?&p*

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/closeLargeView.gif b/src/main/webapp/connect/common/images/reader/closeLargeView.gif
new file mode 100644
index 0000000000000000000000000000000000000000..877e12819ab07028e5c79473f4a1d7e754464e50
GIT binary patch
literal 871
zcmZ?wbhEHb6lD-)_|7m2Mnhmkhk)Ww7Dfh!{|q{yPypo#1`Zd7|C}-&8x|aF<`CA3
zIk91(b29^<TL{O3q=Q|;!bvhaCO$mY$7>i>^Mikh^F&G8D3g_iDW20gA~&^YOk8qy
MwngzP9u5X;04g6LJ^%m!

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/edit.png b/src/main/webapp/connect/common/images/reader/edit.png
new file mode 100644
index 0000000000000000000000000000000000000000..84adb14a6e854c76b9a74b7757ef8b9e3bf741da
GIT binary patch
literal 271
zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RYSkfJR9T^xl_H+M9WCij$3p^r=
z85sBufiR<}hF1enP_o1|q9iy!t)x7$D3u`~F*C13&(AePq0Cs%RL|1EX2WTqq8?8d
z#}Etuw^t7G9#G(54R9}DaW^UaAMl^ixpT#e?cW@t^w)p5%BIA%{k2sGTm6;ofriJV
zqB5oyuQS}o8@^0al}RaZPyXUNit~hyRdHWcHon6=y>ALzWr<5-?5xCPVi~0;<P9&z
zUXc0E@@CQU1o5ls0<R<6E-Nn$)VFvW(zH}WYU-P7rM}_y&*a_Zqobz^JdfD)6zDDn
MPgg&ebxsLQ000$TSpWb4

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/grid.gif b/src/main/webapp/connect/common/images/reader/grid.gif
new file mode 100644
index 0000000000000000000000000000000000000000..f4e7063e878d67961b48bea089c180c9b838dbdc
GIT binary patch
literal 56
zcmZ?wbhEHb<YM4rn8*ME|Ns9#bLI??RQ$=p$iTqNpaT*G$ulr<Ug=wT`Yr$B999Nv
E0P>&_IsgCw

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/largeView.png b/src/main/webapp/connect/common/images/reader/largeView.png
new file mode 100644
index 0000000000000000000000000000000000000000..12ffe3874daca681c4a2208a2fb76ead1bae1ef5
GIT binary patch
literal 341
zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RYSkfJR9T^zbpD<_bdI{un7I;J!
zGcfQS0%1l`4X*~Epj3%#L`iUdT1k0gQ7S_~VrE{6o}X)oLYc9ish**M!Iz?iKvfq#
zT^vI!{NGN|<zq4wa0?f#6FMYo!N}Ck(0rhPfyc3kQGw%K!-0nrQdrp^@XcvtRuJT<
zxPQr0>y|FxX8p>WZ&N-kz3XGX`oqfP<2M5o9l6);U*^;yyKk<rsF2RZU(dB#J~;Dh
zO}TKySk2kI!YTVsau0XZeZj>Gk8#D%;HrJJCgSgj8@9<Wel)+&KDz(KBi`zxT0VWV
zCaEaDc`R#M&&9XVVfIB`Kf|v2#Ug8Dk6-BBe6O9$@K3<o9Xx*>*3ICNUDUMH&Q&t^
j%Eha@!xl1adcz#tV8HujTjf%q=NLR){an^LB{Ts5#wdR*

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/remove.png b/src/main/webapp/connect/common/images/reader/remove.png
new file mode 100644
index 0000000000000000000000000000000000000000..0fda004073649022c7d97af685c2e72d6749f9c7
GIT binary patch
literal 215
zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RYSkfJR9T^xl_H+M9WCij$3p^r=
z85sBufiR<}hF1enP_o1|q9iy!t)x7$D3u`~F*C13&(AePq0Cs%RL|1EX2WTqq7Y9P
z#}Etu<RAb4+cR%9yvoaBS&+b!%5bZj_c6B-&-6z|EfXv@seUn>BBjZg?jra}&qr>y
zvK#NwdA{z4MY6xS@K3v_(i&M8puB$ZY(s-q6H7Zr200&gqvsbgt^>_y@O1TaS?83{
F1ONm(KQ#aV

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/zoomActual.png b/src/main/webapp/connect/common/images/reader/zoomActual.png
new file mode 100644
index 0000000000000000000000000000000000000000..7ef23dccd806cc71844493c4a07c1f3e13623f63
GIT binary patch
literal 256
zcmeAS@N?(olHy`uVBq!ia0vp^q9Dw{1|(OCFP#RYSkfJR9T^xl_H+M9WCij$3p^r=
z85sBufiR<}hF1enP_o1|q9iy!t)x7$D3u`~F*C13&(AePq0Cs%RL|1EX2WTqqFPTE
z#}Etuw^JPX4k&Q2)bjrSuc)gguxaCspf8tZCD<I;u;${iGi$9*H7adzKCc?x-;=e*
zT;ovfqq&=}tq*;*JLTB%s@*Hr%-1?}{e82Lptnm{g5Qde$;vM@(yjh^Xqr_n331bt
y|IhWyYvuRT%^!O9`PrVeX^_wAfBN|UOUCvd?{(jA?kEI0gu&C*&t;ucLK6TuM_?8J

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/zoomFit.gif b/src/main/webapp/connect/common/images/reader/zoomFit.gif
new file mode 100644
index 0000000000000000000000000000000000000000..fbf42f77e6ccd7892ff54f0999c330eea4695c66
GIT binary patch
literal 916
zcmZ?wbhEHb6lD-)_|5<V0s;aG3JL}W24LPOF&Y9RC<GLLvM@3*{AbVs`5BZa7&r<U
z{&UKBY*=uxnS-AxV#b6AP7F+nc5^&FKD6%;mo)2H@$r#cyMl3)j75UNu?`t`H<5-*
zDPFz8k@LQ2Y<hf@K{q-`CBjJkY`=YT-W<;@iGkBO`}rzvTz+t|o{`~!%a1Ser<bVZ
Ts<lRLe&pAq)oaAV!C(yl)>}3<

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/zoomIn.gif b/src/main/webapp/connect/common/images/reader/zoomIn.gif
new file mode 100644
index 0000000000000000000000000000000000000000..56ccdc1e2a5450609bf5dfea0495325bc33a02fa
GIT binary patch
literal 901
zcmZ?wbhEHb6lD-)_|5<VYHDf*1_lWU2?YfOV1ZF$Gz3OU2q^w!VPs(V&!7YHFepzj
za3nGO=ali-u;5@bhp<-6i46-G7z9{NL^w7o9cdHb<WVUIeCXW!pNZp%hGF9I3C#X-
zdn6X5p03y8ohRZc*x=5fkU1%4Mq#o~i<s`Tm>&j@_P0B$bGfXVqHuYcH@m}Juc?U+
G4AubEtSwyt

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/images/reader/zoomOut.gif b/src/main/webapp/connect/common/images/reader/zoomOut.gif
new file mode 100644
index 0000000000000000000000000000000000000000..7ece5baa50c0f2862114f5b396f5ce20ead59c8f
GIT binary patch
literal 898
zcmZ?wbhEHb6lD-)_|5<VYHDf*1_lWU2?YfOV1ZF$Gz3OU2q^w!VPs(V&!7YHFepzj
zaKtnG=ali-u;5@bhp<-6i46-G7z9{NL^w7o9cdHb<WVUIeCXWEV(H~`V`IX}W^v{f
zAwS<Qahxu~Si!<jq}(u3CG*yllNT1b&M{X0SItrK=)!C_P9a~bfCCK60u~$ba4=W{
E0Gn1VhyVZp

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/common/js/mxProperties.js b/src/main/webapp/connect/common/js/mxProperties.js
new file mode 100644
index 000000000..54d53765e
--- /dev/null
+++ b/src/main/webapp/connect/common/js/mxProperties.js
@@ -0,0 +1,115 @@
+var ATLAS_RESOURCE_BASE = '../..';
+var RESOURCES_PATH = ATLAS_RESOURCE_BASE + '/resources';
+var RESOURCE_BASE = RESOURCES_PATH + '/dia';
+var STENCIL_PATH = ATLAS_RESOURCE_BASE + '/stencils';
+var SHAPES_PATH = ATLAS_RESOURCE_BASE + '/shapes';
+var IMAGE_PATH = '../../images';
+var GRAPH_IMAGE_PATH = ATLAS_RESOURCE_BASE + '/img';
+var STYLE_PATH = '../../styles';
+var CSS_PATH = STYLE_PATH;
+var OPEN_FORM = ATLAS_RESOURCE_BASE + '/html/open.html';
+var TEMPLATE_PATH = ATLAS_RESOURCE_BASE + '/templates';
+
+var mxBasePath = ATLAS_RESOURCE_BASE + '/mxgraph';
+var mxLoadResources = false;
+
+var umlDomain = false;
+var collab = null;
+
+// Specifies connection mode for touch devices (at least one should be true)
+var isLocalStorage = typeof(Storage) != 'undefined';
+var uiTheme = 'atlas';
+
+var urlParams = (function(url) {
+	var result = new Object();
+	var idx = url.lastIndexOf('?');
+
+	if (idx > 0) {
+		var params = url.substring(idx + 1).split('&');
+
+		for ( var i = 0; i < params.length; i++) {
+			idx = params[i].indexOf('=');
+
+			if (idx > 0) {
+				result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+			}
+		}
+	}
+
+	return result;
+})(window.location.href);
+
+function getLanguage() 
+{
+	var lang = urlParams['lang'];
+	
+	if (lang == null)
+	{
+		// Cannot use mxSettings here
+		if (isLocalStorage) 
+		{
+			try
+			{
+				var value = localStorage.getItem('.drawio-config');
+				
+				if (value != null)
+				{
+					lang = JSON.parse(value).language || null;
+				}
+			}
+			catch (e)
+			{
+				// cookies are disabled, attempts to use local storage will cause
+				// a DOM error at a minimum on Chrome
+				isLocalStorage = false;
+			}
+		}
+	}
+	
+	return lang;
+};
+
+var mxLanguage = getLanguage();
+
+// Add new languages here. First entry is translated to [Automatic]
+// in the menu defintion in Diagramly.js.
+var mxLanguageMap = {'i18n': '', 'id' : 'Bahasa Indonesia', 'ms' : 'Bahasa Melayu', 'bs' : 'Bosanski', 'ca' : 'Català', 'cs' : 'Čeština', 'da' : 'Dansk', 'de' : 'Deutsch', 'et' : 'Eesti', 'en' : 'English', 'es' : 'Español', 
+		'fil' : 'Filipino', 'fr' : 'Français', 'gl' : 'Galego', 'it' : 'Italiano', 'hu' : 'Magyar', 'nl' : 'Nederlands', 'no' : 'Norsk', 
+		'pl' : 'Polski', 'pt-br' : 'Português (Brasil)', 'pt' : 'Português (Portugal)', 'ro' : 'Română', 'fi' : 'Suomi', 'sv' : 'Svenska', 'vi' : 'Tiếng Việt', 'tr' : 'Türkçe',
+		'el' : 'Ελληνικά', 'ru' : 'Русский', 'sr' : 'Српски', 'uk' : 'Українська', 'he' : 'עברית',
+		'ar' : 'العربية', 'th' : 'ไทย', 'ko' : '한국어', 'ja' : '日本語', 'zh' : '简体中文',  'zh-tw' : '繁體中文'};
+
+var mxLanguages = [];
+
+// Populates the list of supported special language bundles
+for (var lang in mxLanguageMap)
+{
+	// Empty means default (ie. browser language), "en" means English (default for unsupported languages)
+	// Since "en" uses no extension this must not be added to the array of supported language bundles.
+	if (lang != 'en')
+	{
+		mxLanguages.push(lang);
+	}
+}
+
+function mxscript(src)
+{
+	document.write('<script src="'+src+'"></scri' + 'pt>');
+};
+
+/* for debugging */
+if (urlParams['dev'] == '1') 
+{
+	var mxDevUrl = document.location.protocol + '//devhost.jgraph.com/mxgraph2';
+	var drawDevUrl = document.location.protocol + '//test.draw.io/';
+	geBasePath = mxDevUrl + '/javascript/examples/grapheditor/www/js';
+	mxBasePath = mxDevUrl + '/javascript/src';
+
+	mxscript(mxBasePath + '/js/mxClient.js');
+	mxscript(drawDevUrl + 'js/diagramly/Devel.js');
+	mxscript(drawDevUrl + 'connect/common/js/mxReader.js');
+}
+else
+{
+	mxscript('../../js/atlas.min.js');
+}
diff --git a/src/main/webapp/connect/common/js/mxReader.js b/src/main/webapp/connect/common/js/mxReader.js
new file mode 100644
index 000000000..9a4f08bc3
--- /dev/null
+++ b/src/main/webapp/connect/common/js/mxReader.js
@@ -0,0 +1,827 @@
+/**
+ * A Draw.io diagram viewer component with configurable toolbar buttons for editing, deleting and zooming buttons.
+ * Parameters :
+ * diagramName - name of the diagram
+ * attachmentId - ID of the diagram attachment
+ * ceoId - page ID or issue key
+ * readerOpts - JSON object with options :
+ * 		loadUrl - url from which to load the diagram
+ * 		editUrl - url of the editor
+ * 		stylePath - url from which to load the css
+ * 		stencilPath - url from which to load the stencils
+ * 		imagePath - url from which to load the graph mages
+ * 		resourcePath - path to the translations
+ * 		viewerToolbar - show toolbar or not
+ * 		autoSize - resizes the graph container to match the graph bounds
+ * 		width - width of the container
+ * 		height - height of the container
+ * 		disableButtons - disables all buttons
+ * 		center - should the diagram be horizontally centered or not
+ * 		evaluation - evaluation mode
+ * lightbox - boolean indicating if this viewer is a lightbox
+ * graphDocument - optional document containing the XML data
+ */
+function DrawioViewer(diagramName, attachmentId, ceoId, readerOpts, lightbox, graphDocument, connect)
+{
+	this.id = attachmentId;
+	this.diagramName = diagramName;
+	this.ceoId = ceoId;
+	this.options = readerOpts;
+	this.lightbox = lightbox;
+	this.graphDocument = graphDocument;
+	this.connect = connect;
+	this.paddingBottom = (connect) ? 0 : 30;
+
+	// Overrides browser language with Confluence user language
+	var lang = null;
+	
+	// Language is in the readOpts in Server and in the URL in Connect
+	if (!connect && readerOpts.language != null)
+	{
+		lang = readerOpts.language
+	}
+	else if (connect != null && urlParams['loc'] != null)
+	{
+		lang = urlParams['loc'];
+		var dash = lang.indexOf('-');
+		
+		if (dash >= 0)
+		{
+			lang = lang.substring(0, dash);
+		}
+	}
+	
+	// Only german and english supported currently. English is default.
+	if (lang == 'de')
+	{
+		mxClient.language = 'de';
+	}
+
+	// Special extension used for the message bundle. For this bundle there is only a German
+	// translation and the default English bundle so we temporarily override isLanguageSupported
+	// to return true only if German is used and fallback to English for all other languages.
+	var prevExtension = mxResources.extension;
+	var prevIsLangSupported = mxResources.isLanguageSupported;
+	mxResources.extension = '.txt';
+	
+	mxResources.isLanguageSupported = function(lan)
+	{
+		return lan == 'de';
+	};
+	
+	mxResources.add(this.options.resourcePath);
+	
+	// Restores previous settings
+	mxResources.extension = prevExtension;
+	mxResources.isLanguageSupported = prevIsLangSupported;
+	
+	this.buttons = this.createButtons();
+	
+	this.transparentImage = Editor.prototype.transparentImage;
+	this.extractGraphModel = Editor.prototype.extractGraphModel;
+	this.setGraphXml = Editor.prototype.setGraphXml;
+	this.readGraphState = Editor.prototype.readGraphState;
+	this.resetGraph = Editor.prototype.resetGraph;
+	this.decompress = Editor.prototype.decompress;
+	this.updateGraphComponents = Editor.prototype.updateGraphComponents;
+	this.fireEvent = Editor.prototype.fireEvent;
+	this.addListener = Editor.prototype.addListener;
+	this.originalNoForeignObject = Editor.prototype.originalNoForeignObject;
+	this.gridImage = '';
+	
+	this.addListener('resetGraphView', this.resetGraphView);
+}
+
+DrawioViewer.prototype = new mxEventSource();
+
+DrawioViewer.prototype.graph = null;
+DrawioViewer.prototype.id = null;
+DrawioViewer.prototype.toolbar = null;
+DrawioViewer.prototype.options = null;
+DrawioViewer.prototype.originX = 0;
+DrawioViewer.prototype.originY = 0;
+DrawioViewer.prototype.popupWindow = null;
+DrawioViewer.prototype.buttons = {};
+
+DrawioViewer.prototype.graphXmlString = null;
+
+DrawioViewer.prototype.installToolbar = function()
+{
+	this.toolbar = document.createElement('div');
+	var toolbar = this.toolbar;
+	var container = this.graph.container;
+	toolbar.id = 'diagramly-reader-toolbar-' + this.id;
+	toolbar.className = 'diagramly-reader-toolbar';
+	toolbar.style.position = 'absolute';
+	
+	container.parentNode.appendChild(toolbar);
+
+	toolbar.style.height = '30px';
+	toolbar.style.width = this.countVisibleButtons() * 29 + 'px';
+
+	// Makes sure the toolbar is always visible and
+	// disables toolbar for all overflow content
+	container.parentNode.style.overflow = 'visible';
+	
+	if (this.lightbox)
+	{
+		toolbar.style.bottom = '4px';
+		toolbar.style.left = '50%';
+		toolbar.style.width = this.countVisibleButtons() * 29 + 'px';
+		toolbar.style.marginLeft = -Math.round(this.countVisibleButtons() * 29 / 2) + 'px'
+	}
+	else
+	{
+		container.parentNode.style.paddingBottom = this.paddingBottom + 'px';
+
+		var bs = this.graph.getBorderSizes();
+		toolbar.style.bottom = (container.offsetTop + bs.y + 4) + 'px';
+		toolbar.style.left = (container.offsetLeft + bs.x) + 'px';
+	
+		if (!mxClient.IS_TOUCH) 
+		{
+			toolbar.style.display = 'none';
+			
+			$(container.parentNode).hover(function() 
+			{
+				toolbar.style.bottom = (container.offsetTop + bs.y + 4) + 'px';
+				toolbar.style.left = (container.offsetLeft + bs.x) + 'px';
+				
+				$(toolbar).fadeIn(100);
+			},
+			function() 
+			{
+				$(toolbar).fadeOut(100);
+			});
+		}
+	}
+}
+
+DrawioViewer.prototype.countVisibleButtons = function() 
+{
+	var counter = 0;
+	
+	for(var key in this.buttons) 
+	{
+		var button = this.buttons[key];
+		
+		if (button.visible)
+		{
+			counter++;
+		}
+	}
+	
+	return counter;
+}
+
+DrawioViewer.prototype.init = function()
+{
+	this.loadStylesheet();
+	
+	// Makes the shadow brighter
+	mxConstants.SHADOWCOLOR = '#000000';
+	mxConstants.SHADOW_OPACITY = 0.25;
+	this.graph.setEnabled(false);
+	this.graph.autoScroll = false;
+	this.graph.container.style.overflow = 'hidden';
+	this.graph.container.style.cursor = 'move';
+	
+	// Panning only enabled in lightbox to allow text selection in viewer
+	this.graph.setPanning(true);
+	
+	// Workaround for context trigger starting panning if ignoreCell is true
+	this.graph.panningHandler.useLeftButtonForPanning = true;
+	this.graph.panningHandler.usePopupTrigger = false;
+	this.graph.panningHandler.ignoreCell = true;
+	
+	this.graph.panningHandler.isForcePanningEvent = function(me)
+	{
+		return mxEvent.isLeftMouseButton(me.getEvent());
+	};
+
+	// Folding only enabled in lightbox
+	this.graph.foldingEnabled = this.lightbox;
+	
+	// Overrides click handler to ignore graph enabled state
+	if (this.graph.foldingEnabled)
+	{
+		this.graph.cellRenderer.createControlClickHandler = function(state)
+		{
+			var graph = state.view.graph;
+			
+			return function (evt)
+			{
+				var collapse = !graph.isCellCollapsed(state.cell);
+				graph.foldCells(collapse, false, [state.cell], null, evt);
+				mxEvent.consume(evt);
+			};
+		};
+	}
+	else
+	{
+		// Hides collapse/expand icon if folding is disabled
+		this.graph.getFoldingImage = function()
+		{
+			return null;
+		};
+	};
+
+	// HTML entities are displayed as plain text in wrapped plain text labels
+	this.graph.cellRenderer.getLabelValue = function(state)
+	{
+		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+		
+		if (state.view.graph.isHtmlLabel(state.cell))
+		{
+			if (state.style['html'] != 1)
+			{
+				result = mxUtils.htmlEntities(result, false);
+			}
+			else
+			{
+				result = state.view.graph.sanitizeHtml(result);
+			}
+		}
+		
+		return result;
+	};
+
+	// Enables links if graph is "disabled" (ie. read-only)
+	this.graph.click = function(me)
+	{
+		var cell = me.getCell();
+		
+		if (cell != null && !me.isConsumed() && (mxEvent.isTouchEvent(me.getEvent()) ||
+			mxEvent.isLeftMouseButton(me.getEvent())))
+		{
+			var href = this.getLinkForCell(cell);
+			
+			// Test cases:
+			// 1) the relative link without the Conf base path, with a leading slash, e.g. /download/attachment/....
+			// 2) the relative link with the Conf base path, with a leading slash, e.g. /confluence/download/attachmentss/...
+			// 3) the relative link without the conf base path, without a leading slash, e.g. download/attachments/...
+			// 4) the full absolute path, e.g. https://localhost:1990/confluence/download/attachments/...
+			// 5) full path without protocol, e.g. //confluence/download/attachments/...
+
+			if (href != null)
+			{
+				var r = new RegExp('^(?:[a-z]+:)?//', 'i'); // https://stackoverflow.com/questions/10687099/how-to-test-if-a-url-string-is-absolute-or-relative
+				
+				if (!r.test(href))
+				{
+					// relative link
+
+					if (href.lastIndexOf('/', 0) !== 0) // http://stackoverflow.com/a/4579228/226469 seems to be the fastest check
+					{
+						// Need a leading slash in case we need to prepend the base path
+						href = '/' + href;
+					}
+
+					// var cp = AJS.Confluence.getContextPath(); // TODO confluence call in a common module
+					
+					// Originally, links included the base path (but not the host), so there might be cases of the base path
+					// already being prepended. If the base path has changed, we can't recover those cases
+					// window.location.href = href.substring(0, cp.length) === cp ? href : cp + href; // prepends the context path if it's not already there
+					window.location.href = href;
+				}
+				else
+				{
+					// Test if it's an absolute URL, but on the same domain (i.e. open in same window)
+					// There's a security setting (unknown which) that seems to stop the IE hack below working in
+					// IE 11, https://desk.draw.io/browse/DS-175, https://desk.draw.io/browse/DFCS-52
+					// Worst case is these users will open an absolute same domain link in a window
+
+					var link = document.createElement('a');
+					link.href = href;
+					link.href = link.href; // hack to populate 'host' under IE
+				
+					if (link.host === location.host)
+					{
+						window.location.href = href;
+					}
+					else
+					{
+						window.open(href);
+					}
+				}
+			}
+			
+			me.consume();
+		}
+	};
+
+	this.graph.setTooltips(!mxClient.IS_TOUCH);
+
+	if (this.options.width != null) 
+	{
+		this.graph.container.style.width = this.options.width + 'px';
+	}
+	
+	if (this.options.height != null) 
+	{
+		this.graph.container.style.height = this.options.height + 'px';
+	}
+
+	// Accumulates the zoom factor while the rendering is taking place
+	// so that not the complete sequence of zoom steps must be painted
+	var graph = this.graph;
+	graph.updateZoomTimeout = null;
+	graph.cumulativeZoomFactor = 1;
+	
+	graph.lazyZoom = function(zoomIn)
+	{
+		if (this.updateZoomTimeout != null)
+		{
+			window.clearTimeout(this.updateZoomTimeout);
+		}
+
+		if (zoomIn)
+		{
+			this.cumulativeZoomFactor *= this.zoomFactor;
+		}
+		else
+		{
+			this.cumulativeZoomFactor /= this.zoomFactor;
+		}
+		
+		this.cumulativeZoomFactor = Math.round(this.view.scale * this.cumulativeZoomFactor * 100) / 100 / this.view.scale;
+		
+		this.updateZoomTimeout = window.setTimeout(mxUtils.bind(this, function()
+		{
+			this.zoom(this.cumulativeZoomFactor);					
+			this.cumulativeZoomFactor = 1;
+			this.updateZoomTimeout = null;
+		}), 20);
+	};
+	
+	if (this.lightbox)
+	{
+		mxEvent.addMouseWheelListener(mxUtils.bind(this, function(evt, up)
+		{
+			if (!mxClient.IS_MAC || !mxEvent.isControlDown(evt))
+			{
+				var source = mxEvent.getSource(evt);
+				
+				while (source != null)
+				{
+					if (source == graph.container)
+					{
+						graph.lazyZoom(up);
+						mxEvent.consume(evt);
+						
+						return;
+					}
+					
+					source = source.parentNode;
+				}
+			}
+		}));
+	}
+};
+
+DrawioViewer.prototype.resetGraphView = function()
+{
+	this.graph.pageBreaksVisible = false;
+	this.graph.preferPageSize = false;
+	this.graph.pageVisible = false;
+	
+	if (!this.lightbox)
+	{
+		var update = mxUtils.bind(this, function()
+		{
+			this.graph.centerZoom = this.graph.panningHandler.panningEnabled;
+			
+			// If width and height are specified the height is overridden to match the diagram size
+			var autoSizeWidth = this.options.width == null;
+			var autoSizeHeight = this.options.height == null;
+			var bounds = this.graph.getGraphBounds();
+			var ratio = bounds.width / bounds.height;
+			
+			var width = autoSizeWidth ? bounds.width + 2 : this.options.width;
+			var height = autoSizeHeight ? (width / ratio) + 1 : this.options.height;
+	
+			this.graph.container.style.width = Math.ceil(width) + 'px';
+			this.graph.container.style.height = Math.ceil(height) + 'px';
+			this.graph.container.style.maxWidth = '100%';
+			
+			if (autoSizeWidth && autoSizeHeight)
+			{
+				this.translateOrigin();
+				
+				// Used for fast restore of initial position in zoom to fit button
+				this.initialX = this.graph.view.translate.x;
+				this.initialY = this.graph.view.translate.y;
+			}
+			else if (this.options.zoomToFit)
+			{
+				this.graph.fit();
+			}
+	
+			//set the border after calling updateGraphComponnets() because the call sets it to ''
+			this.graph.container.style.border = this.options.border ? '1px solid #DDDDDD' : 'none';
+			this.graph.container.style.backgroundColor = (this.graph.background == null ||
+					this.graph.background == 'none') ? '#ffffff' : this.graph.background;
+		});
+		
+		// Workaround for invisible container is to move the container to the document body for rendering
+		if (!this.connect && (this.graph.container.clientWidth == 0 || this.graph.container.clientHeight == 0))
+		{
+			var previousParent = this.graph.container.parentNode;
+			var nextSibling = this.graph.container.nextSibling;
+			var prevPosition = this.graph.container.style.position;
+			var prevVisible = this.graph.container.style.visible;
+			
+			// Moves to document body for rendering (needed for text measuring)
+			this.graph.container.style.position = 'absolute';
+			this.graph.container.style.visible = 'hidden';
+			
+			document.body.appendChild(this.graph.container);
+			
+			// Refresh required in visible DOM to update text bounding boxes
+			this.graph.refresh();
+			update();
+			
+			// Move it back into DOM tree position
+			if (nextSibling != null)
+			{
+				nextSibling.parentNode.insertBefore(this.graph.container, nextSibling);
+			}
+			else
+			{
+				previousParent.appendChild(this.graph.container);
+			}
+			
+			// Restore position CSS
+			this.graph.container.style.visible = prevVisible;
+			this.graph.container.style.position = prevPosition;
+		}
+		else
+		{
+			update();
+		}
+	}
+	else
+	{
+		this.graph.container.style.backgroundColor = (this.graph.background == null ||
+			this.graph.background == 'none') ? '#ffffff' : this.graph.background;
+	}
+};
+
+DrawioViewer.prototype.translateOrigin = function()
+{
+	var bounds = this.graph.getGraphBounds();
+	this.graph.view.setTranslate(this.originX - Math.floor(bounds.x), this.originY - Math.floor(bounds.y));
+};
+
+DrawioViewer.prototype.loadGraph = function(diagramName, ceoId)
+{
+	var spinner = this.createSpinner(this.graph.container);
+
+	try
+	{
+		mxUtils.get(this.options.loadUrl, mxUtils.bind(this, function(req)
+		{
+			spinner.stop();
+			
+			if (req.getStatus() < 200 || req.getStatus() > 299)
+			{
+				this.showWarning(mxResources.get('error') + ' ' + req.getStatus());
+				this.graph.container.style.border = this.options.border ? '1px solid #DDDDDD' : 'none';
+				this.graph.container.style.backgroundColor = '#ffffff';
+				this.graph.container.style.height = '20px';
+			}
+			else
+			{
+				var json = JSON.parse(req.getText());
+				this.graphXmlString = json.xml;
+				var doc = mxUtils.parseXml(json.xml);
+				this.xmlDoc = doc;
+				this.filename = json.filename;
+				this.setGraphXml(doc.documentElement);
+				this.graphDocument = doc;
+			}
+		}),
+		function()
+		{
+			spinner.stop();
+		});
+	}
+	catch (e)
+	{
+		spinner.stop();
+	}
+};
+
+DrawioViewer.prototype.loadStylesheet = function()
+{
+	var node = mxUtils.load(this.options.stylePath + '/default.xml').getDocumentElement();
+	var dec = new mxCodec(node.ownerDocument);
+	dec.decode(node, this.graph.getStylesheet());
+};
+
+DrawioViewer.prototype.renderButtons = function()
+{
+	for (var key in this.buttons) 
+	{
+		var button = this.buttons[key];
+		
+		if (button.visible) 
+		{
+			this.addToolbarButton(this.toolbar, button);
+		}
+	}
+};
+
+DrawioViewer.prototype.addToolbarButton = function(toolbar, drawioButton)
+{
+	var enabled = typeof drawioButton.enabled === 'undefined' ? true : enabled;
+	var button = drawioButton.linkButton ? document.createElement('a') : document.createElement('div');
+	button.className = 'diagramly-reader-toolbar-button';
+
+	if (drawioButton.icon != null)
+	{
+		var img = document.createElement('img');
+		img.setAttribute('src', drawioButton.icon);
+		img.style.verticalAlign = 'middle';
+		img.style.marginRight = '2px';
+		button.appendChild(img);
+		button.title = drawioButton.label;
+	}
+
+	if (!drawioButton.enabled)
+	{
+		button.style.opacity = 0.2;
+
+	} else
+	{
+		if(drawioButton.linkButton) 
+		{
+			button.href = drawioButton.url;
+		}
+		else 
+		{
+			mxEvent.addListener(button, 'click', function(evt)
+			{
+				drawioButton.clickHandler.apply(this, arguments);
+			});
+		}
+		mxEvent.addListener(button, 'mouseover', function(evt)
+		{
+			button.className += ' diagramly-reader-toolbar-button-hover';
+		});
+		mxEvent.addListener(button, 'mouseout', function(evt)
+		{
+			button.className = 'diagramly-reader-toolbar-button';
+		});
+	}
+
+	toolbar.appendChild(button);
+	return button;
+};
+
+DrawioViewer.prototype.createSpinner = function(container)
+{
+	var opts =
+	{
+		lines : 12, // The number of lines to draw
+		length : 12, // The length of each line
+		width : 5, // The line thickness
+		radius : 10, // The radius of the inner circle
+		rotate : 0, // The rotation offset
+		color : '#000', // #rgb or #rrggbb
+		speed : 1, // Rounds per second
+		trail : 60, // Afterglow percentage
+		shadow : false, // Whether to render a shadow
+		hwaccel : false, // Whether to use hardware acceleration
+		className : 'spinner', // The CSS class to assign to the spinner
+		zIndex : 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	return new Spinner(opts).spin(container);
+};
+
+DrawioViewer.prototype.show = function(container) 
+{
+	this.graph = new Graph(container);
+	this.graph.id = this.id;
+	this.init();
+
+	// Uses the XML document that was loaded for the viewer in the lightbox
+	if (this.graphDocument != null)
+	{
+		this.setGraphXml(this.graphDocument.documentElement);
+	}
+	else
+	{
+		this.loadGraph(this.diagramName, this.ceoId);
+	}
+	
+	if (this.options.viewerToolbar) 
+	{
+		this.installToolbar();
+		this.renderButtons();
+	}
+	
+	if (this.options.licenseStatus == 'NO_LICENSE') 
+	{
+		this.showWarning(mxResources.get('drawio.reader.noLicense'));
+	} 
+	else if (this.options.licenseStatus == 'EVAL_LICENSE') 
+	{
+		this.showWarning(mxResources.get('drawio.reader.evaluation'));
+	} 
+	else if (this.options.licenseStatus == 'EVAL_EXPIRED') 
+	{
+		this.showWarning(mxResources.get('drawio.reader.evaluationExpired'));
+	} 
+	else if (this.options.licenseStatus == 'VERSION_MISMATCH') 
+	{
+		this.showWarning(mxResources.get('drawio.reader.versionMismatch', ['https://support.draw.io/pages/viewpage.action?pageId=11829320']));
+	}
+	else if (this.options.licenseStatus == 'USER_MISMATCH') 
+	{
+		this.showWarning(mxResources.get('drawio.reader.userMismatch', ['https://support.draw.io/pages/viewpage.action?pageId=11829323']));
+	}
+	
+	
+};
+
+DrawioViewer.prototype.showWarning = function(msg) 
+{
+	var div = document.createElement('div');
+	div.style.position = 'absolute';
+	div.style.overflow = 'hidden';
+	div.style.left = '0px';
+	div.style.top = '0px';
+	div.style.right = '0px';
+	div.style.fontSize = '12px';
+	div.style.margin = '2px';
+	mxUtils.setOpacity(div, 50);
+	div.style.color = 'gray';
+	div.style.textAlign = 'center';
+	div.style.whiteSpace = 'nowrap';
+	span = document.createElement('span');
+	span.innerHTML = msg;
+	
+	div.appendChild(span);
+	
+	this.graph.container.parentNode.appendChild(div);
+};
+
+DrawioViewer.prototype.showLightbox = function() 
+{
+	console.log('Lightbox feature not implemented.');
+};
+
+DrawioViewer.prototype.createButtons = function() 
+{
+	var viewer = this;
+	var buttons = {}; 
+	
+	var enableButton = typeof this.options.disableButtons === 'undefined' ? true : !this.options.disableButtons;
+	var canEdit = this.options.userCanEdit && enableButton;
+	var canRemove = this.options.userCanRemove && enableButton;
+
+	var autoSizeWidth = this.options.width == null;
+	var autoSizeHeight = this.options.height == null;
+	
+	buttons[DrawioViewerActions.EDIT] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.edit'),
+		icon : viewer.options.imagePath + '/edit.png', 
+		url : viewer.options.editUrl,
+		enabled : canEdit,
+		linkButton : true
+	});
+	
+	buttons[DrawioViewerActions.REMOVE] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.remove'),
+		icon : viewer.options.imagePath + '/remove.png', 
+		clickHandler : function()
+		{
+			if (confirm(mxResources.get('diagramly.reader.confirmDelete')))
+			{
+				window.location.href = viewer.options.removeUrl;
+			}
+		},
+		enabled : canRemove
+	});
+	
+	buttons[DrawioViewerActions.ACTUAL_SIZE] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.zoomActual'),
+		icon : viewer.options.imagePath + '/zoomActual.png', 
+		clickHandler : function()
+		{
+			viewer.graph.zoomActual();
+			viewer.translateOrigin();
+		},
+		enabled : enableButton
+	});
+	
+	buttons[DrawioViewerActions.ZOOM_TO_FIT] = new DrawioViewerButton(
+	{
+		label : (this.lightbox) ? mxResources.get('diagramly.reader.zoomActual') : mxResources.get('diagramly.reader.fit'),
+		icon : (this.lightbox) ? viewer.options.imagePath + '/zoomActual.png' : viewer.options.imagePath + '/zoomFit.gif', 
+		clickHandler : mxUtils.bind(this, function()
+		{
+			if (this.lightbox)
+			{
+				// NOTE: Maxscale is 1 here so only make smaller but not larger
+				viewer.graph.fit(8);
+				viewer.graph.center(true, true, null, 0.42);
+			}
+			else
+			{
+				if (autoSizeWidth && autoSizeHeight)
+				{
+					this.graph.view.scaleAndTranslate(1, this.initialX, this.initialY);
+				}
+				else
+				{
+					this.graph.fit();
+				}
+			}
+		}),
+		enabled : enableButton
+	});
+	
+	buttons[DrawioViewerActions.ZOOM_OUT] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.zoomOut'),
+		icon : viewer.options.imagePath + '/zoomOut.gif', 
+		clickHandler : function()
+		{
+			viewer.graph.zoomOut();
+		},
+		enabled : enableButton
+	});
+	
+	buttons[DrawioViewerActions.ZOOM_IN] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.zoomIn'),
+		icon : viewer.options.imagePath + '/zoomIn.gif', 
+		clickHandler : function()
+		{
+			viewer.graph.zoomIn();
+		},
+		enabled : enableButton
+	});
+	
+	buttons[DrawioViewerActions.EXPAND] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.fullScreen'),
+		icon : viewer.options.imagePath + '/largeView.png', 
+		clickHandler : mxUtils.bind(this, function()
+		{
+			this.showLightbox();
+		}),
+		enabled : enableButton
+	});
+	
+	buttons[DrawioViewerActions.CLOSE] = new DrawioViewerButton(
+	{
+		label : mxResources.get('diagramly.reader.closeFullScreen'),
+		icon : viewer.options.imagePath + '/closeLargeView.gif', 
+		clickHandler : function()
+		{
+			viewer.popupWindow.remove();
+		},
+		enabled : enableButton,
+		visible : false
+	});
+	
+	return buttons;
+};
+
+DrawioViewerActions = 
+{
+	EDIT : 'edit',
+	REMOVE : 'remove',
+	ACTUAL_SIZE : 'actualSize',
+	ZOOM_TO_FIT : 'zoomToFit',
+	ZOOM_OUT : 'zoomOut',
+	ZOOM_IN : 'zoomIn',
+	EXPAND : 'expand',
+	CLOSE : 'close'
+};
+
+function DrawioViewerButton(options) 
+{
+	this.label = options.label;
+	this.clickHandler = options.clickHandler;
+	this.enabled = typeof options.enabled != 'undefined' ? options.enabled : true;
+	this.icon = options.icon;
+	this.visible = typeof options.visible != 'undefined' ? options.visible : true;
+	this.linkButton = typeof options.linkButton != 'undefined' ? options.linkButton : false;
+	this.url = options.url;
+};
+
+DrawioViewerButton.prototype.label = null;
+DrawioViewerButton.prototype.clickHandler = null;
+DrawioViewerButton.prototype.enabled = true;
+DrawioViewerButton.prototype.icon = null;
+DrawioViewerButton.prototype.visible = true;
+DrawioViewerButton.prototype.linkButton = false;
+DrawioViewerButton.prototype.url = null;
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/message.txt b/src/main/webapp/connect/common/message.txt
new file mode 100644
index 000000000..ca37ebe41
--- /dev/null
+++ b/src/main/webapp/connect/common/message.txt
@@ -0,0 +1,90 @@
+diagramly.new.diagram=Draw.io diagram
+diagramly.edit.diagram=Edit
+diagramly.reader.edit=Edit
+diagramly.reader.remove=Remove
+diagramly.reader.fit=Zoom to fit
+diagramly.reader.zoomActual=Actual size
+diagramly.reader.zoomOut=Zoom out
+diagramly.reader.zoomIn=Zoom in
+diagramly.reader.confirmDelete=Are you sure you want to delete this diagram?
+diagramly.reader.fullScreen=Full screen
+diagramly.reader.closeFullScreen=Close
+drawio.reader.evaluation=draw.io evaluation copy
+
+#macro properties editor
+drawio.macrooptions.size.label=Size
+drawio.macrooptions.options.label=Options
+drawio.macrooptions.width.label=Width
+drawio.macrooptions.height.label=Height
+drawio.macrooptions.border.label=Border
+drawio.macrooptions.border.desc=Display a border around the graph
+drawio.macrooptions.grid.label=Grid
+drawio.macrooptions.grid.desc=Display grid on the graph reader
+drawio.macrooptions.fitWindow.label=Fit to Window
+drawio.macrooptions.fitWindow.desc=Zoom the diagram to fit the reader
+drawio.macrooptions.autoSize.label=Auto Size
+drawio.macrooptions.viewerToolbar.label=Toolbar
+drawio.macrooptions.autoSize.desc=Update width and height of the reader to fit the diagram
+drawio.macrooptions.save.button=Save
+com.mxgraph.confluence.plugins.diagramly.diagramly.desc=Draw.io is a free online diagram drawing application for workflow, BPM, org charts, UML, ER, network diagrams.
+
+diagramly.propertypanel.macrooptions=Draw.io Macro Settings
+diagramly.propertypanel.editMacro=Edit Macro
+diagramly.propertypanel.dupediagram=Duplicate
+drawio.propertypanel.size.original=Original
+
+#search labels
+diagramly.search.header=Search for diagrams
+diagramly.search.button=Search
+diagramly.search.allspaces=All spaces
+diagramly.search.description=Enter the name of a diagram
+diagramly.search.diagramName=Diagram
+diagramly.search.spaceName=Space name
+diagramly.search.lastModified=Last modified
+diagramly.search.noResults=No diagrams have been found
+diagramly.search.error=Error during search. Specified reason
+diagramly.search.select.button=Select
+diagramly.search.copy.button=Copy
+diagramly.search.import.button=Import
+diagramly.search.cancel.button=Cancel
+
+#blueprint popup create dialog
+diagramly.create.header=How do you want to create the diagram?
+diagramly.create.blank=Blank
+diagramly.create.search=Search
+diagramly.create.select.button=Select
+diagramly.create.search.button=Search
+diagramly.create.back.button=Back
+diagramly.create.cancel.button=Cancel
+
+diagramly.import.description=Select a Visio file (.vdx)
+diagramly.import.error=There was an error during import
+diagramly.duplicate.newName=Please enter the name
+diagramly.duplicate.nameConflict=Could not duplicate diagram. Please choose a different name.
+diagramly.duplicate.error=Could not duplicate diagram. Please try again later.
+diagramly.import.uploading=Uploading file...
+drawio-rest.name=Drawio Rest
+drawio-rest.description=The Drawio Rest Plugin
+drawio.pagetemplate.cantadddiagram=Diagrams cannot be added to page templates. You can only add them to pages.
+drawio.linktodiagram.button=Link to Diagram
+
+#new diagram dialog
+drawio.templates.label=Draw.io Templates
+drawio.search.recent=Recent diagrams
+drawio.template.businessprocess=Business Process
+drawio.template.charts=Charts
+drawio.template.engineering=Engineering
+drawio.template.flowcharts=Flowcharts
+drawio.template.mindmaps=Mindmaps
+drawio.template.mockups=Mockups
+drawio.template.networkdiagrams=Network Diagrams
+drawio.template.other=Other
+drawio.template.softwaredesign=Software Design
+drawio.template.venndiagrams=Venn diagrams
+drawio.template.wireframes=Wireframes
+
+drawio.admin.info=Plugin Information
+drawio.admin.config=Plugin Configuration
+drawio.admin.config.externalImageService=Use external image service
+drawio.admin.config.saveChanges=Save changes
+
diff --git a/src/main/webapp/connect/common/message_de.txt b/src/main/webapp/connect/common/message_de.txt
new file mode 100644
index 000000000..34bc15439
--- /dev/null
+++ b/src/main/webapp/connect/common/message_de.txt
@@ -0,0 +1,89 @@
+diagramly.new.diagram=Draw.io Diagramm
+diagramly.edit.diagram=Bearbeiten
+diagramly.reader.edit=Bearbeiten
+diagramly.reader.remove=Entfernen
+diagramly.reader.fit=Zoom anpassen
+diagramly.reader.zoomActual=Tatsächliche Grösse
+diagramly.reader.zoomOut=Herauszoomen
+diagramly.reader.zoomIn=Hineinzoomen
+diagramly.reader.confirmDelete=Möchten Sie das Diagramm wirklich löschen?
+diagramly.reader.fullScreen=Vollbild
+diagramly.reader.closeFullScreen=Schließen
+drawio.reader.evaluation=draw.io Testlizenz
+
+#macro properties editor
+drawio.macrooptions.size.label=Grösse
+drawio.macrooptions.options.label=Optionen
+drawio.macrooptions.width.label=Breite
+drawio.macrooptions.height.label=Höhe
+drawio.macrooptions.border.label=Rahmen
+drawio.macrooptions.border.desc=Rahmen um das Diagramm anzeigen
+drawio.macrooptions.grid.label=Gitternetz
+drawio.macrooptions.grid.desc=Gitternetz anzeigen
+drawio.macrooptions.fitWindow.label=An Fenstergrösse anpassen
+drawio.macrooptions.fitWindow.desc=Diagramm auf Fenstergrösse zoomen
+drawio.macrooptions.autoSize.label=Automatische Grösse
+drawio.macrooptions.viewerToolbar.label=Toolbar
+drawio.macrooptions.autoSize.desc=Breite und Höhe an Diagramm anpassen
+drawio.macrooptions.save.button=Speichern
+com.mxgraph.confluence.plugins.diagramly.diagramly.desc=Draw.io is a free online diagram drawing application for workflow, BPM, org charts, UML, ER, network diagrams.
+
+diagramly.propertypanel.macrooptions=Draw.io Makro Einstellungen
+diagramly.propertypanel.editMacro=Makro bearbeiten
+diagramly.propertypanel.dupediagram=Duplizieren
+drawio.propertypanel.size.original=Original
+
+#search labels
+diagramly.search.header=Nach Diagrammen suchen
+diagramly.search.button=Suchen
+diagramly.search.allspaces=Alle Bereiche
+diagramly.search.description=Geben Sie den Namen eines Diagramms ein
+diagramly.search.diagramName=Diagramm
+diagramly.search.spaceName=Bereichsname
+diagramly.search.lastModified=Zuletzt geändert
+diagramly.search.noResults=Es wurden keine Diagramme gefunden
+diagramly.search.error=Fehler bei der Suche. Ursache
+diagramly.search.select.button=Erstellen
+diagramly.search.copy.button=Kopieren
+diagramly.search.import.button=Importieren
+diagramly.search.cancel.button=Abbrechen
+
+#blueprint popup create dialog
+diagramly.create.header=Wie möchten Sie das Diagramm erstellen?
+diagramly.create.blank=Leer
+diagramly.create.search=Suchen
+diagramly.create.select.button=Erstellen
+diagramly.create.search.button=Suchen
+diagramly.create.back.button=Zurück
+diagramly.create.cancel.button=Abbrechen
+
+diagramly.import.description=Wählen Sie eine Visio-Datei (.vdx)
+diagramly.import.error=Es gab einen Fehler beim Import
+diagramly.duplicate.newName=Bitte geben Sie den Namen ein
+diagramly.duplicate.nameConflict=Diagramm konnte nicht dupliziert werden. Bitte geben Sie einen anderen Namen ein.
+diagramly.duplicate.error=Diagramm konnte nicht dupliziert werden. Bitte versuchen Sie es später.
+diagramly.import.uploading=Datei wird geladen...
+drawio-rest.name=Drawio Rest
+drawio-rest.description=Drawio Rest Plugin
+drawio.pagetemplate.cantadddiagram=Diagramme können nicht in Vorlagen sondern nur in Seiten eingefügt werden.
+drawio.linktodiagram.button=Link zum Diagramm
+
+#new diagram dialog
+drawio.templates.label=Draw.io Vorlagen
+drawio.search.recent=Zuletzt geöffnet
+drawio.template.businessprocess=Geschäftsprozesse
+drawio.template.charts=Grafiken
+drawio.template.engineering=Technik
+drawio.template.flowcharts=Ablaufdiagramme
+drawio.template.mindmaps=Mindmaps
+drawio.template.mockups=Mockups
+drawio.template.networkdiagrams=Netzwerkdiagramme
+drawio.template.other=Andere
+drawio.template.softwaredesign=Software Design
+drawio.template.venndiagrams=Venn Diagramme
+drawio.template.wireframes=Drahtgittermodelle
+
+drawio.admin.info=Plugin Information
+drawio.admin.config=Plugin Konfiguration
+drawio.admin.config.externalImageService=Externen Bild-Service verwenden
+drawio.admin.config.saveChanges=Änderungen speichern
diff --git a/src/main/webapp/connect/common/styles/plugin/aui-buttons.css b/src/main/webapp/connect/common/styles/plugin/aui-buttons.css
new file mode 100644
index 000000000..532a182c6
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/aui-buttons.css
@@ -0,0 +1,536 @@
+/* AUI BUTTONS
+ * Note hover/disabled styles set directly as they are not precisely the same as
+ * if we used straight opacity.
+ */
+
+/* Basic Button Style */
+.aui-button,
+a.aui-button,
+.aui-button:visited {
+    background: #f2f2f2;
+    background: -webkit-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:    -moz-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:     -ms-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:      -o-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:         linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
+    border: 1px solid #ccc;
+    border-radius: 3.01px;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    color: #333;
+    cursor: pointer;
+    display: inline-block;
+    font-family: inherit;
+    font-size: 14px;
+    font-variant: normal;
+    font-weight: normal;
+    height: 2.1428571428571em; /* 30px - using ems so the fields increase in line with user specified font-sizes */
+    line-height: 1.4285714285714;
+    margin: 0;
+    padding: 4px 10px;
+    text-decoration: none;
+    text-shadow: 0 1px 0 white;
+    vertical-align: baseline;
+    white-space: nowrap;
+}
+.aui-button ~ .aui-button {
+    margin-left: 10px;
+}
+/* Ensure underlines not added by link styles */
+a.aui-button:hover,
+a.aui-button:active,
+a.aui-button:focus {
+    text-decoration: none;
+}
+
+/* Control button height in Firefox. See http://www.experimentgarden.com/2010/11/firefox-buttontext-height-and-padding.html */
+.aui-button::-moz-focus-inner {
+    border: 0;
+    padding: 0;
+}
+
+.aui-button:focus,
+.aui-button:hover,
+.aui-button-subtle.aui-button:focus,
+.aui-button-subtle.aui-button:hover {
+    background: #f7f7f7;
+    background: -webkit-linear-gradient(top, #fff 0%, #f7f7f7 100%);
+    background:    -moz-linear-gradient(top, #fff 0%, #f7f7f7 100%);
+    background:     -ms-linear-gradient(top, #fff 0%, #f7f7f7 100%);
+    background:      -o-linear-gradient(top, #fff 0%, #f7f7f7 100%);
+    background:         linear-gradient(to bottom, #fff 0%, #f7f7f7 100%);
+    border-color: #999;
+    color: #000;
+    text-decoration:none;
+}
+
+.aui-button:active,
+.aui-button.active,
+.aui-header .aui-button-split-more.active,
+.aui-button-subtle.aui-button:active,
+.aui-button-subtle.aui-button.active {
+    background-image: none;
+    background-color: #f2f2f2;
+    box-shadow: inset 0 3px 6px rgba(0,0,0,.1);
+    text-shadow: none;
+    text-decoration:none;
+}
+
+/* Primary Buttons */
+.aui-button.aui-button-primary,
+.aui-button.aui-button-primary:visited {
+    background: #3068a2;
+    background: -webkit-linear-gradient(top, #4687ce 0%, #3068a2 100%);
+    background:    -moz-linear-gradient(top, #4687ce 0%, #3068a2 100%);
+    background:     -ms-linear-gradient(top, #4687ce 0%, #3068a2 100%);
+    background:      -o-linear-gradient(top, #4687ce 0%, #3068a2 100%);
+    background:         linear-gradient(to bottom, #4687ce 0%, #3068a2 100%); 
+    border-color: #486582;
+    color: #fff;
+    font-weight: bold;
+    -webkit-font-smoothing: antialiased; /* for chrome on mac */
+    text-shadow: 0 1px 0 #205081;
+}
+
+.aui-button.aui-button-primary:hover,
+.aui-button.aui-button-primary:focus {
+    background: #3673B5;
+    background: -webkit-linear-gradient(top, #5A94D3 0%, #3673B5 100%);
+    background:    -moz-linear-gradient(top, #5A94D3 0%, #3673B5 100%); 
+    background:     -ms-linear-gradient(top, #5A94D3 0%, #3673B5 100%);
+    background:      -o-linear-gradient(top, #5A94D3 0%, #3673B5 100%);
+    background:         linear-gradient(to bottom, #5A94D3 0%,#3673B5 100%);
+    border-color: #205081;
+    color: #fff;
+    text-shadow: 0 1px 0 #205081;
+}
+
+.aui-button.aui-button-primary:active {
+    background: #3673B5;
+    background-image: none;
+    background-color: #3673B5;
+    box-shadow: inset 0 3px 6px rgba(0,0,0,.1);
+    text-shadow: none;
+    text-decoration:none;
+}
+
+/* Link style buttons - used for destructive/cancel actions ONLY */
+.aui-button.aui-button-link,
+.aui-button.aui-button-link:visited  {
+    background: transparent;
+    border-color: transparent;
+    color: #3b73af;
+    padding: 5px 0;
+    text-decoration: none;
+    text-shadow: none;
+    box-shadow: none;
+}
+
+.aui-button.aui-button-link:focus,
+.aui-button.aui-button-link:hover,
+.aui-button.aui-button-link:active,
+.aui-buttons .aui-button.aui-button-link:focus,
+.aui-buttons .aui-button.aui-button-link:hover,
+.aui-buttons .aui-button.aui-button-link:active,
+.aui-buttons .aui-button.aui-button-link[aria-pressed="true"] {
+    background: transparent;
+    border-color: transparent;
+    box-shadow: none;
+    text-decoration: underline;
+}
+
+/* Subtle/hybrid/entity action/mugger buttons */
+.aui-button.aui-button-subtle {
+    background: transparent;
+    border-color: transparent;
+    color: #707070;
+}
+.aui-buttons .aui-button.aui-button-subtle {
+    border-radius: 3.01px;
+}
+.aui-button.aui-button-subtle .aui-icon {
+    margin-right: 1px;
+}
+
+/* aui-buttons groups buttons together into one button lozenge. */
+.aui-buttons {
+    display: inline-block;
+    font-size: 0;
+}
+.aui-buttons:after {
+    clear: both;
+    content: "";
+    display: table;
+}
+.aui-buttons .aui-button {
+    border-radius: 0;
+    margin: 0;
+}
+.aui-buttons .aui-button:first-child {
+    border-top-left-radius: 3.01px;
+    border-bottom-left-radius: 3.01px;
+}
+.aui-buttons .aui-button:last-child {
+    border-top-right-radius: 3.01px;
+    border-bottom-right-radius: 3.01px;
+}
+.aui-buttons + .aui-buttons {
+    margin-left: 10px;
+}
+
+/* Grouped buttons go into toolbar style */
+.aui-buttons .aui-button:focus,
+.aui-buttons .aui-button:hover,
+.aui-buttons .aui-button:active {
+    border-color: #999;
+}
+.aui-buttons .aui-button[disabled],
+.aui-buttons .aui-button[disabled]:hover,
+.aui-buttons .aui-button[disabled]:focus,
+.aui-buttons .aui-button[disabled]:active,
+.aui-buttons .aui-button[aria-disabled="true"],
+.aui-buttons .aui-button[aria-disabled="true"]:hover,
+.aui-buttons .aui-button[aria-disabled="true"]:focus,
+.aui-buttons .aui-button[aria-disabled="true"]:active {
+    border-color: #ccc;
+}
+
+
+/* Grouped Primary Buttons */
+
+/* Primary Buttons */
+.aui-buttons .aui-button.aui-button-primary {
+    background: #f2f2f2;
+    background: -webkit-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:    -moz-linear-gradient(top, #fff 0%, #f2f2f2 100%); 
+    background:     -ms-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:      -o-linear-gradient(top, #fff 0%, #f2f2f2 100%); 
+    background:         linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
+    border-color: #ccc;
+    color: #3b73af;
+    text-shadow: none;
+}
+
+.aui-buttons .aui-button ~ .aui-button {
+    border-left-width: 0;
+    padding-left: 11px;
+}
+
+.aui-buttons .aui-button.aui-button-primary:hover,
+.aui-buttons .aui-button.aui-button-primary:focus,
+.aui-buttons .aui-button.aui-button-primary:active {
+    border-color: #999;
+    color: #205081;
+}
+
+.aui-buttons .aui-button ~ .aui-button:hover,
+.aui-buttons .aui-button ~ .aui-button:focus,
+.aui-buttons .aui-button ~ .aui-button:active {
+    border-width: 1px;
+    margin-left: -1px;
+    position: relative;
+}
+
+/* Selected buttons - NOT supported for free-standing primary buttons
+ARIA usage from http://www.paciellogroup.com/blog/misc/ARIA/togglebutton.html */
+.aui-button[aria-pressed="true"],
+.aui-buttons .aui-button[aria-pressed="true"],
+.aui-buttons .aui-button[aria-pressed="true"].aui-button-primary,
+.aui-buttons .aui-button[aria-pressed="true"].aui-button-subtle {
+    background: #ccc;
+    background: -webkit-linear-gradient(top, #ccc 0%, #ddd 13%); 
+    background:    -moz-linear-gradient(top, #ccc 0%, #ddd 13%);
+    background:     -ms-linear-gradient(top, #ccc 0%, #ddd 13%); 
+    background:      -o-linear-gradient(top, #ccc 0%, #ddd 13%); 
+    background:         linear-gradient(to bottom, #ccc 0%, #ddd 13%);
+}
+
+.aui-button[aria-pressed="true"].aui-button-subtle,
+.aui-buttons .aui-button[aria-pressed="true"].aui-button-subtle {
+    color: #333;
+    border-color: #ccc;
+}
+
+.aui-buttons .aui-button[aria-pressed="true"]:active {
+    background: #ccc;
+    box-shadow: inset 0px 3px 6px rgba(0,0,0,.2);
+}
+
+
+/* Disabled states (keep last to avoid excessive selector weight)
+---------------------------------------------------------------------- */
+.aui-button[disabled],
+.aui-button[disabled]:hover,
+.aui-button[disabled]:focus,
+.aui-button[disabled]:active,
+.aui-button[aria-disabled="true"],
+.aui-button[aria-disabled="true"]:hover,
+.aui-button[aria-disabled="true"]:focus,
+.aui-button[aria-disabled="true"]:active,
+.aui-button[aria-disabled="true"][aria-pressed] {
+    background: #f2f2f2;
+    background: -webkit-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:    -moz-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:     -ms-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:      -o-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:         linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
+    border-color: #ccc;
+    box-shadow: none;
+    color: #999;
+    cursor: default;
+    text-shadow: none;
+}
+
+/* Subtle buttons have their own disabled stated*/
+.aui-button.aui-button-subtle[disabled],
+.aui-button.aui-button-subtle[aria-disabled="true"] {
+    border: 0;
+    background: none;
+}
+
+.aui-button.aui-button-primary[disabled],
+.aui-button.aui-button-primary[disabled]:hover,
+.aui-button.aui-button-primary[disabled]:focus,
+.aui-button.aui-button-primary[disabled]:active,
+.aui-button.aui-button-primary[aria-disabled="true"],
+.aui-button.aui-button-primary[aria-disabled="true"]:hover,
+.aui-button.aui-button-primary[aria-disabled="true"]:focus,
+.aui-button.aui-button-primary[aria-disabled="true"]:active {
+    background: #97b3d0;
+    background: -webkit-linear-gradient(top, #a2c3e6 0%, #97b3d0 100%);
+    background:    -moz-linear-gradient(top, #a2c3e6 0%, #97b3d0 100%);
+    background:     -ms-linear-gradient(top, #a2c3e6 0%, #97b3d0 100%);
+    background:      -o-linear-gradient(top, #a2c3e6 0%, #97b3d0 100%);
+    background:         linear-gradient(to bottom, #a2c3e6 0%, #97b3d0 100%);
+    border-color: #7f9cb9;
+    box-shadow:none;
+    color: #fff;
+    text-shadow: none;
+}
+
+.aui-button.aui-button-link[disabled],
+.aui-button.aui-button-link[disabled]:hover,
+.aui-button.aui-button-link[disabled]:focus,
+.aui-button.aui-button-link[disabled]:active,
+.aui-button.aui-button-link[aria-disabled="true"],
+.aui-button.aui-button-link[aria-disabled="true"]:hover,
+.aui-button.aui-button-link[aria-disabled="true"]:focus,
+.aui-button.aui-button-link[aria-disabled="true"]:active {
+    background: transparent;
+    border-color: transparent;
+    color: #999;
+    text-shadow: none;
+    text-decoration: none;
+}
+
+.aui-buttons .aui-button.aui-button-primary[disabled],
+.aui-buttons .aui-button.aui-button-primary[disabled]:hover,
+.aui-buttons .aui-button.aui-button-primary[disabled]:focus,
+.aui-buttons .aui-button.aui-button-primary[disabled]:active,
+.aui-buttons .aui-button.aui-button-primary[aria-disabled="true"],
+.aui-buttons .aui-button.aui-button-primary[aria-disabled="true"]:hover,
+.aui-buttons .aui-button.aui-button-primary[aria-disabled="true"]:focus,
+.aui-buttons .aui-button.aui-button-primary[aria-disabled="true"]:active {
+    background: #f2f2f2;
+    background: -webkit-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:    -moz-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:     -ms-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:      -o-linear-gradient(top, #fff 0%, #f2f2f2 100%);
+    background:         linear-gradient(to bottom, #fff 0%, #f2f2f2 100%);
+    border-color: #ccc;
+    color: #9dbbd9;
+    text-shadow: none;
+}
+
+
+/* Cross-component integration
+---------------------------------------------------------------------- */
+
+/* Dropdown2 integration
+---------- */
+.aui-button.aui-dropdown2-trigger:first-child.active,
+.aui-button.aui-dropdown2-trigger.active {
+    /* square off bottom corners */
+    border-bottom-right-radius: 0;
+    border-bottom-left-radius: 0;
+    border-bottom-width: 0; /* avoid double border when the dropdown is active - increase padding to cater for this reduction */
+    padding-bottom: 5px; /* increase the padding to cater for the lack of border so the button doesn't change size */
+}
+.aui-button-link.aui-dropdown2-trigger:first-child.active,
+.aui-button-link.aui-dropdown2-trigger.active {
+    border-bottom-width: 1px;
+    box-shadow: none;
+    padding-bottom: 5px;
+}
+
+.aui-buttons .aui-button.aui-button-subtle.aui-dropdown2-trigger.active,
+.aui-button.aui-button-subtle.aui-dropdown2-trigger.active {
+    border-color: #ccc;
+}
+.aui-button.aui-button-subtle.aui-dropdown2-trigger:hover {
+    border-color: #999;
+}
+
+.aui-button.aui-dropdown2-trigger {
+    padding-right: 23px !important; /* 8px (arrow width) + 10px (right padding) + 5px (margin between arrow and logo) */
+    position: relative;
+}
+.aui-button.aui-dropdown2-trigger:after {
+    border: 4px solid transparent;
+    content: "";
+    height: 0;
+    left: 100%; /* "left" + "margin-left" required because of webkit not working properly with "right" */
+    margin-left: -18px;
+    margin-top: -2px;
+    opacity: 0.8;
+    position: absolute;
+    top: 50%;
+    width: 0;
+}
+.aui-button.aui-dropdown2-trigger:after,
+.aui-buttons .aui-button.aui-button-primary.aui-dropdown2-trigger:after {
+    border-top-color: #333;
+}
+.aui-button.aui-button-primary.aui-dropdown2-trigger:after {
+    border-top-color: #fff;
+}
+.aui-button.aui-dropdown2-trigger:hover:after,
+.aui-button.aui-dropdown2-trigger.active:after {
+    opacity: 1;
+}
+.aui-button.aui-button.aui-dropdown2-trigger:after {
+    margin-top: 0;
+    top: 13px;
+}
+
+/* suppress old icon pattern for dropdown widget so we don't get double arrows */
+.aui-button.aui-dropdown2-trigger > .icon-dropdown,
+.aui-button.aui-dropdown2-trigger > .aui-icon-dropdown {
+    display: none;
+}
+
+
+/* INPUT does not play with :after - dropdown2 does not support arrow styles for INPUT buttons */
+input.aui-button.aui-dropdown2-trigger {
+    padding-right: 10px !important; /* someone used important now we're all doomed */
+}
+input.aui-button.aui-dropdown2-trigger:after {
+    display: none;
+}
+
+/* Dropdown2-only / Split Button
+---------- */
+.aui-button.aui-dropdown2-trigger.aui-button-split-more,
+.aui-button.aui-dropdown2-trigger.aui-button-split-more.active {
+    /* don't touch vertical padding or things jump around, jump around, jump up jump up and get down */
+    padding-left: 5px;
+    padding-right: 10px;
+    text-align: left;
+    text-indent: -9999em;
+}
+
+/* remove the element border... */
+.aui-button-split-main {
+    border-right: 0;
+}
+
+.aui-button.aui-dropdown2-trigger.aui-button-split-more:hover {
+    border-left: 0;
+    margin-left: 0;
+}
+ 
+/* ...then replace it with a border on a pseudo element so we can control the height. */
+.aui-button.aui-dropdown2-trigger.aui-button-split-more:before {
+    border-left: 1px solid #ccc;
+    bottom: 4px;
+    content: "";
+    display: block;
+    left: 0;
+    position: absolute;
+    top: 4px;
+}
+
+/* ...then extend it to full height border on hover */
+.aui-button.aui-button-split-main:hover + .aui-button.aui-dropdown2-trigger.aui-button-split-more:before,
+.aui-button.aui-dropdown2-trigger.aui-button-split-more.active:hover:before,
+.aui-button.aui-dropdown2-trigger.aui-button-split-more.active:before,
+.aui-button.aui-dropdown2-trigger.aui-button-split-more:hover:before {
+    border-left-color: #999; /* dark border for hover. */
+    bottom: -1px; /* -1 to pull it out over the border */
+    top: -1px; /* -1 to pull it out over the border */
+}
+/* ...and change the colour on dropdown .active */
+.aui-button.aui-dropdown2-trigger.aui-button-split-more.active:before {
+    border-left-color: #ccc; /* lighter border for dropdown-active */
+}
+
+
+/* App Header Buttons and Split Button
+---------- */
+.aui-header .aui-nav .aui-button,
+.aui-header .aui-nav .aui-button-primary {
+    margin: 5px 0 0 10px;
+}
+
+.aui-header .aui-nav .aui-button-split-main {
+    margin-right: 0;
+}
+
+/* long selector set required to avoid a jump in non-hover focus */
+.aui-header .aui-nav .aui-buttons .aui-button ~ .aui-button:hover, 
+.aui-header .aui-nav .aui-buttons .aui-button ~ .aui-button:focus, 
+.aui-header .aui-nav .aui-buttons .aui-button ~ .aui-button:active,
+.aui-header .aui-nav .aui-button-split-more {
+    margin-left: 0;
+}
+
+.aui-header .aui-nav .aui-button-primary,
+.aui-header .aui-nav .aui-button-primary:link,
+.aui-header .aui-nav .aui-button-primary:visited {
+    background: #336ea9;
+    background-image: -moz-linear-gradient(top, #3b7fc4, #336ea9);
+    background-image: -ms-linear-gradient(top,  #3b7fc4, #336ea9);
+    background-image: -webkit-linear-gradient(top,  #3b7fc4, #336ea9);
+    background-image: -o-linear-gradient(top,  #3b7fc4, #336ea9);
+    background-image: linear-gradient(top,  #3b7fc4, #336ea9);
+    border: 0;
+    box-shadow: rgba(255, 255, 255, 0.1) 0 1px 0 0 inset, rgba(0, 0, 0, 0.2) 0 1px 1px 0;
+    color: #fff;    
+    text-shadow: 0 1px 0 #295989;
+}
+
+.aui-header .aui-nav .aui-button.aui-button-primary:focus,
+.aui-header .aui-nav .aui-button.aui-button-primary:hover {
+    background: #2D5F9C;
+    background-image: -moz-linear-gradient(top, #4796e6, #3773af);
+    background-image: -ms-linear-gradient(top, #4796e6, #3773af);
+    background-image: -webkit-linear-gradient(top, #4796e6, #3773af);
+    background-image: -o-linear-gradient(top, #4796e6, #3773af);
+    background-image: linear-gradient(top, #4796e6, #3773af);
+    color: #fff;    
+}
+
+.aui-header .aui-nav .aui-button.aui-button-primary:active,
+.aui-header .aui-nav .aui-button.aui-button-primary.active {
+    background-color: #3572b0;
+    background-image: none;
+}
+
+.aui-header .aui-nav .aui-buttons .aui-button-primary.aui-dropdown2-trigger:after {
+    border-top-color: #fff;
+}
+
+.aui-header .aui-button-primary.aui-dropdown2-trigger.aui-button-split-more.active {
+    top: -1px;
+}
+
+.aui-header .aui-button-primary.aui-button-split-main:hover + .aui-button.aui-dropdown2-trigger.aui-button-split-more:before,
+.aui-header .aui-button-primary.aui-dropdown2-trigger.aui-button-split-more.active:hover:before,
+.aui-header .aui-button-primary.aui-dropdown2-trigger.aui-button-split-more.active:before,
+.aui-header .aui-button-primary.aui-dropdown2-trigger.aui-button-split-more:hover:before,
+.aui-header .aui-button-primary.aui-dropdown2-trigger.aui-button-split-more:before {
+    border-color: #1f4e7e;
+    bottom: 0;
+    top: 0;
+}
+
diff --git a/src/main/webapp/connect/common/styles/plugin/blueprint.css b/src/main/webapp/connect/common/styles/plugin/blueprint.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/main/webapp/connect/common/styles/plugin/common.css b/src/main/webapp/connect/common/styles/plugin/common.css
new file mode 100644
index 000000000..960de9850
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/common.css
@@ -0,0 +1,150 @@
+div.mxRubberband {
+	position: absolute;
+	overflow: hidden;
+	border-style: solid;
+	border-width: 1px;
+	border-color: #0000FF;
+	background: #0077FF;
+}
+textarea.mxCellEditor {
+	background: url('../images/transparent.gif');
+	border-style: solid;
+	border-color: black;
+	border-width: 0;
+	overflow: auto;
+}
+div.mxWindow {
+	-webkit-box-shadow: 3px 3px 12px #C0C0C0;
+	-moz-box-shadow: 3px 3px 12px #C0C0C0;
+	box-shadow: 3px 3px 12px #C0C0C0;
+	background: url('../images/window.gif');
+	border:1px solid #c3c3c3;
+	position: absolute;
+	overflow: hidden;
+	z-index: 1;
+}
+table.mxWindow {
+	border-collapse: collapse;
+	table-layout: fixed;
+  	font-family: Arial;
+	font-size: 8pt;
+}
+td.mxWindowTitle {
+	background: url('../images/window-title.gif') repeat-x;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+ 	text-align: center;
+ 	font-weight: bold;
+ 	overflow: hidden;
+	height: 13px;
+	padding: 2px;
+ 	padding-top: 4px;
+ 	padding-bottom: 6px;
+ 	color: black;
+}
+td.mxWindowPane {
+	vertical-align: top;
+	padding: 0px;
+}
+div.mxWindowPane {
+	overflow: hidden;
+	position: absolute;
+}
+td.mxWindowPane td {
+  	font-family: Arial;
+	font-size: 8pt;
+}
+td.mxWindowPane input, td.mxWindowPane select, td.mxWindowPane textarea, td.mxWindowPane radio {
+  	border-color: #8C8C8C;
+  	border-style: solid;
+  	border-width: 1px;
+  	font-family: Arial;
+	font-size: 8pt;
+ 	padding: 1px;
+}
+td.mxWindowPane button {
+	background: url('../images/button.gif') repeat-x;
+  	font-family: Arial;
+  	font-size: 8pt;
+  	padding: 2px;
+	float: left;
+}
+img.mxToolbarItem {
+	margin-right: 6px;
+	margin-bottom: 6px;
+	border-width: 1px;
+}
+select.mxToolbarCombo {
+	vertical-align: top;
+	border-style: inset;
+	border-width: 2px;
+}
+div.mxToolbarComboContainer {
+	padding: 2px;
+}
+img.mxToolbarMode {
+	margin: 2px;
+	margin-right: 4px;
+	margin-bottom: 4px;
+	border-width: 0px;
+}
+img.mxToolbarModeSelected {
+	margin: 0px;
+	margin-right: 2px;
+	margin-bottom: 2px;
+	border-width: 2px;
+	border-style: inset;
+}
+div.mxTooltip {
+	-webkit-box-shadow: 3px 3px 12px #C0C0C0;
+	-moz-box-shadow: 3px 3px 12px #C0C0C0;
+	box-shadow: 3px 3px 12px #C0C0C0;
+	background: #FFFFCC;
+	border-style: solid;
+	border-width: 1px;
+	border-color: black;
+	font-family: Arial;
+	font-size: 8pt;
+	position: absolute;
+	cursor: default;
+	padding: 4px;
+	color: black;
+}
+div.mxPopupMenu {
+	-webkit-box-shadow: 3px 3px 12px #C0C0C0;
+	-moz-box-shadow: 3px 3px 12px #C0C0C0;
+	box-shadow: 3px 3px 12px #C0C0C0;
+	background: url('../images/window.gif');
+	position: absolute;
+	border-style: solid;
+	border-width: 1px;
+	border-color: black;
+}
+table.mxPopupMenu {
+	border-collapse: collapse;
+	margin-top: 1px;
+	margin-bottom: 1px;
+}
+tr.mxPopupMenuItem {
+	color: black;
+	cursor: pointer;
+}
+tr.mxPopupMenuItemHover {
+	background-color: #000066;
+	color: #FFFFFF;
+	cursor: pointer;
+}
+td.mxPopupMenuItem {
+	padding: 2px 30px 2px 10px;
+	white-space: nowrap;
+	font-family: Arial;
+	font-size: 8pt;
+}
+td.mxPopupMenuIcon {
+	background-color: #D0D0D0;
+	padding: 2px 4px 2px 4px;
+}
+.mxDisabled {
+	opacity: 0.2 !important;
+	cursor:default !important;
+}
diff --git a/src/main/webapp/connect/common/styles/plugin/dropdown-menu.css b/src/main/webapp/connect/common/styles/plugin/dropdown-menu.css
new file mode 100644
index 000000000..70b54d05c
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/dropdown-menu.css
@@ -0,0 +1,4 @@
+#insert-menu .macro-drawio .icon {
+    background:transparent url("images/logo-16x16.png") 0 0 no-repeat;
+    margin-top:0px;
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/styles/plugin/explorer.css b/src/main/webapp/connect/common/styles/plugin/explorer.css
new file mode 100644
index 000000000..daa5e4873
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/explorer.css
@@ -0,0 +1,18 @@
+div.mxTooltip {
+	filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, 
+        Color='#A2A2A2', Positive='true');
+}
+div.mxPopupMenu {
+	filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, 
+        Color='#C0C0C0', Positive='true');
+}
+div.mxWindow {
+	filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=4, OffY=4, 
+        Color='#C0C0C0', Positive='true');
+}
+td.mxWindowTitle {
+	_height: 23px;
+}
+.mxDisabled {
+	_filter:alpha(opacity=20) !important;
+}
diff --git a/src/main/webapp/connect/common/styles/plugin/linkBrowser.css b/src/main/webapp/connect/common/styles/plugin/linkBrowser.css
new file mode 100644
index 000000000..c45193113
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/linkBrowser.css
@@ -0,0 +1,296 @@
+.drawio-dialog 
+{
+	width: 100%;
+	height: 100%;
+}
+.dialog-title 
+{
+	border-bottom: 1px solid #ccc;
+	padding: 20px 25px;
+	box-sizing: border-box;
+	height: 56px;
+	width : 100%;
+	background: #f5f5f5;
+	color: #333;
+	font-weight: normal;
+	font-size: medium;
+}
+
+.dialog-button-panel 
+{
+	border-top: 1px solid #ccc;
+	padding: 12px 20px;
+	box-sizing: border-box;
+	height: 56px;
+	width: 100%;
+	margin: 0 10px 0 0;
+	text-align: right;
+	background: #f5f5f5;
+}
+.dialog-page 
+{
+	height : 483px;
+}
+.dialog-page-menu 
+{
+    background: none repeat scroll 0 0 #FFFFFF;
+    border-right: 1px solid #CCCCCC;
+    box-sizing: border-box;
+    float: left;
+    height: 100%;
+    list-style: none outside none;
+    margin: 0;
+    overflow-x: hidden;
+    overflow-y: auto;
+    padding: 10px 10px 20px;
+    width: 25%;
+    float : left;
+    list-style: none outside none;
+}
+.dialog-page-menu li.page-menu-item.selected button.item-button {
+    color: #333333;
+    font-weight: bold;
+}
+.dialog-page-menu li.page-menu-item button.item-button 
+{
+    background: none repeat scroll 0 0 rgba(0, 0, 0, 0);
+    border: 0 none;
+    color: #3B73AF;
+    cursor: pointer;
+    font-family: inherit;
+    font-size: inherit;
+    line-height: 1.1428;
+    margin: 0;
+    padding: 7px 10px;
+    text-align: left;
+    text-decoration: none;
+    /*width: 100%;*/
+    word-wrap : none;
+}
+.page-menu-item-hover 
+{
+	background-color: #E6E6E6;
+}
+.page-menu-item-selected button.item-button
+{
+	color : #333333 !important; 
+	font-weight : bold; 
+}
+.dialog-page-contents 
+{
+	height : 100%;
+	float : left;
+	width : 620px;
+}
+.search-input 
+{
+	width : 220px;
+	float : left;
+}
+.text 
+{
+	height: 2.14286em;
+    line-height: 1.42857;
+    padding: 4px 5px;
+    border: 1px solid #ccc;
+    border-radius: 3.01px;
+    box-shadow: 0 1px 3px #ccc inset;
+    box-sizing: border-box;
+    color: #333;
+    font-size: inherit;
+    margin: 5px;
+    max-width: 250px;
+    vertical-align: baseline;
+    width: 100%;
+}
+.dialog-panel-body 
+{
+	padding : 20px 10px;    	    
+}
+.data-table-header 
+{
+	padding: 7px 10px;
+    text-align: left;
+    vertical-align: top;
+}
+table.aui 
+{
+	width : 100%;
+	border-collapse: collapse;;
+}
+table.aui>thead>tr>th, table.aui>tbody>tr>th, table.aui>thead>tr>td, table.aui>tbody>tr>td, table.aui>tfoot>tr>td 
+{
+	padding: 7px 10px;
+	text-align: left;
+	vertical-align: top;
+	
+}
+table.aui>tbody>tr>td, table.aui>tfoot>tr 
+{
+	background: #fff;
+	border-top: 1px solid #ccc;
+	color: #333;
+}
+.button-panel-button 
+{
+	background: #f2f2f2;
+	background: -webkit-linear-gradient(top,#fff 0,#f2f2f2 100%);
+	background: -moz-linear-gradient(top,#fff 0,#f2f2f2 100%);
+	background: -ms-linear-gradient(top,#fff 0,#f2f2f2 100%);
+	background: -o-linear-gradient(top,#fff 0,#f2f2f2 100%);
+	background: linear-gradient(to bottom,#fff 0,#f2f2f2 100%);
+	border-color: #ccc;
+	-moz-border-radius: 3.01px;
+	-webkit-border-radius: 3.01px;
+	border-radius: 3.01px;
+	border-style: solid;
+	border-width: 1px;
+	color: #333;
+	cursor: pointer;
+	display: inline-block;
+	font-size: 14px;
+	font-family: Arial,sans-serif;
+	font-variant: normal;
+	line-height: 20px;
+	padding: 4px 10px;
+	text-decoration: none;
+	text-shadow: 0 1px 0 white;
+	vertical-align: baseline;
+	margin : 0 10px 0 0;
+}
+
+.data-table-panel tr.selected, .data-table-panel tr.selected a, .data-table-panel tr.selected td 
+{
+	background-color: #ebf2f9;
+}
+.data-table-panel 
+{
+	margin : 0px -10px;
+	overflow-x: visible;
+	overflow-y: auto;
+	height : 388px;
+	clear : both;
+}
+
+.location-info, .location-info-top
+{
+	overflow: hidden;
+	width: 100%;
+	position: absolute;
+	left: 210px;
+	padding : 10px;
+}
+.location-info 
+{
+	border-top: 1px solid #ccc;
+	bottom: 51px;
+}
+.location-info-top 
+{
+	top: 51px;
+}
+.field-group
+{
+	padding: 0 0 0 100px;
+	position: relative;
+	word-wrap: break-word;
+}
+
+#search-panel-button 
+{
+	position : relative;
+	top : 4px;
+}
+
+#alias 
+{
+	display: none;
+}
+
+#url 
+{
+	margin : 30px;
+}
+.message-panel 
+{
+	padding-left : 10px;
+	padding-top : 10px;
+}
+
+button:focus, li:focus {
+    outline: 0;
+}
+
+div.description {
+	color: #707070;
+	font-size: 12px;
+	line-height: 1.66666666666667;
+	margin: 5px 0 0 57px;
+}
+#url:hover, .button-panel-link:hover 
+{
+	text-decoration: underline !important;
+}
+#url, .button-panel-link
+{
+	text-decoration: none !important;
+}
+
+.ui-tree li a,
+a.content-type-page span,
+div.content-type-page,
+span.content-type-page,
+.icon-page {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAPFBMVEX///+1tbWwsLCtra3///+Li4v5+fnZ2dnT09P8/PzPz8+rq6uhoaHR0dFycnJwcHB6enp4eHiDg4OAgIDxJSXRAAAADnRSTlMAIiJV3e7u7u7u7u7u7rDOyYEAAABUSURBVHhepcpLDoAwCABRqkBbP9Dq/e9qLYS1ibN8GQBYSFVGfQWLWmFEZG0uknGmuz+CDnjYEzDqDpF8BrV+HBxHNThjyBPo2qpBuemFROIpJXgAPRkGZhcD+TMAAAAASUVORK5CYII=);
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+a.content-type-blogpost span,
+div.content-type-blogpost,
+span.content-type-blogpost,
+.icon-blog,
+.icon-blogpost {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAUVBMVEX///+1tbWwsLCtra3////GxsaLi4uzs7PPz8/5+fnr6+v19fXZ2dnT09P8/Pyrq6uhoaHR0dFwcHBycnJ4eHiAgIB6enqRkZF3d3eDg4OIiIgEhg+GAAAAEnRSTlMAIiJV3e7u7u7u7u7u7u7u7u5mVDB9AAAAdElEQVR4Xk3K2xbCIAxEUaqTcGurJtCq//+hItAF53HPGGNuLKKldDctPjYPwMvRRVfU5NE/ig541s+AUmow0g7WujhBfb9pBgTKQhOUPX5THGBPIRI3gHDmKPYCH3KwggJ7gxeu1gr8cXuDLfMfFtae8GJ+G+sIH3qkr1wAAAAASUVORK5CYII=);
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+a.content-type-attachment-image span,
+div.content-type-attachment-image,
+span.content-type-attachment-image,
+.icon-file-image {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAaVBMVEX///+1tbWzs7OwsLD///+Li4vq6ur4+Pji4uLPz8/Hx8e1tbWmpqb29vazs7PW1tb///+srKzY2NjAwMCIiIiHh4d0dHRycnKLi4uDg4OTk5ORkZFwcHCHh4d6enqFhYV3d3d8fHyZmZke2Bp4AAAAFnRSTlMAIiIi3e7u7u7u7u7u7u7u7u7u7u7uxh/uMQAAAHZJREFUeF6Fz8kOwjAMRVEDdjozY2dsC///kSQB0goWHCmLdyUvAj+2JCu0AQoKi/NEIHVZ8R08yGc77xCPsoTZzzHn0Jp01rjmHTpmjdkrnDjq4qj2fZUCZzWq3trLEnRrk6EEDnoy5v4QuPHKOBLsrl9/+esJNi4MYbEkhTkAAAAASUVORK5CYII=);
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+a.content-type-attachment-pdf span,
+div.content-type-attachment-pdf,
+span.content-type-attachment-pdf,
+.icon-file-pdf {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAWlBMVEX///+1tbWzs7OwsLD////7+/v88vHm5ubi4uLf39/12dbY2NjyzMnS0tLPz8/stK/pqKLmnJXjkYnghXyLi4veenDbb2WFhYWBgYHYY1lycnLVWU1wcHDQRDd8ojdZAAAAFXRSTlMAIiIi3e7u7u7u7u7u7u7u7u7u7u4cXfPyAAAAaUlEQVQYV13PRxaAMAgEUNTYC0awRb3/NY1pz2RW8NkwAFCw8uEcdHivhU178AfK71qUgW9cFyM/wATknABSAufWRYCyuxYpA1QnzQMSecAL3SMOHhIxhJQWmgCTAT56dx9tuTzUvzmDF/8aCYb2SVzBAAAAAElFTkSuQmCC);
+    background-repeat: no-repeat;
+    padding-left: 20px;
+}
+
+a.content-type-attachment-text-html span,
+div.content-type-attachment-text-html,
+span.content-type-attachment-text-html,
+a.content-type-attachment-html span,
+div.content-type-attachment-html,
+span.content-type-attachment-html,
+a.content-type-attachment-text-xml span,
+div.content-type-attachment-text-xml,
+span.content-type-attachment-text-xml,
+a.content-type-attachment-xml span,
+div.content-type-attachment-xml,
+span.content-type-attachment-xml,
+a.content-type-attachment-js span,
+div.content-type-attachment-js,
+span.content-type-attachment-js,
+.icon-file-html,
+.icon-file-xml {
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAZlBMVEX///+1tbWzs7OxsbH///+RkZGPj4/R0dG5ubnMzMzPz8+zs7OcnJzExMT39/f5+fnHx8fm5ubY2Nj09PTz8/OxsbGnp6ft7e1ycnJvb29wcHB2dnaRkZGNjY2FhYWBgYF+fn54eHhKjR8EAAAAGHRSTlMAIiIi3d3d7u7u7u7u7u7u7u7u7u7u7u5Iiv/NAAAAcklEQVR4Xl3Pxw4DMQgEUJyMy5b0Bnbq//9kFssJkufG0xwGIhcy/+IdEfnXgJbh7RfgiH/2rLAzOFcAIMC9SgOZcJwN9MYldY3HQQwAuT0xiQGQrlAxmGPX+AB6ox92qjB2030ZW2e7KfrcOnBL5rCiLxz1CbC+jprRAAAAAElFTkSuQmCC);
+    background-repeat: no-repeat;
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/styles/plugin/mx-editor.css b/src/main/webapp/connect/common/styles/plugin/mx-editor.css
new file mode 100644
index 000000000..48eccbe7f
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/mx-editor.css
@@ -0,0 +1,34 @@
+/* contains styles specific to the Confluence integration */
+
+
+html tr.mxPopupMenuItemHover {
+	background-color: #3B73AF;
+	color: #FFFFFF;
+}
+
+html div.mxPopupMenu {
+	background-color: #FFFFFF;
+	border: 1px solid #CCCCCC;
+	border-bottom-left-radius: 3px;
+	border-bottom-right-radius: 3px;
+	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
+	
+    font-size: 14px;
+    line-height: 1;
+}
+
+.geMenubar 
+{
+	background-color: #205081;
+}
+
+.geMenubarContainer a
+{
+	color: #FFFFFF !important;
+	padding: 10px 10px !important;
+}
+
+.geMenubarContainer .geItem:hover
+{
+	background-color: #3B73A7 !important;
+}
diff --git a/src/main/webapp/connect/common/styles/plugin/newDiagramDialog.css b/src/main/webapp/connect/common/styles/plugin/newDiagramDialog.css
new file mode 100644
index 000000000..1d43d24e8
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/newDiagramDialog.css
@@ -0,0 +1,49 @@
+.drawio-list {
+	width: 120px;
+	height: 120px;
+	text-align: center;
+	padding-bottom: 50px;
+	padding-right: 30px;
+	float: left;
+}
+
+.drawio-list-item {
+	width: 100%;
+	height: 100%;
+	border: 3px solid #F0F0F0;
+	border-radius: 5px;
+	padding: 2px;
+}
+
+.drawio-list-item-hover {
+	border: 3px solid #c5c5c5;
+}
+
+.drawio-list-item-selected {
+	border: 3px solid #3b73af;
+}
+
+.drawio-separator {
+	border-top: 1px solid #F0F0F0;
+	clear: both;
+	padding-top : 10px; 
+	padding-bottom : 10px;
+}
+
+.drawio-thumbnail {
+	width: 100%;
+	height: 100%; background-repeat : no-repeat;
+	background-size: contain;
+	background-repeat: no-repeat;
+}
+
+.drawio-template-panel-header {
+	padding-left: 10px;
+	padding-top: 5px;
+	padding-bottom: 5px;
+	font-style: italic;
+}
+
+.drawio-search-results {
+	padding-top : 10px;
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/styles/plugin/reader.css b/src/main/webapp/connect/common/styles/plugin/reader.css
new file mode 100644
index 000000000..49c2c37b8
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/reader.css
@@ -0,0 +1,39 @@
+.drawio-viewer {
+	max-width: 100%;
+}
+
+.diagramly-reader-toolbar {
+	
+	height : 27px;
+	margin-left: 1px;
+	margin-bottom: 1px;
+	background-color: #EEEEEE;
+	border-radius : 3px;
+}
+
+.diagramly-reader-toolbar-button, .diagramly-reader-toolbar-button-hover {
+	float : left;
+	border-radius : 3px;
+	padding: 2px;
+	opacity : 0.7;
+}
+
+.diagramly-reader-toolbar-button {
+	border: 1px solid transparent;
+}
+
+.diagramly-reader-toolbar-button-hover {
+	border: 1px solid #404040;
+	opacity : 1.0;
+}
+
+.drawio-reader-popup-header 
+{
+	text-align: center;
+}
+
+.drawio-reader-heading 
+{
+	margin-top: 2px;
+	margin-bottom: 2px;
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/styles/plugin/search.css b/src/main/webapp/connect/common/styles/plugin/search.css
new file mode 100644
index 000000000..abf19d908
--- /dev/null
+++ b/src/main/webapp/connect/common/styles/plugin/search.css
@@ -0,0 +1,84 @@
+.diagramly-selected {
+	background-color: #EEEEEE;
+}
+
+.diagramly-search-results {
+	 
+}
+
+.diagramly-results-table {
+	width: 100%;
+	border-spacing: 0px;
+	padding: 0 10px 0 10px;
+	
+}
+
+.diagramly-results-table td {
+	line-height: 24px;
+	color: #666666;
+    cursor: default;
+    text-decoration: none;
+}
+
+.diagramly-results-table th {
+	font-size: 12px;
+	line-height: 24px;
+	margin: 0;
+	overflow: hidden;
+	border-bottom: 1px solid #F0F0F0;
+    color: #666666;
+    font-weight: bold;
+    text-align: left;
+}
+
+
+
+.diagramly-blueprint-list {
+	
+}
+
+.diagramly-blueprint-list-item-wrapper {
+	width : 90px; 
+	height : 90px;
+	text-align : center;
+	
+}
+
+.diagramly-blueprint-list-item {
+	width : 100%; 
+	height : 100%; 
+	border : 3px solid #F0F0F0;
+	border-radius : 5px; 
+	padding : 2px;
+}
+
+.diagramly-blueprint-list-item-hover {
+	border : 3px solid #c5c5c5;
+}
+
+.diagramly-blueprint-list-item-selected {
+	border : 3px solid #3b73af;
+}
+
+.drawio-list-item-wrapper {
+	width : 90px; 
+	height : 90px;
+	text-align : center;
+	
+}
+
+.drawio-list-item {
+	width : 100%; 
+	height : 100%; 
+	border : 3px solid #F0F0F0;
+	border-radius : 5px; 
+	padding : 2px;
+}
+
+.drawio-list-item-hover {
+	border : 3px solid #c5c5c5;
+}
+
+.drawio-list-item-selected {
+	border : 3px solid #3b73af;
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/viewer.txt b/src/main/webapp/connect/common/viewer.txt
new file mode 100644
index 000000000..739080e7c
--- /dev/null
+++ b/src/main/webapp/connect/common/viewer.txt
@@ -0,0 +1,9 @@
+diagramly.reader.edit=Edit
+diagramly.reader.remove=Remove
+diagramly.reader.fit=Zoom to Fit
+diagramly.reader.zoomActual=Actual Size
+diagramly.reader.zoomOut=Zoom Out
+diagramly.reader.zoomIn=Zoom In
+diagramly.reader.confirmDelete=Are you sure you want to delete this diagram?
+diagramly.reader.fullScreen=Full screen
+diagramly.reader.closeFullScreen=Close full screen
\ No newline at end of file
diff --git a/src/main/webapp/connect/common/viewer_de.txt b/src/main/webapp/connect/common/viewer_de.txt
new file mode 100644
index 000000000..2a92b6502
--- /dev/null
+++ b/src/main/webapp/connect/common/viewer_de.txt
@@ -0,0 +1,9 @@
+diagramly.reader.edit=Bearbeiten
+diagramly.reader.remove=Entfernen
+diagramly.reader.fit=Zoom anpassen
+diagramly.reader.zoomActual=Tatsächliche Grösse
+diagramly.reader.zoomOut=Herauszoomen
+diagramly.reader.zoomIn=Hineinzoomen
+diagramly.reader.confirmDelete=Sind Sie sicher, Sie wollen dieses Diagramm zu löschen?
+diagramly.reader.fullScreen=Vollbild
+diagramly.reader.closeFullScreen=Schließen vollbild
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/admin.html b/src/main/webapp/connect/confluence/admin.html
new file mode 100644
index 000000000..3dec7341d
--- /dev/null
+++ b/src/main/webapp/connect/confluence/admin.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+		<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+		<script src="admin.js" type="text/javascript"></script>
+		<link rel="stylesheet" type="text/css" href="//aui-cdn.atlassian.com/aui-adg/6.0.4/css/aui.css">
+	</head>
+	<body class="aui-layout aui-theme-default" style="background-color:rgb(255, 255, 255);">
+		<div class="aui-page-panel" style="margin-top:0px;">
+			<h4 style="padding-top:20px;" data-i18n="gliffyImport">Gliffy Import</h4>
+			<div><br><span data-i18n="gliffyImportInst1">Click the "Start Import" button to import all Gliffy diagrams to draw.io.</span><br>
+			<span data-i18n="gliffyImportInst2">Please note that the import procedure will take some time and the browser window must remain open until the import is completed.</span></div>
+			<div style="padding-bottom:4px;"><br><button id="importBtn" disabled="disabled" class="aui-button aui-button-primary" data-i18n="startImport">Start Import</button></div>
+			<div id="operationLog"><br></div>
+		</div>
+		<script type="text/javascript">
+			//Logs uncaught errors
+			window.onerror = function(message, url, linenumber, colno, err)
+			{
+				message = 'Confluence Cloud Admin: ' + ((message != null) ? message : '');
+				
+				AC.logError(message, url, linenumber, colno, err);
+			};
+			
+			var baseUrl = AC.getBaseUrl();
+	
+			var script = document.createElement('script');
+	
+			script.onload = function()
+			{
+				AP.sizeToParent(true);
+				
+				setTimeout(function()
+				{
+					AP.sizeToParent(true);
+				}, 5000); //Try resizing again after 5 sec since the first one fails sometimes
+				
+				getAndApplyTranslation(function()
+				{
+					//JQuery is loaded in this page, so we can use it
+					var logDiv = $('#operationLog');
+	
+					var importBtn = $('#importBtn');
+					
+					importBtn.attr("disabled", null);
+					
+					importBtn.click(function()
+					{
+						GliffyMassImporter(logDiv);
+					});
+				});
+			};
+	
+			script.src = 'https://connect-cdn.atl-paas.net/all.js';
+			script.setAttribute('data-options', 'resize:false;margin:false');
+			document.getElementsByTagName('head')[0].appendChild(script);
+		</script>
+	</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/admin.js b/src/main/webapp/connect/confluence/admin.js
new file mode 100644
index 000000000..b4e52f602
--- /dev/null
+++ b/src/main/webapp/connect/confluence/admin.js
@@ -0,0 +1,919 @@
+function guid()
+{
+  function s4()
+  {
+    return Math.floor((1 + Math.random()) * 0x10000)
+      .toString(16)
+      .substring(1);
+  }
+  
+  return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
+    s4() + '-' + s4() + s4() + s4();
+};
+
+var drawioMacroParams = ['diagramName', 'contentId', 'contentVer', 'revision', 'width', 'height', 'tempPreview', 'zoom', 'lbox', 
+	'diagramDisplayName', 'tbstyle', 'links', 'simple', 'hiResPreview', 'inComment', 'aspect', 'pageId', 'baseUrl',
+	//inc-drawio macro specific params
+	'diagramUrl', 'includedDiagram', 'aspectHash', 'imgPageId', 'attVer', 'custContentId',
+	'pCenter'
+];
+	
+function getMacroRegExps(macroName, attParams)
+{
+	//RegExp that will be used
+	var findMacrosRegEx = new RegExp('\\<ac\\:structured\\-macro[^\\>]+?(?=ac\\:name\\=)ac\\:name\\=\\"' + macroName + '\\".*?(?=\\<\\/ac\\:structured\\-macro\\>)\\<\\/ac\\:structured\\-macro\\>', 'g');
+	var findMacroIdRegEx = new RegExp('ac\\:macro\\-id\\=\\"([^\\"]+)');
+
+	var findOldMacrosRegEx = new RegExp('\\<ac\\:macro[^\\>]+?(?=ac\\:name\\=)ac\\:name\\=\\"' + macroName + '\\".*?(?=\\<\\/ac\\:macro\\>)\\<\\/ac\\:macro\\>', 'g');
+	
+	var findAttParamsRegExs = [];
+	
+	for (var i = 0; i < attParams.length; i++)
+	{
+		findAttParamsRegExs.push(new RegExp('\\<ac\\:parameter\\s+ac\\:name\\=\\"' + attParams[i] + '\\"\\s*\\>([^\\<]+)'));
+	}
+	
+	return {findMacrosRegEx: findMacrosRegEx, findMacroIdRegEx: findMacroIdRegEx, findOldMacrosRegEx: findOldMacrosRegEx, findAttParamsRegExs: findAttParamsRegExs};
+};
+
+function replacePageMacro(page, regExps, processAttFn, pageUpdateSuccess, pageUpdateError, alwaysCallSuccess)
+{
+	var originalBody = page.body.storage.value;
+	
+	var pageXml = originalBody;
+	
+	var foundMacros = pageXml.match(regExps.findMacrosRegEx);
+	var foundOldMacros = pageXml.match(regExps.findOldMacrosRegEx);
+	
+	var macrosParsed = 0;
+	var drawIoMacros = {};
+	var foundMarcosIds = [];
+	var spaceKey = AC.getSpaceKey(page._expandable.space);
+	var macrosCount = (foundMacros? foundMacros.length : 0) + (foundOldMacros? foundOldMacros.length : 0); 
+
+	
+	function attProcessedFn(attInfo, skipErrorFlag)
+	{
+		//Replace found macro with a draw.io one and use the same preview image
+		if (skipErrorFlag)
+		{
+			drawIoMacros[attInfo.macroId] = skipErrorFlag;
+		}
+		else
+		{
+			//generate draw.io macro HTML
+			var drawIoMacro = '<ac:structured-macro ac:name="' + (attInfo.isInc? 'inc-drawio' : 'drawio') + '" ac:schema-version="1" ac:macro-id="' + attInfo.macroId 
+				+ '"><ac:parameter ac:name="baseUrl">' + baseUrl 
+				+ '</ac:parameter><ac:parameter ac:name="diagramName">' + AC.htmlEntities(attInfo.name)
+				+ '</ac:parameter><ac:parameter ac:name="zoom">' + (attInfo.zoom ? attInfo.zoom : '1')
+				+ '</ac:parameter><ac:parameter ac:name="pageId">' + (attInfo.pageId || page.id)
+				+ '</ac:parameter><ac:parameter ac:name="lbox">' + (attInfo.lbox == 'false' || attInfo.lbox == '0'? '0' : '1')
+				+ (attInfo.width? ('</ac:parameter><ac:parameter ac:name="width">' + attInfo.width) : '')
+				+ (attInfo.height? ('</ac:parameter><ac:parameter ac:name="height">' + attInfo.height) : '') 
+				+ (!attInfo.isInc && attInfo.revision? ('</ac:parameter><ac:parameter ac:name="revision">' + attInfo.revision) : '') 
+				+ (attInfo.previewPng? ('</ac:parameter><ac:parameter ac:name="tempPreview">' + AC.htmlEntities(attInfo.previewPng)) : '')
+				+ (attInfo.contentId? ('</ac:parameter><ac:parameter ac:name="custContentId">' + attInfo.contentId) : '')
+				+ (!attInfo.isInc && attInfo.contentVer? ('</ac:parameter><ac:parameter ac:name="contentVer">' + attInfo.contentVer) : '')
+				+ (attInfo.diagramDisplayName? ('</ac:parameter><ac:parameter ac:name="diagramDisplayName">' + attInfo.diagramDisplayName) : '')
+				+ (attInfo.tbstyle? ('</ac:parameter><ac:parameter ac:name="tbstyle">' + attInfo.tbstyle) : '')
+				+ (attInfo.links? ('</ac:parameter><ac:parameter ac:name="links">' + attInfo.links) : '')
+				+ (attInfo.simple? ('</ac:parameter><ac:parameter ac:name="simple">' + attInfo.simple) : '')
+				+ (attInfo.hiResPreview? ('</ac:parameter><ac:parameter ac:name="hiResPreview">' + attInfo.hiResPreview) : '')
+				+ (attInfo.inComment? ('</ac:parameter><ac:parameter ac:name="inComment">' + attInfo.inComment) : '')
+				+ (attInfo.aspect? ('</ac:parameter><ac:parameter ac:name="aspect">' + attInfo.aspect) : '')
+				+ (attInfo.diagramUrl? ('</ac:parameter><ac:parameter ac:name="diagramUrl">' + attInfo.diagramUrl) : '')
+				+ (attInfo.aspectHash? ('</ac:parameter><ac:parameter ac:name="aspectHash">' + attInfo.aspectHash) : '')
+				+ (attInfo.imgPageId? ('</ac:parameter><ac:parameter ac:name="imgPageId">' + attInfo.imgPageId) : '')
+				+ (attInfo.attVer? ('</ac:parameter><ac:parameter ac:name="attVer">' + attInfo.attVer) : '')
+				+ (attInfo.isInc? ('</ac:parameter><ac:parameter ac:name="includedDiagram">1') : '')
+				+ (attInfo.pCenter? ('</ac:parameter><ac:parameter ac:name="pCenter">' + attInfo.pCenter) : '')
+				+ '</ac:parameter></ac:structured-macro>';
+			
+			drawIoMacros[attInfo.macroId] = drawIoMacro; 
+		}
+		
+		macrosParsed++;
+		
+		if (macrosCount == macrosParsed)
+		{
+			var successfullyConverted = 0;
+			var skippedCount = 0;
+			
+			for (var j = 0; j < macrosParsed; j++)
+			{
+				var id = foundMarcosIds[j].id;
+
+				if (isFinite(drawIoMacros[id]))
+				{
+					if (drawIoMacros[id] == 2)
+					{
+						successfullyConverted++; //skipping is successful
+						skippedCount++;
+					}
+				}
+				else
+				{
+					var macroTxt = foundMarcosIds[j].macroTxt;
+					
+					originalBody = originalBody.replace(macroTxt, drawIoMacros[id]);
+					successfullyConverted++;
+				}
+			}
+			
+			//If all macros are skipped, no need to change the page
+			if (skippedCount == successfullyConverted)
+			{
+				pageUpdateSuccess(successfullyConverted, macrosParsed);
+			}
+			else
+			{
+				//update page contents
+				AP.request({
+					type: 'PUT',
+					data: JSON.stringify({
+						"body": {
+							"storage": {
+								"value": originalBody,
+								"representation": "storage",
+								"embeddedContent": []
+							}
+						},
+						"version": {
+					        "number": page.version.number + 1
+					    },
+					    "type": page.type,
+					    "title": page.title,
+					    "status": "current"
+					}),
+					url:  "/rest/api/content/"+ page.id,
+					contentType: 'application/json;charset=UTF-8',
+					success: function(resp) {
+						//update page object for next phase
+						page.body.storage.value = originalBody;
+						pageUpdateSuccess(successfullyConverted, macrosParsed);
+					},
+					error: pageUpdateError
+				});
+			}
+		}
+	};
+	
+	if (foundMacros && foundMacros.length > 0)
+	{
+		var doneIndex = 0;
+		var PARTITION_SIZE = 5;
+		
+		//Process macros 5 (PARTITION_SIZE) at a time to throttle the process
+		function processPartition(limit)
+		{
+			function partitionDone()
+			{
+				doneIndex++;
+				
+				if (foundMacros.length != limit && doneIndex == limit)
+				{
+					processPartition(limit + PARTITION_SIZE);
+				}
+			};
+			
+			
+			limit = Math.min(foundMacros.length, limit);
+			
+			for (var i = doneIndex; i < limit; i++)
+			{
+				var potentialId = foundMacros[i].match(regExps.findMacroIdRegEx);
+				var macroId = potentialId? potentialId[1] : guid();
+				
+				foundMarcosIds.push({id: macroId, macroTxt: foundMacros[i]});
+				
+				var params = [];
+				
+				for (var j = 0; j < regExps.findAttParamsRegExs.length; j++) 
+				{
+					var paramFound = foundMacros[i].match(regExps.findAttParamsRegExs[j]);
+					
+					params.push(paramFound != null && paramFound[1] != null? AC.fromHtmlEntities(paramFound[1]) : null); 
+				}
+				
+				//get the attachment content
+				processAttFn(page.id, page.type, spaceKey, params, macroId, function(attInfo)
+				{
+					attProcessedFn(attInfo);
+					partitionDone();
+				},
+				function(attInfo)
+				{
+					attProcessedFn(attInfo, 1);
+					partitionDone();
+				},
+				function(attInfo)
+				{
+					attProcessedFn(attInfo, 2);
+					partitionDone();
+				});
+			};
+		}
+		
+		processPartition(PARTITION_SIZE);
+	}
+	
+	if (foundOldMacros && foundOldMacros.length > 0)
+	{
+		for (var i = 0; i < foundOldMacros.length; i++)
+		{
+			//these macros has no id, so generate a unique id
+			var macroId = guid();
+			
+			foundMarcosIds.push({id: macroId, macroTxt: foundOldMacros[i]});
+			
+			var params = [];
+			
+			for (var j = 0; j < regExps.findAttParamsRegExs.length; j++) 
+			{
+				var paramFound = foundOldMacros[i].match(regExps.findAttParamsRegExs[j]);
+				
+				params.push(paramFound? AC.fromHtmlEntities(paramFound[1]) : null); 
+			}
+			
+			//get the attachment content
+			processAttFn(page.id, page.type, spaceKey, params, macroId, attProcessedFn,
+			function(attInfo)
+			{
+				attProcessedFn(attInfo, 1);
+			},
+			function(attInfo)
+			{
+				attProcessedFn(attInfo, 2);
+			});
+		};
+	}
+	
+	if (macrosCount == 0 && alwaysCallSuccess)
+	{
+		pageUpdateSuccess(0, 0);
+	}
+	
+	return macrosCount;
+};
+
+var MassDiagramsProcessor = function(macroName, readableName, attParams, processAttFn, logDiv)
+{
+	var start = 0, limit = 100;
+	var regExps = getMacroRegExps(macroName, attParams);
+	
+	
+	function searchContentForMacro(onSuccess, onError) 
+	{
+		//keeping the block of AP.require to minimize the number of changes!
+		{
+			AP.request({
+				type: 'GET',
+		        url : '/rest/api/content/search?cql=' + encodeURIComponent('macro="' + macroName + '"') + '&start=' + start + '&limit=' + limit,
+		        contentType: 'application/json;charset=UTF-8',
+		        success: function(resp) {
+		        	var resp = JSON.parse(resp);
+		        	
+		        	var list = resp.results.filter(function(p)
+					{
+						return p.status != 'trashed'; //remove trashed pages
+					});
+					
+					Array.prototype.push.apply(pagesList, list);
+					pagesCount += list.length;
+					
+					//Support pageing
+					if (resp._links && resp._links.next) 
+					{
+						start += resp.limit; //Sometimes the limit is changed by the server
+						searchContentForMacro(onSuccess, onError);
+					}
+					else
+					{
+						//Done
+						onSuccess();
+					}
+				},
+				error: onError
+		    });
+		};
+	};
+	
+	function getPageContent(pageId, success, error) 
+	{
+		//keeping the block of AP.require to minimize the number of changes!
+		{
+			AP.request({
+				type: 'GET',
+				url: '/rest/api/content/' + pageId + '/?expand=body.storage,version',
+				contentType: 'application/json;charset=UTF-8',
+				success: success,
+				error: error
+			});
+		};
+	};
+
+	var pagesCount = 0, pagesIndex = 0;
+	var pagesList = [];
+	
+	//Process pages one at a time
+	function processPage()
+	{
+		if (pagesIndex >= pagesCount)
+		{
+			return true; //loop is finished
+		}
+		
+		var page = pagesList[pagesIndex];
+		
+		logDiv.append($('<div>' + mxResources.get('confAPageFoundFetch', [AC.htmlEntities(page.title)]) + '...</div>'));
+		
+		getPageContent(page.id, loadPageSuccess, loadPageError);
+		
+		return false;
+	};
+	
+	function pageProcessed()
+	{
+		pagesIndex++;
+		
+		if (processPage())
+		{
+			logDiv.append($('<div>' + mxResources.get('confAAllDiagDone', [readableName]) + '</div>'));
+		}
+	};
+	
+	function loadPageSuccess(page) 
+	{
+		page = JSON.parse(page);
+		
+		logDiv.append($('<div>' + mxResources.get('confAStartedProcessing', [AC.htmlEntities(page.title)]) + '...</div>'));
+
+		var macrosCount = replacePageMacro(page, regExps, processAttFn, function(successfullyConverted, macrosParsed) 
+		{
+			if (successfullyConverted == macrosParsed)
+			{
+				logDiv.append($('<div>' + mxResources.get('confAAllDiagInPageDone', [readableName, AC.htmlEntities(page.title)]) + '</div>'));
+			}
+			else 
+			{
+				logDiv.append($('<div>' + mxResources.get('confAPartialDiagDone', [successfullyConverted, macrosParsed, readableName, AC.htmlEntities(page.title)]) + '</div>'));
+			}
+			
+			pageProcessed();
+		}, function(resp) 
+		{
+			logDiv.append($('<div style="color:red">' + mxResources.get('confAUpdatePageFailed', [AC.htmlEntities(page.title)]) + '</div>'));
+			pageProcessed();
+			console.log(resp);
+		});
+		
+		if (macrosCount == 0)
+		{
+			logDiv.append($('<div>' + mxResources.get('confANoDiagFoundInPage', [readableName, AC.htmlEntities(page.title)]) + '</div>'));
+			pageProcessed();
+		}
+	}; 
+	
+	function loadPageError(resp) 
+	{
+		logDiv.append($('<div style="color:red">' + mxResources.get('confAFetchPageFailed') + '</div>'));
+		console.log(resp);
+		pageProcessed();
+	};
+
+	//Code starts execution here
+	searchContentForMacro(function success() 
+	{
+		if (pagesCount == 0)
+		{
+			logDiv.append($('<div>' + mxResources.get('confANoDiagFound', [readableName]) + '</div>'));
+		}
+		else
+		{
+			processPage();
+		}
+	}, function error(err) 
+	{
+		logDiv.append($('<div style="color:red">' + mxResources.get('confASearchFailed', [readableName]) + '</div>'));
+		console.log(err);
+	});
+};
+
+var GliffyMassImporter = function(logDiv) 
+{
+	var link = document.createElement('a');
+	link.href = location.href;
+	link.href = link.href; //to have 'host' populated under IE
+	var hostUrl = link.protocol + '//' + link.hostname;
+
+	function importGliffyAtt(pageId, pageType, spaceKey, params, macroId, success, error, skip) 
+	{
+		var attName = params[0];
+		
+		logDiv.append($('<div>' + mxResources.get('confAGliffyDiagFound', [AC.htmlEntities(attName), 'Gliffy']) + '...</div>'));
+		
+		//Get the latest version (no version parameter)
+		//keeping the block of AP.require to minimize the number of changes!
+		{
+			AP.request({
+				url:  "/download/attachments/" + pageId + "/"
+					+ encodeURIComponent(attName),
+				success: function(resp) 
+				{
+					var blob = new Blob([resp], {type : 'application/json'});
+					 
+					 var formData = new FormData();
+					 formData.append('format', 'xml');
+			         formData.append("upfile", blob);
+					
+			         var xhr = new XMLHttpRequest();
+			 		 xhr.open('POST', hostUrl + '/import');
+			 		
+			 		 xhr.onreadystatechange = function()
+			 		 {
+			 			if (xhr.readyState == 4)
+			 			{	
+			 				if (xhr.status >= 200 && xhr.status <= 299 &&
+								xhr.responseText.substring(0, 13) == '<mxGraphModel')
+							{
+								//upload draw.io xml as an attachment and also generate the preview image
+				 				var xml = xhr.responseText;
+				 				AC.saveDiagram(pageId, attName + ".drawio", xml,
+								function(resp)
+								{
+				 					resp = JSON.parse(resp);
+				 					
+				 					var attInfo = {
+				 						name: attName + ".drawio", 
+				 						revision: resp.results[0].version.number,
+				 						macroId: macroId,
+				 						previewPng: attName + ".png",
+					 					//TODO get the actual width & height
+				 						//TODO It works with this hardcoded number, but it is better to get the actual value
+		 								width: 500,
+		 								height: 500
+			 						};
+				 					
+				 					//Add custom content
+				 					AC.saveCustomContent(spaceKey, pageId, pageType, attName + ".drawio", attName + ".drawio", attInfo.revision, null, null, 
+				 							function(responseText)
+				 							{
+				 								logDiv.append($('<div>' + mxResources.get('confAGliffyDiagImported', [AC.htmlEntities(attName), 'Gliffy']) + '</div>'));
+				 								
+				 								var content = JSON.parse(responseText);
+												
+				 								attInfo.contentId = content.id;
+				 								attInfo.contentVer = content.version.number;
+												
+							 					success(attInfo);
+				 							}, function(err)
+				 							{
+				 								logDiv.append($('<div style="color:red">' + mxResources.get('confASavingImpGliffyFailed', [AC.htmlEntities(attName), 'Gliffy']) + '</div>'));
+							 					console.log(err);
+							 					error({macroId:macroId});
+				 							});
+				 					
+				 				}, function(err) 
+				 				{
+				 					logDiv.append($('<div style="color:red">' + mxResources.get('confASavingImpGliffyFailed', [AC.htmlEntities(attName), 'Gliffy']) + '</div>'));
+				 					console.log(err);
+				 					error({macroId:macroId});
+				 				}, false, 'application/vnd.jgraph.mxfile', mxResources.get('confAImportedFromByDraw', [attName]));
+							}
+			 				else
+		 					{
+			 					logDiv.append($('<div style="color:red">' + mxResources.get('confAImportGliffyFailed', [AC.htmlEntities(attName), 'Gliffy']) + '</div>'));
+			 					console.log(xhr.status, xhr.responseText);
+			 					error({macroId:macroId});
+		 					}
+			 			}
+			 		 };
+			 		
+			 		 xhr.send(formData);
+				},
+				error: function(resp) 
+				{
+					logDiv.append($('<div style="color:red">' + mxResources.get('confAFetchGliffyFailed', [AC.htmlEntities(attName), 'Gliffy']) + '</div>'));
+					console.log(resp);
+					error({macroId:macroId});
+				}
+			});
+		};
+	};
+	
+	logDiv.html("<br>");
+	
+	MassDiagramsProcessor('gliffy', 'Gliffy', ['name'], importGliffyAtt, logDiv);
+};
+
+function cleanBrokenCustomContents(logDiv, callback, error)
+{
+	logDiv.append($('<div>' + mxResources.get('confACheckBrokenDiagLnk') + '</div>'));
+	
+	var customContent2Del = [];
+	var pagesAttachments = {};
+	var itemsToProcess = 0;
+	var processedItems = 0;
+	var allChunksDone = false;
+	var pendingCallbacks = {};
+	var pageCustomContents = {};
+	var customContentsMap = {};
+	
+	function checkDelDone()
+	{
+		processedItems++;
+		
+		if (processedItems == itemsToProcess) 
+		{
+			callback(pageCustomContents, customContentsMap);
+		}
+	};
+	
+	function addToPage(pageId, contentId, contentVer, diagramName)
+	{
+		if (pageCustomContents[pageId] == null)
+		{
+			var obj = {};
+			obj[diagramName] = {id: contentId, ver: contentVer};
+			pageCustomContents[pageId] = obj;
+		}
+		else if (pageCustomContents[pageId][diagramName])
+		{
+			customContent2Del.push({id: contentId, name: diagramName, duplicate: true});
+			return false;
+		}
+		else
+		{
+			pageCustomContents[pageId][diagramName] = {id: contentId, ver: contentVer};
+		}
+		
+		return true;
+	};
+	
+	function checkDone(panic)
+	{
+		function deleteAtt(id, name, duplicate)
+		{
+			logDiv.append($('<div>' + mxResources.get('confADelDiagLinkOf', [name]) + (duplicate? ' ' + mxResources.get('confADupLnk') : '') + '.</div>'));
+			
+			AP.request({
+	            type: 'DELETE',
+				url: '/rest/api/content/' + id,
+	            contentType: 'application/json;charset=UTF-8',
+	            success: checkDelDone,
+	            error: function() 
+	            {
+	            	logDiv.append($('<div style="color:red">' + mxResources.get('confADelDiagLnkFailed', [name]) + '</div>'));
+	            	checkDelDone(); //Consider error as done also as we cannot do something else 
+	            }
+	        });
+		};
+		
+		if (panic || (allChunksDone && processedItems == itemsToProcess)) 
+		{
+			processedItems = 0;
+			itemsToProcess = customContent2Del.length;
+			
+			if (itemsToProcess > 0)
+			{
+				//delete collected broken custom contents then callback
+				for (var i = 0; i < customContent2Del.length; i++)
+	       		{
+					var c2del = customContent2Del[i];
+					deleteAtt(c2del.id, c2del.name, c2del.duplicate);
+	       		}
+			}
+			else 
+			{
+				//if nothing needs to be deleted, callback directly
+				callback(pageCustomContents, customContentsMap);
+			}
+		}
+	};
+	
+    function collectAtts(pageId, callback, error, url, atts)
+    {
+    	//first call
+    	if (url == null)
+    	{
+    		if (typeof(pendingCallbacks[pageId]) === 'undefined')
+			{
+    			atts = {};
+    			pendingCallbacks[pageId] = [callback];
+			}
+    		else //Another call for the same page before getting the response
+    		{
+    			pendingCallbacks[pageId].push(callback); //data race?
+    			return;
+    		}
+    	}
+    	
+    	AP.request({
+            type: 'GET',
+			url: url != null? url : '/rest/api/content/' + pageId + '/child/attachment?limit=100&expand=version',
+            contentType: 'application/json;charset=UTF-8',
+            success: function (resp) 
+            {
+            	resp = JSON.parse(resp);
+            	
+               	for (var i = 0; i < resp.results.length; i++)
+           		{
+               		var obj = resp.results[i];
+               		atts[obj.title] = obj.version.number;
+           		}
+               	
+               	//Support pageing
+				if (resp._links && resp._links.next) 
+				{
+					collectAtts(pageId, callback, error, resp._links.next, atts);
+				}
+				else
+				{
+					pagesAttachments[pageId] = atts;
+					
+					for (var i = 0; i < pendingCallbacks[pageId].length; i++)
+					{
+						pendingCallbacks[pageId][i]();
+					}
+					
+					delete pendingCallbacks[pageId];
+				}
+			},
+			error: function(err)
+			{
+				//If not found, mark this page as not found
+				if (err.status == 404)
+				{
+					pagesAttachments[pageId] = false;
+					
+					for (var i = 0; i < pendingCallbacks[pageId].length; i++)
+					{
+						pendingCallbacks[pageId][i]();
+					}
+					
+					delete pendingCallbacks[pageId];
+				}
+				else
+				{
+					//All other errors are unexpected and will stop the process
+					error(err);
+				}
+			}
+		});
+    };
+    
+	function processChunk(nextUrl)
+	{
+		AP.request({
+			url: nextUrl != null? nextUrl : '/rest/api/content/search?cql=' + encodeURIComponent('type="ac:com.mxgraph.confluence.plugins.diagramly:drawio-diagram"') + '&limit=50&expand=body.storage,version',  
+			success: function(resp) 
+			{
+				resp = JSON.parse(resp);
+				var list = resp.results;
+				
+				if (list)
+				{
+					list = list.filter(function(cc)
+					{
+						return cc.status != 'trashed'; //remove trashed custom content
+					}); 
+		
+					itemsToProcess += list.length;
+					
+					//Check each item in the list
+					for (var i = 0; i < list.length; i++)
+					{
+						try 
+						{
+							(function(attInfo, contentId, contentVer)
+							{
+								if (!addToPage(attInfo.pageId, contentId, contentVer, attInfo.diagramName))
+								{
+									processedItems++;
+									checkDone();
+									return; //No need to check as it is a duplicate
+								}
+
+								
+								function checkAtt(pageAtts)
+								{
+									//not found or wrong version
+									if (pageAtts == false || pageAtts[attInfo.diagramName] == null || pageAtts[attInfo.diagramName] < attInfo.version)
+									{
+										customContent2Del.push({id: contentId, name: attInfo.diagramName});
+									}
+									else 
+									{
+										customContentsMap[contentId] = attInfo;	
+									}
+									
+									processedItems++;
+									checkDone();	
+								};
+								
+								var pageAtts = pagesAttachments[attInfo.pageId];
+								
+								if (pageAtts != null)
+								{
+									checkAtt(pageAtts);
+								}
+								else
+								{
+									//fetch page attachments
+									collectAtts(attInfo.pageId, function() 
+									{
+										checkAtt(pagesAttachments[attInfo.pageId]);
+									}, function(err)
+									{
+										logDiv.append($('<div style="color:red">' + mxResources.get('confAUnexpErrProcessPage', [attInfo.pageId]) + '.</div>'));
+					 					console.log(err);
+	
+										checkDone(true);
+									});
+								}
+							})(JSON.parse(decodeURIComponent(list[i]["body"]["storage"]["value"])), list[i].id, list[i].version.number);
+						}
+						catch(e)
+						{
+							//ignore, this should not happen! But, if it happens, it means a corrupted custom content. Just delete it
+							console.log(e);
+							customContent2Del.push({id: list[i].id, name: list[i].title});
+							checkDone();
+						}
+					}
+				}
+				
+				checkDone();
+				
+				//Support pageing
+				if (resp._links && resp._links.next) 
+				{
+					processChunk(resp._links.next);
+				}
+				else
+				{
+					allChunksDone = true;
+					checkDone();
+				}
+			},
+			error : error
+		});
+	};
+	
+	processChunk();
+};
+
+var DrawIoDiagramsIndexer = function(logDiv)
+{
+	var pageCustomContents = {}, customContentsMap = {};
+	
+	function fixDrawIoCustomContent(pageId, pageType, spaceKey, params, macroId, success, error, skip) 
+	{
+		//['diagramName', 'contentId', 'contentVer', 'revision', 'width', 'height', 'tempPreview', 'zoom', 'lbox', 'diagramDisplayName', 'tbstyle', 'links', 'simple', 'hiResPreview', 'inComment', 'aspect', 'pageId', 'baseUrl', 'diagramUrl', 'includedDiagram', 'aspectHash', 'imgPageId', 'attVer', 'custContentId', 'pCenter']
+		var attName = params[0];
+		var contentId = params[1] || params[23];
+		var contentVer = params[2];
+		var revision = params[3];
+		var width = params[4];
+		var height = params[5];
+		var tempPreview = params[6];
+		var zoom = params[7];
+		var lbox = params[8];
+		var diagramDisplayName = params[9];
+		var tbstyle = params[10];
+		var links = params[11];
+		var simple = params[12];
+		var hiResPreview = params[13];
+		var inComment = params[14];
+		var aspect = params[15];
+		var macroPageId = params[16];
+		var macroBaseUrl = params[17];
+		var pCenter = params[24];
+			
+		logDiv.append($('<div>' + mxResources.get('confADiagFoundIndex', [AC.htmlEntities(attName)]) + '...</div>'));
+		
+		var attInfo = {
+			macroId: macroId,
+			name: attName,
+			contentId: contentId,
+			contentVer: contentVer,
+			revision: revision,
+			width: width,
+			height: height,
+			previewPng: tempPreview,
+			zoom: zoom,
+			lbox: lbox,
+			diagramDisplayName: diagramDisplayName,
+			tbstyle: tbstyle,
+			links: links,
+			simple: simple,
+			hiResPreview: hiResPreview,
+			inComment: inComment,
+			aspect: aspect,
+			pCenter: pCenter
+		};
+		
+		function addNewCustomContent()
+		{
+			AC.saveCustomContent(spaceKey, pageId, pageType, attName, attName, revision, null, null, 
+					function(responseText)
+					{
+						logDiv.append($('<div>' + mxResources.get('confADiagIndexSucc', [AC.htmlEntities(attName)]) + '</div>'));
+						
+						var content = JSON.parse(responseText);
+					
+						attInfo.contentId = content.id;
+						attInfo.contentVer = content.version.number;
+					
+						success(attInfo);
+					}, function(err)
+					{
+						logDiv.append($('<div style="color:red">' + mxResources.get('confAIndexDiagFailed', [AC.htmlEntities(attName)]) + '</div>'));
+	 					console.log(err);
+	 					error(attInfo);
+					});
+		};
+		
+		var info = customContentsMap[contentId];
+
+		//Copy & Paste macros result in macros that belongs to another page. We can simply skip those macros
+		if (macroPageId != pageId)
+		{
+			logDiv.append($('<div>' + mxResources.get('confASkipDiagOtherPage', [AC.htmlEntities(attName)]) + '</div>'));
+			skip(attInfo);
+		}
+		else if (info == null && pageCustomContents[pageId] != null && pageCustomContents[pageId][attName] != null) //Reuse existing one in case the same diagram is used more than once
+		{
+			logDiv.append($('<div>' + mxResources.get('confADiagIndexSucc', [AC.htmlEntities(attName)]) + '</div>'));
+			var exiting = pageCustomContents[pageId][attName];
+			attInfo.contentId = exiting.id;
+			attInfo.contentVer = exiting.ver;
+			success(attInfo);
+		}
+		else if (info == null || info.pageId != pageId || info.diagramName != attName || info.version != revision) //Invalid contentId (not found) or invalid content, add it
+		{
+			addNewCustomContent(); //Add a correct custom content
+		}
+		else if (macroBaseUrl != baseUrl) //This can happen when the Confluence domain is changed
+		{
+			logDiv.append($('<div>' + mxResources.get('confADiagIndexSucc', [AC.htmlEntities(attName)]) + '</div>'));
+			success(attInfo);
+		}
+		else
+		{
+			//nothing needs to be done, just skip
+			logDiv.append($('<div>' + mxResources.get('confADiagUptoDate', [AC.htmlEntities(attName)]) + '</div>'));
+			skip(attInfo);
+		}
+	};
+
+	logDiv.html("<br>");
+	
+	//Remove existing custom contents that are broken
+	cleanBrokenCustomContents(logDiv, function(pageCustomContents_p, customContentsMap_p) 
+	{
+		pageCustomContents = pageCustomContents_p;
+		customContentsMap = customContentsMap_p;
+		
+		logDiv.append($('<div>' + mxResources.get('done') + '.</div>'));
+		logDiv.append($('<div>' + mxResources.get('confACheckPagesWDraw') + '</div>'));
+		
+		MassDiagramsProcessor('drawio', 'draw.io', 
+				drawioMacroParams,
+				fixDrawIoCustomContent, logDiv);
+	});
+};
+
+function getAndApplyTranslation(callback)
+{
+	AP.user.getLocale(function(locale)
+	{
+		if (locale != null)
+		{
+			var dash = locale.indexOf('_');
+			
+			if (dash >= 0)
+			{
+				locale = locale.substring(0, dash);
+			}
+			
+			AC.initI18nAsync(locale, function()
+			{
+				//HTML elements localization
+				var i18nElems = document.querySelectorAll('*[data-i18n]'); //get all elements having data-i18n attribute, should be fine given a small html file
+				
+				for (var i = 0; i < i18nElems.length; i++)
+				{
+					var i18nKey = i18nElems[i].getAttribute('data-i18n');
+					i18nElems[i].innerHTML = AC.htmlEntities(mxResources.get(i18nKey, null, i18nElems[i].innerHTML));
+				}
+				
+				callback();
+			});
+		}
+		else
+		{
+			callback();
+		}
+	});
+};
diff --git a/src/main/webapp/connect/confluence/config.html b/src/main/webapp/connect/confluence/config.html
new file mode 100644
index 000000000..44efc1001
--- /dev/null
+++ b/src/main/webapp/connect/confluence/config.html
@@ -0,0 +1,178 @@
+<!DOCTYPE html>
+<html>
+	<head>
+		<meta charset="UTF-8">
+		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+		<script src="//aui-cdn.atlassian.com/aui-adg/6.0.4/js/aui.min.js"></script>
+		<script src="prism/prism.js"></script>
+		<script src="prism/bililiteRange.js"></script>
+		<script src="prism/bililiteRange.undo.js"></script>
+		<script src="prism/bililiteRange.util.js"></script>
+		<script src="prism/bililiteRange.fancytext.js"></script>
+		
+		<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+		<script src="admin.js" type="text/javascript"></script>
+		<script src="config.js" type="text/javascript"></script>
+		<link rel="stylesheet" type="text/css" href="//aui-cdn.atlassian.com/aui-adg/6.0.4/css/aui.css">
+		<link rel="stylesheet" type="text/css" href="prism/prism.css" />
+		<style type="text/css">
+			code:focus {
+			  outline: none;
+			}
+			.upload-btn-wrapper {
+			  position: relative;
+			  overflow: hidden;
+			  display: inline-block;
+			}
+			
+			.upload-btn-wrapper input[type=file] {
+			  font-size: 100px;
+			  position: absolute;
+			  left: 0;
+			  top: 0;
+			  opacity: 0;
+			}
+			table {
+				border: 1px solid #eee;
+			    text-align: left;
+			    border-collapse: collapse;
+			    border-spacing: 0;
+			}
+			
+			table td, th{
+				border: 1px solid #999;
+				padding-left: 4px;
+			}
+		</style>
+	</head>
+	<body class="aui-layout aui-theme-default" style="background-color:rgb(255, 255, 255);">
+		<div class="aui-tabs horizontal-tabs">
+		    <ul class="tabs-menu">
+		    	<li class="menu-item active-tab">
+		            <a href="#configTab"><strong data-i18n="drawConfig">draw.io Configuration</strong></a>
+		        </li>
+		        <li class="menu-item" id="cLibTabHeader" style="display: none">
+		            <a href="#cLibsTab"><strong data-i18n="customLib">Custom Libraries</strong></a>
+		        </li>
+		        <li class="menu-item" id="cTempTabHeader" style="display: none">
+		            <a href="#cTempTab"><strong data-i18n="customTemp">Custom Templates</strong></a>
+		        </li>
+		        <li class="menu-item">
+		            <a href="#pageIdsTab"><strong data-i18n="pageIdsExp">Page IDs Export</strong></a>
+		        </li>
+		        <li class="menu-item">
+		            <a href="#pageIdsImportTab"><strong data-i18n="pageIdsImp">Page IDs Import</strong></a>
+		        </li>
+		        <li class="menu-item">
+		            <a href="#reindexingTab"><strong data-i18n="drawReindex">draw.io re-indexing (Beta)</strong></a>
+		        </li>
+		    </ul>
+		    <div class="tabs-pane active-pane" id="configTab">
+		    	<br>
+			    <h4 data-i18n="drawConfig">draw.io Configuration</h4>
+			    <div id="busyIndicator">
+			    	<img src="/images/spin.gif"> <span data-i18n="working">Working</span>...
+			    </div>
+			    <div id="createSpace" style="display: none;">
+			    	<br>
+			    	<span data-i18n="drawConfigNotFoundInst">draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.</span>
+			    	<br>
+			    	<div>
+			    		<br>
+			    		<button id="createConfSpaceBtn" disabled="disabled" class="aui-button aui-button-primary" data-i18n="createConfSp">Create Config Space</button>
+			    	</div>
+			    </div>
+			    <div id="confError" style="display: none; color: #bb0000" data-i18n="unexpErrRefresh">
+			    	Unexpected error, please refresh the page and try again.
+			    </div>
+			    <div id="manageConfig" style="display: none;">
+			    	<br>
+			    	<span data-i18n="configJSONInst">Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to</span> <a href="https://desk.draw.io/support/solutions/articles/16000058316" target="_blank" data-i18n="thisPage">this page</a>.
+			    	<br>
+			    	<div id="jsonMsg">&nbsp;</div>
+			    	<pre class="line-numbers language-json" style="height: 400px"><code contenteditable="true" id="configJSON" class="language-json"></code></pre>
+			    	<div>
+			    		<button id="saveConfigBtn" class="aui-button aui-button-primary" data-i18n="save">Save</button>
+			    	</div>
+			    </div>
+		    </div>
+		    <div class="tabs-pane" id="cLibsTab">
+		    	<br>
+			    <h4 data-i18n="curCustLib">Current Custom Libraries</h4>
+			    <br>
+			    <table id="curLibs" style="box-sizing: border-box; max-width: 100%">
+			    	<tr>
+			    		<th style="min-width: 400px" data-i18n="libName">Library Name</th>
+			    		<th style="width: 47px" data-i18n="action">Action</th>
+			    		<th data-i18n="drawConfID">draw.io Config ID</th>
+			    	</tr>
+			    </table>
+		        <div><br><span data-i18n="addLibInst">Click the "Add Library" button to upload a new library.</span></div>
+				<div>
+					<div id="cLibMsg">&nbsp;</div>
+					<div class="upload-btn-wrapper">
+					  <button class="aui-button aui-button-primary" data-i18n="addLib">Add Library</button>
+					  <input type="file" id="uploadLib" />
+					</div>
+				</div>
+		    </div>
+		    <div class="tabs-pane" id="cTempTab">
+		    	<br>
+			    <h4 data-i18n="customTemp">Custom Templates</h4>
+			    <br>
+		        <div>
+		        	<span data-i18n="customTempInst1">Custom Templates are draw.io diagrams saved in children pages of</span> <a id="tempPageLnk" target="_blank" data-i18n="tempsPage">Templates page</a>. <br>
+		        	<span data-i18n="customTempInst2">For more details, please refer to</span> <a href="https://desk.draw.io/" target="_blank" data-i18n="thisPage">this page</a>.
+		        </div>
+		    </div>
+		    <div class="tabs-pane" id="pageIdsTab">
+		    	<div><br><span data-i18n="pageIdsExpInst1">Select export target, then click the "Start Export" button to export all page IDs.</span><br>
+				<span data-i18n="pageIdsExpInst2">Please note that the export procedure will take some time and the browser window must remain open until the export is completed.</span></div>
+				<br>
+				<div>
+					<span style="font-weight: bold;" data-i18n="pageIdsExpTrg">Export target</span>:<br>
+					<input type="radio" value="cloud" name="expTrg" id="expTrgCloud" checked="checked"><label for="expTrgCloud">Cloud</label>
+					<input type="radio" value="server" name="expTrg" id="expTrgServer"><label for="expTrgServer">Server</label>
+					<input type="radio" value="dc" name="expTrg" id="expTrgDC"><label for="expTrgDC">Data Center</label>
+				</div>
+				<div style="padding-bottom:4px;">
+					<br><button id="exportBtn" disabled="disabled" class="aui-button aui-button-primary" data-i18n="startExp">Start Export</button>
+					<img id="busyIcon" src="/images/spin.gif" style="display: none">
+					<span id="idExportInfo"></span>
+					<div id="idExportErrors" style="color: red"></div>
+				</div>
+				<textarea id="exportResult" style="width:800px; height: 300px"></textarea>
+				<br><a id="pageIdsDownload" style="display: none; cursor: pointer;" data-i18n="download">Download</a>
+		    </div>
+		    <div class="tabs-pane" id="pageIdsImportTab">
+		    	<div><br><span data-i18n="pageIdsImpInst1">After importing a space from another cloud/server instance or migrating from a cloud/server instance. Use "Page IDs Export" on that instance (the source), download the "pageIds.csv" file, then use this tool to complete the import process.</span><br><br>
+				<span data-i18n="pageIdsImpInst2">Click "Start Import" button to upload the "pageIds.csv" file to this tool and start the import process. Please note that the import procedure will take some time and the browser window must remain open until the import is completed.</span></div>
+				<div style="padding-bottom:4px;">
+					<br>
+				    <button id="importBtn" disabled="disabled" class="aui-button aui-button-primary" data-i18n="startImp">Start Import</button>
+					<img id="PIBusyIcon" src="/images/spin.gif" style="display: none">
+					<span id="idImportInfo"></span>
+					<div id="idImportErrors" style="color: red"></div>
+				</div>
+				<div id="pageIdsImportLog"><br></div>
+		    </div>
+		    <div class="tabs-pane" id="reindexingTab">
+			    <br>
+			    <h4 data-i18n="refreshDrawIndex">Refresh draw.io Diagrams Index</h4>
+				<div><br><span data-i18n="reindexInst1">Click the "Start Indexing" button to refresh draw.io diagrams index.</span><br>
+				<span data-i18n="reindexInst2">Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.</span></div>
+				<div><br><button id="indexBtn" disabled="disabled" class="aui-button aui-button-primary" data-i18n="startIndexing">Start Indexing</button></div>
+				<div id="operationLog"><br></div>
+			</div>
+		</div>
+		<script type="text/javascript">
+			//Logs uncaught errors
+			window.onerror = function(message, url, linenumber, colno, err)
+			{
+				message = 'Confluence Cloud Config: ' + ((message != null) ? message : '');
+				
+				AC.logError(message, url, linenumber, colno, err);
+			};
+		</script>
+	</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/config.js b/src/main/webapp/connect/confluence/config.js
new file mode 100644
index 000000000..ca819f685
--- /dev/null
+++ b/src/main/webapp/connect/confluence/config.js
@@ -0,0 +1,1696 @@
+var collectAllPages = function(callback, error)
+{
+	var start = 0, limit = 200;
+	var pages = [];
+	
+	function getChunck()
+	{
+		AP.request({
+			type: 'GET',
+			url: '/rest/api/content?start=' + start + '&limit=' + limit,
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp) {
+				var resp = JSON.parse(resp);
+				
+				for (var i = 0; i < resp.results.length; i++)
+				{
+					pages.push({
+						id: resp.results[i].id,
+						title: resp.results[i].title,
+						type: resp.results[i].type,
+						spaceKey: AC.getSpaceKey(resp.results[i]._expandable? resp.results[i]._expandable.space : '')
+					});
+				}
+				
+				//Support pageing
+				if (resp._links && resp._links.next) 
+				{
+					start += resp.limit; //Sometimes the limit is changed by the server
+					getChunck();
+				}
+				else
+				{
+					callback(pages);
+				}
+			},
+			error: error
+		});
+	};
+	
+	getChunck();	
+};
+
+var exportPageIds = function(exportTxt)
+{
+	$('#busyIcon').show();
+	var idExportInfo = $('#idExportInfo');
+	var errors = [];
+	var quoteCharRegex = /\"/g;
+	
+	function convertMimeType(doneFn)
+	{
+		idExportInfo.html('Processing draw.io diagrams...');
+		
+		collectDrawAtts(function(attList)
+		{
+			var doneIndex = 0;
+			var PARTITION_SIZE = 5;
+			
+			//Process macros 5 (PARTITION_SIZE) at a time to throttle the process
+			function processPartition(limit)
+			{
+				function partitionDone()
+				{
+					doneIndex++;
+					
+					if (attList.length != limit && doneIndex == limit)
+					{
+						processPartition(limit + PARTITION_SIZE);
+					}
+					else if (attList.length == limit)
+					{
+						//Repeat twice since the API return duplicate entries!!
+						if (doneFn) 
+						{
+							idExportInfo.html('Processing draw.io diagrams is done.');
+							doneFn(mimeConversionDone);
+						}
+					}
+				};
+				
+				
+				limit = Math.min(attList.length, limit);
+				
+				if (attList.length == 0)
+				{
+					partitionDone();
+				}
+				
+				for (var i = doneIndex; i < limit; i++)
+				{
+					var att = attList[i];
+					idExportInfo.html('Checking ' + att.title + '...');
+					
+					att.metadata.mediaType = 'application/vnd.jgraph.mxfile';
+					
+					AP.request({
+						type: 'PUT',
+						url: '/rest/api/content/' + att.container.id + '/child/attachment/' + att.id,
+						data: JSON.stringify({
+							id: att.id,
+							version: att.version,
+							type: 'attachment',
+							metadata: att.metadata
+						}),
+						contentType: 'application/json;charset=UTF-8',
+						success: partitionDone,
+						error: function() 
+						{
+							errors.push(mxResources.get('confAErrCheckDrawDiag'));
+							partitionDone();
+						}
+					});
+				};
+			}
+			
+			processPartition(PARTITION_SIZE);
+		}, 
+		function()
+		{
+			errors.push(mxResources.get('confAErrFetchDrawList'));
+		});
+	};
+
+	//Code adapted from EditorUi.prototype.doSaveLocalFile
+	function downloadTxtFile(data, filename)
+	{
+		var mimeType = 'text/plain';
+		
+		// Newer versions of IE
+		if (window.Blob && navigator.msSaveOrOpenBlob)
+		{
+			var blob = new Blob([data], {type: mimeType});
+			navigator.msSaveOrOpenBlob(blob, filename);
+		}
+		else
+		{
+			var a = document.createElement('a');
+			
+			// Workaround for mxXmlRequest.simulate no longer working in Safari/PaleMoon
+			// if this is used (ie PNG export broken after XML export in Safari/PaleMoon).
+			var useDownload = !(navigator.userAgent.indexOf('AppleWebKit/') >= 0 &&
+			  		navigator.userAgent.indexOf('Chrome/') < 0 &&
+			  		navigator.userAgent.indexOf('Edge/') < 0) && navigator.userAgent.indexOf("PaleMoon/") < 0 &&
+				typeof a.download !== 'undefined';
+			
+			// Workaround for Chromium 65 cross-domain anchor download issue
+			var raw = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+			
+			if (raw)
+			{
+				var vers = parseInt(raw[2], 10);
+				useDownload = vers == 65 ? false : useDownload;
+			}
+			
+			if (useDownload)
+			{
+				a.href = URL.createObjectURL(new Blob([data], {type: mimeType}));
+				a.download = filename;
+				document.body.appendChild(a);
+				
+				try
+				{
+					window.setTimeout(function()
+					{
+						URL.revokeObjectURL(a.href);
+					}, 0);
+
+					a.click();
+					a.parentNode.removeChild(a);
+				}
+				catch (e)
+				{
+					// ignore
+				}
+			}
+			else
+			{
+				alert('Your browser does not support file download');
+			}
+		}
+	};
+	
+	
+	function mimeConversionDone()
+	{
+		var exportStr = 'cloud;\nbaseUrl=' + baseUrl + ';\n';
+		
+		function safe(str)
+		{
+			if (typeof str === 'undefined' || str === null)
+				return '';
+
+			str = str.replace(quoteCharRegex, '""');
+
+			var needsQuotes = str.indexOf('"') > -1
+							|| str.indexOf('\n') > -1
+							|| str.indexOf('\r') > -1
+							|| str.indexOf(';') > -1
+							|| str.indexOf(',') > -1
+							|| str.charAt(0) === ' '
+							|| str.charAt(str.length - 1) === ' ';
+
+			return needsQuotes ? '"' + str + '"' : str;
+		}
+		
+		collectAllPages(function(pages)
+		{
+			for (var i = 0; i < pages.length; i++)
+			{
+				exportStr += pages[i].id + ',' + safe(pages[i].title) + ',' + pages[i].spaceKey + ';\n';
+			}
+			
+			exportTxt.val(exportStr);
+			
+			$('#pageIdsDownload').show();
+			$('#pageIdsDownload').click(function()
+			{
+				downloadTxtFile(exportStr, 'pageIds.csv');
+			});
+			
+			if (errors.length > 0)
+			{
+				$('#idExportErrors').html(errors.join('<br>'));
+			}
+			
+			$('#busyIcon').hide();
+		}, function()
+		{
+			errors.push(mxResources.get('confAErrFetchPageList'));
+			exportTxt.val(exportStr + '\n\n' + mxResources.get('confAErrOccured'));
+		});
+	};
+	
+	//Cloud import doesn't need mimeType fixing 
+	if ($('#expTrgCloud').is(':checked'))
+	{
+		mimeConversionDone();
+	}
+	else
+	{
+		//Repeat twice since the API return duplicate entries!!
+		convertMimeType(convertMimeType);
+	}
+};
+
+function showError()
+{
+	$('#confError').show();
+	$('#createSpace').hide();
+};
+
+var configPageId = null;
+var libsPageId = null;
+var CONFIG_FILENAME = 'configuration.json';
+
+function getConfigFile(callback, error)
+{
+	AP.request({
+		url: '/download/attachments/' + configPageId + '/' + encodeURIComponent(CONFIG_FILENAME),
+		success: callback,
+		error : error
+	});
+};
+
+function createAttFile(pageId, filename, mimeType, content, callback, error, checkExist)
+{
+	function doCreateFile()
+	{
+		var attFile = new Blob([content], {type : mimeType});
+		attFile.name = filename;
+		 
+		var reqData = {file: attFile, minorEdit: true};
+		 
+		AP.request({
+			type: 'PUT',
+			data: reqData,
+			url:  '/rest/api/content/' + pageId + '/child/attachment',
+			contentType: 'multipart/form-data',
+			success: callback,
+			error: error
+		});
+	};
+	
+	//check file exists
+	if (checkExist)
+	{
+		AP.request({
+			type: 'GET',
+			url:  '/rest/api/content/' + pageId + '/child/attachment',
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp)
+			{
+				resp = JSON.parse(resp);
+				var found = false;
+				
+				for (var i = 0; i < resp.results.length; i++)
+        		{
+	        		var item = resp.results[i];
+	        		
+	        		if (item.title == filename)
+        			{
+	        			found = true;
+	        			break;
+        			}
+        		}
+				
+				if (!found)
+				{
+					doCreateFile();
+				}
+				else
+				{
+					callback(true);
+				}
+			},
+			error: error
+		});
+	}
+	else
+	{
+		doCreateFile();
+	}
+};
+
+var lastConfigVersion = 1;
+
+function checkConfigAndSave()
+{
+	var editor = document.querySelector('#configJSON');
+	editor.parentNode.removeAttribute('data-line');
+	var content = editor.textContent;
+	$('#jsonMsg').css('color', '#000000').html('<img src="/images/spin.gif"> ' + mxResources.get('saving') + '...');
+		
+	try
+	{
+		if (content != null && content.trim().length > 0)
+		{	
+			var config = JSON.parse(content);
+			
+			// is user didn't set version manually or forgot to increase - increase it
+			if (!config.version || config.version <= lastConfigVersion) 
+			{
+				lastConfigVersion = lastConfigVersion + 0.1;
+				config.version = Number(lastConfigVersion.toFixed(1)).toString();
+				content = JSON.stringify(config);
+			}
+		}
+		else
+		{
+			content = '';
+		}
+		
+		createAttFile(configPageId, CONFIG_FILENAME, 'application/json', content, function(resp)
+		{
+			$('#jsonMsg').css('color', '#00bb00').html(mxResources.get('savedSucc'));
+		}, function()
+		{
+			$('#jsonMsg').css('color', '#bb0000').html(mxResources.get('confASaveFailedErr'));
+		});
+	}
+	catch(e)
+	{
+		var errMsg = e.message;
+		
+		try
+		{
+			var formatedErrMsg = errMsg, lineNum = -1;
+			
+			if (errMsg.indexOf('at position') > 0)
+			{
+				var errPos = parseInt(errMsg.match(/at position(:| )(\d+)/)[2]);
+				var txtBefore = content.substring(0, errPos);
+				var lineNum = (txtBefore.match(/\n/g) || []).length + 1;
+				var lastNL = txtBefore.lastIndexOf('\n');
+				var linePos = errPos - (lastNL > 0? lastNL : 0);
+				
+				formatedErrMsg = errMsg + ' [' + mxResources.get('line') + ' ' + lineNum + ', ' + mxResources.get('character') + ' ' + linePos + ']';
+			}
+			else if (errMsg.indexOf('at line ') > 0)
+			{
+				var lineNum = parseInt(errMsg.match(/at line (\d+)/)[1]);
+			}
+			
+			$('#jsonMsg').css('color', '#bb0000').html(formatedErrMsg);
+			
+			if (lineNum >= 0)
+			{
+				editor.parentNode.setAttribute('data-line', lineNum);
+				Prism.highlightElement(editor);
+				editor.parentNode.scrollTo(0, (lineNum - 1) * 20);
+			}
+		}
+		catch(e2)
+		{
+			$('#jsonMsg').css('color', '#bb0000').html(errMsg);
+		}		
+	}
+};
+
+var fixMissingComponents = function(existingPages)
+{
+	var doneCount = 0;
+	
+	function checkAllDone()
+	{
+		doneCount++;
+		
+		if (doneCount == 3)
+		{
+			getConfigFile(function(configContent)
+			{
+				//Initialize the editor
+				var editor = document.querySelector('#configJSON');
+				
+				try
+				{
+					var config = JSON.parse(configContent);
+					
+					if (config.version)
+					{
+						lastConfigVersion = parseFloat(config.version);
+					}
+					
+					configContent = JSON.stringify(config, null, 2);
+				}
+				catch(e) {} //Ignore
+				
+				editor.textContent = configContent;
+				editor = bililiteRange.fancyText(editor, Prism.highlightElement, 50);
+				
+				// add the undo's
+				bililiteRange(editor).undo(0).data().autoindent = true; // init
+				
+				editor.addEventListener ('keydown', function(evt)
+				{
+					if (evt.keyCode === 9) // tab key
+					{
+						// now insert four non-breaking spaces for the tab key
+				        var editor = evt.target;
+				        var doc = editor.ownerDocument.defaultView;
+				        var sel = doc.getSelection();
+				        var range = sel.getRangeAt(0);
+				        
+				        var tabNode = document.createTextNode("\t");
+				        range.insertNode(tabNode);
+
+				        range.setStartAfter(tabNode);
+				        range.setEndAfter(tabNode); 
+				        sel.removeAllRanges();
+				        sel.addRange(range);
+				        
+						evt.preventDefault(); // this will prevent us from tabbing out of the editor
+					}
+					// control z
+					else if ((evt.ctrlKey || evt.metaKey)  && evt.which == 90) 
+					{
+						bililiteRange.undo(evt);
+					}
+					// control y
+					else if ((evt.ctrlKey && evt.which == 89) || (evt.metaKey && evt.shiftKey  && evt.which == 90)) 
+					{
+						bililiteRange.redo(evt);
+					}
+					
+					$('#jsonMsg').html('&nbsp;');
+				});
+
+				$('#busyIndicator').hide();
+				$('#createSpace').hide();
+				$('#manageConfig').show();
+				$('#cLibTabHeader').show();
+				$('#cTempTabHeader').show();
+				
+				fetchCustomLibs();
+				setupUploadLibrary();
+			}, showError);
+		}
+	};
+	
+	function createPage(title, desc, callback)
+	{
+		if (existingPages[title])
+		{
+			if (callback) 
+			{
+				callback(existingPages[title], true);
+			}
+			else
+			{
+				checkAllDone();
+			}
+			return;
+		}
+		
+		AP.request({
+            type: 'POST',
+            url: '/rest/api/content',
+            contentType: 'application/json;charset=UTF-8',
+            data: JSON.stringify({
+            	space: {
+            	    key: 'DRAWIOCONFIG'
+            	},
+            	title: title,
+            	status: 'current',
+            	type: 'page',
+            	body: {
+            		storage: {
+            			value: desc,
+            			representation: 'storage'
+            		}
+        	    }
+            }),
+            success: function (resp) 
+            {
+            	if (callback)
+        		{
+            		callback(JSON.parse(resp).id);
+        		}
+            	else
+            	{
+            		checkAllDone();
+            	}
+            },
+            error: showError
+        });
+	};
+	
+	//Note: name shouldn't be translated as we search by page name
+	createPage('Configuration', mxResources.get('confAConfPageDesc'), function(pageId, pageExist)
+	{
+		configPageId = pageId;
+		createAttFile(pageId, CONFIG_FILENAME, 'application/json', '{}', checkAllDone, showError, pageExist);
+	});
+	
+	createPage('Libraries', mxResources.get('confALibPageDesc'), function(pageId)
+	{
+		libsPageId = pageId;
+		checkAllDone();
+	});
+	
+	createPage('Templates', mxResources.get('confATempPageDesc'), function(pageId)
+	{
+		$('#tempPageLnk').attr('href', baseUrl + '/spaces/DRAWIOCONFIG/pages/' + pageId);
+		checkAllDone();
+	});
+};
+
+var createConfigSpace = function()
+{	
+	$('#createSpace').html('<img src="/images/spin.gif"> ' + mxResources.get('working') + '...');
+	
+	AP.request({
+        type: 'POST',
+        url: '/rest/api/space',
+        contentType: 'application/json;charset=UTF-8',
+        data: JSON.stringify({
+        	key: 'DRAWIOCONFIG',
+        	name: 'draw.io Configuration',
+        	description: {
+        		plain: {
+        			value: mxResources.get('confAConfSpaceDesc'),
+        			representation: 'plain'
+        		}
+    	    }
+        }),
+        success: function () 
+        {
+        	fixMissingComponents({});
+        },
+        error: showError
+    });
+};
+
+function addLibRow(item)
+{
+	var libTable = $('#curLibs');
+	
+	var tr = $('<tr>');
+	libTable.append(tr);
+	var title = $('<td>');
+	tr.append(title);
+	title.text(item.title);
+	var action = $('<td style="text-align: center;padding: 3px 0 0 0;">')
+	tr.append(action);
+	var delBtn = $('<img src="/images/delete.png" style="width: 20px;cursor: pointer" title="' + mxResources.get('delete') + '">');
+	delBtn.click(function(e)
+	{
+		if (confirm("Are you sure?"))
+		{
+			AP.request({
+				type: 'DELETE',
+				url:  '/rest/api/content/' + item.id,
+				contentType: 'application/json;charset=UTF-8',
+				success: function(resp)
+				{
+					tr.remove();
+					
+					if (libTable.find('td').length == 0)
+					{
+						$('<div id="noLibMsg">' + mxResources.get('confANoCustLib') + '</div>').insertAfter(libTable);
+					}
+				},
+				error: function()
+				{
+					alert(mxResources.get('delFailed'));
+				}
+			});
+		}
+	});
+	action.append(delBtn);	
+	
+	var idTd = $('<td>');
+	//This code is from RemoteLibrary. It's better to call that code but it is not available in this page
+	var libConfigId = 'R' + encodeURIComponent(JSON.stringify([item.id, item.title, item._links.download]));
+	var showConfigIDBtn = $('<button class="aui-button showIDBtn">' + mxResources.get('showID') + '</button>');
+	showConfigIDBtn.click(function()
+	{
+		$('.libConfigID').show();
+		$('.showIDBtn').hide();
+	});
+	
+	idTd.append(showConfigIDBtn);
+	idTd.append($('<span class="libConfigID" style="display: none">' + libConfigId + '</span>'));
+	tr.append(idTd);
+};
+
+function fetchCustomLibs()
+{
+	AP.request({
+		type: 'GET',
+		url:  '/rest/api/content/' + libsPageId + '/child/attachment',
+		contentType: 'application/json;charset=UTF-8',
+		success: function(resp)
+		{
+			resp = JSON.parse(resp);
+			
+			if (resp.results.length == 0)
+			{
+				$('<div id="noLibMsg">' + mxResources.get('confANoCustLib') + '</div>').insertAfter('#curLibs');
+			}
+			else
+			{
+				for (var i = 0; i < resp.results.length; i++)
+	    		{
+					addLibRow(resp.results[i]);
+	    		}
+			}
+		},
+		error: function()
+		{
+			
+		}
+	});
+};
+
+function setupUploadLibrary()
+{
+    var uploadLib = document.getElementById('uploadLib');
+    
+    uploadLib.addEventListener("click", function () 
+    {
+        this.value = null;
+    });
+
+    uploadLib.addEventListener('change', function (e) {
+    	var libFile = uploadLib.files[0];
+    	
+    	if (libFile.type != 'text/xml')
+		{
+    		$('#cLibMsg').css('color', '#bb0000').html(mxResources.get('confAIncorrectLibFileType'));
+    		return;
+		}
+    	
+    	$('#cLibMsg').css('color', '#000000').html('<img src="/images/spin.gif"> ' + mxResources.get('uploading') + '...');
+    	
+    	reader = new FileReader();
+    	
+        reader.onload = function(event) 
+        {
+        	createAttFile(libsPageId, libFile.name, libFile.type, event.target.result, function(resp)
+    			{
+        			if (resp == true)
+    				{
+        				$('#cLibMsg').css('color', '#bb0000').html(mxResources.get('confALibExist'));
+    				}
+        			else
+    				{
+        				$('#noLibMsg').remove();
+        				addLibRow(JSON.parse(resp).results[0]);
+        				$('#cLibMsg').css('color', '#00bb00').html(mxResources.get('confAUploadSucc'));
+    				}
+    			}, function()
+    			{
+    				$('#cLibMsg').css('color', '#bb0000').html(mxResources.get('confAUploadFailErr'));
+    			}, true);
+        }
+        
+        reader.readAsText(libFile);
+    }, false);
+};
+
+function collectDrawAtts(success, error)
+{
+	var allTextPlainAtts = [];
+	var drawioAtts = [];
+	var pngAttMap = {};
+	var start = 0, limit = 200;
+	var searchUrl = '/rest/api/content/search?cql=' + encodeURIComponent('type=attachment') + '&expand=metadata,container,version'
+	//Collect all attachments in the system and filter them into text/plain (old draw.io mime type) and png. 
+	//	Then, if a text/plain attachment has an associated png image, then most probably this is a draw.io diagram
+	function getChunck()
+	{
+		AP.request({
+			type: 'GET',
+			url: searchUrl + '&start=' + start + '&limit=' + limit,
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp) {
+				var resp = JSON.parse(resp);
+
+				for (var i = 0; i < resp.results.length; i++)
+				{
+					var att = resp.results[i];
+					var mimeType = att.metadata.mediaType;
+					
+					if (mimeType == 'text/plain')
+					{
+						allTextPlainAtts.push(att);
+					}
+					else if (mimeType == 'image/png')
+					{
+						pngAttMap[att.container.id + '%' + att.title] = true;
+					}
+				}
+				
+				//Support pageing
+				if (resp._links && resp._links.next) 
+				{
+					start += resp.limit; //Sometimes the limit is changed by the server
+					getChunck();
+				}
+				else
+				{
+					for (var i = 0; i < allTextPlainAtts.length; i++)
+					{
+						var att = allTextPlainAtts[i];
+						
+						if (pngAttMap[att.container.id + '%' + att.title + '.png'])
+						{
+							drawioAtts.push(att);
+						}
+					}
+					
+					success(drawioAtts);
+				}
+			},
+			error: error
+		});
+	};
+	
+	getChunck();
+};
+
+function processCustomContents(pagesList, srcToDstMap, custCntMap, impBaseUrl, index, allDone, logDiv)
+{
+	if (index >= pagesList.length) 
+	{
+		allDone();
+		return;
+	}
+	
+	var pageInfo = pagesList[index];
+	var curPageId = pageInfo.id;
+	logDiv.append($('<div>' + mxResources.get('confAPrcsDiagInPage', [AC.htmlEntities(pageInfo.name)]) + '...</div>'));
+	
+	//No need for paging?
+	AP.request({
+		type: 'GET',
+		url: '/rest/api/content/' + curPageId + '/child/ac:com.mxgraph.confluence.plugins.diagramly:drawio-diagram?expand=body.storage,version&limit=200',
+		contentType: 'application/json;charset=UTF-8',
+		success: function(custCnts) 
+		{
+			var custCnts = JSON.parse(custCnts);
+			var ccIndex = 0;
+			
+			function checkDone()
+			{
+				ccIndex++;
+				
+				if (custCnts.size <= ccIndex)
+				{
+					logDiv.append($('<div>' + mxResources.get('confAPrcsDiagInPageDone', [AC.htmlEntities(pageInfo.name)]) + '</div>'));
+					processCustomContents(pagesList, srcToDstMap, custCntMap, impBaseUrl, ++index, allDone, logDiv);
+				}
+			};
+			
+			if (custCnts.size == 0)
+			{
+				checkDone();
+			}
+			
+			//build map by spaceKey and title -> id, version
+			for (var i = 0; i < custCnts.size; i++)
+			{
+				(function(custCnt)
+				{
+					var spaceKey = AC.getSpaceKey(custCnt._expandable? custCnt._expandable.space : '');
+					
+					if (custCntMap[spaceKey] == null)
+					{
+						custCntMap[spaceKey] = {};
+					}
+					
+					//Check custom content internal pageId and fix if needed
+					var info = JSON.parse(decodeURIComponent(custCnt.body.storage.value));
+
+					custCntMap[spaceKey][custCnt.title] = {id: custCnt.id, version: custCnt.version.number, revision: info.version};
+					
+					if (curPageId != info.pageId)
+					{
+						logDiv.append($('<div>' + mxResources.get('confAImpDiagram', [AC.htmlEntities(custCnt.title)]) + '...</div>'));
+						var custCntObj = custCntMap[spaceKey][custCnt.title];
+						info.name = info.diagramName;
+						info.pageId = curPageId;
+						info.revision = info.version;
+						
+						processDiagramLinks(info, srcToDstMap, spaceKey, impBaseUrl, function(resp)
+						{
+							if (resp != null)
+							{
+								try
+								{
+									info.version = JSON.parse(resp).results[0].version.number;
+									custCntObj.revision = info.version;
+								}
+								catch(e){} //ignore
+							}
+							
+							AC.saveCustomContent(spaceKey, curPageId, pageInfo.type, info.diagramName, custCnt.title, info.version,
+									custCnt.id, custCnt.version.number,
+									function(responseText) 
+									{
+										var content = JSON.parse(responseText);
+										//Update info
+										custCntObj.id = content.id;
+										custCntObj.version = content.version.number;
+										logDiv.append($('<div>' + mxResources.get('confImpDiagramSuccess', [AC.htmlEntities(custCnt.title)]) + '</div>'));
+										checkDone();
+									}, function()
+									{
+										logDiv.append($('<div style="color:red">' + mxResources.get('confAUpdateDgrmCCFailed', [AC.htmlEntities(custCnt.title)]) + '</div>'));
+										checkDone();
+									}, info.comments);
+						}, function()
+						{
+							logDiv.append($('<div style="color:red">' + mxResources.get('confAImpDiagramError', [AC.htmlEntities(custCnt.title)]) + '</div>'));
+							checkDone();
+						}, logDiv);
+					}
+					else
+					{
+						logDiv.append($('<div style="color:orange">' + mxResources.get('confAImpDiagramFailed', [AC.htmlEntities(custCnt.title)]) + '</div>'));
+						checkDone();
+					}
+				})(custCnts.results[i], i);
+			}
+		},
+		error: function()
+		{
+			logDiv.append($('<div style="color:red">' + mxResources.get('confAErrPrcsDiagInPage', [AC.htmlEntities(pageInfo.name)]) + '</div>'));
+			processCustomContents(pagesList, srcToDstMap, custCntMap, impBaseUrl, ++index, allDone, logDiv);
+		}
+	});
+};
+
+function processPageIdsImport(pagesList, srcToDstMap, custCntMap, drawioRegExps, incDrawioRegExps, impBaseUrl, index, allDone, logDiv)
+{
+	if (index >= pagesList.length) 
+	{
+		allDone();
+		return;
+	}
+
+	var pageInfo = pagesList[index];
+	var curPageId = pageInfo.id;
+	logDiv.append($('<div>' + mxResources.get('confAPrcsMacrosInPage', [AC.htmlEntities(pageInfo.name)]) + '...</div>'));
+
+	function fixDrawIoMacros(pageId, pageType, spaceKey, params, macroId, success, error, skip) 
+	{
+		//['diagramName', 'contentId', 'contentVer', 'revision', 'width', 'height', 'tempPreview', 'zoom', 'lbox', 'diagramDisplayName', 'tbstyle', 'links', 'simple', 'hiResPreview', 'inComment', 'aspect', 'pageId', 'baseUrl']
+		//inc-drawio macro specific params
+		//'diagramUrl', 'includedDiagram', 'aspectHash', 'imgPageId', 'attVer', 'custContentId'
+		//'pCenter'
+		var attName = params[0];
+		var contentId = params[1] || params[23];
+		var contentVer = params[2];
+		var revision = params[3];
+		var width = params[4];
+		var height = params[5];
+		var tempPreview = params[6];
+		var zoom = params[7];
+		var lbox = params[8];
+		var diagramDisplayName = params[9];
+		var tbstyle = params[10];
+		var links = params[11];
+		var simple = params[12];
+		var hiResPreview = params[13];
+		var inComment = params[14];
+		var aspect = params[15];
+		var macroPageId = params[16];
+		var macroBaseUrl = params[17];
+		
+		var diagramUrl = params[18];
+		var isInc = params[19] == '1';
+		var aspectHash = params[20];
+		var imgPageId = params[21];
+		var attVer = params[22];
+		var pCenter = params[24];
+		logDiv.append($('<div>' + mxResources.get('confAFixingMacro', [AC.htmlEntities(attName)]) + '...</div>'));
+		
+		var macroCurPageId = srcToDstMap[macroPageId];
+		var attInfo = {
+			pageId: macroCurPageId || pageId,
+			macroId: macroId,
+			name: attName,
+			contentId: contentId,
+			contentVer: contentVer,
+			revision: revision,
+			width: width,
+			height: height,
+			previewPng: tempPreview,
+			zoom: zoom,
+			lbox: lbox,
+			diagramDisplayName: diagramDisplayName || attName,
+			tbstyle: tbstyle,
+			links: links,
+			simple: simple,
+			hiResPreview: hiResPreview,
+			inComment: inComment,
+			aspect: aspect,
+			diagramUrl: diagramUrl,
+			isInc: isInc,
+			aspectHash: aspectHash,
+			imgPageId: imgPageId,
+			attVer: attVer,
+			pCenter: pCenter
+		};
+		
+		//If the diagram points to another page, change macro type to inc-drawio
+		if (attInfo.pageId != pageId)
+		{
+			attInfo.isInc = true;
+		}
+		
+		//(macroPageId == null) when a server macro without a pageId is imported 
+		if (macroPageId == null || (macroCurPageId != null && macroCurPageId != macroPageId))
+		{
+			var custCntInfo = custCntMap[spaceKey]? custCntMap[spaceKey][attInfo.diagramDisplayName] : null;
+
+			if (custCntInfo != null)
+			{
+				attInfo.contentId = custCntInfo.id;
+				attInfo.contentVer = custCntInfo.version;
+				attInfo.revision = custCntInfo.revision;
+				logDiv.append($('<div>' + mxResources.get('confImpDiagramSuccess', [AC.htmlEntities(attInfo.diagramDisplayName)]) + '</div>'));
+				success(attInfo);
+			}
+			else if (!attInfo.isInc) //Check links and Create a custom content 
+			{
+				processDiagramLinks(attInfo, srcToDstMap, spaceKey, impBaseUrl, function(resp)
+				{
+					if (resp != null)
+					{
+						try
+						{
+							attInfo.revision = JSON.parse(resp).results[0].version.number;
+						}
+						catch(e){} //ignore
+					}
+					
+					AC.saveCustomContent(spaceKey, attInfo.pageId, pageInfo.type, attInfo.name, attInfo.diagramDisplayName, attInfo.revision,
+							null, null,
+							function(responseText) 
+							{
+								var content = JSON.parse(responseText);
+								//Update info
+								attInfo.contentId = content.id;
+								attInfo.contentVer = content.version.number;
+								logDiv.append($('<div>' + mxResources.get('confImpDiagramSuccess', [AC.htmlEntities(attInfo.diagramDisplayName)]) + '</div>'));
+								success(attInfo);
+							}, function()
+							{
+								logDiv.append($('<div style="color:red">' + mxResources.get('confAUpdateDgrmCCFailed', [AC.htmlEntities(attInfo.diagramDisplayName)]) + '</div>'));
+								success(attInfo);
+							});
+				}, function()
+				{
+					logDiv.append($('<div style="color:red">' + mxResources.get('confAImpDiagramError', [AC.htmlEntities(attInfo.diagramDisplayName)]) + '</div>'));
+					success(attInfo);
+				}, logDiv);
+			}
+			else
+			{
+				logDiv.append($('<div>' + mxResources.get('confImpDiagramSuccess', [AC.htmlEntities(attInfo.diagramDisplayName)]) + '</div>'));
+				success(attInfo);
+			}
+		}
+		else
+		{
+			//skip
+			logDiv.append($('<div style="color:orange">' + mxResources.get('confAFixingMacroSkipped', [AC.htmlEntities(attName)]) + '</div>'));
+			skip(attInfo);
+		}
+	};
+	
+	function pageProcessed()
+	{
+		processPageIdsImport(pagesList, srcToDstMap, custCntMap, drawioRegExps, incDrawioRegExps, impBaseUrl, ++index, allDone, logDiv);
+	};
+	
+	AP.request({
+		type: 'GET',
+		url: '/rest/api/content/' + curPageId + '?expand=body.storage,version',
+		contentType: 'application/json;charset=UTF-8',
+		success: function(page) 
+		{
+			var page = JSON.parse(page);
+
+			replacePageMacro(page, drawioRegExps, fixDrawIoMacros, function(successfullyConverted1, macrosParsed1) 
+			{
+				replacePageMacro(page, incDrawioRegExps, fixDrawIoMacros, function(successfullyConverted, macrosParsed) 
+				{
+					successfullyConverted += successfullyConverted1;
+					macrosParsed += macrosParsed1;
+					
+					if (macrosParsed == 0)
+					{
+						logDiv.append($('<div>' + mxResources.get('confANoDiagFoundInPage', ['draw.io', AC.htmlEntities(page.title)]) + '</div>'));
+					}
+					if (successfullyConverted == macrosParsed)
+					{
+						logDiv.append($('<div>' + mxResources.get('confAAllDiagInPageDone', ['draw.io', AC.htmlEntities(page.title)]) + '</div>'));
+					}
+					else 
+					{
+						logDiv.append($('<div>' + mxResources.get('confAPartialDiagDone', [successfullyConverted, macrosParsed, 'draw.io', AC.htmlEntities(page.title)]) + '</div>'));
+					}
+					
+					pageProcessed();
+				}, function(resp) 
+				{
+					logDiv.append($('<div style="color:red">' + mxResources.get('confAUpdatePageFailed', [AC.htmlEntities(page.title)]) + '</div>'));
+					pageProcessed();
+				}, true);
+			}, function(resp) 
+			{
+				logDiv.append($('<div style="color:red">' + mxResources.get('confAUpdatePageFailed', [AC.htmlEntities(page.title)]) + '</div>'));
+				pageProcessed();
+			}, true);
+		},
+		error: function()
+		{
+			logDiv.append($('<div style="color:red">' + mxResources.get('confAErrFetchPage', [AC.htmlEntities(pageInfo.name)]) + '</div>'));
+			pageProcessed();
+		}
+	});
+};
+
+RegExp.escape = function(string) 
+{
+  return string.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
+};
+
+function updateGraphModelLinks(xmlDoc, srcToDstMap, spaceKey, srcBaseUrl, attInfo, logDiv)
+{
+	//TinyURL
+	// In Java: Base64.encodeBase64(longToByteArray(id));
+	// https://community.atlassian.com/t5/Confluence-questions/What-is-the-algorithm-used-to-create-the-quot-Tiny-links-quot/qaq-p/186555
+	// The long to byte array conversion is taken from this source:
+	// https://stackoverflow.com/questions/8482309/converting-javascript-integer-to-byte-array-and-back
+	function byteArrayToLong(byteArray) 
+	{
+	  var value = 0;
+	
+	  for ( var i = byteArray.length - 1; i >= 0; i--) 
+	  {
+	    value = (value * 256) + byteArray[i];
+	  }
+	  
+	  return value;
+	};
+
+	function shortUrlToPageId(shortUrl) 
+	{
+		try
+		{
+		  return byteArrayToLong(atob(shortUrl)
+		    .split('')
+		    .map(function (b) { return b.charCodeAt()}));
+		}
+		catch(e)
+		{
+			console.log('Failed to decode this short url: ', shortUrl, e);
+			return null;
+		}
+	};
+	
+	var pageIdFullUrl = /\/pages\/viewpage\.action\?pageId=(\d+)/;
+	
+	var attachmentFullUrl = /\/download\/attachments\/(\d+)/;
+
+	var tinyPageUrl = /\/x\/(\S+)/;
+
+	var cloudPageUrl = /\/spaces\/\S+\/pages\/([^\/]+)/; 
+	
+	var ceoLightboxUrl = /ceoId=(.*?)(?=&)/;
+	
+	function extractPageIdFromFullUrl(link)
+	{
+		var m = link.match(pageIdFullUrl);
+
+		if (m != null)
+		{
+			return m[1];
+		}
+
+		var m = link.match(attachmentFullUrl);
+
+		if (m != null)
+		{
+			return m[1];
+		}
+
+		return null;
+	};
+	
+	function extractPageIdFromTinyUrl(link)
+	{
+		var m = link.match(tinyPageUrl);
+
+		if (m != null)
+		{
+			var encoded = m[1];
+			var pageId = shortUrlToPageId(encoded);
+			return pageId != null? String(pageId) : null;
+		}
+		return null;
+	};
+
+	function extractPageIdFromCloudUrl(link)
+	{
+		var m = link.match(cloudPageUrl);
+
+		if (m != null)
+		{
+			return m[1];
+		}
+		return null;
+	};
+
+	function getPageIdFromAnyUrl(url)
+	{
+		var pageId = null;
+		
+		try
+		{
+			pageId = extractPageIdFromFullUrl(url);
+			
+			if (pageId == null)
+			{
+				pageId = extractPageIdFromTinyUrl(url);
+			}
+			
+			if (pageId == null)
+			{
+				pageId = extractPageIdFromCloudUrl(url);
+			}
+		}
+		catch(e)
+		{
+			console.log('Failed to process url: ', url, e);
+		}
+		
+		return pageId;
+	};
+
+	function extractPageIdFromLightboxUrl(link)
+	{
+		var m = link.match(ceoLightboxUrl);
+
+		if (m != null)
+		{
+			return m[1];
+		}
+		
+		return null;
+	};
+	
+	function fixLink(link)
+	{
+		var linkUpdated = false;
+		
+		if (link != null && link.length != 0)
+		{
+			var pmm = getPageIdFromAnyUrl(link);
+			
+			if (pmm != null)
+			{
+				var curPageId = srcToDstMap[pmm];
+				
+				if (curPageId != null)
+				{
+					link = baseUrl + '/spaces/' + encodeURIComponent(spaceKey) + '/pages/' + curPageId;
+					logDiv.append($('<div>' + mxResources.get('confAUpdateLnkToPg', [AC.htmlEntities(curPageId), AC.htmlEntities(attInfo.name)]) + '</div>'));
+					linkUpdated = true;
+				}
+			}
+			else
+			{
+				//TODO Add support to lightbox links via custom contents. This requires saving the custom content first without a version
+				//[baseUrl]/plugins/servlet/ac/com.mxgraph.confluence.plugins.diagramly/customContentViewer?content.plugin=ac%3Acom.mxgraph.confluence.plugins.diagramly%3Adrawio-diagram&space.key=[spaceKey]&content.id=[contentId]&content.version=[contentVer]&content.type=custom
+				var lightboxPageId = extractPageIdFromLightboxUrl(link);
+				
+				if (lightboxPageId != null)
+				{
+					var curPageId = srcToDstMap[lightboxPageId];
+					
+					if (curPageId != null)
+					{
+						link = link.replace(lightboxPageId, curPageId);
+						logDiv.append($('<div>' + mxResources.get('confAUpdateLBLnkToPg', [AC.htmlEntities(curPageId), AC.htmlEntities(attInfo.name)]) + '</div>'));
+						linkUpdated = true;
+					}
+				}
+			}
+
+			if (link.indexOf(srcBaseUrl) >= 0)
+			{
+				link = link.replace(new RegExp(RegExp.escape(srcBaseUrl), 'g'), baseUrl);
+				logDiv.append($('<div>' + mxResources.get('confAUpdateLnkBase', [AC.htmlEntities(srcBaseUrl), AC.htmlEntities(baseUrl), AC.htmlEntities(attInfo.name)]) + '</div>'));
+				linkUpdated = true;
+			}
+		}
+		
+		return linkUpdated? link : null;
+	};
+	
+	function fixText(text)
+	{
+		if (text == null) return null;
+		
+		var linkUpdated = false;
+		var parser = new DOMParser();
+		var labelDoc = parser.parseFromString(text, 'text/html');
+		
+		var els = labelDoc.getElementsByTagName('a');
+		
+		for (var i = 0; i < els.length; i++)
+		{
+			var el = els[i];
+			var href = null;
+			
+			try
+			{
+				href = fixLink(el.getAttribute('href'));
+			}
+			catch(e)
+			{
+				console.log(e);
+			}
+			
+			if (href != null)
+			{
+				el.setAttribute('href', href);
+				linkUpdated = true;
+			}
+		}
+		
+		return linkUpdated? labelDoc.body.innerHTML : null;
+	};
+	
+	var graph = new Graph();
+	var codec = new mxCodec(xmlDoc);
+	var model = graph.getModel();
+	codec.decode(xmlDoc.documentElement, model);
+	
+	var linkUpdated = false;
+	
+	for (var cellId in model.cells)
+	{
+		var cell = model.cells[cellId];
+		var value = model.getValue(cell);
+
+		if (value != null)
+		{
+			if (mxUtils.isNode(value))
+			{
+				var el = value;
+				var text = fixText(el.getAttribute('label'));
+
+				if (text != null)
+				{
+					el.setAttribute('label', text);
+					linkUpdated = true;
+				}
+				
+				var link = null;
+
+				try
+				{
+					link = fixLink(el.getAttribute('link'));
+				}
+				catch(e)
+				{
+					console.log(e);
+				}
+				
+				if (link != null)
+				{
+					el.setAttribute('link', link);
+					linkUpdated = true;
+				}
+			}
+			else if (typeof(value.toString) == 'function')
+			{
+				var text = fixText(value.toString());
+				
+				if (text != null)
+				{
+					cell.setValue(text);
+					linkUpdated = true;
+				}
+			}
+		}
+	}
+	
+	if (linkUpdated)
+	{
+		var enc = new mxCodec(mxUtils.createXmlDocument());
+		return enc.encode(model);
+	}
+	else
+	{
+		return null;
+	}
+};
+
+function processDiagramLinks(attInfo, srcToDstMap, spaceKey, impBaseUrl, callback, error, logDiv)
+{
+	//Used to keep the same attributes for the mxGraphModel 
+	function copyAttributes(src, dst)
+	{
+		var attrs = src.attributes;
+
+		for(var i = 0; attrs!= null && i < attrs.length; i++) 
+		{
+			dst.setAttribute(attrs[i].name, attrs[i].value);
+	    }
+	};
+	
+	AP.request(
+	{
+		url: '/download/attachments/' + attInfo.pageId + '/' + encodeURIComponent(attInfo.name) +
+			(attInfo.revision != null ? '?version=' + attInfo.revision : ''),
+		success: function(xml) 
+		{
+			try
+			{
+				var xmlDoc = mxUtils.parseXml(xml);
+				var xmlNode = xmlDoc.documentElement;
+				var fileChanged = false, fileXml = null;
+				
+				if (xmlNode.nodeName == 'mxfile')
+				{
+					var diagrams = xmlNode.getElementsByTagName('diagram');
+					
+					for (var i = 0; i < diagrams.length; i++)
+					{
+						var xmlDoc = Editor.parseDiagramNode(diagrams[i]);
+						
+						if (xmlDoc != null)
+						{
+							xmlDoc = xmlDoc.ownerDocument;
+						}
+						
+						var newDiagram = updateGraphModelLinks(xmlDoc, srcToDstMap, spaceKey, impBaseUrl, attInfo, logDiv);
+						
+						if (newDiagram != null)
+						{
+							fileChanged = true;
+							copyAttributes(xmlDoc.documentElement, newDiagram);
+							EditorUi.removeChildNodes(diagrams[i]);
+							diagrams[i].appendChild(newDiagram);
+						}
+					}
+					
+					if (fileChanged)
+					{
+						fileXml = mxUtils.getXml(xmlNode);
+					}
+				}
+				else
+				{
+					var newDiagram = updateGraphModelLinks(xmlDoc, srcToDstMap, spaceKey, impBaseUrl, attInfo, logDiv);
+					
+					if (newDiagram != null)
+					{
+						fileChanged = true;
+						copyAttributes(xmlNode, newDiagram);
+						fileXml = mxUtils.getXml(newDiagram);
+					}
+				}
+				
+				if (fileChanged)
+				{
+					AC.saveDiagram(attInfo.pageId, attInfo.name, fileXml, callback, error, false, 'application/vnd.jgraph.mxfile', mxResources.get('drawDiag'), false, false); //We don't support draft pages
+				}
+				else
+				{
+					logDiv.append($('<div>' + mxResources.get('confANoLnksInDrgm', [AC.htmlEntities(attInfo.name)]) + '</div>'));
+					callback();
+				}
+			}
+			catch(e)
+			{
+				error();
+				console.log('Processing of diagram ' + attInfo.name + ' failed', e);
+			}
+		},
+		error: error
+	});
+};
+
+//TODO Import comments from server
+//Page IDs import
+function importPageIds(csvData, logDiv)
+{
+	$('#PIBusyIcon').show();
+	logDiv.html('<br>');
+	//Code from https://gist.github.com/Jezternz/c8e9fafc2c114e079829974e3764db75 and https://stackoverflow.com/questions/1293147/javascript-code-to-parse-csv-data
+	function csvStringToArray(strData)
+	{
+	    var objPattern = new RegExp(("(\\,|\\r?\\n|\\r|^)(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|([^\\,\\r\\n]*))"), "gi");
+	    var arrMatches = null, arrData = [[]];
+	    
+	    while (arrMatches = objPattern.exec(strData))
+	    {
+	        if (arrMatches[1].length && arrMatches[1] !== ",") arrData.push([]);
+	        
+	        arrData[arrData.length - 1].push(arrMatches[2] ? 
+	            arrMatches[2].replace(new RegExp( "\"\"", "g" ), "\"") :
+	            arrMatches[3]);
+	    }
+	    
+	    return arrData;
+	};
+	
+	function removeLastChar(str)
+	{
+		return str.substr(0, str.length -1);
+	};
+	
+	try
+	{
+		var srcPageNamesMap = {}, srcToDstMap = {};
+		var lines = csvStringToArray(csvData);
+		var fileType = removeLastChar(lines[0][0]);
+		var impBaseUrl = removeLastChar(lines[1][0]);
+		
+		if (impBaseUrl.indexOf('baseUrl=') == 0)
+		{
+			impBaseUrl = impBaseUrl.substr(8);
+		}
+		else
+		{
+			$('#PIBusyIcon').hide();
+			logDiv.append($('<div style="color:red">' + mxResources.get('confAInvalidPageIdsFormat') + '</div>'));
+			return;
+		}
+		
+		if (fileType == 'cloud' || fileType == 'server')
+		{
+			for (var i = 2; i < lines.length - 1; i++) 
+			{
+				if (lines[i].length == 3)
+				{
+					var pageId = lines[i][0],
+						pageName = lines[i][1],
+						spaceKey = removeLastChar(lines[i][2]);
+					
+					if (srcPageNamesMap[spaceKey] == null)
+					{ 
+						srcPageNamesMap[spaceKey] = {}; 
+					}
+					
+					srcPageNamesMap[spaceKey][pageName] = pageId;
+				}
+				else
+				{
+					logDiv.append($('<div style="color:red">' + mxResources.get('confAInvalidPageIdsFormat') + '</div>'));
+					$('#PIBusyIcon').hide();
+					return;
+				}
+			}
+
+			var drawioRegExps = getMacroRegExps('drawio', drawioMacroParams);
+			var incDrawioRegExps = getMacroRegExps('inc-drawio', drawioMacroParams);
+			
+			logDiv.append($('<div>' + mxResources.get('confACollectingCurPages') + '...</div>'));
+			
+			collectAllPages(function(curPages)
+			{
+				logDiv.append($('<div>' + mxResources.get('confABuildingPagesMap') + '...</div>'));
+				var pages = [];
+				
+				for (var i = 0; i < curPages.length; i++)
+				{
+					if (srcPageNamesMap[curPages[i].spaceKey] != null)
+					{
+						var srcPageId = srcPageNamesMap[curPages[i].spaceKey][curPages[i].title];
+						
+						if (srcPageId != null)
+						{
+							srcToDstMap[srcPageId] = curPages[i].id;
+							pages.push({id: curPages[i].id, type: curPages[i].type, name: curPages[i].title});
+						}
+					}
+				}
+				
+				var custCntMap = {};
+				
+				logDiv.append($('<div>' + mxResources.get('confAProcessDrawDiag') + '...</div>'));
+				//Fix custom contents first to build its ids map
+				processCustomContents(pages, srcToDstMap, custCntMap, impBaseUrl, 0, function()
+				{
+					logDiv.append($('<div>' + mxResources.get('confAProcessDrawDiagDone') + '</div>'));
+					logDiv.append($('<div>' + mxResources.get('confAProcessImpPages') + '</div>'));
+					
+					processPageIdsImport(pages, srcToDstMap, custCntMap, drawioRegExps, incDrawioRegExps, impBaseUrl, 0, function()
+					{
+						logDiv.append($('<div>' + mxResources.get('confAPageIdsImpDone') + '</div>'));
+						$('#PIBusyIcon').hide();
+					}, logDiv);
+				}, logDiv);
+			}, function()
+			{
+				$('#PIBusyIcon').hide();
+				logDiv.append($('<div style="color:red">' + mxResources.get('confAErrFetchPageList') + '</div>'));
+			});
+		}
+		else
+		{
+			$('#PIBusyIcon').hide();
+			logDiv.append($('<div style="color:red">' + mxResources.get('confAInvalidPageIdsFormat') + '</div>'));
+		}
+	}
+	catch (e)
+	{
+		$('#PIBusyIcon').hide();
+		logDiv.append($('<div style="color:red">' + mxResources.get('confAInvalidPageIdsFormat') + '</div>'));
+	}
+};
+
+var baseUrl = AC.getBaseUrl();
+
+var script = document.createElement('script');
+
+script.onload = function()
+{
+	AP.sizeToParent(true);
+	
+	setTimeout(function()
+	{
+		AP.sizeToParent(true);
+	}, 5000); //Try resizing again after 5 sec since the first one fails sometimes
+	
+	AP.request({
+        type: 'GET',
+        url: '/rest/api/space?spaceKey=DRAWIOCONFIG',
+        contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+        	resp = JSON.parse(resp);
+        	
+        	if (resp.results.length > 0)
+    		{
+        		//Check all pages exists, automatically fix if a page/attachment doesn't exist
+				AP.request({
+			        type: 'GET',
+			        url: '/rest/api/content/search?cql=type%3Dpage%20and%20space%3DDRAWIOCONFIG',
+			        contentType: 'application/json;charset=UTF-8',
+			        success: function (resp) 
+			        {
+			        	resp = JSON.parse(resp);
+			        	var configSpaceFoundComponents = {};
+			        	
+			        	for (var i = 0; i < resp.results.length; i++)
+		        		{
+			        		var item = resp.results[i];
+			        		configSpaceFoundComponents[item.title] = item.id;
+		        		}
+			        	
+			        	fixMissingComponents(configSpaceFoundComponents);
+			        },
+			        error: showError
+			    });
+    		}
+        	else
+    		{
+        		$('#busyIndicator').hide();
+        		$('#createSpace').show();
+    		}
+        },
+        error: showError
+    });
+	
+	getAndApplyTranslation(function()
+	{
+		//JQuery is loaded in this page, so we can use it
+		var indexBtn = $('#indexBtn');
+
+		indexBtn.attr("disabled", null);
+		
+		indexBtn.click(function()
+		{
+			DrawIoDiagramsIndexer($('#operationLog'));
+		});
+		
+		var exportBtn = $('#exportBtn');
+		
+		exportBtn.attr("disabled", null);
+		
+		exportBtn.click(function()
+		{
+			exportPageIds($('#exportResult'));
+		});
+		
+		var createConfig = $('#createConfSpaceBtn');
+		
+		createConfig.attr("disabled", null);
+		
+		createConfig.click(createConfigSpace);
+		
+		$('#saveConfigBtn').click(checkConfigAndSave);
+		
+		var importBtn = $('#importBtn');
+		importBtn.attr("disabled", null);
+		var uploadExpFileElt = null;
+		
+		importBtn.click(function()
+		{
+			if (uploadExpFileElt == null) 
+			{
+				var input = document.createElement('input');
+				input.setAttribute('type', 'file');
+				
+				$(input).change(function()
+				{
+					if (input.files != null)
+					{
+						var file = input.files[0];
+						var reader = new FileReader();
+					
+						reader.onload = function(e)
+						{
+							importPageIds(e.target.result, $('#pageIdsImportLog'));
+						};
+						
+						reader.onerror = function(e)
+						{
+							$('#idImportErrors').html(mxResources.get('confAErrReadingExpFile'));
+						};
+						
+						reader.readAsText(file);
+						
+			    		// Resets input to force change event for same file (type reset required for IE)
+						input.type = '';
+						input.type = 'file';
+			    		input.value = '';
+					}
+				});
+				
+				input.style.display = 'none';
+				document.body.appendChild(input);
+				uploadExpFileElt = input;
+			}
+			
+			uploadExpFileElt.click();
+		});
+	});
+	
+	AJS.tabs.setup();	
+};
+
+script.src = 'https://connect-cdn.atl-paas.net/all.js';
+script.setAttribute('data-options', 'resize:false;margin:false');
+document.getElementsByTagName('head')[0].appendChild(script);
diff --git a/src/main/webapp/connect/confluence/connect-dev.json b/src/main/webapp/connect/confluence/connect-dev.json
new file mode 100644
index 000000000..575d15cca
--- /dev/null
+++ b/src/main/webapp/connect/confluence/connect-dev.json
@@ -0,0 +1,474 @@
+{
+    "name": "draw.io",
+    "description": "draw.io add-on for Confluence",
+    "key": "com.mxgraph.confluence.plugins.diagramly",
+    "baseUrl": "https://test.draw.io",
+    "enableLicensing": true,
+    "apiMigrations": {
+        "gdpr": true
+    },
+    "vendor": 
+    {
+        "name": "//SEIBERT/MEDIA",
+        "url": "https://www.seibert-media.net/"
+    },
+    "links": {
+        "documentation": "https://support.draw.io/display/DFCC/draw.io+for+Confluence+Cloud"
+    },
+    "version": "1.4.8",
+    "authentication": 
+    {
+        "type": "none"
+    },
+    "modules": 
+    {
+		"adminPages": [
+			{
+                "key": "gliffyImport",
+                "url": "/connect/confluence/admin.html",
+                "name": {
+                    "value": "draw.io Gliffy Import",
+                    "i18n": "gliffyImport"
+                }
+            },
+            {
+                "key": "drawioConfig",
+                "url": "/connect/confluence/config.html",
+                "name": {
+                    "value": "draw.io Configuration",
+                    "i18n": "drawConfig"
+                }
+            }
+		],
+        "postInstallPage": {
+          	"key": "postInstall",
+            "url": "/connect/confluence/support.html",
+            "name": {
+                "value": "Welcome to draw.io",
+                "i18n": "postinstall"
+            }
+        },
+		"generalPages": [
+            {
+                "key": "lightbox",
+                "location": "hidden",
+                "url": "/connect/confluence/viewer-1-4-8.html?lightbox=1",
+                "name": {
+                    "value": "Lightbox",
+                    "i18n": "lightbox"
+                }
+            },
+            {
+                "key": "customContentViewer",
+                "location": "hidden",
+                "url": "/connect/confluence/viewer-1-4-8.html?custom=1&contentId={content.id}",
+                "name": {
+                    "value": "draw.io Viewer",
+                    "i18n": "drawViewer"
+                }
+            },
+            {
+            	"key": "customContentEditor",
+                "location": "hidden",
+                "url": "/connect/confluence/macroEditor-1-4-8.html?custom=1",
+                "name": {
+                    "value": "draw.io Editor",
+                    "i18n": "drawEditor"
+                }
+            },
+            {
+            	"key": "macroEditor",
+                "location": "hidden",
+                "url": "/connect/confluence/macroEditor-1-4-8.html",
+                "name": {
+                    "value": "draw.io Editor",
+                    "i18n": "drawEditor"
+                }
+            },
+            {
+            	"key": "splashEditor",
+                "location": "hidden",
+                "url": "/connect/confluence/splashEditor.html",
+                "name": {
+                    "value": "draw.io Splash Editor",
+                    "i18n": "drawSplashEditor"
+                }
+            },
+            {
+	          	"key": "support",
+	          	"location": "system.help/pages",
+	            "url": "/connect/confluence/support.html",
+	            "name": {
+	                "value": "draw.io Support",
+	                "i18n": "support"
+	            }
+	        }
+        ],
+        "customContent": [{
+                "key": "drawio-diagram",
+                "name": {
+                    "value": "draw.io Diagrams",
+                    "i18n": "drawDiagrams"
+                },
+                "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}&simple=${simple}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}&displayName=${diagramDisplayName}&contentId={contentId}&custContentId={custContentId}&contentVer={contentVer}&inComment={inComment}&aspect={aspect}&pCenter={pCenter}",
+                "width": "100%",
+                "description": 
+                {
+                    "i18n": "drawDesc",
+                    "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)",
+                    	"i18n": "diagramName"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "automatic size",
+                    	"i18n": "automaticSize"
+				      },
+				      "type": "boolean",
+				      "defaultValue": "true"
+				    },
+				    {
+				      "identifier": "PageId",
+				      "name": 
+				      {
+				        "value": "Parent page ID",
+                    	"i18n": "pPageID"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "baseUrl",
+				      "name": 
+				      {
+				        "value": "Confluence Base URL",
+                    	"i18n": "baseUrl"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "Diagram width",
+                    	"i18n": "dWidth"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Diagram height",
+                   		"i18n": "dHeight"
+				      },
+				      "type": "string"
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/confluence/initEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
+				    "width": "100%",
+				    "height": "100%",
+				    "editTitle":
+				    {
+				    	"value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
+				    },
+				    "insertTitle":
+				    {
+				    	"value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
+				    }
+				},
+				"imagePlaceholder": {
+				    "width": 500,
+				    "height": 300,
+				    "url": "/connectImage",
+				    "applyChrome": true
+				},
+				"renderModes": {
+		          "default": {
+		            "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}&tempPreview=${tempPreview}&width=${width}&height=${height}&zoom=${zoom}"
+		          }
+		        }
+            },
+             {
+                "name": 
+                {
+                    "i18n": "incDrawioMacro",
+                    "value": "Embed draw.io Diagram"
+                },
+                "url": "/connect/confluence/viewer-1-4-8.html?linked=1&ceoId=${page.id}&imgPageId=${imgPageId}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}&tbstyle=${tbstyle}&simple=${simple}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}&displayName=${diagramDisplayName}&contentId=${contentId}&custContentId={custContentId}&contentVer=${contentVer}&diagramUrl=${diagramUrl}&aspect=${aspect}&aspectHash=${aspectHash}&attVer=${attVer}&service=${service}&sFileId=${sFileId}&odriveId=${odriveId}",
+                "width": "100%",
+                "description": 
+                {
+                    "i18n": "embedDesc",
+                    "value": "Embed an existing draw.io diagram"
+                }, "icon": 
+                {
+		          "width": 128,
+		          "height": 128,
+		          "url": "/images/drawlogo128.png"
+		        },
+		        "categories": [
+		          "visuals"
+		        ],
+		        "outputType": "block",
+		        "featured": true,
+                "key": "inc-drawio",
+			    "parameters": 
+			    [
+				    {
+				      "identifier": "diagramName",
+				      "name": 
+				      {
+				        "value": "Diagram name (do not change)",
+                    	"i18n": "diagramName"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "automatic size",
+                    	"i18n": "automaticSize"
+				      },
+				      "type": "boolean",
+				      "defaultValue": "true"
+				    },
+				    {
+				      "identifier": "PageId",
+				      "name": 
+				      {
+				        "value": "Parent page ID",
+                    	"i18n": "pPageID"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "baseUrl",
+				      "name": 
+				      {
+				        "value": "Confluence Base URL",
+                    	"i18n": "baseUrl"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "Diagram width",
+                    	"i18n": "dWidth"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Diagram height",
+                    	"i18n": "dHeight"
+				      },
+				      "type": "string"
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/confluence/includeDiagram.html",
+				    "width": "80%",
+				    "height": "60%"
+				},
+				"imagePlaceholder": {
+				    "width": 500,
+				    "height": 300,
+				    "url": "/connectImage",
+				    "applyChrome": true
+				},
+				"renderModes": {
+		          "default": {
+		            "url": "/connectRender?pageId=${pageId}&imgPageId=${imgPageId}&diagramName=${diagramName}&tempPreview=${tempPreview}&width=${width}&height=${height}&zoom=${zoom}&aspectHash={aspectHash}"
+		          }
+		        }
+            },
+            {
+                "name": 
+                {
+                    "i18n": "legacyDrawioMacro",
+                    "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": "legacyDesc",
+                    "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)",
+                    	"i18n": "diagramName"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "automatic size",
+                    	"i18n": "automaticSize"
+				      },
+				      "type": "boolean"
+				    },
+				    {
+				      "identifier": "PageId",
+				      "name": 
+				      {
+				        "value": "Parent page ID",
+                    	"i18n": "pPageID"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "baseUrl",
+				      "name": 
+				      {
+				        "value": "Confluence Base URL",
+                    	"i18n": "baseUrl"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "Diagram width",
+                    	"i18n": "dWidth"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Diagram Height",
+                    	"i18n": "dHeight"
+				      },
+				      "type": "string"
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/confluence/macroEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
+				    "editTitle": {
+				      "value": "Edit Markdown",
+				      "i18n": "macro.md.edit"
+				    },
+				    "insertTitle": {
+				      "value": "Insert 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}&tempPreview=${tempPreview}"
+		          }
+		        }
+            }
+        ]
+    },
+    "scopes": [
+    "read",
+    "write",
+    "delete"
+  	]
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/connect.json b/src/main/webapp/connect/confluence/connect.json
new file mode 100644
index 000000000..231caa483
--- /dev/null
+++ b/src/main/webapp/connect/confluence/connect.json
@@ -0,0 +1,485 @@
+{
+    "name": "draw.io",
+    "description": "draw.io add-on for Confluence",
+    "key": "com.mxgraph.confluence.plugins.diagramly",
+    "baseUrl": "https://confluence.draw.io",
+    "enableLicensing": true,
+    "apiMigrations": {
+        "gdpr": true
+    },
+    "vendor": 
+    {
+        "name": "//SEIBERT/MEDIA",
+        "url": "https://www.seibert-media.net/"
+    },
+    "links": {
+        "documentation": "https://support.draw.io/display/DFCC/draw.io+for+Confluence+Cloud"
+    },
+    "version": "1.4.8",
+    "authentication": 
+    {
+        "type": "none"
+    },
+    "modules": 
+    {
+		"adminPages": [
+			{
+                "key": "gliffyImport",
+                "url": "/connect/confluence/admin.html",
+                "name": {
+                    "value": "draw.io Gliffy Import",
+                    "i18n": "gliffyImport"
+                }
+            },
+            {
+                "key": "drawioConfig",
+                "url": "/connect/confluence/config.html",
+                "name": {
+                    "value": "draw.io Configuration",
+                    "i18n": "drawConfig"
+                }
+            }
+		],
+        "postInstallPage": {
+          	"key": "postInstall",
+            "url": "/connect/confluence/support.html",
+            "name": {
+                "value": "Welcome to draw.io",
+                "i18n": "postinstall"
+            }
+        },
+		"generalPages": [
+            {
+                "key": "lightbox",
+                "location": "hidden",
+                "url": "/connect/confluence/viewer-1-4-8.html?lightbox=1",
+                "name": {
+                    "value": "Lightbox",
+                    "i18n": "lightbox"
+                }
+            },
+            {
+                "key": "customContentViewer",
+                "location": "hidden",
+                "url": "/connect/confluence/viewer-1-4-8.html?custom=1&contentId={content.id}",
+                "name": {
+                    "value": "draw.io Viewer",
+                    "i18n": "drawViewer"
+                }
+            },
+            {
+            	"key": "customContentEditor",
+                "location": "hidden",
+                "url": "/connect/confluence/macroEditor-1-4-8.html?custom=1",
+                "name": {
+                    "value": "draw.io Editor",
+                    "i18n": "drawEditor"
+                }
+            },
+            {
+            	"key": "macroEditor",
+                "location": "hidden",
+                "url": "/connect/confluence/macroEditor-1-4-8.html",
+                "name": {
+                    "value": "draw.io Editor",
+                    "i18n": "drawEditor"
+                }
+            },
+            {
+            	"key": "splashEditor",
+                "location": "hidden",
+                "url": "/connect/confluence/splashEditor.html",
+                "name": {
+                    "value": "draw.io Splash Editor",
+                    "i18n": "drawSplashEditor"
+                }
+            },
+            {
+	          	"key": "support",
+	          	"location": "system.help/pages",
+	            "url": "/connect/confluence/support.html",
+	            "name": {
+	                "value": "draw.io Support",
+	                "i18n": "support"
+	            }
+	        }
+        ],
+        "customContent": [{
+                "key": "drawio-diagram",
+                "name": {
+                    "value": "draw.io Diagrams",
+                    "i18n": "drawDiagrams"
+                },
+                "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}&simple=${simple}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}&displayName=${diagramDisplayName}&contentId={contentId}&custContentId={custContentId}&contentVer={contentVer}&inComment={inComment}&aspect={aspect}&pCenter={pCenter}",
+                "width": "100%",
+                "description": 
+                {
+                    "i18n": "drawDesc",
+                    "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)",
+                    	"i18n": "diagramName"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "automatic size",
+                    	"i18n": "automaticSize"
+				      },
+				      "type": "boolean",
+				      "defaultValue": "true"
+				    },
+				    {
+				      "identifier": "PageId",
+				      "name": 
+				      {
+				        "value": "Parent page ID",
+                    	"i18n": "pPageID"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "baseUrl",
+				      "name": 
+				      {
+				        "value": "Confluence Base URL",
+                    	"i18n": "baseUrl"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "Diagram width",
+                    	"i18n": "dWidth"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Diagram height",
+                   		"i18n": "dHeight"
+				      },
+				      "type": "string"
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/confluence/initEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
+				    "width": "100%",
+				    "height": "100%",
+				    "editTitle":
+				    {
+				    	"value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
+				    },
+				    "insertTitle":
+				    {
+				    	"value" : "--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
+				    }
+				},
+				"imagePlaceholder": {
+				    "width": 500,
+				    "height": 300,
+				    "url": "/connectImage",
+				    "applyChrome": true
+				},
+				"renderModes": {
+		          "default": {
+		            "url": "/connectRender?pageId=${page.id}&diagramName=${diagramName}&tempPreview=${tempPreview}&width=${width}&height=${height}&zoom=${zoom}"
+		          }
+		        }
+            },
+             {
+                "name": 
+                {
+                    "i18n": "incDrawioMacro",
+                    "value": "Embed draw.io Diagram"
+                },
+                "url": "/connect/confluence/viewer-1-4-8.html?linked=1&ceoId=${page.id}&imgPageId=${imgPageId}&diagramName=${diagramName}&revision=${revision}&width=${width}&height=${height}&tbstyle=${tbstyle}&simple=${simple}&lbox=${lbox}&zoom=${zoom}&links=${links}&owningPageId=${pageId}&displayName=${diagramDisplayName}&contentId=${contentId}&custContentId={custContentId}&contentVer=${contentVer}&diagramUrl=${diagramUrl}&aspect=${aspect}&aspectHash=${aspectHash}&attVer=${attVer}&service=${service}&sFileId=${sFileId}&odriveId=${odriveId}",
+                "width": "100%",
+                "description": 
+                {
+                    "i18n": "embedDesc",
+                    "value": "Embed an existing draw.io diagram"
+                }, "icon": 
+                {
+		          "width": 128,
+		          "height": 128,
+		          "url": "/images/drawlogo128.png"
+		        },
+		        "categories": [
+		          "visuals"
+		        ],
+		        "outputType": "block",
+		        "featured": true,
+                "key": "inc-drawio",
+			    "parameters": 
+			    [
+				    {
+				      "identifier": "diagramName",
+				      "name": 
+				      {
+				        "value": "Diagram name (do not change)",
+                    	"i18n": "diagramName"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "automatic size",
+                    	"i18n": "automaticSize"
+				      },
+				      "type": "boolean",
+				      "defaultValue": "true"
+				    },
+				    {
+				      "identifier": "PageId",
+				      "name": 
+				      {
+				        "value": "Parent page ID",
+                    	"i18n": "pPageID"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "baseUrl",
+				      "name": 
+				      {
+				        "value": "Confluence Base URL",
+                    	"i18n": "baseUrl"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "Diagram width",
+                    	"i18n": "dWidth"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Diagram height",
+                    	"i18n": "dHeight"
+				      },
+				      "type": "string"
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/confluence/includeDiagram.html",
+				    "width": "80%",
+				    "height": "60%"
+				},
+				"imagePlaceholder": {
+				    "width": 500,
+				    "height": 300,
+				    "url": "/connectImage",
+				    "applyChrome": true
+				},
+				"renderModes": {
+		          "default": {
+		            "url": "/connectRender?pageId=${pageId}&imgPageId=${imgPageId}&diagramName=${diagramName}&tempPreview=${tempPreview}&width=${width}&height=${height}&zoom=${zoom}&aspectHash={aspectHash}"
+		          }
+		        }
+            },
+            {
+                "name": 
+                {
+                    "i18n": "legacyDrawioMacro",
+                    "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": "legacyDesc",
+                    "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)",
+                    	"i18n": "diagramName"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "automatic size",
+                    	"i18n": "automaticSize"
+				      },
+				      "type": "boolean"
+				    },
+				    {
+				      "identifier": "PageId",
+				      "name": 
+				      {
+				        "value": "Parent page ID",
+                    	"i18n": "pPageID"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "baseUrl",
+				      "name": 
+				      {
+				        "value": "Confluence Base URL",
+                    	"i18n": "baseUrl"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "Diagram width",
+                    	"i18n": "dWidth"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Diagram Height",
+                    	"i18n": "dHeight"
+				      },
+				      "type": "string"
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/confluence/macroEditor.html?ceoId=${page.id}&diagramName=${diagramName}",
+				    "editTitle": {
+				      "value": "Edit Markdown",
+				      "i18n": "macro.md.edit"
+				    },
+				    "insertTitle": {
+				      "value": "Insert 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}&tempPreview=${tempPreview}"
+		          }
+		        }
+            }
+        ]
+    },
+    "scopes": [
+    "read",
+    "write",
+    "delete"
+  	],
+  	"translations": {
+        "paths": {
+            "en-US": "/connect/confluence/i18n/en.json",
+            "fr-FR": "/connect/confluence/i18n/fr_FR.json",
+            "de-DE": "/connect/confluence/i18n/de_DE.json",
+            "ja-JP": "/connect/confluence/i18n/ja_JP.json",
+            "ko-KR": "/connect/confluence/i18n/ko_KR.json",
+            "es-ES": "/connect/confluence/i18n/es_ES.json",
+            "ru-RU": "/connect/confluence/i18n/ru_RU.json"
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/connectUtils-1-4-8.js b/src/main/webapp/connect/confluence/connectUtils-1-4-8.js
new file mode 100644
index 000000000..06c6b3551
--- /dev/null
+++ b/src/main/webapp/connect/confluence/connectUtils-1-4-8.js
@@ -0,0 +1,2958 @@
+// Renamed from ac.js. This is the version used for release 1.4.8-AC onwards
+
+var AC = {};
+
+AC.autosaveTimeout = 10000;
+AC.draftExtension = '.tmp';
+AC.draftPrefix = '~';
+AC.timeout = 25000;
+
+//Allow saving multiple times
+AC.autoExit = true;
+
+// Last Checked on 08-AUG-2017: No delete scope needed to delete drafts
+// LATER: If delete scope is needed users must upgrade to the latest json
+// Disabled. Flag to mute notifications for drafts is needed. 16-AUG-2017
+AC.draftEnabled = true; //Enabled with the new save that mute notifications for saving TODO is there notification for deleting a draft?
+
+AC.customContentEditMode = false;
+
+AC.findMacrosRegEx = new RegExp('\\<ac\\:structured\\-macro[^\\>]+?(?=ac\\:name\\=)ac\\:name\\=\\"drawio\\".*?(?=\\<\\/ac\\:structured\\-macro\\>)', 'g');
+
+AC.VERSION = '1.4.8'; //TODO Get the version
+
+AC.logError = function(message, url, linenumber, colno, err, severity)
+{
+	try
+	{
+		if (message == AC.lastErrorMessage || (message != null && url != null &&
+			((message.indexOf('Script error') != -1) || (message.indexOf('extension') != -1))))
+		{
+			// TODO log external domain script failure "Script error." is
+			// reported when the error occurs in a script that is hosted
+			// on a domain other than the domain of the current page
+		}
+		// DocumentClosedError seems to be an FF bug an can be ignored for now
+		else if (message != null && message.indexOf('DocumentClosedError') < 0)
+		{
+			AC.lastErrorMessage = message;
+			severity = ((severity != null) ? severity : (message.indexOf('NetworkError') >= 0 ||
+				message.indexOf('SecurityError') >= 0 || message.indexOf('NS_ERROR_FAILURE') >= 0 ||
+				message.indexOf('out of memory') >= 0) ? 'CONFIG' : 'SEVERE');
+			err = (err != null) ? err : new Error(message);
+			
+			var img = new Image();
+			img.src = 'https://log.draw.io/log?severity=' + severity + '&v=' + encodeURIComponent(AC.VERSION) +
+    			'&msg=clientError:' + encodeURIComponent(message) + ':url:' + encodeURIComponent(window.location.href) +
+    			':lnum:' + encodeURIComponent(linenumber) + ((colno != null) ? ':colno:' + encodeURIComponent(colno) : '') +
+    			((err != null && err.stack != null) ? '&stack=' + encodeURIComponent(err.stack) : '');
+		}
+	}
+	catch (err)
+	{
+		// do nothing
+	}
+};
+
+(function() {
+	AC.macroParams = ["diagramName", "diagramDisplayName", "revision", "pageId", "contentId", "contentVer", "baseUrl", "width", "height", "tbstyle", "links", "simple", "lbox", "zoom", "hiResPreview", "inComment", "aspect", "custContentId", "pCenter"];
+	AC.findMacroParamRegEx = {};
+	
+	for (var i = 0; i < AC.macroParams.length; i++)
+	{
+		AC.findMacroParamRegEx[AC.macroParams[i]] = new RegExp('\\<ac\\:parameter\\s+ac\\:name\\=\\"'+ AC.macroParams[i] +'\\"\\s*\\>([^\\<]+)'); 
+	}
+})();
+
+AC.getUrlParam = function(param, escape, url){
+    try{
+    	var url = url || window.location.search;
+        var regex = new RegExp(param + '=([^&]+)'),
+        data = regex.exec(url)[1];
+        // decode URI with plus sign fix.
+        return (escape) ? window.decodeURIComponent(data.replace(/\+/g, '%20')) : data;
+    } catch (e){
+        return undefined;
+    }
+};
+
+AC.getSpaceKey = function(url)
+{
+    try{
+        var url = url || window.location.href;
+        var regex = new RegExp(/\/(spaces|space)\/([^\/]+)/);
+        return decodeURIComponent(regex.exec(url)[2]);
+    } catch (e){
+        return undefined;
+    }
+};
+
+AC.getMetaTag = function(name) {
+	return document.getElementsByTagName('meta')[name].getAttribute('content');
+}
+
+AC.getBaseUrl = function()
+{
+	var baseUrl = AC.getUrlParam('xdm_e', true) + AC.getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+AC.getSiteUrl = function()
+{
+	var siteUrl = AC.getUrlParam('xdm_e', true);
+	//Ensure siteUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	if (/^https:\/\/([^\.])+\.jira\.com$/.test(siteUrl) || /^https:\/\/([^\.])+\.atlassian\.net$/.test(siteUrl)) 
+	{
+		return siteUrl;
+	}
+	throw 'Invalid siteUrl!';
+};
+
+//Code from: https://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript
+AC.b64toBlob = function(b64Data, contentType, sliceSize, isByteCharacters) 
+{
+	  contentType = contentType || '';
+	  sliceSize = sliceSize || 512;
+
+	  var byteCharacters = isByteCharacters? b64Data : atob(b64Data);
+	  var byteArrays = [];
+
+	  for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
+	    var slice = byteCharacters.slice(offset, offset + sliceSize);
+
+	    var byteNumbers = new Array(slice.length);
+	    for (var i = 0; i < slice.length; i++) {
+	      byteNumbers[i] = slice.charCodeAt(i);
+	    }
+
+	    var byteArray = new Uint8Array(byteNumbers);
+
+	    byteArrays.push(byteArray);
+	  }
+
+	  var blob = new Blob(byteArrays, {type: contentType});
+	  return blob;
+};
+
+//We need language translation for error messages mainly which are not needed immediately
+AC.initI18nAsync = function(lang, callback)
+{
+	RESOURCE_BASE = '/resources/dia';
+	
+	//define mxResources such that it is available until code is loaded
+	mxResources = {
+		get: function(key, params, def)
+		{
+			return (def || '').replace('{1}', params? (params[0] || '') : ''); //Simple replacement which covers most cases 
+		}
+	};
+	
+	var script = document.createElement('script');
+	
+	script.onload = function()
+	{
+		mxResources.loadDefaultBundle = false;
+		var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, lang) ||
+			mxResources.getSpecialBundle(RESOURCE_BASE, lang);
+		
+		mxUtils.getAll([bundle], function(xhr)
+		{
+			// Adds bundle text to resources
+			mxResources.parse(xhr[0].getText());
+			
+			if (callback) 
+			{
+				callback();
+			}
+		});
+	};
+	
+	script.src = '/js/viewer.min.js';
+	document.getElementsByTagName('head')[0].appendChild(script);
+};
+
+//AP.flag has a bug and stopped working, we'll use alert until it is fixed
+//		https://ecosystem.atlassian.net/browse/ACJS-1052
+AC.showNotification = function(notifConfig)
+{
+	AP.flag.create(notifConfig);
+	alert(notifConfig.title + ': ' + notifConfig.body);
+};
+
+AC.initAsync = function(baseUrl, contentId, initMacroData, config, lang)
+{
+	AC.customContentEditMode = contentId != null;
+	var contentVer = initMacroData != null? initMacroData.contentVer : null;
+	
+	var link = document.createElement('a');
+	link.href = location.href;
+	link.href = link.href; //to have 'host' populated under IE
+	var hostUrl = link.protocol + '//' + link.hostname;
+	var site = AC.getSiteUrl();
+	var user = null;
+	
+	AP.user.getCurrentUser(function(atlUser) 
+	{
+		user = atlUser.atlassianAccountId;
+	});
+		
+	if (lang != null)
+	{
+		var dash = lang.indexOf('_');
+		
+		if (dash >= 0)
+		{
+			lang = lang.substring(0, dash);
+		}
+		
+		AC.initI18nAsync(lang);
+	}
+	
+	var ui = 'atlas';
+	var plugins = 'ac148';
+	
+	try
+	{
+		var configObj = (config != null) ? JSON.parse(config) : null;
+		
+		if (configObj != null)
+		{
+			// Adds support for ui theme
+			if (configObj.ui != null)
+			{
+				ui = configObj.ui;
+			}
+			
+			// Redirects plugins to p URL parameter
+			if (configObj.plugins != null)
+			{
+				plugins = plugins + ';' + configObj.plugins;
+			}
+			
+			AC.hiResPreview = configObj.hiResPreview || false;
+		}
+	}
+	catch (e)
+	{
+		console.log('Configuration error', e);
+	}
+	
+	var editor = document.createElement('iframe');
+	editor.setAttribute('width', '100%');
+	editor.setAttribute('height', '100%');
+	editor.style.width = '100%';
+	editor.style.height = '100%';
+	editor.setAttribute('id', 'editorFrame');
+	editor.setAttribute('frameborder', '0');
+	//editor.setAttribute('src', hostUrl + '/?dev=1&' +
+	editor.setAttribute('src', hostUrl + '/?' +
+			'ui=' + ui + '&p=' + plugins + '&embed=1&modified=unsavedChanges' +
+			((AC.autoExit) ? '&noSaveBtn=1' : '&saveAndExit=1') +
+			'&keepmodified=1&spin=1&libraries=1&confLib=1&proto=json' +
+		((lang != null) ? '&lang=' + lang : '') + ((site != null) ? '&site=' + encodeURIComponent(site) : '') +
+		((user != null) ? '&user=' + encodeURIComponent(user) : ''));
+
+	var initReceived = false;
+	var draftHandled = false;
+	var waitingForAttachments = false;
+	var xmlReceived = null;
+	var draftXml = null;
+	var draftName = null;
+	var filename = null;
+	var theMacroData = null;
+	var pageId = null;
+	var draftPage = false;
+	var theLocation = null;
+	var attachments = null;
+
+	var serverName = AC.getSiteUrl();
+	var index1 = serverName.indexOf('//');
+
+	if (index1 > 0)
+	{
+		var index2 = serverName.indexOf('/', index1 + 2);
+		
+		if (index2 > index1)
+		{
+			serverName = serverName.substring(index1 + 2, index2);
+		}
+		else
+		{
+			serverName = serverName.substring(index1 + 2);
+		}
+	}
+	
+	function startEditor()
+	{
+		if (initReceived && xmlReceived != null && draftHandled && !waitingForAttachments)
+		{
+			AC.init(baseUrl, theLocation, pageId, editor, filename, xmlReceived, draftName, draftXml, theMacroData, draftPage);
+		}
+	};
+	
+	function loadDraft()
+	{
+		if (waitingForAttachments)
+		{
+			return;
+		}
+		
+		if (AC.draftEnabled && pageId != null && attachments != null &&
+			(draftName != null || xmlReceived == '') && !draftHandled)
+		{
+			// Searches for pending new drafts from this user
+			var prefix = '~drawio~' + user + '~';
+			
+			// Check if attachments contains draftName
+			for (var i = 0; i < attachments.length; i++)
+			{
+				var fn = attachments[i].title;
+				
+				if (draftName == null && attachments[i].fileSize > 0 &&
+					fn.substring(0, prefix.length) === prefix &&
+					fn.substring(fn.length - AC.draftExtension.length) === AC.draftExtension)
+				{
+					filename = fn.substring(prefix.length, fn.length - AC.draftExtension.length);
+					draftName = fn;						
+				}
+				
+				if (fn == draftName)
+				{
+					//keeping the block of AP.require to minimize the number of changes!
+					{
+						var acceptResponse = true;
+						var timeoutHandler = function()
+						{
+							acceptResponse = false;
+							document.body.style.backgroundSize = 'auto auto';
+							document.body.style.backgroundImage = 'url(/images/stop-flat-icon-80.png)';
+							editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+	
+							AC.showNotification({
+								  title: mxResources.get('confTimeout'),
+								  body: mxResources.get('confSrvTakeTooLong', [serverName]),
+								  type: 'error',
+								  close: 'manual'
+								});
+
+							//TODO find how to listen to flag close event, currently just close the editor immediately
+//							messages.onClose(message, function()
+//							{
+				    			AP.dialog.close();
+//							});
+						};
+						
+						var timeoutThread = window.setTimeout(timeoutHandler, AC.timeout);
+						
+						AC.loadDiagram(pageId, draftName, null, function(loadResp)
+						{
+							//console.trace('DRAFT: Found', draftName, loadResp);
+					    		window.clearTimeout(timeoutThread);
+					    		
+					    		if (acceptResponse)
+						    	{
+								if (loadResp != null && loadResp.length > 0)
+								{
+									draftXml = loadResp;
+								}
+								
+								draftHandled = true;
+								startEditor();
+						    	}
+						}, function()
+						{
+					    		window.clearTimeout(timeoutThread);
+					    		
+					    		if (acceptResponse)
+						    	{
+					    			draftHandled = true;
+					    			startEditor();
+						    	}
+						});
+					};
+					
+					// Terminates function
+					return;
+				}
+			}
+		}
+
+		draftHandled = true;
+		startEditor();
+	};
+	
+	var initHandler = function(evt)
+	{
+		if (evt.origin == hostUrl)
+		{
+			var msg = JSON.parse(evt.data);
+			
+			if (msg.event == 'configure')
+			{
+				// Configure must be sent even if JSON invalid
+				var configObj = {compressXml: false};
+				
+				try
+				{
+					configObj = JSON.parse(config);
+
+					// Overrides default
+					if (configObj != null && configObj.compressXml == null)
+					{
+						configObj.compressXml = false;
+					}
+				}
+				catch (e)
+				{
+					// ignore
+				}
+				
+				editor.contentWindow.postMessage(JSON.stringify({action: 'configure',
+					config: configObj}), '*');
+			}
+			else if (msg.event == 'init')
+			{
+				window.removeEventListener('message', initHandler);
+				document.body.style.backgroundImage = 'none';
+				initReceived = true;
+				startEditor();
+			}
+		}
+	};
+
+	window.addEventListener('message', initHandler);
+
+	AP.getLocation(function(location) 
+	{
+		theLocation = location;
+		
+	    var infoReady = function(data, macroData_p)
+	    {
+	    	if (pageId == null || isNaN(pageId))
+    		{
+    			document.body.style.backgroundImage = 'url(/images/stop-flat-icon-80.png)';
+    			document.body.style.backgroundSize = 'auto auto';
+    			
+	    		if (data != null && data.target == 'contentcreate') 
+	    		{
+	    			AC.showNotification({
+						  title: mxResources.get('confCannotInsertNew'),
+						  body: mxResources.get('confSaveTry'),
+						  type: 'error',
+						  close: 'manual'
+						});
+	    		}
+	    		else 
+	    		{
+	    			AC.showNotification({
+						  title: mxResources.get('confCannotGetID'),
+						  body: mxResources.get('confContactAdmin'),
+						  type: 'error',
+						  close: 'manual'
+						});
+	    		}
+	    		
+	    		//TODO find how to listen to flag close event, currently just close the editor immediately
+//    			messages.onClose(message, function()
+//    			{
+	    			AP.dialog.close();
+//    			});
+    		}
+	    	else
+	    	{
+	    		// Workaround for blocked referrer policy in iframe
+	    		editor.setAttribute('src', editor.getAttribute('src') + '&base=' +
+	    			encodeURIComponent(baseUrl + '/pages/viewpage.action?pageId=' + pageId) +
+	    			//adding config here to be the last in the url
+	    			(config != null? '&configure=1' : ''));
+	    		document.body.appendChild(editor);
+	    		
+		    	// Not needed if drafts not enabled
+		    	if (AC.draftEnabled)
+		    	{
+		    		waitingForAttachments = true;
+		    		var acceptResponse2 = true;
+		    		var timeoutHandler2 = function()
+		    		{
+		    			acceptResponse2 = false;
+		    			document.body.style.backgroundSize = 'auto auto';
+		    			document.body.style.backgroundImage = 'url(/images/stop-flat-icon-80.png)';
+		    			editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+
+		    			AC.showNotification({
+							  title: mxResources.get('confTimeout'),
+							  body: mxResources.get('confSrvTakeTooLong', [serverName]),
+							  type: 'error',
+							  close: 'manual'
+							});
+		    		
+		    			//TODO find how to listen to flag close event, currently just close the editor immediately
+//		    			messages.onClose(message, function()
+//		    			{
+			    			AP.dialog.close();
+//		    			});
+		    		};
+		    		
+		    		var timeoutThread2 = window.setTimeout(timeoutHandler2, AC.timeout);
+				
+		    		//TODO do a search instead if possible
+		    		AC.getPageAttachments(pageId, function(atts) 
+    				{
+						window.clearTimeout(timeoutThread2);
+			    		
+			    		if (acceptResponse2)
+				    	{
+			    			waitingForAttachments = false;
+			    			attachments = atts;
+			    			loadDraft();
+				    	}
+    				}, function(res)
+					{
+			    		window.clearTimeout(timeoutThread2);
+			    		
+			    		if (acceptResponse2)
+				    	{
+			    			waitingForAttachments = false;
+			    			draftHandled = true;
+				    	}
+					});
+		    	}
+	    	
+				var acceptResponse = true;	
+				var timeoutHandler = function()
+				{
+					acceptResponse = false;
+					document.body.style.backgroundSize = 'auto auto';
+					document.body.style.backgroundImage = 'url(/images/stop-flat-icon-80.png)';
+					editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+
+					AC.showNotification({
+						  title: mxResources.get('confTimeout'),
+						  body: mxResources.get('confSrvTakeTooLong', [serverName]),
+						  type: 'error',
+						  close: 'manual'
+						});
+				
+					//TODO find how to listen to flag close event, currently just close the editor immediately
+//						messages.onClose(message, function()
+//						{
+		    			AP.dialog.close();
+//						});
+				};
+				
+				var timeoutThread = window.setTimeout(timeoutHandler, AC.timeout);
+			
+				AP.confluence.getMacroData(function (macroData) 
+		    	{
+		    		window.clearTimeout(timeoutThread);
+		    		
+		    		if (acceptResponse)
+			    	{
+			    		var name = null, revision, owningPageId;
+	    				
+	    				if (AC.customContentEditMode)
+    					{
+	    					name = macroData_p.diagramName;
+	    					revision = macroData_p.revision;
+	    					owningPageId = pageId;
+	    					
+	    					//fill the macro data
+	    					theMacroData = macroData_p;
+    					}
+	    				else if (macroData != null)
+    					{
+	    					theMacroData = macroData;
+	    					name = macroData.diagramName || '';
+	    					revision = parseInt(macroData.revision);
+	    					owningPageId  = macroData.pageId;
+    					}
+	    				
+	    				if (name != null && name.length > 0)
+			    		{
+				    		draftName = (name != null) ? AC.draftPrefix + name + AC.draftExtension : null;
+				    		loadDraft();
+			    			
+			    			if (isNaN(revision))
+			    			{
+			    				revision = null;
+			    			}
+			    			
+			    			timeoutThread = window.setTimeout(timeoutHandler, AC.timeout);
+	
+			    			AC.loadDiagram(pageId, name, revision, function(loadResp)
+			    			{
+					    		window.clearTimeout(timeoutThread);
+					    		
+					    		if (acceptResponse)
+						    	{
+				    				xmlReceived = loadResp;
+				    				filename = name;
+									//console.trace('DRAFT: Created', AC.draftPrefix + filename + AC.draftExtension);
+									startEditor();
+						    	}
+			    			}, 
+			    			function(resp) 
+			    			{
+					    		window.clearTimeout(timeoutThread);
+					    		
+					    		if (acceptResponse)
+						    	{
+				    				editor.parentNode.removeChild(editor);
+				    				
+				    				AC.showNotification({
+										  title: mxResources.get('readErr'),
+										  body: (resp.status == 404) ?
+												  mxResources.get('fileNotFound') : mxResources.get('errorLoadingFile'),
+										  type: 'error',
+										  close: 'manual'
+										});
+				    		
+				    				//TODO find how to listen to flag close event, currently just close the editor immediately
+//				    				messages.onClose(message, function()
+//				    				{
+						    			AP.dialog.close();
+//				    				});
+						    	}
+			    			}, owningPageId, true);
+			    		}
+			    		else
+			    		{
+			    			filename = null;
+				    		xmlReceived = '';
+				    		loadDraft();
+			    		}
+			    	}
+		    	});
+	    	}
+	    };
+		
+	    var extEditingError = function()
+	    {
+	    	AC.showNotification({
+				  title: mxResources.get('editingErr'),
+				  body: mxResources.get('confExtEditNotPossible'),
+				  type: 'error',
+				  close: 'manual'
+				});
+	
+			AP.dialog.close({noBack: true});
+	    };
+	    
+		//keeping the block of AP.require to minimize the number of changes!
+		{
+		    AP.navigator.getLocation(function (data)
+		    {
+		    	AC.inComment = (data != null && data.context != null && data.context.contentType == 'comment');
+
+	    		if (AC.customContentEditMode) //we can also find the contentId in data.target == 'addonmodule' and data.context.context["content.id"][0]
+    			{
+	    			//load the custom content to get the page info
+	    			AP.request({
+                        type: 'GET',
+                        url: '/rest/api/content/' + contentId + '/?expand=body.storage,version' + (contentVer != null? ('&version=' + contentVer) : ''),
+                        contentType: 'application/json;charset=UTF-8',
+                        success: function (resp) 
+                        {
+                            resp = JSON.parse(resp);
+                            
+                            var info = JSON.parse(decodeURIComponent(resp.body.storage.value));
+                            
+                            pageId = info.pageId;
+                            info.displayName = resp.title;
+                            info.contentVer = resp.version.number;
+                            
+                            //Out of sync custom content. This happen when a page is moved/copied
+                        	if (initMacroData != null && 
+                        			((initMacroData.pageId != null && initMacroData.pageId != pageId) 
+                					|| (initMacroData.diagramName != null && initMacroData.diagramName != info.diagramName)
+                					|| (initMacroData.diagramDisplayName != null && initMacroData.diagramDisplayName != info.displayName)
+                					|| (initMacroData.revision != null && initMacroData.revision != info.version)))
+                        	{
+                            	pageId = initMacroData.pageId; 
+                            	
+                            	info.createCustomContent = true;
+                        	}
+                            
+                            AC.findMacroInPage(pageId, info.diagramName, info.version, function(macroFound, originalBody, matchingMacros, page)
+                    		{
+                            	if (macroFound)
+                        		{
+                            		if (info.createCustomContent)
+                        			{
+                                     	info.diagramName = initMacroData.diagramName;
+                                    	info.displayName = initMacroData.diagramDisplayName;
+                                    	info.version = initMacroData.revision || 1; //using version one when null is received which is usually the case 
+               
+                            			//Create a new custom content and update the macro
+                            			var spaceKey = AC.getSpaceKey(page._expandable.space);
+            							var pageType = page.type;
+        
+            							AC.saveCustomContent(spaceKey, pageId, pageType, info.diagramName, info.displayName, info.version,
+            									null, null,
+            									function(responseText) 
+            									{
+            										var content = JSON.parse(responseText);
+            										
+            										contentId = content.id;
+            										info.contentVer = content.version? content.version.number : 1;
+            										contentVer = info.contentVer;
+            										
+            										AC.adjustMacroParametersDirect(pageId, 
+            												{pageId: pageId, revision: info.version, contentId: content.id, custContentId: content.id, contentVer: contentVer},
+            												originalBody, matchingMacros, page, function()
+    												{
+            											infoReady(null, matchingMacros[0].macroParams);
+    												}, extEditingError);
+            									}, extEditingError);
+                        			}
+                            		else
+                        			{
+                            			infoReady(null, matchingMacros[0].macroParams);
+                        			}
+                        		}
+                            	else //A published page that has a draft content containing the diagram OR the diagram is deleted from the page OR diagram is edited and page is old!
+                        		{
+                            		var directPageEdit = contentVer != null;
+                            		
+                            		if (directPageEdit)
+                        			{
+                            			//We added translation since sometimes resources doesn't load quickly for this error
+                            			AC.showNotification({
+	        							  title: mxResources.get('confEditedExt', null, 'Diagram/Page edited externally'),
+	          							  body: mxResources.get('confEditedExtRefresh', null, 'Diagram/Page is edited externally. Please refresh the page.'),
+	          							  type: 'error',
+	          							  close: 'manual'
+                            			});
+                            			AP.dialog.close({noBack: true, noBackOnClose: directPageEdit});                            			
+                        			}
+                            		else //If this is edit of a custom content, we allow editing since it can be a stranded diagram (only exists as an attachment and custom contents BUT not as a macro)
+                        			{
+                            			//We added translation since sometimes resources doesn't load quickly for this error
+                            			AC.showNotification({
+                            				title: mxResources.get('macroNotFound', null, 'Macro Not Found'),
+	  	          							body: mxResources.get('confEditDraftDelOrExt', null, 'This diagram is in a draft page, is deleted from the page, or is edited externally. ' + 
+	  	          										  'It will be saved as a new attachment version and may not be reflected in the page.'),
+	  	          							type: 'warning',
+	  	          							close: 'manual'
+                            			});
+                            			AC.strandedMode = true;
+                            			//Add required info that is usually found in the macro
+                            			info.contentId = contentId;
+                            			info.custContentId = contentId;
+                            			info.revision = info.version;
+                            			info.diagramDisplayName = info.displayName;
+                            			infoReady(null, info);
+                        			}
+                        		}
+                    		}, function() //On error, it means the page is a newly created draft that is not published
+                    		{
+                    			AC.showNotification({
+    							  title: mxResources.get('diagNotFound'),
+    							  body: mxResources.get('confDiagNotPublished'),
+    							  type: 'error',
+    							  close: 'manual',
+      							  actions: {
+    							    'actionkey': mxResources.get('retBack')
+    							  }
+    							});
+    	    		
+				    			AP.dialog.close({noBack: true});
+                    		});
+                        },
+                        error: extEditingError //We can create the custom content and fix this case but it adds more complexity to rare situation (e.g., a page is copied then the source page is deleted) 
+                    });
+    			}
+	    		else if (data != null && data.context != null
+			    		&& (data.target == 'contentedit' || data.target == 'contentcreate' || AC.inComment))
+	    		{
+		    		draftPage = (data.target == 'contentcreate');
+		    		pageId = data.context.contentId;
+		    		infoReady(data);
+		    	}
+	    		else
+    			{
+	    			infoReady();
+    			}
+		    });
+		};
+	});
+};
+
+
+AC.getPageAttachments = function(pageId, success, error)
+{
+	var attachments = [];
+
+	function getAttsChunk(nextUrl)
+	{
+		AP.request({
+			url: nextUrl != null? nextUrl : '/rest/api/content/' + pageId + '/child/attachment?limit=100',
+			type: 'GET',
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp) 
+			{
+				resp = JSON.parse(resp);				
+				Array.prototype.push.apply(attachments, resp.results);
+				
+				//Support paging
+				if (resp._links && resp._links.next) 
+				{
+					getAttsChunk(resp._links.next);
+				}
+				else
+				{
+					success(attachments);
+				}
+			},
+			error : error
+		});
+	};
+	
+	getAttsChunk();	
+};
+
+AC.searchDiagrams = function(searchStr, success, error)
+{
+	//Note: we manually filter trashed diagrams as we couldn't make cqlcontext={"contentStatuses":["current"]} work
+	AP.request({
+		url: '/rest/api/content/search?cql=' + encodeURIComponent('type="ac:com.mxgraph.confluence.plugins.diagramly:drawio-diagram" and title ~ "*' + searchStr + '*"') + '&limit=50&expand=body.storage,version',  
+		success: function(resp) 
+		{
+			resp = JSON.parse(resp);
+			var retList = [];
+			var gliffyList = [];
+			var list = resp.results; 
+			var customContentMap = {};
+			if (list)
+			{
+				//Add items in the list and convert the list to map so we can search by name efficiently
+				for (var i = 0; i < list.length; i++)
+				{
+					if (list[i].status == 'trashed') continue;
+					
+					try 
+					{
+						var attInfo = JSON.parse(decodeURIComponent(list[i]["body"]["storage"]["value"]));
+						
+						customContentMap[attInfo.pageId + '|' + attInfo.diagramName] = true;
+						
+						retList.push({
+							title: list[i].title,
+							url: "/download/attachments/" + attInfo.pageId + "/"
+								+ encodeURIComponent(attInfo.diagramName)
+								+ '?version=' + attInfo.version,
+							info: {
+								id: list[i].id,
+								contentId: list[i].id,
+								custContentId: list[i].id,
+								contentVer: list[i].version.number,
+								pageId: attInfo.pageId,
+								version: attInfo.version,
+								name: attInfo.diagramName,
+								displayName: list[i].title
+							},
+							imgUrl: baseUrl + "/download/attachments/" + attInfo.pageId + "/"
+								+ encodeURIComponent(attInfo.diagramName)
+								+ ".png?api=v2&version=" + attInfo.version
+						});
+					}
+					catch(e)
+					{
+						//ignore, this should not happen!
+						console.log(e);
+					}
+				}
+			}
+			
+			//This request search for Gliffy files as well as to support old draw.io diagrams that have no associated draw.io custom contents
+			AP.request({
+				url: '/rest/api/content/search?cql=' + encodeURIComponent('type=attachment and (title ~ "*' + searchStr + '*" or title ~ "*' + searchStr + '*.png")') + '&limit=200&expand=metadata', //limit is 200 to get as much results as possible
+				success: function(resp) 
+				{
+					resp = JSON.parse(resp);
+					var list = resp.results; 
+					if (list)
+					{
+						var attMap = {};
+						//convert the list to map so we can search by name efficiently
+						for (var i = 0; i < list.length; i++)
+						{
+							if (list[i].status == 'trashed') continue;
+							
+							//key is pageId + | + att name
+							var pageId = list[i]["_links"]["webui"].match(/pages\/(\d+)/);
+							
+							if (pageId != null)
+							{
+								var key = pageId[1] + '|' + list[i].title;
+								
+								//exclude contents already found in the custom contents
+								if (!customContentMap[key])
+								{
+									attMap[key] = {att: list[i], pageId: pageId[1]};
+								}
+							}
+						}
+
+						function getAttObj(att, isImport, noImg)
+						{
+							var obj = {
+								title: att.att.title,
+								url: "/download/attachments/" + att.pageId + "/"
+									+ encodeURIComponent(att.att.title),
+								info: {
+									id: att.att.id, 
+									pageId: att.pageId,
+									name: att.att.title,
+									isImport: isImport
+								}
+							};
+							
+							if (noImg)
+							{
+								obj.noImg = true;
+							}
+							else
+							{
+								obj.imgUrl = baseUrl + '/download/attachments/' + att.pageId + '/'
+											+ encodeURIComponent(att.att.title)
+											+ '.png?api=v2';
+							}
+							
+							return obj;
+						};
+						
+						for (var key in attMap) 
+						{
+							var att = attMap[key];
+							var mimeType = att.att.metadata.mediaType;
+							
+							if (mimeType == 'application/gliffy+json')
+							{
+								gliffyList.push(getAttObj(att, true));
+							}
+							else if (mimeType == 'text/plain' && attMap[key+'.png']) //each draw.io attachment should have an associated png preview and mimeType is text/plain
+							{
+								//We cannot get the latest version info, it can be searched when a diagram is selected
+								retList.push(getAttObj(att));
+							}
+						}
+					}
+
+					success(retList, null, {"Gliffy": gliffyList});
+				},
+				error : error
+			});
+		},
+		error : error
+	});
+};
+
+AC.getRecentDiagrams = function(success, error)
+{
+	//I think it is safe now to base the recent documents on draw.io custom contents only since it is in production for long time now
+	AP.request({
+		url: '/rest/api/content/search?cql=type%3D%22ac%3Acom.mxgraph.confluence.plugins.diagramly%3Adrawio-diagram%22%20and%20lastmodified%20%3E%20startOfDay(%22-7d%22)&limit=50&expand=body.storage,version', // type="ac:com.mxgraph.confluence.plugins.diagramly:drawio-diagram" and lastmodified > startOfDay("-7d") //modified in the last 7 days
+		success: function(resp) 
+		{
+			resp = JSON.parse(resp);
+			var retList = [];
+			var list = resp.results; 
+			if (list)
+			{
+				//Add items in the list
+				for (var i = 0; i < list.length; i++)
+				{
+					try 
+					{
+						var attInfo = JSON.parse(decodeURIComponent(list[i]["body"]["storage"]["value"]));
+						
+						retList.push({
+							title: list[i].title,
+							url: "/download/attachments/" + attInfo.pageId + "/"
+								+ encodeURIComponent(attInfo.diagramName)
+								+ '?version=' + attInfo.version,
+							info: {
+								id: list[i].id,
+								contentId: list[i].id,
+								custContentId: list[i].id,
+								contentVer: list[i].version.number,
+								pageId: attInfo.pageId,
+								version: attInfo.version,
+								name: attInfo.diagramName,
+								displayName: list[i].title
+							},
+							imgUrl: baseUrl + "/download/attachments/" + attInfo.pageId + "/"
+								+ encodeURIComponent(attInfo.diagramName)
+								+ ".png?api=v2&version=" + attInfo.version
+						});
+					}
+					catch(e)
+					{
+						//ignore, this should not happen!
+						console.log(e);
+					}
+				}
+			}
+			
+			success(retList);
+		},
+		error : error
+	});
+};
+
+AC.getPageDrawioDiagrams = function(pageId, success, error)
+{
+	AP.request({
+        type: 'GET',
+        url: '/rest/api/content/' + pageId + '/child/ac:com.mxgraph.confluence.plugins.diagramly:drawio-diagram?limit=100&expand=body.storage,version',
+        contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+        	resp = JSON.parse(resp);
+			var retList = [];
+			var list = resp.results; 
+			
+			if (list)
+			{
+				//Add items in the list
+				for (var i = 0; i < list.length; i++)
+				{
+					try 
+					{
+						var attInfo = JSON.parse(decodeURIComponent(list[i]["body"]["storage"]["value"]));
+						var diagramName = list[i].title.replace('.drawio', '');
+						
+						retList.push({
+							title: diagramName,
+							url: "/download/attachments/" + attInfo.pageId + "/"
+								+ encodeURIComponent(attInfo.diagramName)
+								+ '?version=' + attInfo.version,
+							info: {
+								id: list[i].id,
+								contentId: list[i].id,
+								custContentId: list[i].id,
+								contentVer: list[i].version.number,
+								pageId: attInfo.pageId,
+								version: attInfo.version,
+								name: attInfo.diagramName,
+								displayName: diagramName
+							},
+							imgUrl: baseUrl + "/download/attachments/" + attInfo.pageId + "/"
+								+ encodeURIComponent(attInfo.diagramName)
+								+ ".png?api=v2&version=" + attInfo.version
+						});
+					}
+					catch(e)
+					{
+						//ignore, this should not happen!
+						console.log(e);
+					}
+				}
+			}
+			
+			success(retList);
+        },
+        error: error
+	});
+};
+
+AC.getCustomTemplates = function(success, error)
+{
+	var customCats = {};
+	var customCatsCount = 0;
+	var customCatsDone = 0;
+	
+	function checkDone()
+	{
+		customCatsDone++;
+		
+		if (customCatsCount == customCatsDone)
+		{
+			success(customCats, customCatsDone);
+		}
+	}
+	
+	AP.request({
+        type: 'GET',
+        url: '/rest/api/content/search?cql=type%3Dpage%20and%20space%3DDRAWIOCONFIG%20and%20title%3DTemplates', //type=page and space=DRAWIOCONFIG and title=Templates.
+        contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+            resp = JSON.parse(resp);
+            
+            if (resp.size == 1)
+           	{
+            	var tempPageId = resp.results[0].id;
+            	//load the configuration file
+        		AP.request({
+                    type: 'GET',
+        			url: '/rest/api/content/search?limit=50&cql=type%3Dpage%20and%20space%3DDRAWIOCONFIG%20and%20ancestor%3D' + tempPageId, //type=page and space=DRAWIOCONFIG and ancestor={tempPageId}. Limit 50 which is most probably more than enough
+                    contentType: 'application/json;charset=UTF-8',
+                    success: function (resp) 
+                    {
+                    	resp = JSON.parse(resp);
+                    	
+                    	if (resp.size > 0)
+                       	{
+                    		for (var i = 0; i < resp.results.length; i++)
+                    		{
+                    			var cat = resp.results[i];
+                    			customCats[cat.title] = [];
+                    			customCatsCount++;
+                    			
+                    			(function(cat2){
+                    				AC.getPageDrawioDiagrams(cat2.id, function(catList)
+                        			{
+                        				customCats[cat2.title] = catList;
+                        				checkDone();
+                        			}, checkDone); //On error, just ignore this page
+                    			})(cat);
+                    		}
+                       	}
+                    	else 
+                       	{
+                        	success({}, 0);
+                       	}
+        			},
+        			error: error
+        		});
+           	}
+            else 
+           	{
+            	success({}, 0);
+           	}
+		},
+		error: error
+	});	
+};
+
+AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, draftName, draftXml, macroData, draftPage)
+{
+	// Hides the logo
+	document.body.style.backgroundImage = 'none';
+	var user = null;
+	
+	AP.user.getCurrentUser(function(atlUser) 
+	{
+		user = atlUser.atlassianAccountId;
+	});
+	
+	var draftExists = false;
+
+	var diagramDisplayName = diagramName, contentId = null, contentVer = null, lastMacroVer = null, revision = null;
+
+	if (macroData != null)
+	{
+		diagramDisplayName = macroData.diagramDisplayName || diagramName;
+		contentId = macroData.contentId || macroData.custContentId;
+		contentVer = macroData.contentVer;
+		lastMacroVer = macroData.revision;
+		AC.aspect = macroData.aspect;
+		AC.hiResPreview = macroData.hiResPreview != null? macroData.hiResPreview == '1' : AC.hiResPreview;
+	}
+		
+	//keeping the block of AP.require to minimize the number of changes!
+	{
+		var newPage = location.indexOf('createpage.action') > -1 ? true : false;
+		var diagramXml = null;
+		var link = document.createElement('a');
+		link.href = location.href;
+		link.href = link.href; //to have 'host' populated under IE
+		var hostUrl = link.protocol + '//' + link.hostname;
+		
+	   	function removeDraft(fn, err)
+	   	{
+			if (draftExists)
+			{
+				AC.removeAttachment(pageId, draftName, fn, err);
+			}
+			else
+			{
+				fn();
+			}
+	   	};
+		
+	   	function saveDraft(xml, fn, err)
+	   	{
+	   		//console.trace('DRAFT: Save', draftName, xml);
+	   		
+			AC.saveDiagram(pageId, draftName,
+				xml,
+				function(res)
+				{
+					var obj = null;
+					
+					try
+					{
+						obj = JSON.parse(res);
+					}
+					catch (e)
+					{
+						// ignore
+					}
+					
+					//console.trace('DRAFT: Saved', obj);
+					
+					if (obj != null && obj.error != null)
+					{
+						if (err != null)
+						{
+							err(obj);
+						}
+					}
+					else
+					{
+						draftExists = true;
+						
+						if (fn != null)
+						{
+							fn(obj);
+						}
+					}
+				},
+				function(res)
+				{
+					//console.trace('DRAFT: Save error');
+					var obj = null;
+					
+					try
+					{
+						obj = JSON.parse(res);
+					}
+					catch (e)
+					{
+						// ignore
+					}
+					
+					if (obj != null && obj.error != null)
+					{
+						if (err != null)
+						{
+							err(obj);
+						}
+					}
+				}, false, 'application/vnd.jgraph.mxfile', mxResources.get('createdByDraw'), false, draftPage);
+	   	};
+	   	
+		function showTemplateDialog()
+		{
+			if (AC.draftEnabled)
+			{
+				editor.contentWindow.postMessage(JSON.stringify({action: 'template', callback: true, enableRecent: true, enableSearch: true, enableCustomTemp: true}), '*');
+			}
+			else
+			{
+				editor.contentWindow.postMessage(JSON.stringify({action: 'template', enableRecent: true, enableSearch: true, enableCustomTemp: true}), '*');
+			}
+		};
+		
+		function promptName(name, err, errKey)
+		{
+			editor.contentWindow.postMessage(JSON.stringify({action: 'prompt',
+				titleKey: 'filename', okKey: 'save', defaultValue: name || '' }), '*');
+			
+			if (err != null || errKey != null)
+			{
+				editor.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+					titleKey: 'error', message: err, messageKey: errKey,
+					buttonKey: 'ok'}), '*');
+			}
+		};
+		
+		function checkName(name, fn, err)
+		{
+			if (name == null || name.length == 0)
+			{
+				err(name, mxResources.get('filenameShort'));
+			}
+			else if (/[&\*+=\\;/{}|\":<>\?~]/g.test(name))
+			{
+				err(name, mxResources.get('invalidChars') + ' \\ / | : { } < > & + ? = ; * " ~');
+			}
+			else
+			{
+				name = name.trim();
+	    		//TODO do a search instead if possible
+	    		AC.getPageAttachments(pageId, function(attachments) 
+				{
+	    			var draftPattern = new RegExp('^~drawio~.*~' + name.
+							replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + '.tmp$', 'i');
+					var lc = name.toLowerCase();
+					var dn = AC.draftPrefix + lc + AC.draftExtension
+					var fileExists = false;
+
+					// Checks if any files will be overwritten
+					for (var i = 0; i < attachments.length && !fileExists; i++)
+					{
+						// To avoid name clash with new diagrams of other users,
+						// we need to check for ~drawio~.*~filename.tmp
+						var an = attachments[i].title.toLowerCase();
+
+						if (an == lc || an == lc + '.png' || (AC.draftEnabled &&
+							(an == dn || draftPattern.test(an))))
+						{
+							fileExists = true;
+						}
+					}
+					
+					if (fileExists)
+					{
+						err(name, mxResources.get('alreadyExst', [name]));
+					}
+					else
+					{
+						fn(name);
+					}
+
+				}, function(res)
+				{
+					// TODO: What error message to return here?
+					err(name, res);
+				});
+			}
+		};
+
+	   	var autosaveThread = null;
+	   	var autosaveCounter = 0;
+	   	var currentXml = null;
+
+		// Shows template dialog for new diagrams with no draft state
+		if (initialXml != '')
+		{
+			editor.contentWindow.postMessage(JSON.stringify({action: 'load',
+				autosave: 1, xml: initialXml, title: diagramDisplayName,
+				macroData: macroData}), '*');
+		}
+
+		if (draftXml != null)
+		{
+			// Keeps ignore option even for existing files
+			editor.contentWindow.postMessage(JSON.stringify({action: 'draft', xml: draftXml,
+				name: diagramDisplayName, discardKey: 'discardChanges', ignore: true}), '*');
+		}
+		else if (initialXml == '')
+		{
+			showTemplateDialog();
+		}
+		
+		var messageListener = function(evt)
+		{
+			if (typeof window.AC !== 'undefined' && evt.origin == hostUrl)
+			{
+				var drawMsg = JSON.parse(evt.data);
+				
+				if (drawMsg.event == 'draft')
+				{
+					if (drawMsg.error != null)
+					{
+						//console.log('DRAFT: error', drawMsg);
+						
+						editor.parentNode.removeChild(editor);
+						
+						AC.showNotification({
+							  title: mxResources.get('draftReadErr'),
+							  body: drawMsg.error,
+							  type: 'error',
+							  close: 'manual'
+							});
+	    		
+						//TODO find how to listen to flag close event, currently just close the editor immediately
+//		    				messages.onClose(message, function()
+//		    				{
+				    			AP.dialog.close();
+//		    				});
+					}
+					else if (drawMsg.result == 'edit')
+					{
+						// Use draft
+						//console.trace('DRAFT: Using', draftName);
+
+						editor.contentWindow.postMessage(JSON.stringify({action: 'load',
+							autosave: 1, xml: drawMsg.message.xml, title: diagramDisplayName}), '*');
+						editor.contentWindow.postMessage(JSON.stringify({action: 'status',
+							messageKey: 'unsavedChanges', modified: true}), '*');
+						draftExists = true;
+					}
+					else
+					{
+						if (drawMsg.result == 'discard')
+						{
+							//console.trace('DRAFT: Discarding', draftName);
+							
+							AC.removeAttachment(pageId, draftName);
+						}
+						
+						if (initialXml == '' || drawMsg.result == 'ignore')
+						{
+							if (initialXml != '')
+							{
+								editor.contentWindow.postMessage(JSON.stringify({action: 'load',
+									autosave: 1, xml: initialXml, title: diagramDisplayName,
+									macroData: macroData}), '*');
+							}
+							else
+							{
+								diagramName = null;
+								showTemplateDialog();
+							}
+						}
+					}	
+				}
+				else if (drawMsg.event == 'template')
+				{
+					editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+						show: true, messageKey: 'inserting'}), '*');
+					
+					if (drawMsg.docUrl)
+					{
+						checkName(drawMsg.name, function(name)
+						{
+							diagramName = name;
+							diagramDisplayName = name;
+							
+							//keeping the block of AP.require to minimize the number of changes!
+							{
+								var loadTemplate = function(version)
+								{
+									AP.request({
+										url: drawMsg.docUrl + (version != null? "?version=" + version : ""),
+										success: function(xml) 
+										{
+											editor.contentWindow.postMessage(JSON.stringify({action: 'load',
+												autosave: 1, xml: xml, title: diagramDisplayName}), '*');
+											editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+												show: false}), '*');
+										},
+										error : function(resp) 
+										{
+											editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+												show: false}), '*');
+											editor.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+												titleKey: 'error', message: mxResources.get('diagCantLoad'), messageKey: null,
+												buttonKey: 'ok'}), '*');
+										}
+									});
+								}
+								
+								AP.request({
+									url: '/rest/api/content/' + drawMsg.info.id,
+									success: function(resp) 
+									{
+										resp = JSON.parse(resp);
+										
+										try
+										{
+											loadTemplate(resp.version.number);
+										}
+										catch(e)
+										{
+											loadTemplate();
+										}
+									},
+									error : function(resp) 
+									{
+										loadTemplate();
+									}
+								});
+							};
+						},
+						function(name, err, errKey)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: false}), '*');
+							editor.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+								titleKey: 'error', message: err, messageKey: errKey,
+								buttonKey: 'ok'}), '*');
+						});
+					}
+					else
+					{
+						checkName(drawMsg.name, function(name)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: false}), '*');
+							diagramName = name;
+							diagramDisplayName = name;
+	
+							if (AC.draftEnabled)
+							{
+								draftName = '~drawio~' + user + '~' + diagramName + AC.draftExtension;
+								editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+									show: true, messageKey: 'inserting'}), '*');
+								
+								saveDraft(drawMsg.xml, function()
+								{
+									editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+									editor.contentWindow.postMessage(JSON.stringify({action: 'load',
+										autosave: 1, xml: drawMsg.xml, title: diagramDisplayName}), '*');
+								},
+								function()
+								{
+									editor.parentNode.removeChild(editor);
+									
+									AC.showNotification({
+										  title: mxResources.get('draftWriteErr'),
+										  body: mxResources.get('draftCantCreate'),
+										  type: 'error',
+										  close: 'manual'
+										});
+				    		
+									//TODO find how to listen to flag close event, currently just close the editor immediately
+//				    				messages.onClose(message, function()
+//				    				{
+						    			AP.dialog.close();
+//				    				});
+								});
+							}
+							else
+							{
+								editor.contentWindow.postMessage(JSON.stringify({action: 'load',
+									autosave: 1, xml: drawMsg.xml, title: diagramDisplayName}), '*');
+							}
+						},
+						function(name, err, errKey)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: false}), '*');
+							editor.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+								titleKey: 'error', message: err, messageKey: errKey,
+								buttonKey: 'ok'}), '*');
+						});
+					}
+				}
+				else if (drawMsg.event == 'autosave')
+				{
+					// Saves all changes to draft attachment
+					currentXml = drawMsg.xml;
+					
+					if (autosaveThread == null && AC.draftEnabled)
+					{
+						//console.trace('DRAFT: Starting timer');
+						
+						autosaveThread = window.setTimeout(function()
+						{
+							//console.log('DRAFT: Saving', currentXml);
+							
+							autosaveThread = null
+							saveDraft(currentXml);
+							autosaveCounter++;
+						}, (autosaveCounter == 0) ? 0 : AC.autosaveTimeout);
+					}
+				}
+				else if (drawMsg.event == 'exit') 
+				{
+					removeDraft(function()
+					{
+			    		//revision is non-null if the diagram is saved
+		    			AP.dialog.close(revision? {newRev: revision, newContentVer: contentVer, newContentId: contentId, newAspect: AC.aspect} : null);
+					});
+				}
+				else if (drawMsg.event == 'save')
+				{
+					diagramXml = drawMsg.xml;
+					
+					if (diagramName == null)
+					{
+						promptName('');
+					}
+					else
+					{
+						var aspectObj = AC.getAspectObj();
+						
+						//Copy & Paste causes multiple diagrams in a page to have the same attachment name. Rename doesn't help as it only changes the display name (not the attachment name)
+						//So, prompt the use for a new attachment name
+						AP.request({
+							url: '/rest/api/content/' + pageId + '/?expand=body.storage,version&status=draft', //always request draft content which will match published content if no draft is found
+					        contentType: 'application/json;charset=UTF-8',
+					        success: function (resp) 
+					        {
+					        	var page = JSON.parse(resp);
+					    		
+								//find all macros and check if diagram name (attachment) is used more than once
+					    		var foundMacros = page.body.storage.value.match(AC.findMacrosRegEx);
+					    		matchingCount = 0;
+					    		
+					    		for (var i = 0; foundMacros != null && i < foundMacros.length; i++)
+								{
+					    			var macroDiagName = foundMacros[i].match(AC.findMacroParamRegEx["diagramName"]);
+					    			
+					    			if (macroDiagName != null && macroDiagName[1] == diagramName)
+									{
+					    				matchingCount++;
+									}
+								}
+								
+					    		if (matchingCount > 1)
+					    		{
+					    			promptName(diagramName, mxResources.get('confDuplName'));
+				    			}
+					    		else
+				    			{
+									editor.contentWindow.postMessage(JSON.stringify({action: 'export',
+										format: 'png', spinKey: 'saving', scale: AC.hiResPreview? 2 : 1, 
+										pageId: aspectObj.pageId, layerIds: aspectObj.layerIds, message: drawMsg}), '*');
+
+				    			}
+							},
+							error : function(resp) 
+							{
+								//We can safely ignore errors to avoid complicating loading diagram process
+								editor.contentWindow.postMessage(JSON.stringify({action: 'export',
+									format: 'png', spinKey: 'saving', scale: AC.hiResPreview? 2 : 1, 
+									pageId: aspectPageId, layerIds: aspectLayerIds, message: drawMsg}), '*');
+							}
+						});
+					}
+				}
+				else if (drawMsg.event == 'prompt')
+				{
+					editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+						show: true, messageKey: 'inserting'}), '*');
+
+					checkName(drawMsg.value, function(name)
+					{
+						var aspectObj = AC.getAspectObj();
+						
+						editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+							show: false}), '*');
+						diagramName = name;
+						diagramDisplayName = name;
+						contentId = null;
+						contentVer = null;
+						editor.contentWindow.postMessage(JSON.stringify({action: 'export',
+							format: 'png', spinKey: 'saving', scale: AC.hiResPreview? 2 : 1,
+							pageId: aspectObj.pageId, layerIds: aspectObj.layerIds}), '*');
+					},
+					function(name, err, errKey)
+					{
+						editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+							show: false}), '*');
+						promptName(name, err, errKey);
+					});
+				}
+				else if (drawMsg.event == 'rename')
+				{
+					//If diagram name is not set yet, use the new name for both file and diagram
+					//TODO should we disable renaming if diagramName is null?
+					if (diagramName == null) 
+					{
+						editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+							show: true}), '*');
+
+						checkName(drawMsg.name, function(name)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: false}), '*');
+							diagramName = name;
+							diagramDisplayName = name;
+						},
+						function(name, err, errKey)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: false}), '*');
+							editor.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+								titleKey: 'error', message: err, messageKey: errKey,
+								buttonKey: 'ok'}), '*');
+						});	
+					}
+					else
+					{
+						diagramDisplayName = drawMsg.name;
+					}
+					
+					editor.contentWindow.postMessage(JSON.stringify({action: 'status',
+						messageKey: 'unsavedChanges', modified: true}), '*');
+				}
+				else if (drawMsg.event == 'export')
+				{
+					// Proceeds from sending the export message by saving the exported files
+					var imageData = drawMsg.data.substring(drawMsg.data.indexOf(',') + 1);
+					var diaWidth = drawMsg.bounds.width / drawMsg.scale;
+					var diaHeight = drawMsg.bounds.height / drawMsg.scale;
+					
+					function showError(key, message)
+					{
+						var msg = {action: 'dialog', titleKey: 'error', modified: true, buttonKey: 'close'};
+						
+						if (message != null)
+						{
+							msg.message = message;
+						}
+						else
+						{
+							msg.messageKey = key || 'errorSavingFile';
+						}
+						
+						editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+						editor.contentWindow.postMessage(JSON.stringify(msg), '*');
+					};
+					
+					function saveError(err) 
+					{
+						var key = null;
+						var message = null;
+						
+						if (err.status == 409) 
+						{
+							diagramName = null;
+							key = 'fileExists';
+						}
+						else if (err.status == 401)
+						{
+							// Session expired
+							message = mxResources.get('confSessionExpired') +
+								' <a href="' + baseUrl + '/pages/dashboard.action" target="_blank">' + mxResources.get('login') + '</a>';
+						}
+						
+						showError(key, message);
+					};
+					
+					function successXml(responseText) 
+					{
+						var resp = null;
+						revision = '1';
+						
+						//TODO Why this code (Is it expected to have incorrect responseText?)
+						try
+						{
+							resp = JSON.parse(responseText);
+						}
+						catch (e)
+						{
+							// Ignores and use default value for revision
+						}
+
+						// LATER: Get revision from metadata of attachment and check
+						// what condition makes the response not contain an URL
+						//TODO Is prev comment still needed with REST API?
+						if (resp != null && resp.results != null && resp.results[0])
+						{
+							var attObj = resp.results[0];
+							revision = attObj.version.number;
+							//Save/update the custom content
+							var spaceKey = AC.getSpaceKey(attObj._expandable.space);
+							var pageType = attObj.container.type;
+
+							AC.saveCustomContent(spaceKey, pageId, pageType, diagramName, diagramDisplayName, revision, 
+									contentId, contentVer,
+									function(responseText) 
+									{
+										var content = JSON.parse(responseText);
+										
+										contentId = content.id;
+										contentVer = content.version? content.version.number : 1;
+										
+										AC.saveDiagram(pageId, diagramName + '.png', AC.b64toBlob(imageData, 'image/png'),
+												successPng, saveError, false, 'image/png', mxResources.get('drawPrev'), false, draftPage);
+									}, saveError, drawMsg.comments);
+						}
+						else
+						{
+							// Logs special case where save response has no URL
+							try
+							{
+								var img = new Image();
+								var message = 'Invalid Confluence Cloud response';
+						    		img.src = '/images/2x2.png?msg=' + encodeURIComponent(message) +
+					    				((responseText != null) ? '&resp=' + encodeURIComponent(responseText) : '&resp=[null]');
+						    			'&url=' + encodeURIComponent(window.location.href);
+							}
+							catch (err)
+							{
+								// do nothing
+							}
+							
+							//TODO Save png here in case responseText is incorrect (But why it can be incorrect?)
+							AC.saveDiagram(pageId, diagramName + '.png', AC.b64toBlob(imageData, 'image/png'),
+									successPng, saveError, false, 'image/png', mxResources.get('drawPrev'), false, draftPage);
+						}
+
+						function successPng(pngResponseText) 
+						{
+							try
+							{
+								// IMPORTANT: New macro parameters must be added to AC.macroParams to for adjustMacroParametersDirect to parse existing parameters correctly.
+								var newMacroData = {
+									diagramName: diagramName,
+									diagramDisplayName: diagramDisplayName,
+									revision: revision,
+									pageId: newPage ? null : pageId,
+									custContentId: contentId,
+									contentVer: contentVer,
+									baseUrl: baseUrl,
+									width: diaWidth,
+									height: diaHeight,
+									tbstyle: (drawMsg.macroData != null && drawMsg.macroData.tbstyle) ? drawMsg.macroData.tbstyle : '',
+									links: (drawMsg.macroData != null && drawMsg.macroData.links) ? drawMsg.macroData.links : '',
+									simple: (drawMsg.macroData != null && drawMsg.macroData.simple != null) ? drawMsg.macroData.simple : '0',
+									lbox: (drawMsg.macroData != null && drawMsg.macroData.lbox != null) ? drawMsg.macroData.lbox : '1',
+									zoom: (drawMsg.macroData != null && drawMsg.macroData.zoom != null) ? drawMsg.macroData.zoom : '1',
+									pCenter: (drawMsg.macroData != null && drawMsg.macroData.pCenter != null) ? drawMsg.macroData.pCenter : '0',
+									aspect:	AC.aspect,
+									inComment: AC.inComment? '1' : '0'
+								};
+
+								//Set the hiResPreview only if the user set it in the UI which overrides the global settings
+								if (drawMsg.macroData != null && drawMsg.macroData.hiResPreview != null)
+								{
+									newMacroData.hiResPreview = drawMsg.macroData.hiResPreview;									
+								}
+									
+								var finalizeSaving = function()
+								{
+									if (AC.autoExit || drawMsg.message == null || drawMsg.message.message == null || drawMsg.message.message.exit)
+									{
+										var savingCallback = function()
+										{
+											removeDraft(function()
+											{
+								    			AP.dialog.close({newRev: revision, newContentVer: contentVer, newContentId: contentId, newAspect: AC.aspect});
+											});
+										};
+										
+										//Save indexing text
+										//Exit is done when the response is received!
+										//This is needed for advanced search by draw.io diagrams type
+										AC.remoteInvoke('getDiagramTextContent', null, null, function(textContent)
+										{
+											AC.saveContentSearchBody(contentId, diagramDisplayName + ' ' + textContent,
+													savingCallback, savingCallback);	//ignore error and just exit
+										}, savingCallback);
+									}
+									else
+									{
+										editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+										editor.contentWindow.postMessage(JSON.stringify({action: 'status', message: '', modified: false}), '*');
+									}
+								};
+
+								if (AC.customContentEditMode)
+								{
+									//load the page to edit the macro
+									AC.findMacroInPage(pageId, diagramName, lastMacroVer, function(macroFound, originalBody, matchingMacros, page)
+									{
+										if (macroFound)
+										{
+											AC.adjustMacroParametersDirect(pageId, newMacroData, originalBody, matchingMacros, page, finalizeSaving, saveError);
+											lastMacroVer = revision; //for next save
+										}
+										else //macro is not found in the page content, so just continue with saving instead of showing an error and losing users modifications
+										{
+											//Using alert here to pause execution as some execution flows go back and Confluence error messages will be lost
+											//In strandedMode, we already warned the user at the beginning
+											if (!AC.strandedMode)
+											{
+												alert(mxResources.get('confDiagEditedExt'));
+											}
+											
+											finalizeSaving();
+										}
+									}, saveError);
+								}
+								else
+								{
+									AP.confluence.saveMacro(newMacroData);
+									finalizeSaving();
+								}
+							}
+							catch (e)
+							{
+								editor.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+								editor.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+									titleKey: 'errorSavingFile', message: e.message, buttonKey: 'ok'}), '*');
+							}
+						};
+					};
+
+					if (diagramName != null) 
+					{
+						editor.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+							show: true, messageKey: 'saving'}), '*');
+						
+						AC.saveDiagram(pageId, diagramName, diagramXml,
+							successXml, saveError, false, 'application/vnd.jgraph.mxfile', mxResources.get('drawDiag'), false, draftPage);
+					}
+				}
+				else if (drawMsg.event == 'remoteInvoke')
+				{
+					AC.handleRemoteInvoke(drawMsg);
+				}
+				else if (drawMsg.event == 'remoteInvokeResponse')
+				{
+					AC.handleRemoteInvokeResponse(drawMsg);
+				}
+			}
+		};
+
+		window.addEventListener('message', messageListener);
+		editor.contentWindow.postMessage(JSON.stringify({action: 'remoteInvokeReady'}), '*');
+		AC.remoteWin = editor.contentWindow;
+	};
+};
+
+AC.loadDiagram = function (pageId, diagramName, revision, success, error, owningPageId, tryRev1, dontCheckVer) {
+	// TODO: Get binary
+
+	//keeping the block of AP.require to minimize the number of changes!
+	{
+		//Confirm that the macro is in sync with the diagram
+		//Sometimes the diagram is saved but the macro is not updated
+		var attInfo = null;
+		var pageInfo = null;
+		
+		function confirmDiagramInSync()
+		{
+			if (attInfo == null || pageInfo == null) 
+				return;
+			
+			//TODO is this condition enough or we need to check timestamps also?
+			if (attInfo.version.number > revision 
+					&& (pageInfo.version.message == null || pageInfo.version.message.indexOf("Reverted") < 0)) 
+			{
+				AC.loadDiagram(pageId, diagramName, attInfo.version.number, success, error, owningPageId, tryRev1, true);
+				//Update the macro
+				//Custom Content version will be fixed on next save, this will not affect correctness
+				if (!AC.customContentEditMode)
+				{
+					AP.confluence.getMacroData(function (macroData) 
+			    	{
+						if (macroData != null) 
+						{
+							AP.confluence.saveMacro(
+							{
+								diagramName: macroData.diagramName,
+								diagramDisplayName: macroData.diagramDisplayName != null ? macroData.diagramDisplayName : macroData.diagramName,
+								revision: attInfo.version.number,
+								pageId: macroData.pageId,
+								custContentId: macroData.contentId || macroData.custContentId,
+								contentVer: macroData.contentVer,
+								baseUrl: macroData.baseUrl,
+								width: macroData.width,
+								height: macroData.height,
+								tbstyle: macroData.tbstyle,
+								links: macroData.links,
+								simple: macroData.simple != null ? macroData.simple : '0',
+								lbox: macroData.lbox != null ? macroData.lbox : '1',
+								zoom: macroData.zoom != null ? macroData.zoom : '1',
+								pCenter: (macroData.pCenter != null) ? macroData.pCenter : '0',
+								hiResPreview: macroData.hiResPreview,
+								inComment: AC.inComment? '1' : '0'
+							});
+						}
+			    	});
+				}
+			}
+		}
+		
+		//To avoid race we do the version check after loading the diagram in the macro 
+		var localSuccess = function()
+		{
+			success.apply(this, arguments);
+			
+			//This fix contradict with copy/paste workflow where all diagrams have the same name
+			//On copy/paste diagram name must be changed
+			/*if (!dontCheckVer && revision != null)
+			{
+	            AP.request({
+	                type: 'GET',
+	                url: '/rest/api/content/' + pageId + '?expand=version',
+	                contentType: 'application/json;charset=UTF-8',
+	                success: function (resp) 
+	                {
+	                	pageInfo = JSON.parse(resp);
+	                    
+	                	confirmDiagramInSync();
+	                },
+	                error: function (resp) 
+	                {
+	                    //Ignore
+	                }
+	            });
+	
+	            AP.request({
+	                type: 'GET',
+	                url: '/rest/api/content/' + pageId + '/child/attachment?filename=' + 
+	                		encodeURIComponent(diagramName) + '&expand=version',
+	                contentType: 'application/json;charset=UTF-8',
+	                success: function (resp) 
+	                {
+	                	var tmp = JSON.parse(resp);
+	                    
+	                	if (tmp.results && tmp.results.length == 1)
+	                	{
+	                		attInfo = tmp.results[0];
+	                	}
+	                	
+	                	confirmDiagramInSync();
+	                },
+	                error: function (resp) 
+	                {
+	                    //Ignore
+	                }
+	            });
+			}*/
+		}
+		
+		AP.request({
+			//TODO find out the ID of the page that actually holds the attachments because historical revisions do not have attachments
+			url: '/download/attachments/' + pageId + '/' + encodeURIComponent(diagramName) +
+				((revision != null) ? '?version=' + revision : ''),
+			success: localSuccess,
+			error : function(resp) 
+			{
+				//When a page is copied, attachments are reset to version 1 while the revision parameter remains the same
+				if (tryRev1 && revision > 1 && resp.status == 404)
+				{
+					AP.request({
+						url: '/download/attachments/' + pageId + '/' + encodeURIComponent(diagramName),
+						success: localSuccess,
+						error : function(resp) { //If revesion 1 failed, then try the owningPageId
+							if (owningPageId && resp.status == 404)
+							{
+								AP.request({
+									url: '/download/attachments/' + owningPageId + '/' + encodeURIComponent(diagramName)
+										+'?version=' + revision, //this version should exists in the original owning page
+									success: localSuccess,
+									error : function(resp)
+									{
+										if (/(^\s|\s$)/.test(diagramName))
+										{
+											AC.loadDiagram(pageId, diagramName.trim(), revision, success, error, owningPageId, tryRev1, dontCheckVer);
+										}
+										else
+										{
+											error(resp);
+										}
+									}
+								});
+							}
+						}
+					});
+				}
+				else if (owningPageId && resp.status == 404) //We are at revesion 1, so try the owningPageId directly
+				{
+					AP.request({
+						url: '/download/attachments/' + owningPageId + '/' + encodeURIComponent(diagramName),
+						success: localSuccess,
+						error : function(resp)
+						{
+							if (/(^\s|\s$)/.test(diagramName))
+							{
+								AC.loadDiagram(pageId, diagramName.trim(), revision, success, error, owningPageId, tryRev1, dontCheckVer);
+							}
+							else
+							{
+								error(resp);
+							}
+						}
+					});
+				}
+				else
+				{
+					error(resp);
+				}
+			}
+		});
+	};
+};
+
+AC.findMacroInPage = function(pageId, diagramName, lastMacroVer, success, error, draftPage)
+{
+	//load the page to edit the macro
+	AP.request({
+        type: 'GET',
+        url: '/rest/api/content/' + pageId + '/?expand=body.storage,version' + (draftPage ? "&status=draft" : ""),
+        contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+        	var page = JSON.parse(resp);
+    		
+    		var originalBody = page.body.storage.value;
+    		
+    		var foundMacros = originalBody.match(AC.findMacrosRegEx);
+
+    		var macroFound = false;
+    		var matchingMacros = [];
+    		
+    		for (var i = 0; foundMacros != null && i < foundMacros.length; i++)
+			{
+    			var macroDiagName = foundMacros[i].match(AC.findMacroParamRegEx["diagramName"]);
+    			var macroRevision = foundMacros[i].match(AC.findMacroParamRegEx["revision"]);
+    			
+    			if (macroDiagName != null && macroRevision != null && macroDiagName[1] == diagramName && macroRevision[1] == lastMacroVer)
+				{
+    				var macroParams = {};
+    				
+    				for (var j = 0; j < AC.macroParams.length; j++)
+					{
+    					var param = AC.macroParams[j];
+    					var val = foundMacros[i].match(AC.findMacroParamRegEx[param]);
+    					
+    					if (val != null)
+    						macroParams[param] = val[1];
+					}
+    				
+    				matchingMacros.push({macro: foundMacros[i], macroParams: macroParams});
+    				macroFound = true;
+				}
+			}
+    		
+    		success(macroFound, originalBody, matchingMacros, page);
+        },
+        error: error
+    });
+};
+
+//FIXME Confluence adjust macros in draft such that there is no way to adjust the content of drafts currently! So, drafts code is removed
+AC.adjustMacroParametersDirect = function(pageId, macroData, originalBody, matchingMacros, page, success, error)
+{
+	for (var i = 0; i < matchingMacros.length; i++)
+	{
+		var modMacro = matchingMacros[i].macro;
+
+		for (var param in macroData) 
+		{
+			var pRegEx = AC.findMacroParamRegEx[param];
+			
+			//This to avoid errors if a new parameter/key is added to the macro and is not in the macro regexps
+			if (pRegEx == null) continue;
+			
+			var newParamVal = '<ac:parameter ac:name="'+ param +'">' + macroData[param];
+			
+			//If parameter exists, change it. Otherwise, add it
+			if (modMacro.match(pRegEx))
+			{
+				modMacro = modMacro.replace(pRegEx, newParamVal);
+			}
+			else
+			{
+				modMacro += newParamVal + "</ac:parameter>";
+			}
+		}
+		
+		originalBody = originalBody.replace(matchingMacros[i].macro, modMacro);
+	}
+	
+	page.body.storage.value = originalBody;
+    page.version.number++;
+
+	AP.request({
+           type: 'PUT',
+           data: JSON.stringify(page),
+           url:  "/rest/api/content/" + pageId,
+           contentType: "application/json",
+           success: success,
+           error: error
+       });
+};
+
+AC.saveCustomContent = function(spaceKey, pageId, pageType, diagramName, diagramDisplayName, revision, contentId, contentVer, success, error, comments)
+{
+	//Make sure comments are not lost
+	if (comments == null)
+	{
+		AC.getComments(contentId, function(comments)
+		{
+			AC.saveCustomContent(spaceKey, pageId, pageType, diagramName, diagramDisplayName, revision, contentId, contentVer, success, error, comments);
+		}, 
+		//On error, whether the custom content is deleted or corrupted. It is better to proceed with saving and losing the comments than losing the diagram
+		function()
+		{
+			AC.saveCustomContent(spaceKey, pageId, pageType, diagramName, diagramDisplayName, revision, contentId, contentVer, success, error, []);
+		});
+		
+		return;
+	}
+	
+	var info = {
+	    "pageId": pageId,
+	    "diagramName": diagramName,
+	    "version": revision,
+	    "inComment": AC.inComment,
+	    "comments": comments || []
+	};
+	
+    var customObj = {
+        "type": "ac:com.mxgraph.confluence.plugins.diagramly:drawio-diagram",
+        "space": {
+           "key": spaceKey
+         },
+         "container": {
+               "type": pageType,
+               "id": pageId
+            },
+         "title": diagramDisplayName,
+         "body": {
+           "storage": {
+             "value": encodeURIComponent(JSON.stringify(info)),
+             "representation": "storage"
+           }
+         },
+         "status": "current"
+    };
+    
+    if (contentId)
+    {
+        customObj.version = {
+            "number": ++contentVer
+        };
+    }
+    
+	//keeping the block of AP.require to minimize the number of changes!
+    {
+       AP.request({
+           type: contentId? 'PUT' : 'POST',
+           data: JSON.stringify(customObj),
+           url:  "/rest/api/content/" + (contentId? contentId : ""),
+           contentType: "application/json",
+           success: success,
+           error: function(resp) {
+               //User can delete a custom content externally and we will get error 403 and message will contain the given id
+               //Then save a new one
+               var err = JSON.parse(resp.responseText);
+               
+               //Sometimes the macro is not updated such that the version is not correct. The same happens when a page version is restored
+               if (err.statusCode == 409 && err.message.indexOf("Current version is:") > 0)
+        	   {
+            	   //We will use the error message to detect the correct version instead of doing another request. 
+            	   //It should be safe as long as error messages are not translated or changed
+            	   var curContentVer = err.message.match(/\d+/);
+            	   
+            	   if (curContentVer != null)
+        		   {
+            		   AC.saveCustomContent(spaceKey, pageId, pageType, diagramName, diagramDisplayName, revision, contentId, curContentVer[0], success, error, comments);
+        		   }
+        	   }
+               //Sometimes, when a page is copied or site is cloned, custom contents are lost, so create a new one
+               //For example, error 400: When a page is moved to another space, an error occur since the original  custom content belong to another space/page
+               else if (contentId != null)
+               {
+                   AC.saveCustomContent(spaceKey, pageId, pageType, diagramName, diagramDisplayName, revision, null, null, success, error, comments);
+               }
+               else
+               {
+                   error(resp);
+               }
+           }
+       });
+    };
+};
+
+AC.saveContentSearchBody = function(contentId, searchBody, success, error)
+{
+	var doSaveSearchBody = function(version)
+	{
+		var obj = {
+		    "value": searchBody
+		};
+		
+		if (version) 
+		{
+			obj["version"] = {
+				    "number": version + 1,
+				    "minorEdit": true
+				  };
+		}
+		else
+		{
+			obj["key"] = "ac:custom-content:search-body";
+		}
+		
+		AP.request({
+			  url: "/rest/api/content/" + contentId + "/property" + (version? "/ac%3Acustom-content%3Asearch-body?expand=version" : ""),
+			  type: version? "PUT" : "POST",
+			  contentType: "application/json",
+			  data: JSON.stringify(obj),
+			  success: success,
+			  error: error
+		});
+	};
+	
+	AP.request({
+		  url: "/rest/api/content/" + contentId + "/property/ac%3Acustom-content%3Asearch-body?expand=version",
+		  type: "GET",
+		  contentType: "application/json",
+		  success: function(resp)
+		  {
+			  resp = JSON.parse(resp);
+              
+			  doSaveSearchBody(resp.version.number);
+		  },
+		  error: function(resp)
+		  {
+			  var err = JSON.parse(resp.responseText);
+			  
+			  //if not found, create one
+			  if (err.statusCode == 404)
+			  {
+				  doSaveSearchBody();
+			  }
+			  else
+				  error();
+		  }
+	});
+};
+
+//TODO We can upload both the diagram and its png in one call if needed?
+AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mime, comment, sendNotif, draftPage) 
+{
+	loadSucess = function(resp) 
+	{
+		error({status: 409, message: mxResources.get('fileExists')});
+	};
+	
+	loadError = function(resp)
+	{
+		if (resp.status == 404) // file under given name does not exist means we can proceed with saving 
+		{
+			doSave();
+		}
+		else 
+		{
+			error({status: resp.status, message : resp.statusText });
+		}
+	};
+	
+	var sessionCheck = function(responseText)
+	{
+		if (responseText != null)
+		{
+			var obj = JSON.parse(responseText);
+			
+			if (obj != null && obj.code == -32600) //TODO is the codes the same with new REST APIs 
+			{
+				error({status: 401});
+				
+				return;
+			}
+		}
+		
+		success(responseText);
+	}
+	
+	doSave = function() 
+	{
+		//keeping the block of AP.require to minimize the number of changes!
+		{
+			 var attFile = (xml instanceof Blob)? xml : new Blob([xml], {type: mime});
+			 attFile.name = diagramName;
+			 
+			 var reqData = {file: attFile, minorEdit: !sendNotif};
+			 var draft = draftPage ? "?status=draft" : "";
+
+			 if (comment != null)
+			 {
+				 reqData.comment = comment;
+			 }
+			 
+			 AP.request({
+				type: 'PUT',
+				data: reqData,
+				url:  "/rest/api/content/"+ pageId +"/child/attachment" + draft,
+				contentType: "multipart/form-data",
+				success: sessionCheck,
+				error: error
+			 });
+		};
+	};
+	
+	if(newSave && mime == 'application/vnd.jgraph.mxfile')
+	{
+		this.loadDiagram(pageId, diagramName, 0, loadSucess, loadError);
+	}
+	else 
+	{
+		doSave();
+	}
+};
+
+AC.removeAttachment = function(pageId, filename, fn, err)
+{
+	if (pageId != null && filename != null)
+	{
+		var errFn = function()
+		{
+			if (err != null)
+			{
+				err();
+			}
+			
+			if (fn != null)
+			{
+				fn();
+			}
+		};
+		
+		 //Empty the draft file without deleting it to prevent email notifications 
+		 var attFile = new Blob(['']);
+		 attFile.name = filename;
+		 
+		 var reqData = {
+			 file: attFile, 
+			 minorEdit: true,
+			 comment: 'draw.io draft (D)'
+		 };
+		 
+		 AP.request({
+				type: 'PUT',
+				data: reqData,
+				url:  "/rest/api/content/"+ pageId +"/child/attachment",
+				contentType: "multipart/form-data",
+				success: function () 
+	            {
+	            	if (fn != null)
+					{
+						fn();
+					}
+				},
+				error: errFn
+		 });
+	}
+	else
+	{
+		 fn();
+	}
+};
+
+AC.getMacroData = function(fn) 
+{
+	AP.confluence.getMacroData(fn);
+}
+
+//From mxUtils
+AC.htmlEntities = function(s, newline)
+{
+	s = String(s || '');
+	
+	s = s.replace(/&/g,'&amp;'); // 38 26
+	s = s.replace(/"/g,'&quot;'); // 34 22
+	s = s.replace(/\'/g,'&#39;'); // 39 27
+	s = s.replace(/</g,'&lt;'); // 60 3C
+	s = s.replace(/>/g,'&gt;'); // 62 3E
+
+	if (newline == null || newline)
+	{
+		s = s.replace(/\n/g, '&#xa;');
+	}
+	
+	return s;
+};
+
+AC.fromHtmlEntities = function(str)
+{
+    var doc = new DOMParser().parseFromString(str || '', "text/html");
+    return doc.documentElement.textContent;
+};
+
+AC.getCustomLibraries = function(callback, error)
+{
+    var ret = [];
+
+    function getChunk(url)
+    {
+    	AP.request({
+            type: 'GET',
+			url: url,
+            contentType: 'application/json;charset=UTF-8',
+            success: function (resp) 
+            {
+            	resp = JSON.parse(resp);
+            	
+               	for (var i = 0; i < resp.results.length; i++)
+           		{
+               		var obj = resp.results[i];
+               		ret.push({
+               			id: obj.id, 
+               			title: obj.title, 
+               			downloadUrl: obj._links? obj._links.download : null
+               		});
+           		}
+               	
+               	//Support pageing
+				if (resp._links && resp._links.next) 
+				{
+					getChunk(resp._links.next);
+				}
+				else
+				{
+					callback(ret);
+				}
+			},
+			error: error
+		});
+    };
+    
+	AP.request({
+        type: 'GET',
+        url: '/rest/api/content/search?cql=type%3Dpage%20and%20space%3DDRAWIOCONFIG%20and%20title%3DLibraries', //type=page and space=DRAWIOCONFIG and title=Libraries. Search doesn't return 404 if not found
+        contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+            resp = JSON.parse(resp);
+            
+            if (resp.size == 1)
+           	{
+            	var libsPageId = resp.results[0].id;
+
+            	getChunk('/rest/api/content/' + libsPageId + '/child/attachment?limit=100');
+           	}
+            else
+            {
+            	callback(ret);            	
+            }
+		},
+		error: error
+	});	
+};
+
+AC.getFileContent = function(url, callback, error)
+{
+	AP.request({
+        type: 'GET',
+		url: url,
+        contentType: 'text/xml;charset=UTF-8',
+        success: function (fileContent) 
+        {
+        	callback(fileContent); 
+		},
+		error: error
+	});
+};
+
+AC.getCurrentUser = function(callback, error)
+{
+	var baseUrl = AC.getBaseUrl();
+	
+	AP.request({
+        type: 'GET',
+		url: '/rest/api/user/current',
+		contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+        	resp = JSON.parse(resp);
+        	
+        	callback({
+        		id: resp.accountId,
+        		username: resp.username,
+        		email: resp.email,
+        		displayName: resp.displayName,
+        		pictureUrl: resp.profilePicture? baseUrl.substr(0, baseUrl.lastIndexOf('/')) + resp.profilePicture.path : null
+        	}); 
+		},
+		error: error
+	});
+};
+
+AC.getComments = function(contentId, callback, error)
+{
+	if (contentId)
+	{
+		AP.request({
+			type: 'GET',
+			url: '/rest/api/content/' + contentId + '/?expand=body.storage,version,container',
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp)
+			{
+				try 
+				{
+					resp = JSON.parse(resp);
+					var infoObj = JSON.parse(decodeURIComponent(resp.body.storage.value));
+					var spaceKey = AC.getSpaceKey(resp._expandable.space);
+					var pageId = resp.container.id;
+                    var pageType = resp.container.type;
+                    var contentVer = resp.version.number;
+                    
+					callback(infoObj.comments || [], spaceKey, pageId, pageType, contentVer);
+				}
+				catch(e)
+				{
+					error(e);
+				}
+			},
+			error: error
+		});
+	}
+	else
+	{
+		callback([]);
+	}
+};
+
+//Check if user can edit content (page or another content)
+//Confluence doesn't provide an easy way to check for permissions. 
+//		E.g., https://draw-test.atlassian.net/wiki/rest/api/content/{contentId}/restriction/byOperation/update/user?accountId={userAccountId}
+//		It returns 404 even if the user has permission. It only returns 200 (OK) if the user is explicitly in restrictions list (doesn't check groups also)
+AC.userCanEdit = function(contentId, callback, error)
+{
+	var userFound = false;
+	var accountId, groupsCount, parsedGroups = 0;
+	
+	function checkGroupMembers(resp)
+	{
+		//If the user belong to multiple groups, callback will be called more than once
+		if (userFound) return;
+		
+		resp = JSON.parse(resp);
+		
+		var list = resp.results;
+		
+		for (var i = 0; i < list.length; i++)
+		{
+			if (list[i].accountId == accountId)
+			{
+				callback(true);
+				userFound = true;
+				return;
+			}
+		}
+		
+		parsedGroups++;
+		
+		//All groups parsed
+		if (groupsCount == parsedGroups)
+		{
+			callback(false);
+		}
+	};
+	
+	AP.user.getCurrentUser(function(user) {
+		accountId = user.atlassianAccountId;
+		
+		AP.request({
+			type: 'GET',
+			url: '/rest/api/content/' + contentId + '/restriction/byOperation/update', //This API doesn't work well with paging, BUT 100 as a default limit looks enough
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp)
+			{
+				resp = JSON.parse(resp);
+				
+				if (resp.restrictions.user.size == 0) //When restrictions are empty, it means all are allowed
+				{
+					callback(true);
+				}
+				else
+				{
+					//Search users
+					var list = resp.restrictions.user.results;
+					
+					for (var i = 0; i < list.length; i++)
+					{
+						if (list[i].accountId == accountId)
+						{
+							callback(true);
+							userFound = true;
+							break;
+						}
+					}
+					
+					//Check groups
+					if (!userFound)
+					{
+						if (resp.restrictions.group.size == 0) //The owner must be in the list of editors, so, a group cannot exist without a user in the list
+						{
+							callback(false); //User cannot edit
+						}
+						else //For each group check its members!
+						{
+							var groups = resp.restrictions.group.results;
+							groupsCount = groups.length;
+							
+							for (var i = 0; i < groups.length; i++)
+							{
+								AP.request({
+									type: 'GET',
+									url: '/rest/api/group/' + encodeURIComponent(groups[i].name) + '/member',
+									contentType: 'application/json;charset=UTF-8',
+									success: checkGroupMembers,
+									error: error
+								});
+							}
+						}
+					}
+				}
+			},
+			error: error
+		});		
+	});
+};
+
+AC.getPageInfo = function(urlOnly, success, error)
+{
+	AP.getLocation(function(url)
+	{
+		if (urlOnly) 
+		{
+			success({url: url});	
+		}
+		else
+		{
+			AP.navigator.getLocation(function (location) 
+			{
+				AP.request({
+					type: 'GET',
+					url: '/rest/api/content/' + location.context.contentId,
+					contentType: 'application/json;charset=UTF-8',
+					success: function(resp)
+					{
+						resp = JSON.parse(resp);
+						resp.url = url;
+						success(resp);
+					},
+					error: error
+				});
+			});
+			
+		}
+	});
+};
+
+AC.gotoAnchor = function(anchor)
+{
+	AC.getPageInfo(false, function(info)
+	{
+		var url = info.url;
+		
+		if (url != null)
+		{
+			//remove any hash
+			var hash = url.indexOf('#');
+			
+			if (hash > -1)
+			{
+				url = url.substring(0, hash);
+			}
+			
+			//When page title has a [ at the beginning, conf adds id- to anchor name
+			top.window.location = url + '#' + (info.title.indexOf('[') == 0? 'id-' : '') + 
+									encodeURI(info.title.replace(/\s/g, '') + '-' + anchor.replace(/\s/g, ''));
+		}
+	}, function()
+	{
+		//ignore as we cannot get the page info
+	});
+};
+
+AC.getDiagramRevisions = function(diagramName, pageId, success, error)
+{
+	AP.request({
+		type: 'GET',
+		url: '/rest/api/content/' + pageId + '/child/attachment',
+		contentType: 'application/json;charset=UTF-8',
+		success: function(resp)
+		{
+			resp = JSON.parse(resp);
+			var attObj = null;
+			
+			for (var i = 0; i < resp.results.length; i++)
+			{
+				if (resp.results[i].title == diagramName)
+				{
+					attObj = resp.results[i];
+				}
+			}
+
+			if (attObj != null)
+			{
+				AP.request({
+					type: 'GET',
+					url: '/rest/api/content/' + attObj.id + '/version',
+					contentType: 'application/json;charset=UTF-8',
+					success: function(resp)
+					{
+						resp = JSON.parse(resp);
+						var revs = [];
+						
+						for (var i = 0; i < resp.results.length; i++)
+						{
+							var rev =  resp.results[i];
+
+							revs.unshift({
+								modifiedDate: rev.when,
+								lastModifyingUserName: rev.by? rev.by.displayName : '', 
+								downloadUrl: '/download/attachments/' + pageId + '/' + encodeURIComponent(diagramName) + '?version=' + rev.number,
+								obj: rev
+							});
+						}
+						
+						success(revs);
+					},
+					error: error
+				});
+			}
+			else
+			{
+				error();
+			}
+		},
+		error: error
+	});
+};
+
+AC.setHiResPreview = function(hiResPreview, success, error)
+{
+	AC.hiResPreview = hiResPreview;
+};
+
+AC.setAspect = function(aspect, success, error)
+{
+	AC.aspect = aspect;
+};
+
+AC.getAspectObj = function()
+{
+	if (AC.aspect != null)
+	{
+		var aspectArray = AC.aspect.split(' ');
+		
+		if (aspectArray.length > 1)
+		{
+			return {pageId: aspectArray[0], layerIds: aspectArray.slice(1)};
+		}
+	}
+	
+	return {};
+};
+
+AC.getAttachmentInfo = function(pageId, attName, sucess, error)
+{
+	AP.request({
+        type: 'GET',
+        url: '/rest/api/content/' + pageId + '/child/attachment?expand=version&filename=' + 
+        		encodeURIComponent(attName),
+        contentType: 'application/json;charset=UTF-8',
+        success: function (resp) 
+        {
+        	var tmp = JSON.parse(resp);
+            
+        	if (tmp.results && tmp.results.length == 1)
+        	{
+        		sucess(tmp.results[0]);
+        	}
+        	else
+    		{
+        		error({status: 404});
+    		}
+        },
+        error: error
+    });	
+};
+
+//White-listed functions and some info about it
+AC.remoteInvokableFns = {
+	getRecentDiagrams: {isAsync: true},
+	searchDiagrams: {isAsync: true},
+	getCustomLibraries: {isAsync: true},
+	getFileContent: {isAsync: true},
+	getCurrentUser: {isAsync: true},
+	getComments: {isAsync: true},
+	userCanEdit: {isAsync: true},
+	getCustomTemplates: {isAsync: true},
+	getPageInfo: {isAsync: true},
+	getDiagramRevisions: {isAsync: true},
+	setHiResPreview: {isAsync: false},
+	setAspect: {isAsync: false}
+};
+
+AC.remoteInvokeCallbacks = [];
+
+AC.handleRemoteInvokeResponse = function(msg)
+{
+	var msgMarkers = msg.msgMarkers;
+	var callback = AC.remoteInvokeCallbacks[msgMarkers.callbackId];
+	
+	if (msg.error)
+	{
+		if (callback.error) callback.error(msg.error.errResp);
+	}
+	else if (callback.callback)
+	{
+		callback.callback.apply(this, msg.resp);
+	}
+	
+	AC.remoteInvokeCallbacks[msgMarkers.callbackId] = null; //set it to null only to keep the index
+};
+
+//Here, the editor is ready before sending init even which starts everything, so no need for waiting for ready message. Init is enough
+AC.remoteInvoke = function(remoteFn, remoteFnArgs, msgMarkers, callback, error)
+{
+	msgMarkers = msgMarkers || {};
+	msgMarkers.callbackId = AC.remoteInvokeCallbacks.length;
+	AC.remoteInvokeCallbacks.push({callback: callback, error: error});
+	AC.remoteWin.postMessage(JSON.stringify({action: 'remoteInvoke', funtionName: remoteFn, functionArgs: remoteFnArgs, msgMarkers: msgMarkers}), '*');
+};
+
+AC.handleRemoteInvoke = function(msg)
+{
+	function sendResponse(resp, error)
+	{
+		var respMsg = {action: 'remoteInvokeResponse', msgMarkers: msg.msgMarkers};
+		
+		if (error != null)
+		{
+			respMsg.error = {errResp: error};
+		}
+		else if (resp != null) 
+		{
+			respMsg.resp = resp;
+		}
+		
+		AC.remoteWin.postMessage(JSON.stringify(respMsg), '*');
+	}
+	
+	try
+	{
+		//Remote invoke are allowed to call functions in AC
+		var funtionName = msg.funtionName;
+		var functionInfo = AC.remoteInvokableFns[funtionName];
+		
+		if (functionInfo != null && typeof AC[funtionName] === 'function')
+		{
+			var functionArgs = msg.functionArgs;
+			
+			//Confirm functionArgs are not null and is array, otherwise, discard it
+			if (!Array.isArray(functionArgs))
+			{
+				functionArgs = [];
+			}
+			
+			//for functions with callbacks (async) we assume last two arguments are success, error
+			if (functionInfo.isAsync)
+			{
+				//success
+				functionArgs.push(function() 
+				{
+					sendResponse(Array.prototype.slice.apply(arguments));
+				});
+				
+				//error
+				functionArgs.push(function(err) 
+				{
+					sendResponse(null, err || mxResources.get('unknownError'));
+				});
+				
+				AC[funtionName].apply(this, functionArgs);
+			}
+			else
+			{
+				var resp = AC[funtionName].apply(this, functionArgs);
+				
+				sendResponse([resp]);
+			}
+		}
+		else
+		{
+			sendResponse(null, mxResources.get('invalidCallFnNotFound', [funtionName]));
+		}
+	}
+	catch(e)
+	{
+		sendResponse(null, mxResources.get('invalidCallErrOccured', [e.message]));
+	}
+};
diff --git a/src/main/webapp/connect/confluence/i18n/cs_CZ.json b/src/main/webapp/connect/confluence/i18n/cs_CZ.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/cs_CZ.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/da_DK.json b/src/main/webapp/connect/confluence/i18n/da_DK.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/da_DK.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/de_DE.json b/src/main/webapp/connect/confluence/i18n/de_DE.json
new file mode 100644
index 000000000..9238b2edd
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/de_DE.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Konfiguration",
+  "drawDiagrams": "draw.io Diagramme",
+  "drawioMacro": "draw.io Diagramm",
+  "drawDesc": "Fügt eine neues draw.io Diagramm ein",
+  "incDrawioMacro": "draw.io Diagramm einbetten",
+  "embedDesc": "Bestehendes draw.io Diagramm einbetten",
+  "legacyDrawioMacro": "Legacy Makro - bitte nicht verwenden",
+  "legacyDesc": "Bitte nicht verwenden",
+  "lightbox": "Vollbild",
+  "drawViewer": "draw.io Ansicht",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Startbildschirm Editor",
+  "diagramName": "Diagrammname (bitte nicht ändern)",
+  "automaticSize": "automatische Grösse",
+  "pPageID": "ID der übergeordneten Seite",
+  "baseUrl": "Confluence Basis URL",
+  "dWidth": "Diagrammbreite",
+  "dHeight": "Diagrammhöhe",
+  "macro.md.edit": "Markdown bearbeiten",
+  "macro.md.insert": "Markdown einfügen"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/en.json b/src/main/webapp/connect/confluence/i18n/en.json
new file mode 100644
index 000000000..b367d5b9b
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/en.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit Markdown",
+  "macro.md.insert": "Insert Markdown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/es_ES.json b/src/main/webapp/connect/confluence/i18n/es_ES.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/es_ES.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/et_EE.json b/src/main/webapp/connect/confluence/i18n/et_EE.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/et_EE.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/fi_FI.json b/src/main/webapp/connect/confluence/i18n/fi_FI.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/fi_FI.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/fr_FR.json b/src/main/webapp/connect/confluence/i18n/fr_FR.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/fr_FR.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/hu_HU.json b/src/main/webapp/connect/confluence/i18n/hu_HU.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/hu_HU.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/is_IS.json b/src/main/webapp/connect/confluence/i18n/is_IS.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/is_IS.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/it_IT.json b/src/main/webapp/connect/confluence/i18n/it_IT.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/it_IT.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/ja_JP.json b/src/main/webapp/connect/confluence/i18n/ja_JP.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/ja_JP.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/ko_KR.json b/src/main/webapp/connect/confluence/i18n/ko_KR.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/ko_KR.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/nl_NL.json b/src/main/webapp/connect/confluence/i18n/nl_NL.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/nl_NL.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/no_NO.json b/src/main/webapp/connect/confluence/i18n/no_NO.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/no_NO.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/pl_PL.json b/src/main/webapp/connect/confluence/i18n/pl_PL.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/pl_PL.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/pt_BR.json b/src/main/webapp/connect/confluence/i18n/pt_BR.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/pt_BR.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/ro_RO.json b/src/main/webapp/connect/confluence/i18n/ro_RO.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/ro_RO.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/ru_RU.json b/src/main/webapp/connect/confluence/i18n/ru_RU.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/ru_RU.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/sk_SK.json b/src/main/webapp/connect/confluence/i18n/sk_SK.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/sk_SK.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/sv_SE.json b/src/main/webapp/connect/confluence/i18n/sv_SE.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/sv_SE.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/i18n/zh_CN.json b/src/main/webapp/connect/confluence/i18n/zh_CN.json
new file mode 100644
index 000000000..df9b90b58
--- /dev/null
+++ b/src/main/webapp/connect/confluence/i18n/zh_CN.json
@@ -0,0 +1,23 @@
+{
+  "gliffyImport": "draw.io Gliffy Import",
+  "drawConfig": "draw.io Configuration",
+  "drawDiagrams": "draw.io Diagrams",
+  "drawioMacro": "draw.io Diagram",
+  "drawDesc": "Inserts a new draw.io diagram",
+  "incDrawioMacro": "Embed draw.io diagram",
+  "embedDesc": "Embed an existing draw.io diagram",
+  "legacyDrawioMacro": "Legacy macro - do not use",
+  "legacyDesc": "Do not use",
+  "lightbox": "Lightbox",
+  "drawViewer": "draw.io Viewer",
+  "drawEditor": "draw.io Editor",
+  "drawSplashEditor": "draw.io Splash Editor",
+  "diagramName": "Diagram name (do not change)",
+  "automaticSize": "automatic size",
+  "pPageID": "Parent page ID",
+  "baseUrl": "Confluence Base URL",
+  "dWidth": "Diagram width",
+  "dHeight": "Diagram height",
+  "macro.md.edit": "Edit MarkDown",
+  "macro.md.insert": "Insert New MarkDown"
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/includeDiagram.html b/src/main/webapp/connect/confluence/includeDiagram.html
new file mode 100644
index 000000000..10127f587
--- /dev/null
+++ b/src/main/webapp/connect/confluence/includeDiagram.html
@@ -0,0 +1,386 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Include draw.io Diagram</title>
+<script type="text/javascript">
+	// To Avoid NPE in connectUtils
+	urlParams = {};
+</script>
+<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script src="../onedrive_common/editor.js" type="text/javascript"></script>
+<script src="../gdrive_common/editor.js" type="text/javascript"></script>
+<script src="../att_common/att-editor.js" type="text/javascript"></script>
+<script src="includeDiagram.js" type="text/javascript"></script>
+
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.9.12/css/aui.min.css" media="all">
+<style type="text/css">
+body {
+	font-family:Arial, sans-serif;
+	overflow:hidden;
+	height:100%;
+	width:100%;
+	margin:0;
+}
+
+/* Style the tab */
+.tab {
+    overflow: hidden;
+    border: 1px solid #ccc;
+    background-color: #f1f1f1;
+}
+
+/* Style the buttons that are used to open the tab content */
+.tab button {
+    background-color: inherit;
+    float: left;
+    border: none;
+    outline: none;
+    cursor: pointer;
+    padding: 14px 16px;
+    transition: 0.3s;
+}
+
+/* Change background color of buttons on hover */
+.tab button:hover {
+    background-color: #ddd;
+}
+
+/* Create an active/current tablink class */
+.tab button.active {
+    background-color: #ccc;
+}
+
+/* Style the tab content */
+.tabcontent {
+	width: 100%;
+	height: 100%;
+    display: none;
+    padding: 6px 12px;
+    border: 1px solid #ccc;
+    border-top: none;
+    animation: fadeEffect 1s; /* Fading effect takes 1 second */
+}
+
+/* Go from zero to full opacity */
+@keyframes fadeEffect {
+    from {opacity: 0;}
+    to {opacity: 1;}
+}
+
+.diagram {
+	border:1px solid #ddd;
+	display:inline-block;
+	vertical-align:top;
+	border-radius:3px;
+	overflow:hidden;
+	font-size:14pt;
+	cursor:pointer;
+	margin:5px;
+}
+
+#errorMsg {
+  position:absolute;
+  bottom:10px;
+  left:0px;
+  right:0px;
+  text-align:center;
+  overflow:hidden;
+  color:red;
+  opacity: 0;
+  transition: opacity 1s; 
+}
+
+#errorMsg.fade {
+  opacity: 1;
+}
+</style>
+</head>
+<body style="height:100%">
+	<!-- Tab links -->
+	<div class="tab">
+	  <button id="currentTab" class="tablinks" data-tabContetn="current">Current Diagram</button>
+	  <button id="recentTab" class="tablinks" data-tabContetn="recent">Recent Diagrams</button>
+	  <button id="searchTab" class="tablinks" data-tabContetn="search">Search</button>
+	  <button id="gDriveTab" class="tablinks" data-tabContetn="gDrive">Google Drive</button>
+	  <button id="oneDriveTab" class="tablinks" data-tabContetn="oneDrive">OneDrive</button>
+	  <button id="uploadTab" class="tablinks" data-tabContetn="upload">Upload</button>
+	  <button id="extUrlTab" class="tablinks" data-tabContetn="extUrl">From URL</button>
+	</div>
+	
+	<!-- Tab content -->
+	<div id="current" class="tabcontent" style="padding: 0">
+	</div>
+	
+	<div id="recent" class="tabcontent">
+	  <div id="recentList" style="width:100%; height: 100%">
+			
+	  </div>
+	</div>
+	
+	<div id="search" class="tabcontent">
+	    <div class="field-group">
+			<label for="searchStr" style="display:inline-block;">Search:</label> <input class="text medium-field" id="searchStr" value="" placeholder="Diagram Name">
+			<button class="aui-button aui-button-primary ap-dialog-submit" id="searchBtn">Search</button>
+		</div>
+	    <div id="searchList"  style="width:100%; height: 100%">
+			
+		</div>
+	</div>
+	
+	<div id="gDrive" class="tabcontent" style="padding: 0;height:100%;">
+		<div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="filename">File name</label> 
+					<input class="text macro-param-input" type="text" id="filenameGD" name="filename" disabled placeholder="Choose a file...">
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerGD" disabled>Choose</button>
+					<div id="spinner-containerGD"></div>
+					<div class="description">Google Drive file name</div>
+					<div class="error" id="filenameErrorGD"></div>
+				</div>
+				<div style="display: none">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="widthGD">Width</label> <input class="text medium-field" id="widthGD" value="800">
+						<div class="description">Width of the viewer (px)</div>
+						<div class="error" id="widthErrorGD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="heightGD">Height</label> <input class="text medium-field" id="heightGD" value="600">
+						<div class="description">Height of the viewer (px)</div>
+						<div class="error" id="heightErrorGD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input class="checkbox small-field" id="autoSizeGD" type="checkbox" >
+						<label for="autoSizeGD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<label for="thumbImg">Thumbnail</label>
+						<div class="thumbnail">
+							<img class="thumbImg" id="thumbImgGD">
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<input type="checkbox" class="checkbox small-fiel" id="useDrawioGD">
+						<label for="useDrawio" style="display:inline-block;">Preview in draw.io</label>
+					</div>
+				</div>
+				<a id="signoutGD" style="position: absolute;bottom: 2px;right: 5px;font-size: 11px;cursor: pointer;" onclick="javascript:void(0);">Sign Out</a>
+			</form>
+		</div>
+		<div id="previewGD" style="bottom:0px;left:351px;position:absolute;top:42px;right:0px;display:inline-block;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('filePickerGD').click();">Choose a file...</a>
+		</div>
+	</div>
+	
+	<div id="oneDrive" class="tabcontent" style="padding: 0;height:100%">
+		<div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="filenameOD">File name</label> 
+					<input class="text macro-param-input" type="text" id="filenameOD" name="filename" disabled placeholder="Choose a file...">
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerOD" disabled>Choose</button>
+					<div id="spinner-containerOD"></div>
+					<div class="description">OneDrive file name</div>
+					<div class="error" id="filenameErrorOD"></div>
+				</div>
+				<div style="display: none">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="widthOD">Width</label> <input class="text medium-field" id="widthOD" value="800">
+						<div class="description">Width of the viewer (px)</div>
+						<div class="error" id="widthErrorOD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="heightOD">Height</label> <input class="text medium-field" id="heightOD" value="600">
+						<div class="description">Height of the viewer (px)</div>
+						<div class="error" id="heightErrorOD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input class="checkbox small-field" id="autoSizeOD" type="checkbox" >
+						<label for="autoSizeOD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<label for="thumbImgOD">Thumbnail</label>
+						<div class="thumbnail">
+							<img class="thumbImg" id="thumbImgOD">
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<input type="checkbox" class="checkbox small-fiel" id="useDrawioOD">
+						<label for="useDrawioOD" style="display:inline-block;">Preview in draw.io</label>
+					</div>
+				</div>
+				<a id="signoutOD" style="position: absolute;bottom: 2px;right: 5px;font-size: 11px;cursor: pointer;" onclick="javascript:void(0);">Sign Out</a>
+			</form>
+		</div>
+		<div id="previewOD" style="bottom:0px;left:351px;position:absolute;top:42px;right:0px;display:inline-block;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('filePickerOD').click();">Choose a file...</a>
+		</div>
+	</div>
+	
+	<div id="upload" class="tabcontent" style="padding: 0;height:100%">
+		<div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="filenameUD">File name</label> 
+					<input type="file" id="fileuploadUD" style="display: none">
+					<input class="text macro-param-input" type="text" id="filenameUD" name="filename" disabled placeholder="Choose a file...">
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerUD">Choose</button>
+					<div id="spinner-containerUD"></div>
+					<div class="description">Diagram file name</div>
+					<div class="error" id="filenameErrorUD"></div>
+				</div>
+				<div style="display: none">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="widthUD">Width</label> <input class="text medium-field" id="widthUD" value="800">
+						<div class="description">Width of the viewer (px)</div>
+						<div class="error" id="widthErrorUD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="heightUD">Height</label> <input class="text medium-field" id="heightUD" value="600">
+						<div class="description">Height of the viewer (px)</div>
+						<div class="error" id="heightErrorUD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input class="checkbox small-field" id="autoSizeUD" type="checkbox" >
+						<label for="autoSizeUD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+					</div>
+				</div>
+				<div class="error" id="errorMsgUD">
+				</div>
+			</form>
+		</div>
+		<div id="previewUD" style="bottom:0px;left:351px;position:absolute;top:42px;right:0px;display:inline-block;text-align: center;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('fileuploadUD').click();">Choose a file...</a>
+		</div>
+	</div>
+	
+	<div id="extUrl" class="tabcontent">
+		<div class="field-group" style="height: 60px">
+			<label for="diagramName" style="display:inline-block;width: 100px">Diagram Name:</label> <input class="text medium-field" id="diagramName" value="" placeholder="Diagram Name" style="width: 50%; height:20px"><br>
+			<label for="diagramUrl" style="display:inline-block;width: 100px">Diagram URL:</label> <input class="text medium-field" id="diagramUrl" value="" placeholder="Diagram URL" style="width: 50%; height:20px">
+			<button class="aui-button aui-button-primary ap-dialog-submit" id="showDiagBtn">Show Diagram</button>
+		</div>
+	  	<div id="extUrlDiagram" style="width: calc(100% - 25px); height: calc(100% - 115px)">
+	  	</div>
+	</div>
+	
+	<div id="errorMsg">
+		 
+	</div>
+	<script type="text/javascript">
+		//Logs uncaught errors
+		window.onerror = function(message, url, linenumber, colno, err)
+		{
+			message = 'Confluence Cloud Embed Editor: ' + ((message != null) ? message : '');
+			
+			AC.logError(message, url, linenumber, colno, err);
+		};
+		
+		var xdm_e = AC.getSiteUrl();
+		var license = AC.getUrlParam('lic', false);
+		var baseUrl = AC.getBaseUrl(); //TODO FIXME search and recent depends on having baseUrl global 
+		var connectUrl = baseUrl + '/atlassian-connect';
+		var head = document.getElementsByTagName('head')[0];
+		var licenseValid = true;
+		
+		var script = document.createElement('script');
+		script.setAttribute('data-options', 'resize:false;margin:false');
+		
+		if (license != null && xdm_e != null)
+		{
+			if  (license == 'none')
+			{
+				var hostParse = document.createElement('a');
+				hostParse.href = xdm_e;
+				var hostname = hostParse.hostname;
+				
+				if (hostname != null)
+				{
+	 				if (hostname.indexOf('.ngrok.io') > -1)
+					{
+						console.log("License status = ", license);
+					}
+					else
+					{
+						var xhr = new XMLHttpRequest();
+			
+						xhr.onreadystatechange = function()
+						{
+						    if (xhr.readyState == XMLHttpRequest.DONE && xhr.status >= 200 && xhr.status <= 299)
+						    {
+						        var resp = xhr.responseText;
+			
+								if (resp != null && resp.length > 0)
+								{
+									var lic = JSON.parse(resp);
+									
+									if (lic != null && lic.atlasCloudLic != null)
+									{
+										licenseValid = true;
+									}
+								}
+						    }
+						};
+			
+						xhr.open('POST', '/license?domain=' + hostname, true);
+						xhr.send(null);
+					}
+				}
+			}
+			else
+			{
+				licenseValid = true;
+			}
+		}
+	
+		// Main
+		script.onload = function()
+		{
+			if (!licenseValid)
+			{
+				setTimeout(function()
+				{
+					if (!licenseValid)
+					{
+						alert("Please install a license for the draw.io app");
+						AP.confluence.closeMacroEditor();
+					}
+				}, 3000);
+			}
+			
+			//start the macro editro
+			AP.navigator.getLocation(function (data)
+		    {
+		    	if (data != null && data.context != null)
+		   		{
+		    		var draftPage = (data.target == 'contentcreate');
+		    		var pageId = data.context.contentId;
+		    		
+		    		includeDiagramMain(pageId, draftPage);
+		   		}
+		    	else
+	    		{
+		    		alert('Unexpected Error: Cannot get content id or type.');
+	    		}
+		    });
+		};
+	
+		script.src = 'https://connect-cdn.atl-paas.net/all.js';
+		head.appendChild(script);
+		
+		var link = document.createElement('link');
+		link.type = 'text/css';
+		link.rel = 'stylesheet';
+		link.href = connectUrl + '/all.css';
+		head.appendChild(link);
+	</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/includeDiagram.js b/src/main/webapp/connect/confluence/includeDiagram.js
new file mode 100644
index 000000000..23c17f819
--- /dev/null
+++ b/src/main/webapp/connect/confluence/includeDiagram.js
@@ -0,0 +1,989 @@
+function includeDiagramMain(confPageId, draftPage)
+{
+	var EXPORT_URL = 'https://exp.draw.io/ImageExport4/export';
+	var selectedDiagramInfo = null;
+	var theMacroData = null;
+	var selectedElt = null;
+	var activeTab = 'recent';
+	var recentLoaded = false;
+	var searchLoaded = false;
+	var curViewer = null;
+	var attEditor, odEditor = null, gdEditor = null;
+	var gSelFileContent = null;
+	var gSelFileModifiedTS = null;
+	var gAttVer = null;
+	var async = false;
+	var editMode = false;
+	
+	var opts =
+	{
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+	
+	var spinner = new Spinner(opts);
+	
+	function sha1 (str) 
+	{
+		  //  discuss at: http://locutus.io/php/sha1/
+		  // original by: Webtoolkit.info (http://www.webtoolkit.info/)
+		  // improved by: Michael White (http://getsprink.com)
+		  // improved by: Kevin van Zonneveld (http://kvz.io)
+		  //    input by: Brett Zamir (http://brett-zamir.me)
+		  //      note 1: Keep in mind that in accordance with PHP, the whole string is buffered and then
+		  //      note 1: hashed. If available, we'd recommend using Node's native crypto modules directly
+		  //      note 1: in a steaming fashion for faster and more efficient hashing
+		  //   example 1: sha1('Kevin van Zonneveld')
+		  //   returns 1: '54916d2e62f65b3afa6e192e6a601cdbe5cb5897'
+
+		  var hash
+		  try {
+		    var crypto = require('crypto')
+		    var sha1sum = crypto.createHash('sha1')
+		    sha1sum.update(str)
+		    hash = sha1sum.digest('hex')
+		  } catch (e) {
+		    hash = undefined
+		  }
+
+		  if (hash !== undefined) {
+		    return hash
+		  }
+
+		  var _rotLeft = function (n, s) {
+		    var t4 = (n << s) | (n >>> (32 - s))
+		    return t4
+		  }
+
+		  var _cvtHex = function (val) {
+		    var str = ''
+		    var i
+		    var v
+
+		    for (i = 7; i >= 0; i--) {
+		      v = (val >>> (i * 4)) & 0x0f
+		      str += v.toString(16)
+		    }
+		    return str
+		  }
+
+		  var blockstart
+		  var i, j
+		  var W = new Array(80)
+		  var H0 = 0x67452301
+		  var H1 = 0xEFCDAB89
+		  var H2 = 0x98BADCFE
+		  var H3 = 0x10325476
+		  var H4 = 0xC3D2E1F0
+		  var A, B, C, D, E
+		  var temp
+
+		  // utf8_encode
+		  str = unescape(encodeURIComponent(str))
+		  var strLen = str.length
+
+		  var wordArray = []
+		  for (i = 0; i < strLen - 3; i += 4) {
+		    j = str.charCodeAt(i) << 24 |
+		      str.charCodeAt(i + 1) << 16 |
+		      str.charCodeAt(i + 2) << 8 |
+		      str.charCodeAt(i + 3)
+		    wordArray.push(j)
+		  }
+
+		  switch (strLen % 4) {
+		    case 0:
+		      i = 0x080000000
+		      break
+		    case 1:
+		      i = str.charCodeAt(strLen - 1) << 24 | 0x0800000
+		      break
+		    case 2:
+		      i = str.charCodeAt(strLen - 2) << 24 | str.charCodeAt(strLen - 1) << 16 | 0x08000
+		      break
+		    case 3:
+		      i = str.charCodeAt(strLen - 3) << 24 |
+		        str.charCodeAt(strLen - 2) << 16 |
+		        str.charCodeAt(strLen - 1) <<
+		      8 | 0x80
+		      break
+		  }
+
+		  wordArray.push(i)
+
+		  while ((wordArray.length % 16) !== 14) {
+		    wordArray.push(0)
+		  }
+
+		  wordArray.push(strLen >>> 29)
+		  wordArray.push((strLen << 3) & 0x0ffffffff)
+
+		  for (blockstart = 0; blockstart < wordArray.length; blockstart += 16) {
+		    for (i = 0; i < 16; i++) {
+		      W[i] = wordArray[blockstart + i]
+		    }
+		    for (i = 16; i <= 79; i++) {
+		      W[i] = _rotLeft(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1)
+		    }
+
+		    A = H0
+		    B = H1
+		    C = H2
+		    D = H3
+		    E = H4
+
+		    for (i = 0; i <= 19; i++) {
+		      temp = (_rotLeft(A, 5) + ((B & C) | (~B & D)) + E + W[i] + 0x5A827999) & 0x0ffffffff
+		      E = D
+		      D = C
+		      C = _rotLeft(B, 30)
+		      B = A
+		      A = temp
+		    }
+
+		    for (i = 20; i <= 39; i++) {
+		      temp = (_rotLeft(A, 5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff
+		      E = D
+		      D = C
+		      C = _rotLeft(B, 30)
+		      B = A
+		      A = temp
+		    }
+
+		    for (i = 40; i <= 59; i++) {
+		      temp = (_rotLeft(A, 5) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff
+		      E = D
+		      D = C
+		      C = _rotLeft(B, 30)
+		      B = A
+		      A = temp
+		    }
+
+		    for (i = 60; i <= 79; i++) {
+		      temp = (_rotLeft(A, 5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6) & 0x0ffffffff
+		      E = D
+		      D = C
+		      C = _rotLeft(B, 30)
+		      B = A
+		      A = temp
+		    }
+
+		    H0 = (H0 + A) & 0x0ffffffff
+		    H1 = (H1 + B) & 0x0ffffffff
+		    H2 = (H2 + C) & 0x0ffffffff
+		    H3 = (H3 + D) & 0x0ffffffff
+		    H4 = (H4 + E) & 0x0ffffffff
+		  }
+
+		  temp = _cvtHex(H0) + _cvtHex(H1) + _cvtHex(H2) + _cvtHex(H3) + _cvtHex(H4)
+		  return temp.toLowerCase()
+	};
+	
+	function showError(errMsg, nohide)
+	{
+		var errorMsg = document.getElementById('errorMsg');
+		errorMsg.innerHTML = errMsg;
+		errorMsg.className = 'fade';
+		
+		if (!nohide)
+		{
+			setTimeout(function()
+			{
+				errorMsg.className = '';
+			}, 2000);
+		}
+	};
+	
+	function onSelect()
+	{
+		if (activeTab == 'extUrl')
+		{
+			var hasErr = false;
+			var diagramUrl = document.getElementById('diagramUrl');
+			
+			if (!diagramUrl.value)
+			{
+				diagramUrl.style.border = '1px solid red';
+				hasErr = true;
+			}
+			
+			var diagramName = document.getElementById('diagramName');
+			
+			if (!diagramName.value)
+			{
+				diagramName.style.border = '1px solid red';
+				hasErr = true;
+			}
+			
+			if (hasErr)
+			{
+				return;
+			}
+			
+			theMacroData = {
+				baseUrl: baseUrl,
+				diagramName: diagramName.value,
+				diagramDisplayName: diagramName.value,
+				diagramUrl: diagramUrl.value,
+				includedDiagram: 1
+			};
+			document.getElementById('currentTab').style.display = '';
+			document.getElementById('currentTab').click();
+		}
+		else if (activeTab == 'gDrive') 
+		{
+			gdEditor.doSubmit();
+		}
+		else if (activeTab == 'oneDrive') 
+		{
+			odEditor.doSubmit();
+		}
+		else if (activeTab == 'upload') 
+		{
+			attEditor.doSubmit();
+		}
+		else if (selectedDiagramInfo != null) 
+		{
+			var info = selectedDiagramInfo.info;
+			theMacroData = {
+				diagramName: info.name,
+				diagramDisplayName: info.displayName,
+				pageId: info.pageId,
+				custContentId: info.contentId || info.custContentId,
+				baseUrl: baseUrl,
+				includedDiagram: 1
+			};
+			document.getElementById('currentTab').style.display = '';
+			document.getElementById('currentTab').click();
+		}
+		else
+		{
+			showError('Please select a diagram to insert it.');
+		}
+	};
+	
+	function onSubmit()
+	{
+		if (activeTab == 'current')
+		{
+			if (theMacroData != null && curViewer != null)
+			{
+				spinner.spin(document.getElementById('current'));
+				AP.dialog.getButton('submit').disable();
+				
+				var layerIds = [], pageId = curViewer.diagrams[curViewer.currentPage].getAttribute('id');
+				
+				var model = curViewer.graph.getModel();
+				var childCount = model.getChildCount(model.root);
+					
+				// Get visible layers
+				for (var i = 0; i < childCount; i++)
+				{
+					var layer = model.getChildAt(model.root, i);
+					
+					if (model.isVisible(layer))
+					{
+						layerIds.push(layer.id);
+					}
+				}
+					
+				var aspect = pageId + ' ' + layerIds.join(' ');
+				var aspectHash = sha1(aspect);
+				theMacroData.aspect = aspect;
+				theMacroData.aspectHash = aspectHash;
+				theMacroData.imgPageId = confPageId;
+				
+				var bounds = curViewer.graph.getGraphBounds();
+				
+				if (bounds != null)
+				{
+					theMacroData.width = Math.round(bounds.width) || null;
+					theMacroData.height = Math.round(bounds.height) || null;
+				}
+				
+				function saveMacro()
+				{
+					AP.confluence.saveMacro(theMacroData);
+					AP.confluence.closeMacroEditor();
+				};
+				
+				function saveError()
+				{
+					spinner.stop();
+					AP.dialog.getButton('submit').enable();
+					showError('Saving failed, please try again later.')
+				};
+				
+				function doSaveImage(imageData)
+				{
+					if (imageData == null)
+					{
+						saveError();
+						return;
+					}
+					
+					AC.saveDiagram(confPageId, theMacroData.diagramName + '-' + aspectHash + '.png', AC.b64toBlob(imageData, 'image/png'),
+							saveMacro, saveError, false, 'image/png', 'draw.io aspect image' + (gAttVer != null? ' - ' + gAttVer : ''), false, draftPage);
+				};
+				
+				function serverFallback()
+				{
+
+					var acceptResponse = true;
+					
+					var timeoutThread = window.setTimeout(function()
+					{
+						acceptResponse = false;
+						doSaveImage(null);
+					}, 25000);
+			    	
+			    	var req = new mxXmlRequest(EXPORT_URL, 'format=png&base64=1' +
+			    			 (layerIds != null? '&extras=' + encodeURIComponent(JSON.stringify({layerIds: layerIds})) : '') + 
+							 (pageId != null? '&pageId=' + pageId : '') + '&xml=' + encodeURIComponent(curViewer.xml));
+
+					req.send(function(req)
+					{
+				    	window.clearTimeout(timeoutThread);
+						
+						if (acceptResponse)
+						{
+							doSaveImage(req.getStatus() >= 200 && req.getStatus() <= 299? req.getText() : null);
+						}
+					}, 
+					function()
+					{
+				    	window.clearTimeout(timeoutThread);
+						
+						if (acceptResponse)
+						{
+							doSaveImage(null);
+						}
+					});
+			    
+				};
+				
+				function startSaving()
+				{
+					if (curViewer.editor.isExportToCanvas())
+			    	{
+						curViewer.editor.exportToCanvas(function(canvas)
+				    	{
+				    		var data = canvas.toDataURL('image/png');
+				   	   		doSaveImage(data.substring(data.lastIndexOf(',') + 1));
+				    	}
+				    	, null, null, null, serverFallback);
+			    	}
+			    	else
+		    		{
+			    		serverFallback();
+		    		}
+				};
+				
+				if (theMacroData.service != null)
+				{
+					function doSave()
+					{
+						AC.saveDiagram(confPageId, theMacroData.diagramName, gSelFileContent,
+								startSaving, function(resp)
+								{
+									showError('Unexpected error. Cannot cannot save cached file');
+								}, false, 'application/vnd.jgraph.mxfile', 'Embedded draw.io diagram' + (gSelFileModifiedTS != null ? ' - ' + gSelFileModifiedTS : ''), false, draftPage);
+					};
+					
+					if (editMode)
+					{
+						doSave()
+					}
+					else
+					{
+						//Confirm filename is unique for new files
+						AC.getPageAttachments(confPageId, function(attachments) 
+						{
+							var fileExists = false;
+							var lc = theMacroData.diagramName.toLowerCase();
+							
+							// Checks if any files will be overwritten
+							for (var i = 0; i < attachments.length && !fileExists; i++)
+							{
+								var an = attachments[i].title.toLowerCase();
+
+								if (an == lc)
+								{
+									fileExists = true;
+								}
+							}
+							
+							if (fileExists)
+							{
+								//Make filename unique
+								theMacroData.diagramName = Date.now() + '-' + theMacroData.diagramName;
+							}
+							
+							doSave();
+						}, function(res)
+						{
+							showError('Unexpected error. Cannot cannot save cached file');
+						});
+					}
+				}
+				else
+				{
+					startSaving()
+				}
+			}
+			else
+			{
+				showError('Unexpected error. Cannot show diagram');
+			}
+		}
+		else
+		{
+			showError('Please select a diagram to insert it.');
+		}
+	};
+	 
+	function deselectDiagram()
+	{
+		selectedDiagramInfo = null;
+
+		if (selectedElt != null)
+		{
+			selectedElt.style.backgroundColor = 'transparent';
+			selectedElt.style.border = '1px solid #ddd';
+		}
+	};
+	
+	function fillDiagramsList(list, listDiv, top, emptyMsg)
+	{
+		listDiv.innerHTML = ''; 
+		var div = document.createElement('div');
+		div.style.border = '1px solid #d3d3d3';
+		div.style.margin = '6px 0 0 -1px';
+		div.style.padding = '6px';
+		div.style.overflow = 'auto';
+		div.style.position = 'absolute';
+		div.style.bottom = '10px';
+		div.style.right = '10px';
+		div.style.left = '10px';
+		div.style.top = top + 'px';
+		
+		var w = 140;
+		var h = 140;
+		
+		function selectElement(elt, infoObj)
+		{
+			deselectDiagram();
+			
+			selectedElt = elt;
+			selectedDiagramInfo = infoObj;
+			
+			selectedElt.style.backgroundColor = '#e6eff8';
+			selectedElt.style.border = '2px solid #ccd9ea';
+		};
+
+		function addButton(url, imgUrl, tooltip, infoObj)
+		{
+			var elt = document.createElement('div');
+			elt.className = 'diagram';
+			elt.style.height = w + 'px';
+			elt.style.width = h + 'px';
+			
+			elt.setAttribute('title', tooltip);
+
+			elt.style.backgroundImage = 'url(' + imgUrl + ')';
+			elt.style.backgroundSize = 'contain';
+			elt.style.backgroundPosition = 'center center';
+			elt.style.backgroundRepeat = 'no-repeat';
+			
+			elt.addEventListener('click', function(evt)
+			{
+				selectElement(elt, infoObj);
+			});
+			
+			elt.addEventListener('dblclick', function(evt)
+			{
+				selectedDiagramInfo = infoObj;
+				onSelect();
+			});
+			
+			div.appendChild(elt);
+		}
+		
+		for (var i = 0; i < list.length; i++)
+		{
+			addButton(list[i].url, list[i].imgUrl, list[i].title, list[i]);
+		}
+		
+		if (list.length == 0 && emptyMsg)
+		{
+			var msg = document.createElement('div');
+			msg.style.width = '100%';
+			msg.style.height = '100%';
+			msg.style.textAlign = 'center';
+			msg.innerHTML = emptyMsg;
+			
+			div.appendChild(msg);
+		}
+		
+		listDiv.appendChild(div);
+		return div;
+	}
+	
+	function activateTab()
+	{
+		deselectDiagram();
+		showError('', true);
+		AP.dialog.getButton('selectBtn').show();
+		AP.dialog.getButton('submit').hide();
+		AP.dialog.getButton('submit').disable();
+		
+		switch (activeTab)
+    	{
+	    case 'recent':
+	    	if (!recentLoaded)
+			{
+	    		recentLoaded = true;
+		    	AC.getRecentDiagrams(function(retList)
+				{
+    				fillDiagramsList(retList, document.getElementById('recentList'), 50, 'No recent diagrams found!');
+				}, function() 
+				{
+					showError('Failed to fetch recent diagrams.', true);
+				});
+    		}
+	    	break;
+	    case 'search':
+	    	if (!searchLoaded)
+			{
+	    		searchLoaded = true;
+		    	//fill the div with empty box
+		    	fillDiagramsList([], document.getElementById('searchList'), 80, 'Use the search box to find draw.io diagrams');
+			}
+	    	break;
+	    case 'gDrive':
+	    	if (gdEditor == null)
+    		{
+    			gdEditor = new GDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+    			{
+    				gSelFileContent = selFileContent;
+    				gSelFileModifiedTS = new Date(selectedFile.modifiedDate).getTime();
+    				gAttVer = null;
+    				editMode = false;
+    				//Upload is the same as embedding an existing draw.io macro but without content id
+    				theMacroData = {
+    					diagramName: selectedFile.title,
+    					diagramDisplayName: selectedFile.title,
+    					pageId: confPageId,
+    					baseUrl: baseUrl,
+    					service: 'GDrive',
+    					sFileId: selectedFile.id,
+    					aspect: selectedFile.aspect,
+    					includedDiagram: 1
+    				};
+    				
+    				document.getElementById('currentTab').style.display = '';
+    				document.getElementById('currentTab').click();
+    			}, null, 'GD', true, true);
+			}
+	    	else
+    		{
+	    		gdEditor.spinner.stop();
+    		}
+	    	break;
+	    case 'oneDrive':
+	    	if (odEditor == null)
+    		{
+    			odEditor = new OneDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+ 				{
+    				gSelFileContent = selFileContent;
+    				gSelFileModifiedTS = new Date(selectedFile.lastModifiedDateTime).getTime();
+    				gAttVer = null;
+    				editMode = false;
+    				//Upload is the same as embedding an existing draw.io macro but without content id
+    				theMacroData = {
+    					diagramName: selectedFile.name,
+    					diagramDisplayName: selectedFile.name,
+    					pageId: confPageId,
+    					baseUrl: baseUrl,
+    					service: 'OneDrive',
+    					sFileId: selectedFile.id,
+    					odriveId: selectedFile.parentReference.driveId,
+    					aspect: selectedFile.aspect,
+    					includedDiagram: 1
+    				};
+    				
+    				document.getElementById('currentTab').style.display = '';
+    				document.getElementById('currentTab').click();
+ 				}, null, 'OD', true, true);
+    		}
+	    	else
+    		{
+	    		odEditor.spinner.stop();
+    		}
+	    	break;
+	    case 'upload':
+	    	attEditor.spinner.stop();
+	    	break;
+		case 'current':
+			AP.dialog.getButton('selectBtn').hide();
+			AP.dialog.getButton('submit').show();
+			
+			var div = document.getElementById('current');
+			div.innerHTML = '';
+			var container = document.createElement('div');
+			// NOTE: Height must be specified with default value "auto" to force automatic fit in viewer
+			container.style.cssText = 'position:absolute;width:100%;height:auto;bottom:0px;top:45px;border:1px solid transparent;';
+			div.appendChild(container);
+			spinner.spin(div);
+			
+			var pageId, layerIds;
+			
+			if (theMacroData.aspect != null)
+			{
+				var aspectArray = theMacroData.aspect.split(' ');
+				
+				if (aspectArray.length > 1)
+				{
+					pageId = aspectArray[0];
+					layerIds = aspectArray.slice(1);
+				}
+			}
+			
+			function showFile(fileContent)
+			{
+				if (!async) 
+				{
+					var doc = mxUtils.parseXml(fileContent);
+					
+					curViewer = new GraphViewer(container, doc.documentElement,
+							{highlight: '#3572b0', border: 8, 'auto-fit': true,
+							resize: false, nav: true, lightbox: false, title: (theMacroData.diagramDisplayName || theMacroData.diagramName),
+							'toolbar-nohide': true, 'toolbar-position': 'top', toolbar: 'pages layers',
+							pageId: pageId, layerIds: layerIds
+							});
+				
+					spinner.stop();
+					AP.dialog.getButton('submit').enable();
+				}
+			};
+			
+			if (theMacroData.diagramUrl)
+			{
+				mxUtils.get(theMacroData.diagramUrl, function(req)
+				{
+					if (req.getStatus() >= 200 && req.getStatus() <= 299)
+					{
+						try
+						{
+							showFile(req.getText());
+						}
+						catch(e)
+						{
+							showError('Unsupported file. Please check the specified URL', true);
+							spinner.stop();
+						}
+					}
+					else
+					{
+						showError('Diagram not found or cannot be accessed. Please check the specified URL', true);
+						spinner.stop();
+					}
+				});
+			}
+			else if (theMacroData.service != null && gSelFileContent != null)
+			{
+				showFile(gSelFileContent);
+			}
+			else
+			{
+				//Get version
+				AC.getAttachmentInfo(theMacroData.pageId, theMacroData.diagramName, function(info)
+				{
+					gAttVer = info.version.number;
+            		
+            		AP.request({
+    					url: '/download/attachments/' + theMacroData.pageId + '/' + encodeURIComponent(theMacroData.diagramName),
+    					success: showFile,
+    					error : function()
+    					{
+    						showError('Cannot read the specified diagram. Please check you have read permission on that file.', true);
+    					}
+    				});
+				}, function()
+				{
+					showError('Cannot fetch diagram info. Please check you have read permission on that file.', true);
+				});
+			}
+			break;
+    	}
+	}
+	
+	function openTab(evt) 
+	{
+		var tabName = this.getAttribute('data-tabContetn');
+	    // Declare all variables
+	    var i, tabcontent, tablinks;
+
+	    // Get all elements with class='tabcontent' and hide them
+	    tabcontent = document.getElementsByClassName('tabcontent');
+	    for (i = 0; i < tabcontent.length; i++) {
+	        tabcontent[i].style.display = 'none';
+	    }
+
+	    // Get all elements with class='tablinks' and remove the class 'active'
+	    tablinks = document.getElementsByClassName('tablinks');
+	    for (i = 0; i < tablinks.length; i++) {
+	        tablinks[i].className = tablinks[i].className.replace(' active', '');
+	    }
+
+	    // Show the current tab, and add an 'active' class to the button that opened the tab
+	    document.getElementById(tabName).style.display = 'block';
+	    evt.currentTarget.className += ' active';
+	    
+	    activeTab = tabName;
+	    activateTab();
+	}
+	
+	function doSearch()
+	{
+		var searchList = document.getElementById('searchList');
+		var searchStr = document.getElementById('searchStr').value;
+		
+		if (searchStr != null && searchStr.length > 0)
+		{
+			spinner.spin(searchList);
+
+			AC.searchDiagrams(searchStr, function(retList)
+			{
+				spinner.stop();
+				fillDiagramsList(retList, searchList, 80, 'No diagrams found!');
+			}, function() 
+			{
+				showError('Searching failed. Please try again later.', true);
+			});
+		}
+		else
+		{
+			showError('Please type a search string.');
+		}
+	};
+	
+	function showDiagFromUrl()
+	{
+		var diagramUrl = document.getElementById('diagramUrl');
+		
+		if (!diagramUrl.value)
+		{
+			diagramUrl.style.border = '1px solid red';
+			return;
+		}
+		
+		var extUrlDiagram = document.getElementById('extUrlDiagram');
+		extUrlDiagram.innerHTML = '';
+		var diagramFrame = document.createElement('iframe');
+		diagramFrame.setAttribute('width', '100%');
+		diagramFrame.setAttribute('height', '100%');
+		diagramFrame.style.width = '100%';
+		diagramFrame.style.height = '100%';
+		diagramFrame.setAttribute('frameborder', '0');
+		
+		diagramFrame.setAttribute('src', 'https://www.draw.io/?lightbox=1&toolbar-config=%7B"refreshBtn"%3Atrue%2C"fullscreenBtn"%3Atrue%2C"closeBtn"%3Atrue%7D&layers=1' +
+				'#U' + encodeURIComponent(diagramUrl.value));
+		
+		extUrlDiagram.appendChild(diagramFrame);
+	};
+	
+	//=======Upload==========
+	attEditor = new AttViewerEditor(function(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, onError)
+	{
+		//We only have add in Jira
+		if (selectedFile != null)
+		{
+			gSelFileContent = selFileContent;
+			gSelFileModifiedTS = null;
+			gAttVer = null;
+			editMode = false;
+			//Upload is the same as embedding an existing draw.io macro but without content id
+			theMacroData = {
+				diagramName: selectedFile.name,
+				diagramDisplayName: selectedFile.name,
+				pageId: confPageId,
+				baseUrl: baseUrl,
+				service: 'AttFile',
+				aspect: aspect,
+				includedDiagram: 1
+			};
+			
+			document.getElementById('currentTab').style.display = '';
+			document.getElementById('currentTab').click();
+		}
+	}, null, 'UD', true, true);
+	
+	//Staring the editor
+	//Setting events listeners
+	document.getElementById('searchBtn').addEventListener('click', doSearch);
+	document.getElementById('searchStr').addEventListener('keypress', function(e)
+	{
+		if (e.keyCode == 13) doSearch();
+	});
+	
+	document.getElementById('showDiagBtn').addEventListener('click', showDiagFromUrl);
+	
+	function resetBorder()
+	{
+		if (this.value)
+			this.style.border = '';
+	};
+	
+	var diagramUrl = document.getElementById('diagramUrl');
+	var diagramName = document.getElementById('diagramName');
+	
+	diagramUrl.addEventListener('keypress', resetBorder);
+	diagramName.addEventListener('keypress', resetBorder);
+	diagramUrl.addEventListener('change', resetBorder);
+	diagramName.addEventListener('change', resetBorder);
+	
+	var tabs = document.getElementsByClassName('tablinks');
+	
+	for (var i = 0; i < tabs.length; i++)
+	{
+		tabs[i].addEventListener('click', openTab);
+	}
+
+	AP.sizeToParent(true);
+	
+	AP.confluence.getMacroData(function (macroData) 
+	{
+		if (macroData != null && macroData.includedDiagram != null)
+		{
+			theMacroData = macroData;
+			editMode = true;
+			
+			if (macroData.diagramUrl)
+			{
+				diagramUrl.value = macroData.diagramUrl;
+				diagramName.value = macroData.diagramName;
+			}
+
+			function extractFileContents(resp, isPng)
+			{
+				if (isPng)
+				{
+					resp = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (resp);
+					resp = AC.extractGraphModelFromPng(resp);
+				}
+				
+				gSelFileContent = resp;
+				async = false;
+				document.getElementById('currentTab').click();
+			};
+			
+			async = true;
+			gSelFileContent = ''; //To prevent fetching the cached file
+			
+			//Update file
+			if (macroData.service == 'GDrive')
+			{
+				GAC.getFileInfo(macroData.sFileId, function(fileInfo)
+				{
+					var isPng = fileInfo.mimeType == 'image/png';
+					gSelFileModifiedTS = new Date(fileInfo.modifiedDate).getTime();
+					
+        			GAC.doAuthRequestPlain(fileInfo['downloadUrl'], 'GET', null, function(req)
+					{
+        				extractFileContents(req.responseText, isPng);
+					}, function()
+					{
+						showError('Cannot read "' + fileInfo.title + '" file from Google Drive.', true);
+					}, null, isPng);
+				}, function()
+				{
+					showError('Fetching file info from Google Drive failed.', true);
+				});
+			}
+			else if (macroData.service == 'OneDrive')
+			{
+				AC.getFileInfo(macroData.sFileId, macroData.odriveId, function(fileInfo)
+				{
+					var isPng = fileInfo.file.mimeType == 'image/png';
+					gSelFileModifiedTS = new Date(fileInfo.lastModifiedDateTime).getTime();
+					
+        			var req = new XMLHttpRequest();
+					req.open('GET', fileInfo['@microsoft.graph.downloadUrl']);
+					
+					req.onreadystatechange = function()
+					{
+						if (this.readyState == 4)
+						{
+							if (this.status >= 200 && this.status <= 299)
+							{
+								extractFileContents(req.responseText, isPng);
+							}
+							else
+							{
+								showError('Cannot read "' + fileInfo.name + '" file from OneDrive.', true);
+							}
+						}
+					};
+					
+					if (isPng && req.overrideMimeType)
+					{
+						req.overrideMimeType('text/plain; charset=x-user-defined');
+					}
+					
+					req.send();
+				}, function()
+				{
+					showError('Fetching file info from OneDrive failed.', true);
+				});
+			}
+			else if (macroData.service == 'AttFile')
+			{
+				AP.request({
+					url: '/download/attachments/' + theMacroData.pageId + '/' + encodeURIComponent(theMacroData.diagramName),
+					success: function(resp)
+					{
+						extractFileContents(resp);
+					},
+					error : function()
+					{
+						showError('Cannot read the uploaded diagram.', true);
+					}
+				});
+			}
+			else
+			{
+				async = false;
+				gSelFileContent = null;
+			}
+			
+			document.getElementById('currentTab').click();
+		}
+		else
+		{
+			document.getElementById('currentTab').style.display = 'none';
+			document.getElementById('recentTab').click();
+		}
+	});
+	
+	var selectBtn = AP.dialog.createButton({
+		  text: 'Select...',
+		  identifier: 'selectBtn'
+	});
+	selectBtn.bind(onSelect);
+	
+	AP.dialog.disableCloseOnSubmit();
+	AP.events.on('dialog.submit', onSubmit);
+	AP.dialog.getButton('submit').hide();
+	AP.dialog.getButton('submit').disable();
+};
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/initEditor.html b/src/main/webapp/connect/confluence/initEditor.html
new file mode 100644
index 000000000..878bd76ee
--- /dev/null
+++ b/src/main/webapp/connect/confluence/initEditor.html
@@ -0,0 +1,79 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Editor</title>
+<script type="text/javascript">
+	// To Avoid NPE in connectUtils
+	urlParams = {};
+</script>
+<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+<style type="text/css">
+	html, body {
+	  height:100%;
+	  overflow:hidden;
+	}
+	body {
+		background-color:#ffffff;
+		background-image:url(/images/drawlogo-text-bottom.svg);
+		background-repeat:no-repeat;
+		background-position:center;
+		background-size:128px;
+		font-family:Arial,Sans-Serif;
+		overflow:hidden;
+		width:100%;
+		margin:0;
+	}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	// Main
+	script.onload = function()
+	{
+		// TODO: Try avoid this by using workaround in EditorUi.fileLoaded on line 2200
+		//Firefox has a problem with focusing the can be fixed with a chrome dialog
+		if(navigator.userAgent.indexOf('Firefox/') >= 0)
+		{
+			AP.dialog.create(
+	        {
+	    		key: 'splashEditor',
+	    		header: 'draw.io',
+	            chrome: true,
+	            width: "50%",
+	            height: "50%",
+	        }).on("close", function(flags)
+        	{
+	        	AP.dialog.close();
+	        	AP.confluence.closeMacroEditor();
+    		});
+			AP.dialog.getButton('submit').hide();
+			//Confluence refuse to hide cancel button!!!
+			AP.dialog.getButton('cancel').hide();
+		}
+		else
+		{
+			AP.dialog.create(
+	        {
+	    		key: 'macroEditor',
+	    		customData: {},
+	            chrome: false,
+	            width: "100%",
+	            height: "100%",
+	        }).on("close", function(flags)
+        	{
+	        	AP.confluence.closeMacroEditor();
+    		});
+		}
+	};
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	head.appendChild(script);
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/macroEditor-1-4-8.html b/src/main/webapp/connect/confluence/macroEditor-1-4-8.html
new file mode 100644
index 000000000..c77edda30
--- /dev/null
+++ b/src/main/webapp/connect/confluence/macroEditor-1-4-8.html
@@ -0,0 +1,189 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Editor</title>
+<script type="text/javascript">
+	// To Avoid NPE in connectUtils
+	urlParams = {};
+</script>
+<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+<style type="text/css">
+	html, body {
+	  height:100%;
+	  overflow:hidden;
+	}
+	body {
+		background-color:#ffffff;
+		background-image:url(/images/drawlogo-text-bottom.svg);
+		background-repeat:no-repeat;
+		background-position:center;
+		background-size:128px;
+		font-family:Arial,Sans-Serif;
+		overflow:hidden;
+		width:100%;
+		margin:0;
+	}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+	//Logs uncaught errors
+	window.onerror = function(message, url, linenumber, colno, err)
+	{
+		message = 'Confluence Cloud Editor: ' + ((message != null) ? message : '');
+		
+		AC.logError(message, url, linenumber, colno, err);
+	};
+	
+	var xdm_e = AC.getSiteUrl();
+	var baseUrl = AC.getBaseUrl();
+	var license = AC.getUrlParam('lic', false);
+	var connectUrl = baseUrl + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	var licenseValid = true;
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	if (!licenseValid && license != null && xdm_e != null)
+	{
+		if (license == 'none')
+		{
+			var hostParse = document.createElement('a');
+			hostParse.href = xdm_e;
+			var hostname = hostParse.hostname;
+			
+			if (hostname != null)
+			{
+ 				if (hostname.indexOf('.ngrok.io') > -1)
+				{
+					console.log("License status = ", license);
+				}
+				else
+				{
+					var xhr = new XMLHttpRequest();
+		
+					xhr.onreadystatechange = function()
+					{
+					    if (xhr.readyState == XMLHttpRequest.DONE && xhr.status >= 200 && xhr.status <= 299)
+					    {
+					        var resp = xhr.responseText;
+		
+							if (resp != null && resp.length > 0)
+							{
+								var lic = JSON.parse(resp);
+								
+								if (lic != null && lic.atlasCloudLic != null)
+								{
+									licenseValid = true;
+								}
+							}
+					    }
+					};
+		
+					xhr.open('POST', '/license?domain=' + hostname, true);
+					xhr.send(null);
+				}
+			}
+		}
+		else
+		{
+			licenseValid = true;
+		}
+	}
+
+	// Main
+	script.onload = function()
+	{
+		if (!licenseValid)
+		{
+			setTimeout(function()
+			{
+				if (!licenseValid)
+				{
+					alert("Please install a license for the draw.io app");
+					AP.dialog.close();
+				}
+			}, 3000);
+		}
+
+		AP.resize('100%', '100%');
+
+		var config = null;
+		var lang = null;
+		var allDone = 0;
+		
+		var startEditor = function () 
+		{
+			allDone++;
+			
+			if (allDone == 2)
+			{
+				var isCustom = AC.getUrlParam('custom');
+				
+				if (isCustom == "1") 
+				{
+					var contentId = AC.getUrlParam('contentId') || AC.getUrlParam('custContentId');
+					AP.dialog.getCustomData(function (customData) 
+					{
+						AC.initAsync(baseUrl, customData.contentId || customData.custContentId || contentId, customData.macroData, config, lang);
+					});
+				}
+				else
+				{
+					AC.initAsync(baseUrl, null, null, config, lang);
+				}
+			}
+		}
+		
+		AP.user.getLocale(function(locale)
+		{
+			lang = locale;
+			startEditor();
+		});	
+		
+		AP.request({
+            type: 'GET',
+            url: '/rest/api/content/search?cql=type%3Dpage%20and%20space%3DDRAWIOCONFIG%20and%20title%3DConfiguration', //type=page and space=DRAWIOCONFIG and title=Configuration. Search doesn't return 404 if not found
+            contentType: 'application/json;charset=UTF-8',
+            success: function (resp) 
+            {
+                resp = JSON.parse(resp);
+                
+                if (resp.size == 1)
+               	{
+                	var configPageId = resp.results[0].id;
+                	//load the configuration file
+            		AP.request({
+                        type: 'GET',
+            			url: '/download/attachments/' + configPageId + '/configuration.json',
+                        contentType: 'application/json;charset=UTF-8',
+                        success: function (fileContent) 
+                        {
+                        	config = fileContent; 
+                           	startEditor();
+            			},
+            			error: startEditor //if there is an error loading the configuration, just load the editor normally. E.g., 404 when the space doesn't exist
+            		});
+                	
+               	}
+                else 
+               	{
+                	startEditor();
+               	}
+			},
+			error: startEditor //if there is an error loading the configuration, just load the editor normally. E.g., 404 when the space doesn't exist
+		});
+	};
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = 'text/css';
+	link.rel = 'stylesheet';
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/macroEditor.html b/src/main/webapp/connect/confluence/macroEditor.html
new file mode 100644
index 000000000..b12b53baf
--- /dev/null
+++ b/src/main/webapp/connect/confluence/macroEditor.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Draw.io Editor</title>
+<style type="text/css">
+	html, body {
+	  height:100%;
+	  overflow:hidden;
+	}
+	body {
+		background-color:#ffffff;
+		background-image:url(/images/logo-flat.png);
+		background-repeat:no-repeat;
+		background-position:center;
+		font-family:Arial,Sans-Serif;
+		overflow:hidden;
+		width:100%;
+		margin:0;
+	}
+</style>
+</head>
+<body>
+</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/prism/bililiteRange.fancytext.js b/src/main/webapp/connect/confluence/prism/bililiteRange.fancytext.js
new file mode 100644
index 000000000..fd23b07cd
--- /dev/null
+++ b/src/main/webapp/connect/confluence/prism/bililiteRange.fancytext.js
@@ -0,0 +1,91 @@
+// Turn a textarea element into a pre element that can use a highlighter
+// Designed for use with Prism (prismjs.com)
+// usage: editor = bililiteRange.fancytext(element, Prism.highlightElement, threshold);
+// the element should have the appropriate class=language-* for Prism.
+// Version: 1.0
+// Documentation: http://bililite.com/blog/2013/12/16/simple-syntax-highlighting-editor-with-prism/
+// Copyright (c) 2013 Daniel Wachsstock
+// depends: bililiteRange.js, bililiteRange.utils.js (the latter is only for autoindenting; if that's not used it is not necessary)
+
+// MIT license:
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+
+bililiteRange.fancyText = function(editor, highlighter, threshold){
+	if (editor.tagName.toLowerCase() == 'textarea'){
+		// turn the editor into an editable <pre>, since that is what Prism works on
+		var replacement = document.createElement('pre');
+		replacement.setAttribute ('contenteditable', true);
+		[].forEach.call(editor.attributes, function(attr){
+			replacement.setAttribute(attr.name, attr.value);
+		});
+		replacement.textContent = editor.value;
+		editor.parentNode.replaceChild(replacement, editor);
+		editor = replacement;
+	}
+	// for large texts, it can be too slow to run the highlighter on every input event.
+	// use the code from http://unscriptable.com/2009/03/20/debouncing-javascript-methods/
+	// to limit it to once every threshold milliseconds
+	function debounce (func, threshold){
+		if (!threshold) return func; // no debouncing
+		var timeout;
+		return function(){
+			var self = this, args = arguments;
+			clearTimeout(timeout);
+			timeout = setTimeout(function(){
+				func.apply(self, args);
+			}, threshold);
+		};
+	}
+
+	var rng = bililiteRange(editor);
+	function highlight(){
+		rng.bounds('selection');
+		// handle what Lea Verou calls "Dirty fix to #2"--seems to be Chrome issue with missing newlines
+		// from https://github.com/LeaVerou/dabblet/issues/2
+		if (!/\n$/.test(editor.textContent)) editor.textContent += '\n';
+		highlighter(editor);
+		rng.select();
+	}
+	if (highlighter){
+		highlight();
+		rng.listen('input', debounce(highlight, threshold));
+	}
+	rng.listen('paste', function(evt){
+    if (!evt.defaultPrevented) {
+			// Firefox changes newlines to br's on paste!
+			// Chrome pastes cr's! Nothing is easy.
+			rng.bounds('selection').
+				text(evt.clipboardData.getData("text/plain").replace(/\r/g,''), 'end').
+				select();
+			evt.preventDefault();
+		}
+	});
+	rng.listen('keydown', function(evt){
+		// avoid the fancy element-creation with newlines
+		if (evt.keyCode == 13 && !evt.defaultPrevented){
+			rng.bounds('selection').text('\n','end', rng.data().autoindent).select();
+			evt.preventDefault();
+		}
+	});
+
+	return editor;
+};
diff --git a/src/main/webapp/connect/confluence/prism/bililiteRange.js b/src/main/webapp/connect/confluence/prism/bililiteRange.js
new file mode 100644
index 000000000..ebdeb6974
--- /dev/null
+++ b/src/main/webapp/connect/confluence/prism/bililiteRange.js
@@ -0,0 +1,763 @@
+// Cross-broswer implementation of text ranges and selections
+// documentation: http://bililite.com/blog/2011/01/17/cross-browser-text-ranges-and-selections/
+// Version: 2.6
+// Copyright (c) 2013 Daniel Wachsstock
+// MIT license:
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+
+(function(){
+
+// a bit of weirdness with IE11: using 'focus' is flaky, even if I'm not bubbling, as far as I can tell.
+var focusEvent = 'onfocusin' in document.createElement('input') ? 'focusin' : 'focus';
+
+// IE11 normalize is buggy (http://connect.microsoft.com/IE/feedback/details/809424/node-normalize-removes-text-if-dashes-are-present)
+var n = document.createElement('div');
+n.appendChild(document.createTextNode('x-'));
+n.appendChild(document.createTextNode('x'));
+n.normalize();
+var canNormalize = n.firstChild.length == 3;
+
+
+bililiteRange = function(el, debug){
+	var ret;
+	if (debug){
+		ret = new NothingRange(); // Easier to force it to use the no-selection type than to try to find an old browser
+	}else if (window.getSelection && el.setSelectionRange){
+		// Standards. Element is an input or textarea 
+		// note that some input elements do not allow selections
+		try{
+			el.selectionStart; // even getting the selection in such an element will throw
+			ret = new InputRange();
+		}catch(e){
+			ret = new NothingRange();
+		}
+	}else if (window.getSelection){
+		// Standards, with any other kind of element
+		ret = new W3CRange();
+	}else if (document.selection){
+		// Internet Explorer
+		ret = new IERange();
+	}else{
+		// doesn't support selection
+		ret = new NothingRange();
+	}
+	ret._el = el;
+	// determine parent document, as implemented by John McLear <john@mclear.co.uk>
+	ret._doc = el.ownerDocument;
+	ret._win = 'defaultView' in ret._doc ? ret._doc.defaultView : ret._doc.parentWindow;
+	ret._textProp = textProp(el);
+	ret._bounds = [0, ret.length()];
+	//  There's no way to detect whether a focus event happened as a result of a click (which should change the selection)
+	// or as a result of a keyboard event (a tab in) or a script  action (el.focus()). So we track it globally, which is a hack, and is likely to fail
+	// in edge cases (right-clicks, drag-n-drop), and is vulnerable to a lower-down handler preventing bubbling.
+	// I just don't know a better way.
+	// I'll hack my event-listening code below, rather than create an entire new bilililiteRange, potentially before the DOM has loaded
+	if (!('bililiteRangeMouseDown' in ret._doc)){
+		var _doc = {_el: ret._doc};
+		ret._doc.bililiteRangeMouseDown = false;
+		bililiteRange.fn.listen.call(_doc, 'mousedown', function() {
+			ret._doc.bililiteRangeMouseDown = true;
+		});
+		bililiteRange.fn.listen.call(_doc, 'mouseup', function() {
+			ret._doc.bililiteRangeMouseDown = false;
+		});
+	}
+	// note that bililiteRangeSelection is an array, which means that copying it only copies the address, which points to the original.
+	// make sure that we never let it (always do return [bililiteRangeSelection[0], bililiteRangeSelection[1]]), which means never returning
+	// this._bounds directly
+	if (!('bililiteRangeSelection' in el)){
+		// start tracking the selection
+		function trackSelection(evt){
+			if (evt && evt.which == 9){
+				// do tabs my way, by restoring the selection
+				// there's a flash of the browser's selection, but I don't see a way of avoiding that
+				//The following line is commented out in order for supporting inserting tabs in the editor
+				//ret._nativeSelect(ret._nativeRange(el.bililiteRangeSelection));
+			}else{
+				el.bililiteRangeSelection = ret._nativeSelection();
+			}
+		}
+		trackSelection();
+		// only IE does this right and allows us to grab the selection before blurring
+		if ('onbeforedeactivate' in el){
+			ret.listen('beforedeactivate', trackSelection);
+		}else{
+			// with standards-based browsers, have to listen for every user interaction
+			ret.listen('mouseup', trackSelection).listen('keyup', trackSelection);
+		}
+		ret.listen(focusEvent, function(){
+			// restore the correct selection when the element comes into focus (mouse clicks change the position of the selection)
+			// Note that Firefox will not fire the focus event until the window/tab is active even if el.focus() is called
+			// https://bugzilla.mozilla.org/show_bug.cgi?id=566671
+			if (!ret._doc.bililiteRangeMouseDown){
+				ret._nativeSelect(ret._nativeRange(el.bililiteRangeSelection));
+			}
+		});
+	}
+	if (!('oninput' in el)){
+		// give IE8 a chance. Note that this still fails in IE11, which has has oninput on contenteditable elements but does not 
+		// dispatch input events. See http://connect.microsoft.com/IE/feedback/details/794285/ie10-11-input-event-does-not-fire-on-div-with-contenteditable-set
+		// TODO: revisit this when I have IE11 running on my development machine
+		var inputhack = function() {ret.dispatch({type: 'input', bubbles: true}) };
+		ret.listen('keyup', inputhack);
+		ret.listen('cut', inputhack);
+		ret.listen('paste', inputhack);
+		ret.listen('drop', inputhack);
+		el.oninput = 'patched';
+	}
+	return ret;
+}
+
+function textProp(el){
+	// returns the property that contains the text of the element
+	// note that for <body> elements the text attribute represents the obsolete text color, not the textContent.
+	// we document that these routines do not work for <body> elements so that should not be relevant
+	if (typeof el.value != 'undefined') return 'value';
+	if (typeof el.text != 'undefined') return 'text';
+	if (typeof el.textContent != 'undefined') return 'textContent';
+	return 'innerText';
+}
+
+// base class
+function Range(){}
+Range.prototype = {
+	length: function() {
+		return this._el[this._textProp].replace(/\r/g, '').length; // need to correct for IE's CrLf weirdness
+	},
+	bounds: function(s){
+		if (bililiteRange.bounds[s]){
+			this._bounds = bililiteRange.bounds[s].apply(this);
+		}else if (s){
+			this._bounds = s; // don't do error checking now; things may change at a moment's notice
+		}else{
+			var b = [
+				Math.max(0, Math.min (this.length(), this._bounds[0])),
+				Math.max(0, Math.min (this.length(), this._bounds[1]))
+			];
+			b[1] = Math.max(b[0], b[1]);
+			return b; // need to constrain it to fit
+		}
+		return this; // allow for chaining
+	},
+	select: function(){
+		var b = this._el.bililiteRangeSelection = this.bounds();
+		if (this._el === this._doc.activeElement){
+			// only actually select if this element is active!
+			this._nativeSelect(this._nativeRange(b));
+		}
+		this.dispatch({type: 'select', bubbles: true});
+		return this; // allow for chaining
+	},
+	text: function(text, select){
+		if (arguments.length){
+			var bounds = this.bounds(), el = this._el;
+			// signal the input per DOM 3 input events, http://www.w3.org/TR/DOM-Level-3-Events/#h4_events-inputevents
+			// we add another field, bounds, which are the bounds of the original text before being changed.
+			this.dispatch({type: 'beforeinput', bubbles: true,
+			               data: text, bounds: bounds});
+			this._nativeSetText(text, this._nativeRange(bounds));
+			if (select == 'start'){
+				this.bounds ([bounds[0], bounds[0]]);
+			}else if (select == 'end'){
+				this.bounds ([bounds[0]+text.length, bounds[0]+text.length]);
+			}else if (select == 'all'){
+				this.bounds ([bounds[0], bounds[0]+text.length]);
+			}
+			this.dispatch({type: 'input', bubbles: true,
+			               data: text, bounds: bounds});
+			return this; // allow for chaining
+		}else{
+			return this._nativeGetText(this._nativeRange(this.bounds())).replace(/\r/g, ''); // need to correct for IE's CrLf weirdness
+		}
+	},
+	insertEOL: function (){
+		this._nativeEOL();
+		this._bounds = [this._bounds[0]+1, this._bounds[0]+1]; // move past the EOL marker
+		return this;
+	},
+	sendkeys: function (text){
+		var self = this;
+		this.data().sendkeysOriginalText = this.text();
+		this.data().sendkeysBounds = undefined;
+		function simplechar (rng, c){
+			if (/^{[^}]*}$/.test(c)) c = c.slice(1,-1);	// deal with unknown {key}s
+			for (var i =0; i < c.length; ++i){
+				var x = c.charCodeAt(i);
+				rng.dispatch({type: 'keypress', bubbles: true, keyCode: x, which: x, charCode: x});
+			}
+			rng.text(c, 'end');
+		}
+		text.replace(/{[^}]*}|[^{]+|{/g, function(part){
+			(bililiteRange.sendkeys[part] || simplechar)(self, part, simplechar);
+		});
+		this.bounds(this.data().sendkeysBounds);
+		this.dispatch({type: 'sendkeys', which: text});
+		return this;
+	},
+	top: function(){
+		return this._nativeTop(this._nativeRange(this.bounds()));
+	},
+	scrollIntoView: function(scroller){
+		var top = this.top();
+		// scroll into position if necessary
+		if (this._el.scrollTop > top || this._el.scrollTop+this._el.clientHeight < top){
+			if (scroller){
+				scroller.call(this._el, top);
+			}else{
+				this._el.scrollTop = top;
+			}
+		}
+		return this;
+	},
+	wrap: function (n){
+		this._nativeWrap(n, this._nativeRange(this.bounds()));
+		return this;
+	},
+	selection: function(text){
+		if (arguments.length){
+			return this.bounds('selection').text(text, 'end').select();
+		}else{
+			return this.bounds('selection').text();
+		}
+	},
+	clone: function(){
+		return bililiteRange(this._el).bounds(this.bounds());
+	},
+	all: function(text){
+		if (arguments.length){
+			this.dispatch ({type: 'beforeinput', bubbles: true, data: text});
+			this._el[this._textProp] = text;
+			this.dispatch ({type: 'input', bubbles: true, data: text});
+			return this;
+		}else{
+			return this._el[this._textProp].replace(/\r/g, ''); // need to correct for IE's CrLf weirdness
+		}
+	},
+	element: function() { return this._el },
+	// includes a quickie polyfill for CustomEvent for IE that isn't perfect but works for me
+	// IE10 allows custom events but not "new CustomEvent"; have to do it the old-fashioned way
+	dispatch: function(opts){
+		opts = opts || {};
+		var event = document.createEvent ? document.createEvent('CustomEvent') : this._doc.createEventObject();
+		event.initCustomEvent && event.initCustomEvent(opts.type, !!opts.bubbles, !!opts.cancelable, opts.detail);
+		for (var key in opts) event[key] = opts[key];
+		// dispatch event asynchronously (in the sense of on the next turn of the event loop; still should be fired in order of dispatch
+		var el = this._el;
+		setTimeout(function(){
+			try {
+				el.dispatchEvent ? el.dispatchEvent(event) : el.fireEvent("on" + opts.type, document.createEventObject());
+				}catch(e){
+				// IE8 will not let me fire custom events at all. Call them directly
+					var listeners = el['listen'+opts.type];
+					if (listeners) for (var i = 0; i < listeners.length; ++i){
+						listeners[i].call(el, event);
+					}
+				}
+		}, 0);
+		return this;
+	},
+	listen: function (type, func){
+		var el = this._el;
+		if (el.addEventListener){
+			el.addEventListener(type, func);
+		}else{
+			el.attachEvent("on" + type, func);
+			// IE8 can't even handle custom events created with createEventObject  (though it permits attachEvent), so we have to make our own
+			var listeners = el['listen'+type] = el['listen'+type] || [];
+			listeners.push(func);
+		}
+		return this;
+	},
+	dontlisten: function (type, func){
+		var el = this._el;
+		if (el.removeEventListener){
+			el.removeEventListener(type, func);
+		}else try{
+			el.detachEvent("on" + type, func);
+		}catch(e){
+			var listeners = el['listen'+type];
+			if (listeners) for (var i = 0; i < listeners.length; ++i){
+				if (listeners[i] === func) listeners[i] = function(){}; // replace with a noop
+			}
+		}
+		return this;
+	}
+};
+
+// allow extensions ala jQuery
+bililiteRange.fn = Range.prototype; // to allow monkey patching
+bililiteRange.extend = function(fns){
+	for (fn in fns) Range.prototype[fn] = fns[fn];
+};
+
+//bounds functions
+bililiteRange.bounds = {
+	all: function() { return [0, this.length()] },
+	start: function () { return [0,0] },
+	end: function () { return [this.length(), this.length()] },
+	selection: function(){
+		if (this._el === this._doc.activeElement){
+			this.bounds ('all'); // first select the whole thing for constraining
+			return this._nativeSelection();
+		}else{
+			return this._el.bililiteRangeSelection;
+		}
+	}
+};
+
+// sendkeys functions
+bililiteRange.sendkeys = {
+	'{enter}': function (rng){
+		rng.dispatch({type: 'keypress', bubbles: true, keyCode: '\n', which: '\n', charCode: '\n'});
+		rng.insertEOL();
+	},
+	'{tab}': function (rng, c, simplechar){
+		simplechar(rng, '\t'); // useful for inserting what would be whitespace
+	},
+	'{newline}': function (rng, c, simplechar){
+		simplechar(rng, '\n'); // useful for inserting what would be whitespace (and if I don't want to use insertEOL, which does some fancy things)
+	},
+	'{backspace}': function (rng){
+		var b = rng.bounds();
+		if (b[0] == b[1]) rng.bounds([b[0]-1, b[0]]); // no characters selected; it's just an insertion point. Remove the previous character
+		rng.text('', 'end'); // delete the characters and update the selection
+	},
+	'{del}': function (rng){
+		var b = rng.bounds();
+		if (b[0] == b[1]) rng.bounds([b[0], b[0]+1]); // no characters selected; it's just an insertion point. Remove the next character
+		rng.text('', 'end'); // delete the characters and update the selection
+	},
+	'{rightarrow}':  function (rng){
+		var b = rng.bounds();
+		if (b[0] == b[1]) ++b[1]; // no characters selected; it's just an insertion point. Move to the right
+		rng.bounds([b[1], b[1]]);
+	},
+	'{leftarrow}': function (rng){
+		var b = rng.bounds();
+		if (b[0] == b[1]) --b[0]; // no characters selected; it's just an insertion point. Move to the left
+		rng.bounds([b[0], b[0]]);
+	},
+	'{selectall}' : function (rng){
+		rng.bounds('all');
+	},
+	'{selection}': function (rng){
+		// insert the characters without the sendkeys processing
+		var s = rng.data().sendkeysOriginalText;
+		for (var i =0; i < s.length; ++i){
+			var x = s.charCodeAt(i);
+			rng.dispatch({type: 'keypress', bubbles: true, keyCode: x, which: x, charCode: x});
+		}
+		rng.text(s, 'end');
+	},
+	'{mark}' : function (rng){
+		rng.data().sendkeysBounds = rng.bounds();
+	}
+};
+// Synonyms from the proposed DOM standard (http://www.w3.org/TR/DOM-Level-3-Events-key/)
+bililiteRange.sendkeys['{Enter}'] = bililiteRange.sendkeys['{enter}'];
+bililiteRange.sendkeys['{Backspace}'] = bililiteRange.sendkeys['{backspace}'];
+bililiteRange.sendkeys['{Delete}'] = bililiteRange.sendkeys['{del}'];
+bililiteRange.sendkeys['{ArrowRight}'] = bililiteRange.sendkeys['{rightarrow}'];
+bililiteRange.sendkeys['{ArrowLeft}'] = bililiteRange.sendkeys['{leftarrow}'];
+
+function IERange(){}
+IERange.prototype = new Range();
+IERange.prototype._nativeRange = function (bounds){
+	var rng;
+	if (this._el.tagName == 'INPUT'){
+		// IE 8 is very inconsistent; textareas have createTextRange but it doesn't work
+		rng = this._el.createTextRange();
+	}else{
+		rng = this._doc.body.createTextRange ();
+		rng.moveToElementText(this._el);
+	}
+	if (bounds){
+		if (bounds[1] < 0) bounds[1] = 0; // IE tends to run elements out of bounds
+		if (bounds[0] > this.length()) bounds[0] = this.length();
+		if (bounds[1] < rng.text.replace(/\r/g, '').length){ // correct for IE's CrLf weirdness
+			// block-display elements have an invisible, uncounted end of element marker, so we move an extra one and use the current length of the range
+			rng.moveEnd ('character', -1);
+			rng.moveEnd ('character', bounds[1]-rng.text.replace(/\r/g, '').length);
+		}
+		if (bounds[0] > 0) rng.moveStart('character', bounds[0]);
+	}
+	return rng;					
+};
+IERange.prototype._nativeSelect = function (rng){
+	rng.select();
+};
+IERange.prototype._nativeSelection = function (){
+	// returns [start, end] for the selection constrained to be in element
+	var rng = this._nativeRange(); // range of the element to constrain to
+	var len = this.length();
+	var sel = this._doc.selection.createRange();
+	try{
+		return [
+			iestart(sel, rng),
+			ieend (sel, rng)
+		];
+	}catch (e){
+		// TODO: determine if this is still necessary, since we only call _nativeSelection if _el is active
+		// IE gets upset sometimes about comparing text to input elements, but the selections cannot overlap, so make a best guess
+		return (sel.parentElement().sourceIndex < this._el.sourceIndex) ? [0,0] : [len, len];
+	}
+};
+IERange.prototype._nativeGetText = function (rng){
+	return rng.text;
+};
+IERange.prototype._nativeSetText = function (text, rng){
+	rng.text = text;
+};
+IERange.prototype._nativeEOL = function(){
+	if ('value' in this._el){
+		this.text('\n'); // for input and textarea, insert it straight
+	}else{
+		this._nativeRange(this.bounds()).pasteHTML('\n<br/>');
+	}
+};
+IERange.prototype._nativeTop = function(rng){
+	var startrng = this._nativeRange([0,0]);
+	return rng.boundingTop - startrng.boundingTop;
+}
+IERange.prototype._nativeWrap = function(n, rng) {
+	// hacky to use string manipulation but I don't see another way to do it.
+	var div = document.createElement('div');
+	div.appendChild(n);
+	// insert the existing range HTML after the first tag
+	var html = div.innerHTML.replace('><', '>'+rng.htmlText+'<');
+	rng.pasteHTML(html);
+};
+
+// IE internals
+function iestart(rng, constraint){
+	// returns the position (in character) of the start of rng within constraint. If it's not in constraint, returns 0 if it's before, length if it's after
+	var len = constraint.text.replace(/\r/g, '').length; // correct for IE's CrLf weirdness
+	if (rng.compareEndPoints ('StartToStart', constraint) <= 0) return 0; // at or before the beginning
+	if (rng.compareEndPoints ('StartToEnd', constraint) >= 0) return len;
+	for (var i = 0; rng.compareEndPoints ('StartToStart', constraint) > 0; ++i, rng.moveStart('character', -1));
+	return i;
+}
+function ieend (rng, constraint){
+	// returns the position (in character) of the end of rng within constraint. If it's not in constraint, returns 0 if it's before, length if it's after
+	var len = constraint.text.replace(/\r/g, '').length; // correct for IE's CrLf weirdness
+	if (rng.compareEndPoints ('EndToEnd', constraint) >= 0) return len; // at or after the end
+	if (rng.compareEndPoints ('EndToStart', constraint) <= 0) return 0;
+	for (var i = 0; rng.compareEndPoints ('EndToStart', constraint) > 0; ++i, rng.moveEnd('character', -1));
+	return i;
+}
+
+// an input element in a standards document. "Native Range" is just the bounds array
+function InputRange(){}
+InputRange.prototype = new Range();
+InputRange.prototype._nativeRange = function(bounds) {
+	return bounds || [0, this.length()];
+};
+InputRange.prototype._nativeSelect = function (rng){
+	this._el.setSelectionRange(rng[0], rng[1]);
+};
+InputRange.prototype._nativeSelection = function(){
+	return [this._el.selectionStart, this._el.selectionEnd];
+};
+InputRange.prototype._nativeGetText = function(rng){
+	return this._el.value.substring(rng[0], rng[1]);
+};
+InputRange.prototype._nativeSetText = function(text, rng){
+	var val = this._el.value;
+	this._el.value = val.substring(0, rng[0]) + text + val.substring(rng[1]);
+};
+InputRange.prototype._nativeEOL = function(){
+	this.text('\n');
+};
+InputRange.prototype._nativeTop = function(rng){
+	// I can't remember where I found this clever hack to find the location of text in a text area
+	var clone = this._el.cloneNode(true);
+	clone.style.visibility = 'hidden';
+	clone.style.position = 'absolute';
+	this._el.parentNode.insertBefore(clone, this._el);
+	clone.style.height = '1px';
+	clone.value = this._el.value.slice(0, rng[0]);
+	var top = clone.scrollHeight;
+	// this gives the bottom of the text, so we have to subtract the height of a single line
+	clone.value = 'X';
+	top -= clone.scrollHeight;
+	clone.parentNode.removeChild(clone);
+	return top;
+}
+InputRange.prototype._nativeWrap = function() {throw new Error("Cannot wrap in a text element")};
+
+function W3CRange(){}
+W3CRange.prototype = new Range();
+W3CRange.prototype._nativeRange = function (bounds){
+	var rng = this._doc.createRange();
+	rng.selectNodeContents(this._el);
+	if (bounds){
+		w3cmoveBoundary (rng, bounds[0], true, this._el);
+		rng.collapse (true);
+		w3cmoveBoundary (rng, bounds[1]-bounds[0], false, this._el);
+	}
+	return rng;					
+};
+W3CRange.prototype._nativeSelect = function (rng){
+	this._win.getSelection().removeAllRanges();
+	this._win.getSelection().addRange (rng);
+};
+W3CRange.prototype._nativeSelection = function (){
+	// returns [start, end] for the selection constrained to be in element
+	var rng = this._nativeRange(); // range of the element to constrain to
+	if (this._win.getSelection().rangeCount == 0) return [this.length(), this.length()]; // append to the end
+	var sel = this._win.getSelection().getRangeAt(0);
+	return [
+		w3cstart(sel, rng),
+		w3cend (sel, rng)
+	];
+	}
+W3CRange.prototype._nativeGetText = function (rng){
+	return String.prototype.slice.apply(this._el.textContent, this.bounds());
+	// return rng.toString(); // this fails in IE11 since it insists on inserting \r's before \n's in Ranges. node.textContent works as expected
+};
+W3CRange.prototype._nativeSetText = function (text, rng){
+	rng.deleteContents();
+	rng.insertNode (this._doc.createTextNode(text));
+	if (canNormalize) this._el.normalize(); // merge the text with the surrounding text
+};
+W3CRange.prototype._nativeEOL = function(){
+	var rng = this._nativeRange(this.bounds());
+	rng.deleteContents();
+	var br = this._doc.createElement('br');
+	br.setAttribute ('_moz_dirty', ''); // for Firefox
+	rng.insertNode (br);
+	rng.insertNode (this._doc.createTextNode('\n'));
+	rng.collapse (false);
+};
+W3CRange.prototype._nativeTop = function(rng){
+	if (this.length == 0) return 0; // no text, no scrolling
+	if (rng.toString() == ''){
+		var textnode = this._doc.createTextNode('X');
+		rng.insertNode (textnode);
+	}
+	var startrng = this._nativeRange([0,1]);
+	var top = rng.getBoundingClientRect().top - startrng.getBoundingClientRect().top;
+	if (textnode) textnode.parentNode.removeChild(textnode);
+	return top;
+}
+W3CRange.prototype._nativeWrap = function(n, rng) {
+	rng.surroundContents(n);
+};
+
+// W3C internals
+function nextnode (node, root){
+	//  in-order traversal
+	// we've already visited node, so get kids then siblings
+	if (node.firstChild) return node.firstChild;
+	if (node.nextSibling) return node.nextSibling;
+	if (node===root) return null;
+	while (node.parentNode){
+		// get uncles
+		node = node.parentNode;
+		if (node == root) return null;
+		if (node.nextSibling) return node.nextSibling;
+	}
+	return null;
+}
+function w3cmoveBoundary (rng, n, bStart, el){
+	// move the boundary (bStart == true ? start : end) n characters forward, up to the end of element el. Forward only!
+	// if the start is moved after the end, then an exception is raised
+	if (n <= 0) return;
+	var node = rng[bStart ? 'startContainer' : 'endContainer'];
+	if (node.nodeType == 3){
+	  // we may be starting somewhere into the text
+	  n += rng[bStart ? 'startOffset' : 'endOffset'];
+	}
+	while (node){
+		if (node.nodeType == 3){
+			var length = node.nodeValue.length;
+			if (n <= length){
+				rng[bStart ? 'setStart' : 'setEnd'](node, n);
+				// special case: if we end next to a <br>, include that node.
+				if (n == length){
+					// skip past zero-length text nodes
+					for (var next = nextnode (node, el); next && next.nodeType==3 && next.nodeValue.length == 0; next = nextnode(next, el)){
+						rng[bStart ? 'setStartAfter' : 'setEndAfter'](next);
+					}
+					if (next && next.nodeType == 1 && next.nodeName == "BR") rng[bStart ? 'setStartAfter' : 'setEndAfter'](next);
+				}
+				return;
+			}else{
+				rng[bStart ? 'setStartAfter' : 'setEndAfter'](node); // skip past this one
+				n -= length; // and eat these characters
+			}
+		}
+		node = nextnode (node, el);
+	}
+}
+var     START_TO_START                 = 0; // from the w3c definitions
+var     START_TO_END                   = 1;
+var     END_TO_END                     = 2;
+var     END_TO_START                   = 3;
+// from the Mozilla documentation, for range.compareBoundaryPoints(how, sourceRange)
+// -1, 0, or 1, indicating whether the corresponding boundary-point of range is respectively before, equal to, or after the corresponding boundary-point of sourceRange. 
+    // * Range.END_TO_END compares the end boundary-point of sourceRange to the end boundary-point of range.
+    // * Range.END_TO_START compares the end boundary-point of sourceRange to the start boundary-point of range.
+    // * Range.START_TO_END compares the start boundary-point of sourceRange to the end boundary-point of range.
+    // * Range.START_TO_START compares the start boundary-point of sourceRange to the start boundary-point of range. 
+function w3cstart(rng, constraint){
+	if (rng.compareBoundaryPoints (START_TO_START, constraint) <= 0) return 0; // at or before the beginning
+	if (rng.compareBoundaryPoints (END_TO_START, constraint) >= 0) return constraint.toString().length;
+	rng = rng.cloneRange(); // don't change the original
+	rng.setEnd (constraint.endContainer, constraint.endOffset); // they now end at the same place
+	return constraint.toString().replace(/\r/g, '').length - rng.toString().replace(/\r/g, '').length;
+}
+function w3cend (rng, constraint){
+	if (rng.compareBoundaryPoints (END_TO_END, constraint) >= 0) return constraint.toString().length; // at or after the end
+	if (rng.compareBoundaryPoints (START_TO_END, constraint) <= 0) return 0;
+	rng = rng.cloneRange(); // don't change the original
+	rng.setStart (constraint.startContainer, constraint.startOffset); // they now start at the same place
+	return rng.toString().replace(/\r/g, '').length;
+}
+
+function NothingRange(){}
+NothingRange.prototype = new Range();
+NothingRange.prototype._nativeRange = function(bounds) {
+	return bounds || [0,this.length()];
+};
+NothingRange.prototype._nativeSelect = function (rng){ // do nothing
+};
+NothingRange.prototype._nativeSelection = function(){
+	return [0,0];
+};
+NothingRange.prototype._nativeGetText = function (rng){
+	return this._el[this._textProp].substring(rng[0], rng[1]);
+};
+NothingRange.prototype._nativeSetText = function (text, rng){
+	var val = this._el[this._textProp];
+	this._el[this._textProp] = val.substring(0, rng[0]) + text + val.substring(rng[1]);
+};
+NothingRange.prototype._nativeEOL = function(){
+	this.text('\n');
+};
+NothingRange.prototype._nativeTop = function(){
+	return 0;
+};
+NothingRange.prototype._nativeWrap = function() {throw new Error("Wrapping not implemented")};
+
+
+// data for elements, similar to jQuery data, but allows for monitoring with custom events
+var data = []; // to avoid attaching javascript objects to DOM elements, to avoid memory leaks
+bililiteRange.fn.data = function(){
+	var index = this.element().bililiteRangeData;
+	if (index == undefined){
+		index = this.element().bililiteRangeData = data.length;
+		data[index] = new Data(this);
+	}
+	return data[index];
+}
+try {
+	Object.defineProperty({},'foo',{}); // IE8 will throw an error
+	var Data = function(rng) {
+		// we use JSON.stringify to display the data values. To make some of those non-enumerable, we have to use properties
+		Object.defineProperty(this, 'values', {
+			value: {}
+		});
+		Object.defineProperty(this, 'sourceRange', {
+			value: rng
+		});
+		Object.defineProperty(this, 'toJSON', {
+			value: function(){
+				var ret = {};
+				for (var i in Data.prototype) if (i in this.values) ret[i] = this.values[i];
+				return ret;
+			}
+		});
+		// to display all the properties (not just those changed), use JSON.stringify(state.all)
+		Object.defineProperty(this, 'all', {
+			get: function(){
+				var ret = {};
+				for (var i in Data.prototype) ret[i] = this[i];
+				return ret;
+			}
+		});
+	}
+
+	Data.prototype = {};
+	Object.defineProperty(Data.prototype, 'values', {
+		value: {}
+	});
+	Object.defineProperty(Data.prototype, 'monitored', {
+		value: {}
+	});
+	
+	bililiteRange.data = function (name, newdesc){
+		newdesc = newdesc || {};
+		var desc = Object.getOwnPropertyDescriptor(Data.prototype, name) || {};
+		if ('enumerable' in newdesc) desc.enumerable = !!newdesc.enumerable;
+		if (!('enumerable' in desc)) desc.enumerable = true; // default
+		if ('value' in newdesc) Data.prototype.values[name] = newdesc.value;
+		if ('monitored' in newdesc) Data.prototype.monitored[name] = newdesc.monitored;
+		desc.configurable = true;
+		desc.get = function (){
+			if (name in this.values) return this.values[name];
+			return Data.prototype.values[name];
+		};
+		desc.set = function (value){
+			this.values[name] = value;
+			if (Data.prototype.monitored[name]) this.sourceRange.dispatch({
+				type: 'bililiteRangeData',
+				bubbles: true,
+				detail: {name: name, value: value}
+			});
+		}
+		Object.defineProperty(Data.prototype, name, desc);
+	}
+}catch(err){
+	// if we can't set object property properties, just use old-fashioned properties
+  Data = function(rng){ this.sourceRange = rng };
+	Data.prototype = {};
+	bililiteRange.data = function(name, newdesc){
+		if ('value' in newdesc) Data.prototype[name] = newdesc.value;
+	}
+}
+
+})();
+
+// Polyfill for forEach, per Mozilla documentation. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Polyfill
+if (!Array.prototype.forEach)
+{
+  Array.prototype.forEach = function(fun /*, thisArg */)
+  {
+    "use strict";
+
+    if (this === void 0 || this === null)
+      throw new TypeError();
+
+    var t = Object(this);
+    var len = t.length >>> 0;
+    if (typeof fun !== "function")
+      throw new TypeError();
+
+    var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
+    for (var i = 0; i < len; i++)
+    {
+      if (i in t)
+        fun.call(thisArg, t[i], i, t);
+    }
+  };
+}
diff --git a/src/main/webapp/connect/confluence/prism/bililiteRange.undo.js b/src/main/webapp/connect/confluence/prism/bililiteRange.undo.js
new file mode 100644
index 000000000..63387869a
--- /dev/null
+++ b/src/main/webapp/connect/confluence/prism/bililiteRange.undo.js
@@ -0,0 +1,122 @@
+// implements a simple undo stack for bililiteRange
+
+// version 1.2
+// Documentation at http://bililite.com/blog/2013/12/25/bililiterange-undo/
+
+// depends on bililiteRange.js
+
+// Copyright (c) 2013 Daniel Wachsstock
+// MIT license:
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+
+if (bililiteRange) (function(){
+
+bililiteRange.data ('undos', {enumerable: false});
+
+bililiteRange.fn.undo = function(n){
+	if (arguments.length == 0) n = 1; // default
+	var state = getundostate(this);
+	if (n > 0){
+		for (var i = 0; i < n; ++i) restore (state, 'undo', this);
+	}else if (n < 0){
+		for (i = 0; i > n; --i) restore (state, 'redo', this);
+	}
+	return this;
+};
+
+function getundostate(rng){
+	var undos = rng.data().undos;
+	if (undos) return undos;
+	var state = new undostate (rng);
+	setuplisteners (rng);
+	return state;
+}
+
+function undostate (rng){
+	// inefficiently just stores the whole text rather than trying to figure out a diff
+	this.text = rng.all();
+	var laststate = rng.data().undos;
+	if (laststate && this.text == laststate.text) return; // is this too inefficient, to compare each time?
+	this.bounds = rng.bounds('selection').bounds(); 
+	this.undo = this; // set up a doubly linked list that never ends (so undo with only one element on the list does nothing) 
+	this.redo = this;
+	if (laststate) {
+		this.undo = laststate;
+		laststate.redo = this;
+	}
+	rng.data().undos = this;
+}
+
+function restore (state, dir, rng){
+	// dir is 'undo' or 'redo';
+	rng.dispatch({type: dir}); // signal it
+	state = state[dir];
+	state.lastevent = dir; // mark the undo/redo so we don't add the change in text to the undo stack
+	rng.data().undos = state;
+	rng.all(state.text).bounds(state.bounds).select(); // restore the old state
+}
+
+function setuplisteners (rng){
+	rng.listen('input', function(){
+		var state = getundostate(rng), el = rng.element(), lastevent = state.lastevent;
+		delete state.lastevent;
+		switch (lastevent){
+			//  catch input events that we should not save  (resulting from undo, redo and keypress events that are contiguous)
+			case 'undo': case 'redo':
+				return; // don't record the current input
+			case 'keypress':
+				// if the last event was also a keypress, drop that one (so we would undo back to the beginning of the typing)
+				if (state.penultimateevent == 'keypress') rng.data().undos = state.undo;
+		}
+		(new undostate(rng)).penultimateevent = lastevent; // record so we can check for keypress sequences
+	}).listen('keypress', function(evt){
+		// key presses replace each other, which means that undo will undo all of them, unless the previous event was not a keypress (meaning we are starting a
+		// new series of typing) or we type a carriage return, which starts a new series of typing, or the new keypress is in a different place than the old one
+		if (evt.which < 32) return; // nonprinting characters; Firefox tends to send them all. We want them all undone individually
+		if (evt.altKey || evt.altGraphKey || evt.ctrlKey || evt.metaKey) return;
+		var bounds = rng.bounds('selection').bounds();
+		if (bounds[0] != bounds[1]) return; // about to erase a selection; start a new undo sequence
+		var state = getundostate(rng);
+		// only mark this if the previous event was in the same place
+		if (state.bounds[0] != bounds[0]) return;
+		state.lastevent = 'keypress';
+	});	
+}
+
+// for use as an event handler
+bililiteRange.undo = function (event){
+	bililiteRange(event.target).undo();
+	event.preventDefault();
+}
+bililiteRange.redo = function (event){
+	bililiteRange(event.target).undo(-1);
+	event.preventDefault();
+}
+
+// for debugging
+function getstack(state, dir){
+	dir = dir || 'undo';
+	for (var ret = []; ret.push(state), state[dir] != state; state = state[dir]);
+	return ret;
+}
+
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/prism/bililiteRange.util.js b/src/main/webapp/connect/confluence/prism/bililiteRange.util.js
new file mode 100644
index 000000000..95510a61c
--- /dev/null
+++ b/src/main/webapp/connect/confluence/prism/bililiteRange.util.js
@@ -0,0 +1,272 @@
+// Text range utilities
+// documentation: http://bililite.com/blog/2013/02/08/bililiterange-plugins/
+// depends on bililiteRange.js (http://bililite.com/blog/2011/01/17/cross-browser-text-ranges-and-selections/)
+// Version: 1.3
+// Copyright (c) 2013 Daniel Wachsstock
+// MIT license:
+// Permission is hereby granted, free of charge, to any person
+// obtaining a copy of this software and associated documentation
+// files (the "Software"), to deal in the Software without
+// restriction, including without limitation the rights to use,
+// copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following
+// conditions:
+
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+// OTHER DEALINGS IN THE SOFTWARE.
+
+if (bililiteRange) (function(){
+
+bililiteRange.bounds.EOL = function(){
+	// set the range to the end of this line
+	// if we start at the end of a line, find will go to the next line! Check for that case first
+	this.bounds('startbounds');
+	if (this.findprimitive (/$/mg, this.bounds())) return this.bounds();
+	return this.find(/$/m, true).bounds(); // don't wrap
+};
+bililiteRange.bounds.BOL = function(){
+	// set the range to the beginning of this line
+	// if we start at the beginning of a line, findBack will go to the previous line! Check for that case first
+	this.bounds('startbounds');
+	if (this.findprimitive (/^/mg, this.bounds())) return this.bounds();
+	return this.findBack(/^/m, true).bounds(); // don't wrap
+};
+bililiteRange.bounds.line = function(){
+	this.bounds('BOL');
+	var start = this.bounds()[0];
+	this.bounds('EOL');
+	return [start, this.bounds()[1]];
+};
+bililiteRange.bounds.startbounds = function(){
+	return [this.bounds()[0], this.bounds()[0]];
+};
+bililiteRange.bounds.endbounds = function(){
+	return [this.bounds()[1], this.bounds()[1]];
+};
+
+// add autoindent option
+var oldtext = bililiteRange.fn.text;
+bililiteRange.fn.text = function (text, select, autoindent){
+	if (!arguments.length) return oldtext.call (this);
+	if (autoindent) text = indent(text, this.indentation());
+	return oldtext.call (this, text, select);
+}
+
+bililiteRange.extend({
+	
+	find: function(re, nowrap, backwards){
+		// little hack: can put the "nowrap" as a flag on the RegExp itself, analagous to ignoreCase and multiline; overrides the parameter
+		if (re.nowrap !== undefined) nowrap = re.nowrap;
+		re = globalize(re);
+		var bounds = this.bounds();
+		if (!backwards){
+			var findprimitive = 'findprimitive';
+			var initialbounds = [bounds[0], Number.MAX_VALUE];
+			var fallbackbounds = [bounds[0]+1, Number.MAX_VALUE];
+		}else{
+			findprimitive = 'findprimitiveback';
+			initialbounds = [0, bounds[0]];
+			fallbackbounds = [0, bounds[0]-1];
+		}
+		var match = this[findprimitive](re, initialbounds);
+		if (matchIs(match, bounds)){ // if the match is exactly the current string, it doesn't count
+			match = this[findprimitive](re, fallbackbounds);
+		}
+		if (!match && !nowrap) match = this[findprimitive](re, [0, Number.MAX_VALUE]);
+		if (matchIs(match, bounds)) match = false; // again, even with wrapping, don't find the identical segment
+		this.match = match; // remember this for the caller
+		if (match) this.bounds([match.index, match.index+match[0].length]); // select the found string
+		return this;
+	},
+
+	findBack: function (re, nowrap) { return this.find(re,nowrap,true) },
+
+	indentation: function(){
+		// returns the whitespace at the start of this line
+		return /^\s*/.exec(this.clone().bounds('line').text())[0];
+	},
+	
+	indent: function (tabs){
+		// tabs is the string to insert before each line of the range
+		var oldtext = this.text(), newtext = indent(oldtext, tabs), b = this.bounds();
+		this.text(newtext);
+		// Need to indent the line containing the start of the range (indent only adds the tabs after newlines)
+		this.clone().bounds('BOL').text(tabs);
+		// Adjust bounds
+		return this.bounds([b[0]+tabs.length, b[1]+tabs.length+newtext.length-oldtext.length]);
+	},
+	
+	unindent: function (n, tabSize){
+		// remove n tabs or sets of tabSize spaces from the beginning of each line
+		tabSize = tabSize || this.data().tabSize || 8; // 8 is the browser default
+		// remove internal tabs
+		var oldtext = this.text(), newtext = unindent(oldtext, n, tabSize, false), b = this.bounds();
+		var diffInternal = newtext.length-oldtext.length;
+		this.text(newtext).bounds([b[0], b[1]+diffInternal]);
+		// remove initial tabs
+		var line = this.clone().bounds('line');
+		oldtext = line.text();
+		newtext = unindent(oldtext, n, tabSize, true);
+		line.text(newtext);
+		var diffStart = newtext.length-oldtext.length;
+		return this.bounds([Math.max(line.bounds()[0], b[0]+diffStart), b[1]+diffInternal+diffStart]);
+	},
+			
+	line:function(n){
+		// set the bounds to the nth line or
+		// return the line number of the start of the bounds. Note that it is 1-indexed, the way ex writes it!
+		if (arguments.length){
+			n =  parseInt(n);
+			if (isNaN(n)) return this;
+			// if n is too large,set the bounds to the end; if too small, to the beginning
+			if (n > this.all().split('\n').length) return this.bounds('end');
+			if (n < 1) return this.bounds([0,0]);
+			// move to the given line number, at same character number as the initial bounds.
+			var start = this.bounds();
+			this.bounds('BOL');
+			var c = start[0] - this.bounds()[0]; // character number
+			// so find n-1 newlines to get to the correct line, then c characters over (if we don't have that many, go to the end of the line)
+			var re = new RegExp('(.*\\n){'+(n-1)+'}(.{'+c+'}|.*$)', 'm');
+			return this.bounds('all').find(re).bounds('endbounds');
+		}else{
+			// just count newlines before this.bounds
+			// If we are on the boundary between lines (i.e. after the newline), this counts the next line
+			return this.all().slice(0, this.bounds()[0]).split('\n').length;
+		}
+	},
+	
+	live: function(on){
+		var self = this;
+		if (arguments.length == 0 || on){
+			this._oldtext = self.all(); // resync the text if it should be necessary
+			if (this._inputHandler) return this; // don't double-bind
+			this._inputHandler = function(ev){
+				// first find the change.
+				var start, oldend, newend;
+				var newtext = self.all();
+				if (newtext == self._oldtext) return; // no change
+				if (!ev.bounds){
+					// "real" input events don't tell us the bounds (and until they really support DOM 3 events, not even the text.
+					// we have to start from scratch.
+					var change = diff (self._oldtext, newtext);
+					ev.bounds = change.bounds; // save it for future events
+					ev.data = change.data;
+				}
+				start = ev.bounds[0];
+				oldend = ev.bounds[1];
+				newend = ev.bounds[0]+ev.data.length;
+				self._oldtext = newtext;
+				// adjust bounds; this tries to emulate the algorithm that Microsoft Word uses for bookmarks
+				if (self._bounds[0] <= start){
+					// no change
+				}else if (self._bounds[0] > oldend){
+					self._bounds[0] += newend - oldend;
+				}else{
+					self._bounds[0] = newend;
+				}
+				if (self._bounds[1] < start){
+					// no change
+				}else if (self._bounds[1] >= oldend){
+					self._bounds[1] += newend - oldend;
+				}else{
+					self._bounds[1] = start;
+				}
+			};
+			self.listen('input', self._inputHandler);
+		}else{
+			self.dontlisten('input', self._inputHandler);
+			delete self._inputHandler;
+		}
+	return this;
+	},
+	
+	findprimitive: function(re, bounds){
+		// search for re within the bounds given. Return the result of the RegExp.exec call  or false if not found.
+		// re needs to be global for this to work!
+		var text = this.all();
+		re.lastIndex = bounds[0];
+		var match = re.exec(text);
+		if (!match || match.index+match[0].length > bounds[1]) return false;
+		return match;
+	},
+	
+	findprimitiveback: function (re, bounds){
+		// no way to search backwards; have to search forward until we fail
+		var match = false;
+		do {
+			var lastmatch = match;
+			match = this.findprimitive(re, bounds);
+			bounds[0] = match.index+1;
+		}while (match);
+		return lastmatch;
+	}
+});
+
+// utilities
+function globalize (re){
+	// make a RegExp global, to allow multiple searches
+	return new RegExp(re.source, 'g'+(re.ignoreCase ? 'i' : '') + (re.multiline ? 'm' : ''));
+}
+function matchIs(match, bounds){
+	// check if the match that we just found is the same as the existing bounds, since we shouldn't count that
+	// this way, "Find Next" won't keep coming back to the same string.
+	// I think this is the way that Word does it
+	return match && match.index == bounds[0] && match[0].length == bounds[1]-bounds[0];
+}
+
+function diff (oldtext, newtext){
+	// Try to find the changed text , assuming it was a continuous change
+	// This is wrong for drag and drop, which only fires one input event for both removal and insertion
+	var oldlen = oldtext.length;
+	var	newlen = newtext.length;
+	for (var i = 0; i < newlen && i < oldlen; ++i){
+		if (newtext.charAt(i) != oldtext.charAt(i)) break;
+	}
+	var start = i;
+	for (i = 0; i < newlen && i < oldlen; ++i){
+		var newpos = newlen-i-1, oldpos = oldlen-i-1;
+		if (newpos < start || oldpos < start) break;
+		if (newtext.charAt(newpos) != oldtext.charAt(oldpos)) break;
+	}
+	var oldend = oldlen-i;
+	var newend = newlen-i;
+	return {bounds: [start, oldend], data: newtext.slice(start, newend)}
+};
+bililiteRange.diff = diff; // expose
+
+function indent(text, tabs){
+	return text.replace(/\n/g, '\n'+tabs);
+}
+function unindent(str, count, tabwidth, start){
+	// count can be an integer >= 0 or Infinity.
+	// (We delete up to 'count' tabs at the beginning of each line.)
+	// If invalid, defaults to 1.
+	//
+	// tabwidth can be an integer >= 1.
+	// (The number of spaces to consider a single tab.)
+	// If invalid, defaults to 4.
+	//
+	// Either can also be a string or number that rounds to that.
+	//
+	// start=true: unindent only the first line of the string.
+	// start=false: unindent any line in the string except the first.
+	tabwidth = Math.round(tabwidth);
+	count = Math.round(count);
+	if (!isFinite(tabwidth) || tabwidth < 1) tabwidth = 4;
+	if (isNaN(count) || count < 0) count = 1;
+	if (!isFinite(count)) count = '';
+	var re = new RegExp((start ? '(^)' : '(\\n)') + '(?:\t| {'+tabwidth+'}){1,'+count+'}', 'g');
+	return str.replace(re, '$1');
+}
+
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/prism/prism.css b/src/main/webapp/connect/confluence/prism/prism.css
new file mode 100644
index 000000000..9bc4fd1da
--- /dev/null
+++ b/src/main/webapp/connect/confluence/prism/prism.css
@@ -0,0 +1,234 @@
+/* PrismJS 1.16.0
+https://prismjs.com/download.html#themes=prism&languages=json&plugins=line-highlight+line-numbers */
+/**
+ * prism.js default theme for JavaScript, CSS and HTML
+ * Based on dabblet (http://dabblet.com)
+ * @author Lea Verou
+ */
+
+code[class*="language-"],
+pre[class*="language-"] {
+	color: black;
+	background: none;
+	text-shadow: 0 1px white;
+	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
+	font-size: 1em;
+	text-align: left;
+	white-space: pre;
+	word-spacing: normal;
+	word-break: normal;
+	word-wrap: normal;
+	line-height: 1.5;
+
+	-moz-tab-size: 4;
+	-o-tab-size: 4;
+	tab-size: 4;
+
+	-webkit-hyphens: none;
+	-moz-hyphens: none;
+	-ms-hyphens: none;
+	hyphens: none;
+}
+
+pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
+code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
+	text-shadow: none;
+	background: #b3d4fc;
+}
+
+pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
+code[class*="language-"]::selection, code[class*="language-"] ::selection {
+	text-shadow: none;
+	background: #b3d4fc;
+}
+
+@media print {
+	code[class*="language-"],
+	pre[class*="language-"] {
+		text-shadow: none;
+	}
+}
+
+/* Code blocks */
+pre[class*="language-"] {
+	padding: 1em;
+	margin: .5em 0;
+	overflow: auto;
+}
+
+:not(pre) > code[class*="language-"],
+pre[class*="language-"] {
+	background: #f5f2f0;
+}
+
+/* Inline code */
+:not(pre) > code[class*="language-"] {
+	padding: .1em;
+	border-radius: .3em;
+	white-space: normal;
+}
+
+.token.comment,
+.token.prolog,
+.token.doctype,
+.token.cdata {
+	color: slategray;
+}
+
+.token.punctuation {
+	color: #999;
+}
+
+.namespace {
+	opacity: .7;
+}
+
+.token.property,
+.token.tag,
+.token.boolean,
+.token.number,
+.token.constant,
+.token.symbol,
+.token.deleted {
+	color: #905;
+}
+
+.token.selector,
+.token.attr-name,
+.token.string,
+.token.char,
+.token.builtin,
+.token.inserted {
+	color: #690;
+}
+
+.token.operator,
+.token.entity,
+.token.url,
+.language-css .token.string,
+.style .token.string {
+	color: #9a6e3a;
+	background: hsla(0, 0%, 100%, .5);
+}
+
+.token.atrule,
+.token.attr-value,
+.token.keyword {
+	color: #07a;
+}
+
+.token.function,
+.token.class-name {
+	color: #DD4A68;
+}
+
+.token.regex,
+.token.important,
+.token.variable {
+	color: #e90;
+}
+
+.token.important,
+.token.bold {
+	font-weight: bold;
+}
+.token.italic {
+	font-style: italic;
+}
+
+.token.entity {
+	cursor: help;
+}
+
+pre[data-line] {
+	position: relative;
+	padding: 1em 0 1em 3em;
+}
+
+.line-highlight {
+	position: absolute;
+	left: 0;
+	right: 0;
+	padding: inherit 0;
+	margin-top: 1em; /* Same as .prism’s padding-top */
+
+	background: hsla(24, 20%, 50%,.08);
+	background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
+
+	pointer-events: none;
+
+	line-height: inherit;
+	white-space: pre;
+}
+
+	.line-highlight:before,
+	.line-highlight[data-end]:after {
+		content: attr(data-start);
+		position: absolute;
+		top: .4em;
+		left: .6em;
+		min-width: 1em;
+		padding: 0 .5em;
+		background-color: hsla(24, 20%, 50%,.4);
+		color: hsl(24, 20%, 95%);
+		font: bold 65%/1.5 sans-serif;
+		text-align: center;
+		vertical-align: .3em;
+		border-radius: 999px;
+		text-shadow: none;
+		box-shadow: 0 1px white;
+	}
+
+	.line-highlight[data-end]:after {
+		content: attr(data-end);
+		top: auto;
+		bottom: .4em;
+	}
+
+.line-numbers .line-highlight:before,
+.line-numbers .line-highlight:after {
+	content: none;
+}
+
+pre[class*="language-"].line-numbers {
+	position: relative;
+	padding-left: 3.8em;
+	counter-reset: linenumber;
+}
+
+pre[class*="language-"].line-numbers > code {
+	position: relative;
+	white-space: inherit;
+}
+
+.line-numbers .line-numbers-rows {
+	position: absolute;
+	pointer-events: none;
+	top: 0;
+	font-size: 100%;
+	left: -3.8em;
+	width: 3em; /* works for line-numbers below 1000 lines */
+	letter-spacing: -1px;
+	border-right: 1px solid #999;
+
+	-webkit-user-select: none;
+	-moz-user-select: none;
+	-ms-user-select: none;
+	user-select: none;
+
+}
+
+	.line-numbers-rows > span {
+		pointer-events: none;
+		display: block;
+		counter-increment: linenumber;
+	}
+
+		.line-numbers-rows > span:before {
+			content: counter(linenumber);
+			color: #999;
+			display: block;
+			padding-right: 0.8em;
+			text-align: right;
+		}
+
diff --git a/src/main/webapp/connect/confluence/prism/prism.js b/src/main/webapp/connect/confluence/prism/prism.js
new file mode 100644
index 000000000..d270a8609
--- /dev/null
+++ b/src/main/webapp/connect/confluence/prism/prism.js
@@ -0,0 +1,6 @@
+/* PrismJS 1.16.0
+https://prismjs.com/download.html#themes=prism&languages=json&plugins=line-highlight+line-numbers */
+var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++a}),e.__id},clone:function t(e,n){var r,a,i=C.util.type(e);switch(n=n||{},i){case"Object":if(a=C.util.objId(e),n[a])return n[a];for(var l in r={},n[a]=r,e)e.hasOwnProperty(l)&&(r[l]=t(e[l],n));return r;case"Array":return a=C.util.objId(e),n[a]?n[a]:(r=[],n[a]=r,e.forEach(function(e,a){r[a]=t(e,n)}),r);default:return e}}},languages:{extend:function(e,a){var t=C.util.clone(C.languages[e]);for(var n in a)t[n]=a[n];return t},insertBefore:function(t,e,a,n){var r=(n=n||C.languages)[t],i={};for(var l in r)if(r.hasOwnProperty(l)){if(l==e)for(var o in a)a.hasOwnProperty(o)&&(i[o]=a[o]);a.hasOwnProperty(l)||(i[l]=r[l])}var s=n[t];return n[t]=i,C.languages.DFS(C.languages,function(e,a){a===s&&e!=t&&(this[e]=i)}),i},DFS:function e(a,t,n,r){r=r||{};var i=C.util.objId;for(var l in a)if(a.hasOwnProperty(l)){t.call(a,l,a[l],n||l);var o=a[l],s=C.util.type(o);"Object"!==s||r[i(o)]?"Array"!==s||r[i(o)]||(r[i(o)]=!0,e(o,t,l,r)):(r[i(o)]=!0,e(o,t,null,r))}}},plugins:{},highlightAll:function(e,a){C.highlightAllUnder(document,e,a)},highlightAllUnder:function(e,a,t){var n={callback:t,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};C.hooks.run("before-highlightall",n);for(var r,i=n.elements||e.querySelectorAll(n.selector),l=0;r=i[l++];)C.highlightElement(r,!0===a,n.callback)},highlightElement:function(e,a,t){for(var n,r,i=e;i&&!c.test(i.className);)i=i.parentNode;i&&(n=(i.className.match(c)||[,""])[1].toLowerCase(),r=C.languages[n]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+n,e.parentNode&&(i=e.parentNode,/pre/i.test(i.nodeName)&&(i.className=i.className.replace(c,"").replace(/\s+/g," ")+" language-"+n));var l={element:e,language:n,grammar:r,code:e.textContent},o=function(e){l.highlightedCode=e,C.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,C.hooks.run("after-highlight",l),C.hooks.run("complete",l),t&&t.call(l.element)};if(C.hooks.run("before-sanity-check",l),l.code)if(C.hooks.run("before-highlight",l),l.grammar)if(a&&g.Worker){var s=new Worker(C.filename);s.onmessage=function(e){o(e.data)},s.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))}else o(C.highlight(l.code,l.grammar,l.language));else o(C.util.encode(l.code));else C.hooks.run("complete",l)},highlight:function(e,a,t){var n={code:e,grammar:a,language:t};return C.hooks.run("before-tokenize",n),n.tokens=C.tokenize(n.code,n.grammar),C.hooks.run("after-tokenize",n),M.stringify(C.util.encode(n.tokens),n.language)},matchGrammar:function(e,a,t,n,r,i,l){for(var o in t)if(t.hasOwnProperty(o)&&t[o]){if(o==l)return;var s=t[o];s="Array"===C.util.type(s)?s:[s];for(var g=0;g<s.length;++g){var c=s[g],u=c.inside,h=!!c.lookbehind,f=!!c.greedy,d=0,m=c.alias;if(f&&!c.pattern.global){var p=c.pattern.toString().match(/[imuy]*$/)[0];c.pattern=RegExp(c.pattern.source,p+"g")}c=c.pattern||c;for(var y=n,v=r;y<a.length;v+=a[y].length,++y){var k=a[y];if(a.length>e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A<O&&(P<w||!a[A].type&&!a[A-1].greedy);++A)(P+=a[A].length)<=b&&(++y,v=P);if(a[y]instanceof M)continue;N=A-y,k=e.slice(v,P),x.index-=v}else{c.lastIndex=0;var x=c.exec(k),N=1}if(x){h&&(d=x[1]?x[1].length:0);w=(b=x.index+d)+(x=x[0].slice(d)).length;var j=k.slice(0,b),S=k.slice(w),E=[y,N];j&&(++y,v+=j.length,E.push(j));var _=new M(o,u?C.tokenize(x,u):x,m,x,f);if(E.push(_),S&&E.push(S),Array.prototype.splice.apply(a,E),1!=N&&C.matchGrammar(e,a,t,y,v,!0,o),i)break}else if(i)break}}}}},tokenize:function(e,a){var t=[e],n=a.rest;if(n){for(var r in n)a[r]=n[r];delete a.rest}return C.matchGrammar(e,t,a,0,0,!1),t},hooks:{all:{},add:function(e,a){var t=C.hooks.all;t[e]=t[e]||[],t[e].push(a)},run:function(e,a){var t=C.hooks.all[e];if(t&&t.length)for(var n,r=0;n=t[r++];)n(a)}},Token:M};function M(e,a,t,n,r){this.type=e,this.content=a,this.alias=t,this.length=0|(n||"").length,this.greedy=!!r}if(g.Prism=C,M.stringify=function(e,a){if("string"==typeof e)return e;if(Array.isArray(e))return e.map(function(e){return M.stringify(e,a)}).join("");var t={type:e.type,content:M.stringify(e.content,a),tag:"span",classes:["token",e.type],attributes:{},language:a};if(e.alias){var n=Array.isArray(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(t.classes,n)}C.hooks.run("wrap",t);var r=Object.keys(t.attributes).map(function(e){return e+'="'+(t.attributes[e]||"").replace(/"/g,"&quot;")+'"'}).join(" ");return"<"+t.tag+' class="'+t.classes.join(" ")+'"'+(r?" "+r:"")+">"+t.content+"</"+t.tag+">"},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),t=a.language,n=a.code,r=a.immediateClose;g.postMessage(C.highlight(n,C.languages[t],t)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
+Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}};
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,h=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding=0,e.style.border=0,e.innerHTML="&nbsp;<br />&nbsp;",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentNode,n=t&&t.getAttribute("data-line");if(t&&n&&/pre/i.test(t.nodeName)){var i=0;r(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^( \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentNode,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){clearTimeout(l);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;g(n,"line-numbers")&&r&&!o?Prism.hooks.add("line-numbers",e):(a(n,i),l=setTimeout(s,1))}}),window.addEventListener("hashchange",s),window.addEventListener("resize",function(){var e=document.querySelectorAll("pre[data-line]");Array.prototype.forEach.call(e,function(e){a(e)})})}function r(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function g(e,t){return t=" "+t+" ",-1<(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)}function a(e,t,n){for(var i,r=(t="string"==typeof t?t:e.getAttribute("data-line")).replace(/\s+/g,"").split(","),o=+e.getAttribute("data-line-offset")||0,l=(h()?parseInt:parseFloat)(getComputedStyle(e).lineHeight),a=g(e,"line-numbers"),s=0;i=r[s++];){var d=i.split("-"),u=+d[0],c=+d[1]||u,m=e.querySelector('.line-highlight[data-range="'+i+'"]')||document.createElement("div");if(m.setAttribute("aria-hidden","true"),m.setAttribute("data-range",i),m.className=(n||"")+" line-highlight",a&&Prism.plugins.lineNumbers){var p=Prism.plugins.lineNumbers.getLine(e,u),f=Prism.plugins.lineNumbers.getLine(e,c);p&&(m.style.top=p.offsetTop+"px"),f&&(m.style.height=f.offsetTop-p.offsetTop+f.offsetHeight+"px")}else m.setAttribute("data-start",u),u<c&&m.setAttribute("data-end",c),m.style.top=(u-o-1)*l+"px",m.textContent=new Array(c-u+2).join(" \n");a?e.appendChild(m):(e.querySelector("code")||e).appendChild(m)}}function s(){var e=location.hash.slice(1);r(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);i&&(i.hasAttribute("data-line")||i.setAttribute("data-line",""),a(i,t,"temporary "),document.querySelector(".temporary.line-highlight").scrollIntoView())}}}();
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var l="line-numbers",c=/\n(?!$)/g,m=function(e){var t=a(e)["white-space"];if("pre-wrap"===t||"pre-line"===t){var n=e.querySelector("code"),r=e.querySelector(".line-numbers-rows"),s=e.querySelector(".line-numbers-sizer"),i=n.textContent.split(c);s||((s=document.createElement("span")).className="line-numbers-sizer",n.appendChild(s)),s.style.display="block",i.forEach(function(e,t){s.textContent=e||"\n";var n=s.getBoundingClientRect().height;r.children[t].style.height=n+"px"}),s.textContent="",s.style.display="none"}},a=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null};window.addEventListener("resize",function(){Array.prototype.forEach.call(document.querySelectorAll("pre."+l),m)}),Prism.hooks.add("complete",function(e){if(e.code){var t=e.element,n=t.parentNode;if(n&&/pre/i.test(n.nodeName)&&!t.querySelector(".line-numbers-rows")){for(var r=!1,s=/(?:^|\s)line-numbers(?:\s|$)/,i=t;i;i=i.parentNode)if(s.test(i.className)){r=!0;break}if(r){t.className=t.className.replace(s," "),s.test(n.className)||(n.className+=" line-numbers");var l,a=e.code.match(c),o=a?a.length+1:1,u=new Array(o+1).join("<span></span>");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(l),m(n),Prism.hooks.run("line-numbers",e)}}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(l)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,s=r+(n.children.length-1);t<r&&(t=r),s<t&&(t=s);var i=t-r;return n.children[i]}}}}}();
diff --git a/src/main/webapp/connect/confluence/splashEditor.html b/src/main/webapp/connect/confluence/splashEditor.html
new file mode 100644
index 000000000..b1db4b2ff
--- /dev/null
+++ b/src/main/webapp/connect/confluence/splashEditor.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Editor</title>
+<script type="text/javascript">
+	// To Avoid NPE in connectUtils
+	urlParams = {};
+</script>
+<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+<style type="text/css">
+	html, body {
+	  height:100%;
+	  overflow:hidden;
+	}
+	body {
+		background-color:#ffffff;
+		background-image:url(/images/drawlogo-text-bottom.svg);
+		background-repeat:no-repeat;
+		background-position:center;
+		background-size:128px;
+		font-family:Arial,Sans-Serif;
+		overflow:hidden;
+		width:100%;
+		margin:0;
+	}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	// Main
+	script.onload = function()
+	{
+		AP.dialog.create(
+        {
+    		key: 'macroEditor',
+    		customData: {},
+            chrome: false,
+            width: "100%",
+            height: "100%",
+        }).on("close", function(flags)
+        {
+        	AP.dialog.close();
+		});
+	};
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	head.appendChild(script);
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/support.html b/src/main/webapp/connect/confluence/support.html
new file mode 100644
index 000000000..6addf5abf
--- /dev/null
+++ b/src/main/webapp/connect/confluence/support.html
@@ -0,0 +1,146 @@
+<html>
+	<head>
+		<script type="text/javascript" src="https://connect-cdn.atl-paas.net/all.js" data-options="sizeToParent:true;"></script>
+		<link rel="stylesheet" type="text/css" href="https://aui-cdn.atlassian.com/aui-adg/6.0.4/css/aui.css">
+ 		<title>draw.io Support</title>
+	</head>
+	<body>
+		<div id="admin-content" style="padding: 20 0 0 30;">
+                <div class="logo-heading-block">
+                    <span class="logoBlock"></span>
+                    <div id="admin-heading-container">
+						<h1 class="admin-heading">
+                            draw.io Support
+                        </h1>
+                        <div>
+							draw.io add-on for Confluence (Version: <span id="drawioVersion"></span> and License SEN: <span id="drawioLic"></span>)
+						</div>
+                    </div>
+                </div>
+				<br>
+                <div id="admin-body">
+                    <div id="admin-body-content">
+						<div id="content_thank-you_page" align="left">
+							<div id="p_head">
+								<h3>Getting Support</h3>
+							</div>
+							<div id="p_content">
+								<div class="p_lower_content">
+									<ul>
+										<li>For support requests relating to installation, data load/save, broken functionality problems, email <a href="mailto:support@draw.io?subject=Confluence%20Cloud%20Support%20-%20TOPIC">support@draw.io</a>.
+										<li>Please include the draw.io version and SEN shown on this page to speed up the support process.</li>
+										<li>Support requests should be routed via an admin, wherever possible.</li>
+									</ul>
+									<p></p>
+								</div>
+							</div>
+							<div id="p_head">
+								<h3>Helpful resources for Admins</h3>
+							</div>
+							<div id="p_content">
+								<div class="p_lower_content">
+									<ul>
+										<li>
+											<a class="external-link"
+												href="https://drawio-app.com/learning/interactive-tutorials/"
+												rel="nofollow" target="_blank">Customise colours, fonts
+												and styles</a>&nbsp;of&nbsp;<a class="external-link"
+												href="https://drawio-app.com/learning/interactive-tutorials/"
+												rel="nofollow" target="_blank">draw.io</a>&nbsp;for Confluence
+										</li>
+										<li>
+											<a class="external-link"
+												href="https://drawio-app.com/learning/interactive-tutorials/"
+												rel="nofollow" target="_blank">Embed our interactive
+												tutorials for your user base</a>
+										</li>
+										<li>
+											<a class="external-link"
+												href="https://support.draw.io/display/DFCS/draw.io+for+Confluence+and+JIRA+support+terms+and+Service+Level+Agreement"
+												rel="nofollow" target="_blank">View our support terms and
+												SLAs</a>
+										</li>
+										<!-- li>Optionally configure draw.io by following the posts 
+											<a href="https://about.draw.io/customise-default-colours-fonts-styles-and-the-draw-io-ui-in-confluence-cloud/" target="_blank">here</a> and 
+											<a href="https://about.draw.io/customise-default-shape-libraries-templates-and-plugins-in-draw-io-for-confluence-cloud/">here</a>.
+										</li-->
+									</ul>
+									<p></p>
+								</div>
+							</div>
+							<div id="p_head">
+								<h3>Helpful resources for Users</h3>
+							</div>
+							<div id="p_content">
+								<div class="p_lower_content">
+									<!-- <p>
+										Some links you can send out to users to help them be more productive:
+										</p>-->
+									<ul>
+										<li>
+											<a class="external-link"
+												href="https://about.draw.io/features/training-material/"
+												rel="nofollow" target="_blank">Have a look at our
+												cost-free learning offerings</a>
+										</li>
+										<li>
+											<a class="external-link"
+												href="https://www.youtube.com/watch?v=Z0D96ZikMkc"
+												rel="nofollow" target="_blank">10 tips about draw.io core
+												functionalities</a>&nbsp;(90 second video)
+										</li>
+										<li>
+											<a class="external-link"
+												href="https://drawio-app.com/customise-default-shape-libraries-templates-and-plugins-in-draw-io-for-confluence-cloud/"
+												rel="nofollow" target="_blank">Customise draw.io libraries
+												and templates</a>
+										</li>
+										<li>
+											Search existing Q&amp;A on&nbsp;<a class="external-link"
+												href="https://community.atlassian.com/t5/forums/searchpage/tab/message?advanced=false&amp;allow_punctuation=false&amp;q=%22draw.io%22&amp;sort_by=-topicPostDate"
+												rel="nofollow" target="_blank">Atlassian Community</a>
+										</li>
+										<li>
+											Search existing Q&amp;A on&nbsp;<a class="external-link"
+												href="https://groups.google.com/forum/#!forum/drawio"
+												rel="nofollow" target="_blank">Google Groups</a>
+										</li>
+										<li>
+											See our Roadmap and feature requests for&nbsp;<a
+												class="external-link"
+												href="https://trello.com/b/24APPeGl/drawio-confluence-cloud"
+												rel="nofollow" target="_blank">draw.io for Confluence
+												Cloud</a>&nbsp;and our&nbsp;<a class="external-link"
+												href="https://trello.com/b/y21hYbn6/drawio-core"
+												rel="nofollow" target="_blank">core draw.io editor</a>&nbsp;
+										</li>
+									</ul>
+									<p></p>
+								</div>
+							</div>
+						</div>
+                    </div>
+                </div>
+        </div>
+        <script type="text/javascript">
+        	AP.request({
+                type: 'GET',
+                url: '/rest/atlassian-connect/1/addons/com.mxgraph.confluence.plugins.diagramly',
+                contentType: 'application/json;charset=UTF-8',
+                success: function (resp) 
+                {
+                    resp = JSON.parse(resp);
+        			document.getElementById('drawioLic').innerHTML = resp.license? resp.license.supportEntitlementNumber : 'Unlicensed';
+        			document.getElementById('drawioVersion').innerHTML = resp.version;
+                }
+        	});
+		</script>
+		<script>
+		
+		  window.intercomSettings = {
+		    app_id: "fz6gxyi6"
+		  };
+		</script>
+		
+		<script>(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',w.intercomSettings);}else{var d=document;var i=function(){i.c(arguments);};i.q=[];i.c=function(args){i.q.push(args);};w.Intercom=i;var l=function(){var s=d.createElement('script');s.type='text/javascript';s.async=true;s.src='https://widget.intercom.io/widget/fz6gxyi6';var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);};if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})();</script>	</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/viewer-1-4-8.html b/src/main/webapp/connect/confluence/viewer-1-4-8.html
new file mode 100644
index 000000000..e486582c6
--- /dev/null
+++ b/src/main/webapp/connect/confluence/viewer-1-4-8.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/drawlogo-gray.svg);
+	background-repeat:no-repeat;
+	background-position:center top;
+	background-size: 64px;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+<link rel="stylesheet" href="/mxgraph/css/common.css" />
+<link rel="stylesheet" href="/styles/grapheditor.css" />
+<script src="connectUtils-1-4-8.js" type="text/javascript"></script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+</head>
+<body>
+<script type="text/javascript">
+// Parses URL parameters
+function getUrlParam(param, treatEmptyAsNull)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		var val = decodeURIComponent(result[1].replace(/\+/g, '%20'));
+		return treatEmptyAsNull && val != null && val.length == 0 ? null : val;
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Absolute for font conversion in lightbox to work
+PROXY_URL = '/proxy';
+
+var lightbox = getUrlParam('lightbox') == '1';
+var customContent = getUrlParam('custom') == '1';
+
+if (lightbox)
+{
+	document.body.style.backgroundImage = 'url(/images/drawlogo-text-bottom.svg)';
+	document.body.style.backgroundPosition = 'center 30%';
+	document.body.style.backgroundSize = '128px';
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="viewer.js"></script>
+<script type="text/javascript">
+// Logs uncaught errors
+EditorUi.enableLogging = true;
+
+window.onerror = function(message, url, linenumber, colno, err)
+{
+	message = 'Confluence Cloud: ' + ((message != null) ? message : '');
+	
+	EditorUi.logError(message, url, linenumber, colno, err);
+};
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/confluence/viewer.js b/src/main/webapp/connect/confluence/viewer.js
new file mode 100644
index 000000000..b15f40c3f
--- /dev/null
+++ b/src/main/webapp/connect/confluence/viewer.js
@@ -0,0 +1,1485 @@
+(function()
+{
+	var EXPORT_URL = 'https://exp.draw.io/ImageExport4/export';
+	
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Loads the Atlassian API
+	var script = document.createElement('script');
+	var baseUrl = getBaseUrl();
+	
+	// Loads the attachment and renders the diagram
+	var diagramWidth = parseFloat(getUrlParam('width'));
+	var diagramHeight = parseFloat(getUrlParam('height'));
+	var diagramName = getUrlParam('diagramName');
+	var displayName = getUrlParam('displayName');
+	
+	//ceoId and owningPageId are IDs of the page that potentially hold the attachment
+	//they will differ when page history is shown, ceoId will be historical version ID,
+	//owningPageId will be the ID of the current version that holds the attachment
+	//ceoId is used as fallback in case owningPageId is not set(should be very rare)
+	var ceoId = getUrlParam('ceoId');
+	var owningPageId = getUrlParam('owningPageId');
+	var revision = getUrlParam('revision');
+	
+	var tbStyle = getUrlParam('tbstyle') || 'top';
+	var links = getUrlParam('links') || 'auto';
+	var enableLightbox = getUrlParam('lbox') != '0';
+	var simpleViewer = getUrlParam('simple') == '1';
+	var tbHeight = (tbStyle == 'top' && !simpleViewer) ? GraphViewer.prototype.toolbarHeight : 0;
+	var zoom = parseFloat(getUrlParam('zoom') || 1);
+	var border = (simpleViewer) ? 0 : 8;
+	var pCenter = getUrlParam('pCenter') == '1';
+	
+	var contentId = getUrlParam('contentId') || getUrlParam('custContentId');
+	var contentVer = getUrlParam('contentVer');
+	var linkedMode = getUrlParam('linked') == '1';
+	var diagramUrl = getUrlParam('diagramUrl');
+	var inComment = getUrlParam('inComment') == '1';
+	var aspect = getUrlParam('aspect');
+	var imgPageId = getUrlParam('imgPageId');
+	var aspectHash = getUrlParam('aspectHash');
+	var attVer = getUrlParam('attVer', true);
+	var service = getUrlParam('service', true);
+	var sFileId = getUrlParam('sFileId', true);
+	var odriveId = getUrlParam('odriveId', true);
+	var userCanEdit = {}; //0: Unknown, 1: Yes, -1: No. For each pageId
+	// Workaround for blocked referrer in iframe
+	Graph.prototype.baseUrl = baseUrl + '/pages/viewpage.action?pageId=' + owningPageId;
+
+	var openPageImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4goKFCgQ6ZBdjgAAAvJJREFUWMPFlz+IFHcUxz/vt7Nzu7fuKYqGM7HQKBISUc8gwcYiRcDKJliqRYRUkkYtUgRUCIekCQFbxUIDFxBCimAKBUtRJEVQLyRGZV31yO1e9vbPzO+b4obLnl682bm99TW/md/Me+/7vr/3Z8boEkkTwDayiQFV4KCZ1TNZkHRXy5cHvfgM/md/EzDdg51/gDvADuBdSZPA+0DLzJSFgXIG9m4nuleT9Z6k0lJ6jv7LUeBikkt33wSA0MwOJyC2SJqUVJJkgwIggATEBWBLkh/FQQH4ry7NjiQgtgK/DgpAfREQ3wKbJf0uaSRNGS5H7kuaeWmvAUTAZuAGsGslAAwl68Yl3tu5UgzsXsRemLRogCbwC/BRTwCefBkWyyP6ChG97r2Z8fCVyVCr2em3z7SbXc2qk7YVz0uhqDEHJyLvF46dVoj8XHDmBEMt6Cr1MHAUh+MfgFtZZsErha1u752Q0md3cIW5hPbNaWrn95IrNgDf1Q2yD6PXS34Dwei2rlp+i/rUekZG/8I535Op/vUBg9rTAO+tJ7VsDEQV4hcP8a1GEkYBRRUsEDPVPOX1ndSWMwAQeCFX4tGp9yCX551z91AbLBDeQ60aEm6MsP4dgQHCbBhYxfCnPzL90zhujcOVY2o/f8OGzy8jimAlJE/9WZ6onesTAwLCTYR7jkOuSH77x0TXLiWZLqKpCqWxA0TVsyiapX79O3z0lMbzvEG7HwA8wQfHKOz/Yn5r7aGveXzy+/lrzFj9yTFwDt+epXn9LGbWxyPwLzVCxYAlJCRF71zS8eL+l6Fqfy64j2emIDAsMOL684XPXvyRKvr0R+DAT17h8fEJOlE+8dLECnORVsb3Qa4wx4T3WChCl64bBmnyH4GsyarRHI2/O7QbBjnNDzoLPTDbpeVTk7skAC8qztlvAbkWwMi6iFoUSJF1TdpFKHMMEVPN+mdUZgVE0g1JGthH6XKqoLVC/nzaHLgpabbPzmNgf1oAHw7qCP4Fs6J7VGnK/oIAAAAASUVORK5CYII=';
+
+	if (!lightbox)
+	{
+		document.body.style.backgroundImage = 'url(/images/aui-wait.gif)';
+		document.body.style.backgroundPosition = 'left top';
+		document.body.style.backgroundSize = 'auto auto';
+	}
+	
+	function main()
+	{
+		// Sets initial placeholder size to allow for scrollbars in fit to page width
+		AP.resize('100%', (lightbox || customContent) ? '100%' : (diagramHeight * zoom + tbHeight + 2));
+		
+		function showError(msg)
+		{
+			document.body.style.backgroundImage = 'none';
+			document.body.style.padding = '4px';
+			mxUtils.write(document.body, msg);
+			AP.resize('100%', 24);
+		};
+		
+		//keeping the block of AP.require to mimimize the number of changes!
+		{
+			//This is a workaround Jira Service Desk preview which has no context. 
+			//AP.navigator.getLocation will just log an error and callback function won't be called 
+			var ignoreNavFallback = false;
+			var isServiceDesk = false; //In service desk, we cannot show dialogs as we cannot pass customData
+			
+			var fallbackTimeoutThread = window.setTimeout(function()
+			{
+				if (!ignoreNavFallback) 
+				{
+					isServiceDesk = true;
+					startViewer();
+				}
+			}, 500); //allow 0.5 sec for AP.navigator.getLocation 
+			
+			// Uses pageId from current page as page in macro may be outdated after export
+			AP.navigator.getLocation(function (data)
+		    {
+				ignoreNavFallback = true;
+				window.clearTimeout(fallbackTimeoutThread);
+				startViewer(data);
+		    });
+			
+			function startViewer(data) 
+			{
+				var candidateId = (owningPageId != null && owningPageId.length > 0) ? owningPageId : ceoId;
+
+				if (!linkedMode && data != null && data.target != null && data.context != null)
+				{
+					candidateId = data.context.contentId;
+				}
+				
+				function showExtDiagram(name, url)
+				{
+					mxUtils.get(url, function(req) 
+					{
+						if (req.getStatus() >= 200 && req.getStatus() <= 299)
+						{
+							try
+							{
+							    var xml = req.getText();
+						
+							    document.body.style.backgroundImage = 'none';
+							    
+								//In case we want to load another diagram
+								var oldContainer = document.getElementById("drawIODiagram");
+								
+								if (oldContainer != null)
+								{
+									oldContainer.parentNode.removeChild(oldContainer);
+								}
+								// LATER: Fix horizontal alignment ignored with 100% width of iframe
+								// LATER: Fix page scrolling on touch device if trigger event on diagram
+								// LATER: Hide toolbar after second container click for iOS
+								// LATER: Disable responsive resize while lightbox shows
+								var container = document.createElement('div');
+								container.id = "drawIODiagram";
+								container.style.cssText = 'position:absolute;' +
+									'max-width:100%;border:1px solid transparent;';
+								document.body.appendChild(container);
+								var doc = mxUtils.parseXml(xml);
+								
+								var config = {highlight: '#3572b0', 'toolbar-position': tbStyle,
+									nav: true, zoom: zoom};
+								
+								config.lightbox = false;
+								config.toolbar = 'pages zoom layers';
+								config.border = border;
+								config.title = name;
+								config.resize = true;
+								
+								if (aspect != null)
+								{
+									//Set pageId and layers
+									var aspectArray = aspect.split(' ');
+
+									if (aspectArray.length > 1)
+									{
+										config.pageId = aspectArray[0];
+										config.layerIds = aspectArray.slice(1);
+									}
+								}
+								
+								var viewer = new GraphViewer(container, doc.documentElement, config);
+			
+								// Handles resize of iframe after zoom
+								var graphDoResizeContainer = viewer.graph.doResizeContainer;
+								
+								function updateHeight(height)
+								{
+									AP.resize('100%', Math.ceil(height) + tbHeight + 2);
+								};
+								
+								viewer.graph.doResizeContainer = function(width, height)
+								{
+									graphDoResizeContainer.apply(this, arguments);
+									updateHeight(height);
+								};
+			
+								// Updates the size of the iframe in responsive cases
+								viewer.updateContainerHeight = function(container, height)
+								{
+									updateHeight(height);
+								};
+								
+								updateHeight(container.offsetHeight);
+							}
+							catch(e)
+							{
+								showError(e.message);
+							}
+						}
+						else
+						{
+							if (req.getStatus() == 404)
+							{
+								showError(mxResources.get('fileNotFound'));
+							}
+						}
+					}, function()
+					{
+						showError(mxResources.get('unknownError'));
+					}, false, 25000, function()
+				    {
+						showError(mxResources.get('confTimeout'));
+				    });
+				};
+				
+				// Loads the given XML into the viewer
+				function showDiagram(id, backupId, name, revision, links, retryParams, displayName, contentId, spaceKey, openComments, aspect)
+				{
+					//Check if the user can edit this diagram
+					if (userCanEdit[id] == null)
+					{
+						if (inComment)
+						{
+							userCanEdit[id] = -1; //TODO enable editing macros in comments externally (requires finding which comment it belongs to and editing that comment content)
+						}
+						else
+						{
+							var acceptPermResponse = true;
+							
+							var permTimer = setTimeout(function()
+							{
+								acceptPermResponse = false;
+								userCanEdit[id] = 0;
+								showDiagram(id, backupId, name, revision, links, retryParams, displayName, contentId, spaceKey, openComments, aspect);
+							}, 5000); //Five second timeout
+							
+							AC.userCanEdit(id, function(canEdit)
+							{
+								if (acceptPermResponse)
+								{
+									window.clearTimeout(permTimer);
+									userCanEdit[id] = canEdit? 1 : -1;
+									showDiagram(id, backupId, name, revision, links, retryParams, displayName, contentId, spaceKey, openComments, aspect);
+								}
+							}, function()
+							{
+								if (acceptPermResponse)
+								{
+									window.clearTimeout(permTimer);
+									userCanEdit[id] = 0;
+									showDiagram(id, backupId, name, revision, links, retryParams, displayName, contentId, spaceKey, openComments, aspect);
+								}
+							});
+							
+							return;
+						}
+					}
+					
+					displayName = displayName || name;
+					retryParams = retryParams || {}; //so we can use it without NPE check
+					
+					var aspectPageId = null, aspectLayerIds = null;
+					
+					if (aspect != null)
+					{
+						//Set pageId and layers
+						var aspectArray = aspect.split(' ');
+
+						if (aspectArray.length > 1)
+						{
+							aspectPageId = aspectArray[0];
+							aspectLayerIds = aspectArray.slice(1);
+						}
+					}
+					
+					if (id != null)
+					{
+						id = id.toString();
+					}
+
+					if (id != null && id.length > 0 && name != null && name.length > 0) 
+					{
+						// Option currently not available in the UI
+						if (simpleViewer)
+						{
+							document.body.style.backgroundImage = 'none';
+							var img = document.createElement('img');
+							img.style.cssText = 'max-width:100%;';
+							img.setAttribute('src', baseUrl + '/download/attachments/' + id + '/'
+									+ encodeURIComponent(name) + ".png?api=v2"
+									+ (revision != null ? "&version=" + revision : ""));
+							
+							if (zoom != 1)
+							{
+								img.style.width = Math.round(diagramWidth * zoom) + 'px';
+							}
+							
+							document.body.appendChild(img);
+						}
+						else
+						{
+							var timeout = 25000;
+							var serverName = getUrlParam('xdm_e');
+							var index1 = serverName.indexOf('//');
+							
+							if (index1 > 0)
+							{
+								var index2 = serverName.indexOf('/', index1 + 2);
+								
+								if (index2 > index1)
+								{
+									serverName = serverName.substring(index1 + 2, index2);
+								}
+								else
+								{
+									serverName = serverName.substring(index1 + 2);
+								}
+							}
+							
+							var acceptResponse = true;
+							
+							var timeoutThread = window.setTimeout(function()
+							{
+								acceptResponse = false;
+								
+								if (lightbox)
+								{
+									AC.showNotification({
+									  title: mxResources.get('confTimeout'),
+									  body: mxResources.get('confSrvTakeTooLong', [serverName]),
+									  type: 'error',
+									  close: 'manual'
+									});
+									
+									//TODO find how to listen to flag close event, currently just close the dialog immidiately
+									//AP.events.on('flag.close', function()
+									//{
+										AP.dialog.close();
+									//});
+								}
+								else
+								{
+									showError(mxResources.get('confTimeout') + ': ' +
+											mxResources.get('confSrvTakeTooLong', [serverName]));
+								}
+							}, timeout);
+							
+							AP.request(
+							{
+								url: '/download/attachments/' + id + '/' + encodeURIComponent(name) +
+									((revision != null && revision.length > 0) ? '?version=' + revision : ''),
+								success: function(xml) 
+								{
+							 		window.clearTimeout(timeoutThread);
+									
+							 		if (acceptResponse)
+							 		{
+										document.body.style.backgroundImage = 'none';
+										
+										var openParentPageFunc = function()
+										{
+											var openURL = function(pageURL)
+											{
+												try
+												{
+													top.window.location.href = pageURL;										
+												}
+												catch(e) //In case of a security exception
+												{
+													window.location = pageURL;
+												}
+											};
+											
+						                    AP.request({
+						                        type: 'GET',
+						                        url: '/rest/api/content/' + id,
+						                        contentType: 'application/json;charset=UTF-8',
+						                        success: function (resp) 
+						                        {
+						                        	if (userCanEdit[id] != -1)
+					                        		{
+							                        	openURL(baseUrl + '/spaces/' + encodeURIComponent(spaceKey) + '/pages/edit/' + id);					                        		
+					                        		}
+						                        	else
+					                        		{
+						                        		//Open in view mode
+					                        			openURL(baseUrl + '/spaces/' + encodeURIComponent(spaceKey) + '/pages/' + id);	
+					                        		}
+						                        },
+						                        error: function (resp) 
+						                        {
+						                            //On error, we assume it is a draft page
+						                        	openURL(baseUrl + '/spaces/' + encodeURIComponent(spaceKey) + '/pages/create?draftId=' + id);
+						                            //TODO we can confirm page exist with another request + "?status=draft" and show error message if page cannot be found
+						                        }
+						                    });
+										};
+										
+										var editFunc = function()
+										{
+											if (lightbox)
+											{
+												AP.dialog.close({noBack: true, openEditorId: contentId});												
+											}
+											else
+											{
+												AP.dialog.create(
+								                {
+							                		key: 'customContentEditor',
+							                		//sending pageId and revision to verify custom content matches opened diagram
+								                    customData: {contentId: contentId, 
+							                    				macroData: {
+							                    					width: diagramWidth,
+							                    					height: diagramHeight,
+							                    					diagramName: name,
+							                    					diagramDisplayName: displayName,
+							                    					pageId: id,
+							                    					revision: revision,
+							                    					tbstyle: tbStyle,
+							                    					links: links,
+							                    					simple: simpleViewer,
+							                						lbox: enableLightbox,
+							                    					zoom: zoom,
+							                    					contentVer: contentVer,
+							                    					contentId: contentId,
+							                    					custContentId: contentId,
+							                    					aspect: aspect
+							                    				}
+								                    },
+								                    chrome: false,
+								                    width: "100%",
+								                    height: "100%",
+								                }).on("close", function(flags)
+						                		{
+								                	//refresh the viewer
+								                	if (flags && flags.newRev && flags.newContentVer && flags.newContentId)
+							                		{
+								                		contentVer = flags.newContentVer;
+								                		contentId = flags.newContentId;
+								                		showDiagram(id, backupId, name, flags.newRev, links, retryParams, displayName, contentId, null, null, flags.newAspect);
+							                		}
+						                		});
+											}
+										};
+										
+										var commentsWindow = null;
+										var confUser = null;
+										
+										//Comments are only shown in lightbox mode
+										if (lightbox)
+										{
+											//Adjust some functions such that it can be instanciated without UI
+											EditorUi.prototype.createUi = function(){};
+											EditorUi.prototype.addTrees = function(){};
+									    	EditorUi.prototype.updateActionStates = function(){};
+									    	var editorUi = new EditorUi();
+											
+											editorUi.getCurrentUser = function()
+											{
+												if (confUser == null)
+												{
+													AC.getCurrentUser(function(user)
+													{
+														confUser = new DrawioUser(user.id, user.email, user.displayName, user.pictureUrl);
+														
+														if (openComments) //Open the comments window here when the user is ready
+														{
+															openCommentsFunc();
+														}
+													}, function()
+													{
+														//ignore such that next call we retry
+													});
+													
+													//Return a dummy user until we have the actual user in order for UI to be populated
+													return new DrawioUser(Date.now(), null, mxResources.get('anonymous'));
+												}
+												
+												return confUser;
+											};
+											
+											//Prefetch current user 
+											editorUi.getCurrentUser();
+										}
+										
+										var openCommentsFunc = function()
+										{
+											if (commentsWindow != null)
+											{
+												commentsWindow.window.setVisible(commentsWindow.window.isVisible()? false : true);
+											}
+											else
+											{
+												var confComments = null;
+												var spaceKey, pageId, pageType, contentVer;
+												
+												function saveComments(comments, success, error)
+												{
+													AC.saveCustomContent(spaceKey, pageId, pageType, name, displayName, revision,
+			            									contentId, contentVer,
+			            									function(responseText) 
+			            									{
+			            										var content = JSON.parse(responseText);
+			            										
+			            										contentId = content.id;
+			            										contentVer = content.version.number;
+			            										
+			            										success();
+			            									}, error, comments);
+												}
+												
+												editorUi.canComment = function()
+												{
+													return true; //We don't put restrictions on draw.io custom contents, so anyone can edit
+												};
+												
+												editorUi.commentsSupported = function()
+												{
+													return true;
+												};
+												
+												editorUi.commentsRefreshNeeded = function()
+												{
+													return false;
+												};
+
+												editorUi.commentsSaveNeeded = function()
+												{
+													return false;
+												};
+
+												
+												editorUi.canReplyToReplies = function()
+												{
+													return true;
+												};
+												
+												function confCommentToDrawio(cComment, pCommentId)
+												{
+													if (cComment.isDeleted) return null; //skip deleted comments
+													
+													var comment = new DrawioComment(null, cComment.id, cComment.content, 
+															cComment.modifiedDate, cComment.createdDate, cComment.isResolved,
+															new DrawioUser(cComment.user.id, cComment.user.email,
+																	cComment.user.displayName, cComment.user.pictureUrl), pCommentId);
+													
+													for (var i = 0; cComment.replies != null && i < cComment.replies.length; i++)
+													{
+														comment.addReplyDirect(confCommentToDrawio(cComment.replies[i], cComment.id));
+													}
+													
+													return comment;
+												};
+														
+												editorUi.getComments = function(success, error)
+												{
+													if (confComments == null)
+													{
+														AC.getComments(contentId, function(comments, spaceKey_p, pageId_p, pageType_p, contentVer_p)
+														{
+															spaceKey = spaceKey_p; pageId = pageId_p; pageType = pageType_p; contentVer = contentVer_p;
+															
+															confComments = [];
+															
+															for (var i = 0; i < comments.length; i++)
+															{
+																var comment = confCommentToDrawio(comments[i]);
+																
+																if (comment != null) confComments.push(comment);
+															}
+															
+															success(confComments);
+														}, error);
+													}
+													else
+													{
+														success(confComments);
+													}
+												};
+
+												editorUi.addComment = function(comment, success, error)
+												{
+													var tmpComments = JSON.parse(JSON.stringify(confComments));
+													comment.id = confUser.id + ':' + Date.now();
+													tmpComments.push(comment);
+													
+													saveComments(tmpComments, function()
+													{
+														success(comment.id);
+													}, error);
+												};
+														
+												editorUi.newComment = function(content, user)
+												{
+													return new DrawioComment(null, null, content, Date.now(), Date.now(), false, user); //remove file information
+												};
+												
+												//In Confluence, comments are part of the file (specifically custom contents), so needs to mark as changed with every change
+												DrawioComment.prototype.addReply = function(reply, success, error, doResolve, doReopen)
+												{
+													reply.id = confUser.id + ':' + Date.now();
+													this.replies.push(reply);
+													var isResolved = this.isResolved;
+													
+													if (doResolve)
+													{
+														this.isResolved = true;
+													}
+													else if (doReopen)
+													{
+														this.isResolved = false;
+													}
+													
+													var tmpComments = JSON.parse(JSON.stringify(confComments));
+													this.replies.pop(); //Undo in case more changes are done before getting the reply
+													this.isResolved = isResolved;
+													
+													saveComments(tmpComments, function()
+													{
+														success(reply.id);
+													}, error);
+												};
+
+												DrawioComment.prototype.editComment = function(newContent, success, error)
+												{
+													var oldContent = this.content;
+													this.content = newContent;
+													var tmpComments = JSON.parse(JSON.stringify(confComments));
+													this.content = oldContent;
+													
+													saveComments(tmpComments, success, error);
+												};
+
+												DrawioComment.prototype.deleteComment = function(success, error)
+												{
+													var that = this;
+													this.isDeleted = true; //Mark as deleted since searching for this comment in the entire structure is complex. It will be cleaned in next save
+													var tmpComments = JSON.parse(JSON.stringify(confComments));
+													
+													saveComments(tmpComments, success, function(err) 
+													{
+														that.isDeleted = false;
+														error(err);
+													});
+												};
+												
+												commentsWindow = new CommentsWindow(editorUi, document.body.offsetWidth - 380, 120, 300, 350);
+												commentsWindow.window.setVisible(true);
+												//Lightbox Viewer has 999 zIndex
+												commentsWindow.window.getElement().style.zIndex = 2000;
+											}
+										};
+										
+										if (lightbox)
+										{
+											var config = {highlight: '#3572b0', nav: true, lightbox: false};
+											
+											var lbBtns = [];
+
+											if (spaceKey != null && spaceKey.length > 0)
+											{
+												if (userCanEdit[id] != -1)
+												{
+													lbBtns.push({icon: Editor.editLargeImage, tooltip: mxResources.get('edit'), fn: editFunc});
+												}
+												
+												lbBtns.push({icon: openPageImg, tooltip: mxResources.get('confGotoPage'), fn: openParentPageFunc});
+											}
+											
+											lbBtns.push({icon: Editor.commentImageInverted, tooltip: mxResources.get('comments'), fn: openCommentsFunc});
+											EditorUi.prototype.lightboxToolbarActions = lbBtns;
+											
+											if (links != 'auto')
+											{
+												config.target = links;
+											}
+											
+											config.pageId = aspectPageId;
+											config.layerIds = aspectLayerIds;
+											
+											var viewer = new GraphViewer(null, null, config);
+											
+											viewer.lightboxChrome = false;
+											viewer.xml = xml;
+			
+											// Enables layers via flag to avoid toolbar
+											viewer.layersEnabled = true;
+											
+											var ui = viewer.showLocalLightbox();
+											// Destroy lightbox with ui instance
+											var destroy = ui.destroy;
+											ui.destroy = function()
+											{
+												AP.dialog.close();
+												destroy.apply(this, arguments);
+											};
+											
+											// Workaround for ignored header toolbar height for iframe
+											ui.editor.graph.container.style.bottom = '51px';
+										}
+										else
+										{
+											//In case we want to load another diagram
+											var oldContainer = document.getElementById("drawIODiagram");
+											
+											if (oldContainer != null)
+											{
+												oldContainer.parentNode.removeChild(oldContainer);
+											}
+											// LATER: Fix horizontal alignment ignored with 100% width of iframe
+											// LATER: Fix page scrolling on touch device if trigger event on diagram
+											// LATER: Hide toolbar after second container click for iOS
+											// LATER: Disable responsive resize while lightbox shows
+											var container = document.createElement('div');
+											container.id = "drawIODiagram";
+											//There is an issue with AP.resize when custom content is shown. It works only once!
+											if (customContent) {
+												document.body.style.overflow = "auto";
+											}
+											container.style.cssText = (customContent? '' : 'position:absolute;') +
+												'max-width:100%;border:1px solid transparent;';
+											document.body.appendChild(container);
+											var doc = mxUtils.parseXml(xml);
+											
+											var config = {highlight: '#3572b0', 'toolbar-position': tbStyle,
+												nav: true, border: 2, zoom: zoom};
+											
+											if (pCenter)
+											{
+												config['auto-fit'] = true;
+												config['resize'] = false;
+												container.style.width = '100%';
+											}
+											
+											if (tbStyle == 'top')
+											{
+												config.title = displayName;
+											}
+	
+											if (links != 'auto')
+											{
+												config.target = links;
+											}
+											
+											if (!enableLightbox)
+											{
+												config.lightbox = false;
+											}
+											
+											if (tbStyle != 'hidden')
+											{
+												config.toolbar = 'pages zoom layers';
+												config.border = border;
+												
+												if (enableLightbox)
+												{
+													config.toolbar += ' lightbox';
+												}
+											}
+											else
+											{
+												// Workaround for invalid width if no toolbar is present
+												var updateContainerWidth = GraphViewer.prototype.updateContainerWidth;
+												
+												GraphViewer.prototype.updateContainerWidth = function(container, width)
+												{
+													width += 3;
+													updateContainerWidth.apply(this, arguments);
+												};
+
+												config.resize = true;
+											}
+											
+											
+											if (userCanEdit[id] != -1 //We treat 0 (unknown as allowed since anyway the editor will show an error on save) 
+													&& contentId != null && contentId.length > 0 && tbStyle != 'hidden' && !linkedMode && !isServiceDesk)
+											{
+												config.toolbar = 'edit ' + config.toolbar;
+												var editImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAQEBBycnIgICBqwj3hAAAAAXRSTlMAQObYZgAAADlJREFUCNdjoBwoChrAmCyGggJwYWVBBSiTSVDICKFa0AEuLCiEJKyAX5gBSZgBSZgBKGwMBKQ7HAAWzQSfKKAyBgAAAABJRU5ErkJggg==';
+												
+												config['toolbar-buttons'] = 
+												{
+													'edit': {title: mxResources.get('edit'), enabled: true,
+														image: editImage, handler: editFunc}
+												};
+											}
+											
+											config.pageId = aspectPageId;
+											config.layerIds = aspectLayerIds;
+											
+											var viewer = new GraphViewer(container, doc.documentElement, config);
+			
+											// Handles resize of iframe after zoom
+											var graphDoResizeContainer = viewer.graph.doResizeContainer;
+											
+											function updateHeight(height)
+											{
+												AP.resize('100%', Math.ceil(height) + tbHeight + 2);
+											};
+											
+											viewer.graph.doResizeContainer = function(width, height)
+											{
+												graphDoResizeContainer.apply(this, arguments);
+												updateHeight(height);
+											};
+			
+											// Updates the size of the iframe in responsive cases
+											viewer.updateContainerHeight = function(container, height)
+											{
+												updateHeight(height);
+											};
+											
+											updateHeight(container.offsetHeight);
+											
+											var orignShowLightbox = viewer.showLightbox;
+											
+											viewer.showLightbox = function(openComments)
+											{
+												//Revert back to opening the lightbox in a new tab since we cannot open Confluence dialogs as there is no custom data
+												if (isServiceDesk)
+												{
+													orignShowLightbox.call(this, false); //Open in new tab without edit option
+													return;
+												}
+												
+												//Create an aspect reflecting current view
+												var curPageDiagram = viewer.diagrams[viewer.currentPage];
+												var curAspect = null;
+												
+												if (curPageDiagram != null)
+												{
+													var layerIds = [], pageId = curPageDiagram.getAttribute('id');
+					
+													var model = viewer.graph.getModel();
+													var childCount = model.getChildCount(model.root);
+														
+													// Get visible layers
+													for (var i = 0; i < childCount; i++)
+													{
+														var layer = model.getChildAt(model.root, i);
+														
+														if (model.isVisible(layer))
+														{
+															layerIds.push(layer.id);
+														}
+													}
+														
+													curAspect = pageId + ' ' + layerIds.join(' ');
+												}
+												else
+												{
+													EditorUi.logEvent('CONF_VIEWER_CURRENT_PAGE_NOT_FOUND: current page = ' + viewer.currentPage + ', diagrams length = ' + viewer.diagrams.length);
+												}
+												
+												AP.dialog.create(
+								                {
+								                    header: displayName,
+							                		key: 'lightbox',
+								                    size: 'fullscreen',
+								                    customData: {id: id, name: name, revision: revision, aspect: curAspect, links: links, displayName: displayName, contentId: contentId, custContentId: contentId, openComments: openComments},
+								                    chrome: true
+								                });
+											};
+											
+											//Handle Anchor links
+											var origCustomLinkClicked = viewer.graph.customLinkClicked;
+											
+											viewer.graph.customLinkClicked = function(href)
+											{
+												if (href.substring(0, 23) == 'data:confluence/anchor,')
+												{
+													AC.gotoAnchor(href.substring(23));
+													return true;
+												}
+												else
+												{
+													return origCustomLinkClicked.apply(this, arguments);
+												}
+											};
+											
+											//Check embedded diagrams preview image is in sync in the background
+											if (linkedMode && (diagramUrl == null || diagramUrl.length == 0))
+											{
+												var imgAttVer = null, curAttVer = null;
+												
+												function checkImgVer()
+												{
+													if (imgAttVer != null && curAttVer != null && curAttVer != imgAttVer)
+													{
+														updateImage();
+													}
+												}
+												
+												function updateImage()
+												{
+				                    				//Update the image
+				                    				function doSaveImage(imageData)
+													{
+														if (imageData != null)
+														{
+															AC.saveDiagram(imgPageId, name + '-' + aspectHash + '.png', AC.b64toBlob(imageData, 'image/png'),
+																	ignoreFn, ignoreFn, false, 'image/png', 'draw.io aspect image' + (curAttVer != null? ' - ' + curAttVer : ''), false, false);
+														}
+													};
+													
+													function serverFallback()
+													{
+												    	var req = new mxXmlRequest(EXPORT_URL, 'format=png&base64=1' +
+												    			 (aspectLayerIds != null? '&extras=' + encodeURIComponent(JSON.stringify({layerIds: aspectLayerIds})) : '') + 
+																 (aspectPageId != null? '&pageId=' + aspectPageId : '') + '&xml=' + encodeURIComponent(xml));
+									
+														req.send(function(req)
+														{
+															doSaveImage(req.getStatus() >= 200 && req.getStatus() <= 299? req.getText() : null);
+														}, ignoreFn);
+												    
+													};
+													
+													if (viewer.editor.isExportToCanvas())
+											    	{
+														viewer.editor.exportToCanvas(function(canvas)
+												    	{
+												    		var data = canvas.toDataURL('image/png');
+												   	   		doSaveImage(data.substring(data.lastIndexOf(',') + 1));
+												    	}
+												    	, null, null, null, serverFallback);
+											    	}
+											    	else
+										    		{
+											    		serverFallback();
+										    		}
+												};
+												
+												function ignoreFn(){};
+												
+												if (service != null)
+												{
+													function renderAndCache(newXml, timestamp, isPng)
+													{
+														if (isPng)
+														{
+															newXml = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (newXml);
+															newXml = AC.extractGraphModelFromPng(newXml);
+														}
+														
+			            								//render diagram
+			            								viewer.setXmlNode(mxUtils.parseXml(newXml).documentElement);
+			            								//Apply aspect (layers) again
+			            								viewer.showLayers(viewer.graph);
+			            								//Update xml (used for server rendering)
+			            								xml = newXml;
+			            								//Save diagram
+			            								AC.saveDiagram(id, name, newXml,
+			            										updateImage, function(resp)
+			            										{
+			            											showError(mxResources.get('confSaveCacheFailed'));
+			            										}, false, 'application/vnd.jgraph.mxfile', 'Embedded draw.io diagram - ' + timestamp, false, false);
+													};
+													
+													if (service == 'GDrive')
+													{
+														GAC.getFileInfo(sFileId, function(fileInfo)
+														{
+															var isPng = fileInfo.mimeType == 'image/png';
+															var timestamp = new Date(fileInfo.modifiedDate).getTime();
+															
+															AC.getAttachmentInfo(id, name, function(info)
+															{
+																var cachedTS = null;
+																
+																try
+									                    		{
+									                    			cachedTS = parseInt(info.metadata.comment.split(' - ').pop());
+									                    		}
+									                    		catch(e) {} //ignore
+
+									                    		//If cache is old or invalid, fetch the current version
+									                    		if (timestamp != cachedTS)
+								                    			{
+									                    			GAC.doAuthRequestPlain(fileInfo['downloadUrl'], 'GET', null, function(req)
+																	{
+									                    				renderAndCache(req.responseText, timestamp, isPng);
+																	}, function()
+																	{
+																		showError(mxResources.get('confReadFileErr', [name, 'Google Drive']));
+																	}, null, isPng);
+								                    			}
+															}, function()
+															{
+																showError(mxResources.get('confCheckCacheFailed'));
+															});
+														}, function()
+														{
+															showError(mxResources.get('confGetInfoFailed', ['Google Drive']));
+														});
+													}
+													else if (service == 'OneDrive')
+													{
+														AC.getFileInfo(sFileId, odriveId, function(fileInfo)
+														{
+															var isPng = fileInfo.file.mimeType == 'image/png';
+															var timestamp = new Date(fileInfo.lastModifiedDateTime).getTime();
+															
+															AC.getAttachmentInfo(id, name, function(info)
+															{
+																var cachedTS = null;
+																
+																try
+									                    		{
+									                    			cachedTS = parseInt(info.metadata.comment.split(' - ').pop());
+									                    		}
+									                    		catch(e) {} //ignore
+
+									                    		//If cache is old or invalid, fetch the current version
+									                    		if (timestamp != cachedTS)
+								                    			{
+									                    			var req = new XMLHttpRequest();
+									            					req.open('GET', fileInfo['@microsoft.graph.downloadUrl']);
+									            					
+									            					req.onreadystatechange = function()
+									            					{
+									            						if (this.readyState == 4)
+									            						{
+									            							if (this.status >= 200 && this.status <= 299)
+									            							{
+									            								renderAndCache(req.responseText, timestamp, isPng);
+									            							}
+									            							else
+									            							{
+																				showError(mxResources.get('confReadFileErr', [name, 'OneDrive']));
+									            							}
+									            						}
+									            					};
+									            					
+									            					if (isPng && req.overrideMimeType)
+									            					{
+									            						req.overrideMimeType('text/plain; charset=x-user-defined');
+									            					}
+									            					
+									            					req.send();
+								                    			}
+															}, function()
+															{
+																showError(mxResources.get('confCheckCacheFailed'));
+															});
+														}, function()
+														{
+															showError(mxResources.get('confGetInfoFailed', ['OneDrive']));
+														});
+													}
+												}
+												else
+												{
+													//The case of referring to a diagram in another page
+													
+													//Get image version from attachment comment
+													AC.getAttachmentInfo(imgPageId, name + '-' + aspectHash + '.png', function(info)
+													{
+														try
+							                    		{
+							                    			imgAttVer = parseInt(info.metadata.comment.split(' - ').pop());
+							                    		}
+							                    		catch(e) {} //ignore
+							                    		
+							                    		imgAttVer = imgAttVer || attVer;
+							                    		checkImgVer();
+													}, ignoreFn);
+													
+													//Get version
+													AC.getAttachmentInfo(id, name, function(info)
+													{
+														curAttVer = info.version.number;
+							                    		checkImgVer();
+													}, ignoreFn);
+												}
+											}
+											
+											AC.getComments(contentId, function(comments)
+											{
+												var hasUnresolvedComments = false;
+												
+												for (var i = 0; i < comments.length; i++)
+												{
+													if (!comments[i].isDeleted && !comments[i].isResolved)
+													{
+														hasUnresolvedComments = true;
+														break;
+													}
+												}
+												
+												//If there are comments, show the comments icon
+												if (hasUnresolvedComments)
+												{
+													var commentsIcon = document.createElement('img');
+													commentsIcon.style.cssText = 'position:absolute;bottom: 5px; right: 5px;opacity: 0.25; cursor: pointer';
+													commentsIcon.setAttribute('title', mxResources.get('showComments'));
+													commentsIcon.src = Editor.commentImage;
+													commentsIcon.addEventListener('click', function() 
+													{
+														viewer.showLightbox(true);
+													});
+													container.appendChild(commentsIcon);
+												}
+											}, function(){});//Nothing to do in case of an error
+										}
+										//Confirm that the macro is in sync with the diagram
+										//Sometimes the diagram is saved but the macro is not updated
+										var attInfo = null;
+										var pageInfo = null;
+										
+										function confirmDiagramInSync()
+										{
+											if (attInfo == null || pageInfo == null) 
+												return;
+											
+											var loadedVer = parseInt(revision);
+											
+											//TODO is this condition enough or we need to check timestamps also?
+											if (attInfo.version.number > loadedVer 
+													&& (pageInfo.version.message == null || pageInfo.version.message.indexOf("Reverted") < 0)) 
+											{
+												showDiagram(id, backupId, name, attInfo.version.number + '', links, {dontCheckVer: true}, displayName, contentId, null, null, aspects);
+												//I think updating macro here is too risky since calling confluence.getMacroData returns null
+											}
+										}
+										
+										//This fix contradict with copy/paste workflow where all diagrams have the same name
+										//On copy/paste diagram name must be changed
+										/*if (!retryParams.dontCheckVer && revision != null && revision.length > 0)
+										{
+						                    AP.request({
+						                        type: 'GET',
+						                        url: '/rest/api/content/' + id + '?expand=version',
+						                        contentType: 'application/json;charset=UTF-8',
+						                        success: function (resp) 
+						                        {
+						                        	pageInfo = JSON.parse(resp);
+						                            
+						                        	confirmDiagramInSync();
+						                        },
+						                        error: function (resp) 
+						                        {
+						                            //Ignore
+						                        }
+						                    });
+	
+						                    AP.request({
+						                        type: 'GET',
+						                        url: '/rest/api/content/' + id + '/child/attachment?filename=' + 
+						                        		encodeURIComponent(name) + '&expand=version',
+						                        contentType: 'application/json;charset=UTF-8',
+						                        success: function (resp) 
+						                        {
+						                        	var tmp = JSON.parse(resp);
+						                            
+						                        	if (tmp.results && tmp.results.length == 1)
+						                        	{
+						                        		attInfo = tmp.results[0];
+						                        	}
+						                        	
+						                        	confirmDiagramInSync();
+						                        },
+						                        error: function (resp) 
+						                        {
+						                            //Ignore
+						                        }
+						                    });
+										}*/
+										
+										//Saving the diagram to this page negates page linking feature!
+										//May be we should ask the user first or saving is not needed all together
+										/*if (retryParams.saveIt)
+										{
+								 			//Since attachment wasn't found in this page, it is better to save it to this page
+								 			//First load AC dynamically. Since AC is not needed in the viewer except for this case
+							 				var head = document.getElementsByTagName('head')[0];
+											var script = document.createElement('script');
+											script.setAttribute('data-options', 'resize:false;margin:false');
+											
+											// Main
+											script.onload = function()
+											{
+												//save diagram
+												AC.saveDiagram(retryParams.pageId, name, xml,
+												function()
+												{
+													//nothing!
+												}, 
+												function()
+												{
+													//nothing!
+												}, false, 'application/vnd.jgraph.mxfile', 'Diagram imported by Draw.io', false, false);
+												
+												//TODO save preview png
+												//This requires an editor to do the png export, may be a canvas can be used with supported browsers
+											};
+											script.src = 'connectUtils-1-4-8.js';
+											head.appendChild(script);
+										}*/
+							 		}
+								},
+								error: function (err)
+								{
+							 		window.clearTimeout(timeoutThread);
+									
+							 		if (err.status == 404)
+							 		{
+							 			if (/(^\s|\s$)/.test(name))
+										{
+							 				showDiagram(id, backupId, name.trim(), revision, links, retryParams, displayName, contentId, spaceKey, openComments, aspect)
+										}
+							 			//Copied pages are reset to revision 1, in addition, copy&paste pages saves diagrams imported from another page
+							 			//So, try revision 1 first
+							 			else if (revision > 1)
+							 			{
+								 			showDiagram(id, backupId, name, null, links, {revision: revision}, displayName, contentId, null, null, aspect);
+							 			}
+							 			else if (backupId != null)
+						 				{
+								 			//Since attachment wasn't found in this page, it is better to save it to this page
+								 			showDiagram(backupId, null, name, revision || retryParams.revision, links, {saveIt: true, pageId: id}, displayName, contentId, null, null, aspect);
+						 				}
+							 			else //All alternatives failed, so this diagram is not found
+						 				{
+							 				document.body.style.backgroundImage = 'none';
+											showError(mxResources.get('diagNotFound'));
+						 				}
+							 		}
+							 		else if (err.status == 0)
+						 			{
+							 			document.body.style.backgroundImage = 'none';
+							 			
+							 			if (linkedMode) //When the embedded diagram refers to a page that current user has no permissions to view, and error status 0 is returned
+							 			{
+							 				showError(mxResources.get('confNoPermErr', [id]));
+							 			}
+							 			else // This can happen when a macro has a pageId (backupId) that the current user doesn't have access to it AND the diagram itself is deleted from this page (e.g, macro is copy/paste)
+							 				 //	, so show a more meaningful error with a dot to differentiate
+						 				{
+							 				showError(mxResources.get('diagNotFound') + '.');
+						 				}
+						 			}
+							 		else if (acceptResponse)
+							 		{
+										document.body.style.backgroundImage = 'none';
+										showError(mxResources.get('confError', ['HTTP ' + err.status]));
+							 		}
+								}
+							});
+						}
+					}
+					else
+					{
+						showError(mxResources.get('confError', ['Invalid descriptor']));
+					}
+				};
+	
+                if (customContent)
+                {
+                    AP.request({
+                        type: 'GET',
+                        url: '/rest/api/content/' + contentId + '/?expand=body.storage',
+                        contentType: 'application/json;charset=UTF-8',
+                        success: function (resp) 
+                        {
+                            resp = JSON.parse(resp);
+                            
+                            var info = JSON.parse(decodeURIComponent(resp.body.storage.value));
+                            var spaceKey = resp._expandable && resp._expandable.space? resp._expandable.space.substr(resp._expandable.space.lastIndexOf('/') + 1) : "";
+                            
+                            AP.dialog.create(
+                            {
+                                header: resp.title,
+                        		key: 'lightbox',
+                                size: 'fullscreen',
+                              	//custom content can load old versions which will be overridden by version check
+                                customData: {id: info.pageId, name: info.diagramName, revision: info.version, aspect: info.aspect, links: links, 
+                                	displayName: resp.title, spaceKey: spaceKey, retryParams: {dontCheckVer: true}, contentId: contentId, custContentId: contentId, inComment: info.inComment},
+                                chrome: true
+                            }).on("close", function(flags)
+                    		{
+                				if (flags && flags.noBack)
+               					{
+                					if (flags.openEditorId)
+                					{
+                						//setTimeout is needed such that the current dialog closes completely
+                						//without it, the on close event is not called!
+										setTimeout(function()
+										{
+											AP.dialog.create(
+							                {
+						                		key: 'customContentEditor',
+							                    customData: {contentId: flags.openEditorId, custContentId: flags.openEditorId},
+							                    chrome: false,
+							                    width: "100%",
+							                    height: "100%",
+							                }).on("close", function(flags)
+						                    {
+							                	if (flags && flags.noBack)
+						                		{
+							                		if (!flags.noBackOnClose)
+						                			{
+							                			//Go back after user (closes/clicks the link in) the flag 
+								                		AP.events.on('flag.close', function(){
+								                			AP.history.go(-1);
+						                      			});
+								                		AP.events.on('flag.action', function(){
+								                			AP.history.go(-1);
+						                      			});
+						                			}
+						                		}
+							                	else
+							                	{
+				                					AP.history.go(-1);
+							                	}
+				                			});
+										}, 10);
+                					}
+               					}
+                				else
+               					{
+                					AP.history.go(-1);
+               					}
+                			});
+                        },
+                        error: function (resp) 
+                        {
+                        	AC.showNotification({
+          					  title: mxResources.get('error'),
+          					  body: mxResources.get('diagNotFound'),
+          					  type: 'error'
+          					});
+          					
+	                      	//give the user some time to read the error!
+	                      	setTimeout(function()
+	                  		{
+	                      		AP.history.go(-1);	
+	                      	}, 500);
+                        }
+                    });
+                }
+                else if (lightbox)
+				{
+					// Gets the paramters from the customData object in lightbox mode
+					// LATER: Add XML to custom data (does not seem to work)
+                	AP.dialog.getCustomData(function (customData) {
+                		inComment = customData.inComment;
+						showDiagram(customData.id, customData.id, customData.name, customData.revision, 
+								customData.links, customData.retryParams, customData.displayName, customData.contentId || customData.custContentId,
+								customData.spaceKey, customData.openComments, customData.aspect);
+                	});
+				}
+				else
+				{
+					if (diagramUrl)
+					{
+						showExtDiagram(diagramName, diagramUrl);				
+					}
+					else
+					{
+						showDiagram(candidateId, (owningPageId != null && owningPageId.length > 0) ? owningPageId : ceoId, diagramName, revision, links, null, displayName, contentId, null, null, aspect);
+					}
+				}
+		    };
+		};
+	};
+	
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	var fontsLoaded = false;
+	var validSize = document.documentElement.offsetWidth > 0;
+
+	function mainBarrier()
+	{
+		if (validSize && bundleLoaded && scriptLoaded && fontsLoaded)
+		{
+			main();
+		}
+	};
+
+	// Disables delayed rendering since the container is created on the fly
+	GraphViewer.prototype.checkVisibleState = false;
+	
+	// Workaround for collapsed panel is to delay main until size is not 0
+	if (!validSize)
+	{
+		var listener = function()
+		{
+			if (document.documentElement.offsetWidth > 0)
+			{
+				window.removeEventListener('resize', listener);
+				validSize = true;
+				mainBarrier();
+			}
+		};
+		
+		window.addEventListener('resize', listener);
+	}
+	
+	script.onload = function()
+	{
+		AP.user.getLocale(function(lang)
+		{
+			// Overrides browser language with Confluence user language
+			if (lang != null)
+			{
+				var dash = lang.indexOf('_');
+				
+				if (dash >= 0)
+				{
+					mxLanguage = lang.substring(0, dash);
+				}
+			}
+			
+			mxResources.loadDefaultBundle = false;
+			var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+				mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+			mxUtils.getAll([bundle], function(xhr)
+			{
+				// Adds bundle text to resources
+				mxResources.parse(xhr[0].getText());
+				bundleLoaded = true;
+				mainBarrier();
+			});
+		});
+
+		// Workaround for Google Chrome triggering
+		// no resize event if height is set to 0
+		if (mxClient.IS_GC && !validSize)
+		{
+			AP.resize('100%', 1);
+		}
+		
+		// Checks configuration and loads fontCss
+		// While this is executed in parallel it still adds unnecessary
+		// calls since it is only needed if global fontCss is used
+		AP.request({
+            type: 'GET',
+            url: '/rest/api/content/search?cql=type%3Dpage%20and%20space%3DDRAWIOCONFIG%20and%20title%3DConfiguration', //type=page and space=DRAWIOCONFIG and title=Configuration. Search doesn't return 404 if not found
+            contentType: 'application/json;charset=UTF-8',
+            success: function (resp) 
+            {
+                resp = JSON.parse(resp);
+                
+                if (resp.size == 1)
+               	{
+                	var configPageId = resp.results[0].id;
+                	
+                	// Loads the configuration file
+            		AP.request({
+                        type: 'GET',
+            			url: '/download/attachments/' + configPageId + '/configuration.json',
+                        contentType: 'application/json;charset=UTF-8',
+                        success: function (fileContent) 
+                        {
+                        	try
+                        	{
+	                        	var config = JSON.parse(fileContent);
+	                        	Editor.configureFontCss(config.fontCss);
+	                        	fontsLoaded = true;
+								mainBarrier();
+                        	}
+                        	catch (e)
+                        	{
+                        		console.log('Configuration error', e);
+                        		fontsLoaded = true;
+								mainBarrier();	
+                        	}
+            			},
+            			error: function()
+						{ 
+							fontsLoaded = true;
+							mainBarrier();	
+						}
+	            	});
+				}
+                else
+                {
+                	fontsLoaded = true;
+					mainBarrier();	
+                }
+			}, error: function()
+			{ 
+				fontsLoaded = true;
+				mainBarrier();	
+			}});
+		
+		scriptLoaded = true;
+		mainBarrier();
+	};
+
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	document.getElementsByTagName('head')[0].appendChild(script);
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/confluence/viewer2.html b/src/main/webapp/connect/confluence/viewer2.html
new file mode 100644
index 000000000..0abc577f2
--- /dev/null
+++ b/src/main/webapp/connect/confluence/viewer2.html
@@ -0,0 +1,214 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Draw.io Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/drawlogo-gray.svg);
+	background-repeat:no-repeat;
+	background-position:center top;
+	background-size: 64px;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+// Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript">
+(function()
+{
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Loads the Atlassian API
+	var script = document.createElement('script');
+	var baseUrl = getBaseUrl();
+
+	// Loads the attachment and renders the diagram
+	var diagramWidth = parseFloat(getUrlParam('width'));
+	var diagramHeight = parseFloat(getUrlParam('height'));
+	var diagramName = getUrlParam('diagramName');
+	
+	//ceoId and owningPageId are IDs of the page that potentially hold the attachment
+	//they will differ when page history is shown, ceoId will be historical version ID,
+	//owningPageId will be the ID of the current version that holds the attachment
+	//ceoId is used as fallback in case owningPageId is not set(should be very rare)
+	var ceoId = getUrlParam('ceoId');
+	var owningPageId = getUrlParam('owningPageId');
+	var revision = null;
+	var tbStyle = getUrlParam('tbstyle') || 'top';
+	var links = getUrlParam('links') || 'auto';
+	var tbHeight = tbStyle == 'top' ? GraphViewer.prototype.toolbarHeight : 0;
+	var zoom = parseFloat(getUrlParam('zoom') || 1);
+	var border = 0;
+	
+	document.body.style.backgroundImage = 'url(/images/aui-wait.gif)';
+	document.body.style.backgroundPosition = 'left top';
+	document.body.style.backgroundSize = 'auto auto';
+	
+	function main()
+	{
+		// Sets initial placeholder size to allow for scrollbars in fit to page width
+		AP.resize('100%', (diagramHeight * zoom + tbHeight + 2 * border));
+		
+		function showError(msg)
+		{
+			document.body.style.backgroundImage = 'none';
+			document.body.style.padding = '4px';
+			mxUtils.write(document.body, msg);
+			AP.resize('100%', 24);
+		};
+		
+		AP.require(['request', 'dialog', 'messages', 'navigator'], function(request, dialog, messages, navigator)
+		{
+			// Uses pageId from current page as page in macro may be outdated after export
+			navigator.getLocation(function (data)
+		    {
+				var candidateId = (owningPageId != null && owningPageId.length > 0) ? owningPageId : ceoId;
+
+				if (data != null && data.target != null && data.context != null)
+				{
+					candidateId = data.context.contentId;
+				}
+				
+				// Loads the given XML into the viewer
+				function showDiagram(id, backupId, name, revision, page, links, retryParams)
+				{
+					id = id.toString();
+					
+					retryParams = retryParams || {}; //so we can use it without NPE check
+					
+					if (id != null && id.length > 0 && name != null && name.length > 0) 
+					{
+						document.body.style.backgroundImage = 'none';
+						var img = document.createElement('img');
+						img.style.cssText = 'max-width:100%;';
+						img.setAttribute('src', baseUrl + '/download/attachments/' + id + '/'
+								+ encodeURIComponent(name) + ".png?api=v2"
+								+ (revision != null ? "&version=" + revision : ""));
+						
+						if (zoom != 1)
+						{
+							img.style.width = Math.round(diagramWidth * zoom) + 'px';
+						}
+						
+						document.body.appendChild(img);
+					}
+					else
+					{
+						showError('Error: Invalid descriptor');
+					}
+				};
+	
+				var myPageId = (owningPageId != null && owningPageId.length > 0) ? owningPageId : ceoId;
+				showDiagram(candidateId, (owningPageId != null && owningPageId.length > 0) ? owningPageId : ceoId, diagramName, revision, null, links);
+		    });
+		});
+	};
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	var validSize = document.documentElement.offsetWidth > 0;
+
+	function mainBarrier()
+	{
+		if (validSize && bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+
+	// Disables delayed rendering since the container is created on the fly
+	GraphViewer.prototype.checkVisibleState = false;
+	
+	// Workaround for collapsed panel is to delay main until size is not 0
+	if (!validSize)
+	{
+		var listener = function()
+		{
+			if (document.documentElement.offsetWidth > 0)
+			{
+				window.removeEventListener('resize', listener);
+				validSize = true;
+				mainBarrier();
+			}
+		};
+		
+		window.addEventListener('resize', listener);
+	}
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		// Workaround for Google Chrome triggering
+		// no resize event if height is set to 0
+		if (mxClient.IS_GC && !validSize)
+		{
+			AP.resize('100%', 1);
+		}
+		
+		scriptLoaded = true;
+		mainBarrier();
+	};
+
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'sizeToParent:true;');
+	document.getElementsByTagName('head')[0].appendChild(script);
+})();
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdrive_common/editor.js b/src/main/webapp/connect/gdrive_common/editor.js
new file mode 100644
index 000000000..fc2cf5590
--- /dev/null
+++ b/src/main/webapp/connect/gdrive_common/editor.js
@@ -0,0 +1,477 @@
+function GDriveEditor(onSubmit, getFileInfoFn, idSuffix, notStandalone, drawioOnly)
+{
+	idSuffix = idSuffix || '';
+	var noThumbImg = '/images/google-drive-logo.svg';
+	var connectUrl = GAC.getBaseUrl() + '/atlassian-connect';
+	
+	var opts =
+	{
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	var spinner = new Spinner(opts);
+	window.spinner = spinner; //TODO Remove this, it is used in the GAC
+	this.spinner = spinner;
+	spinner.spin(GAC.$('#spinner-container' + idSuffix));
+
+	var head = document.getElementsByTagName('head')[0];
+	
+	// Handles timeouts
+	var acceptResponse = true;
+	
+	var timeoutHandler = function()
+	{
+		acceptResponse = false;
+		spinner.stop();
+		alert('The connection has timed out');
+	};
+	
+	var timeoutThread = window.setTimeout(timeoutHandler, 25000);
+	
+	var selectedFile = null, selFileContent = null;
+	var curViewer = null;
+	var status = document.getElementById('status');
+		
+	function debug(msg)
+	{
+		if (status != null)
+		{
+			mxUtils.write(status, msg);
+			mxUtils.br(status);
+		}
+	};
+
+	function showError(elem, errMsg)
+	{
+		elem.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+			errMsg;
+	};
+	
+	function setPreview(file)
+	{
+		AP.dialog.getButton('submit').enable();
+		var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+		
+		if (altSubmitBtn) altSubmitBtn.enable();
+		
+		var thumbImg = GAC.$('#thumbImg' + idSuffix);
+
+		thumbImg.onerror = function()
+		{
+			this.onerror = null;
+			this.src = noThumbImg;
+		};
+		
+		thumbImg.src = file.thumbnailLink; 
+		
+		var prevDiv = GAC.$('#preview' + idSuffix);
+		prevDiv.innerHTML = '';
+		var iframe = document.createElement('iframe');
+		iframe.src = file.embedLink;
+		iframe.setAttribute('frameborder', '0');
+		iframe.width = '100%';
+		iframe.height = '100%';
+		prevDiv.appendChild(iframe);
+		
+		var autoSizeCheck = GAC.$('#autoSize' + idSuffix);
+		autoSizeCheck.checked = false;
+		autoSizeCheck.setAttribute('disabled', 'disabled');
+		autoSizeChanged(false);
+		curViewer = null;
+	};
+	
+	function prevDrawioFile(doc, prevDiv, file, aspect)
+	{
+		spinner.stop();
+		
+		var thumbImg = GAC.$('#thumbImg' + idSuffix);
+		
+		thumbImg.onerror = function()
+		{
+			this.onerror = null;
+			this.src = noThumbImg;
+		};
+		
+		thumbImg.src = file.thumbnailLink; 
+
+		var container = document.createElement('div');
+		// NOTE: Height must be specified with default value "auto" to force automatic fit in viewer
+		container.style.cssText = 'position:absolute;width:100%;height:auto;bottom:0px;top:0px;border:1px solid transparent;';
+		prevDiv.appendChild(container);
+
+		var pageId, layerIds;
+		
+		if (aspect != null)
+		{
+			var aspectArray = aspect.split(' ');
+			
+			if (aspectArray.length > 1)
+			{
+				pageId = aspectArray[0];
+				layerIds = aspectArray.slice(1);
+			}
+		}
+		
+		var viewer = new GraphViewer(container, doc.documentElement,
+				{highlight: '#3572b0', border: 8, 'auto-fit': true,
+				resize: false, nav: true, lightbox: false, title: file.title,
+				'toolbar-nohide': true, 'toolbar-position': 'top', toolbar: 'pages layers',
+				pageId: pageId, layerIds: layerIds});
+
+		curViewer = viewer;
+		
+		AP.dialog.getButton('submit').enable();
+		var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+		
+		if (altSubmitBtn) altSubmitBtn.enable();
+	};
+	
+	// Waits for both APIs to load in parallel
+	function main()
+	{
+		if (notStandalone || (typeof window.AP !== 'undefined' && typeof window.google != 'undefined'))
+		{
+			try
+			{
+				window.clearTimeout(timeoutThread);
+				
+				//Google Drive Auth before proceeding
+				GAC.confirmGDAuth(mainAuth, function()
+				{
+					alert('Error authenticating to Google Drive!'); //TODO better error handling
+				});
+	
+				if (status != null)
+				{
+					status.style.display = 'none';
+				}
+			}
+			catch (e)
+			{
+				debug('Error in main: ' + e.message);
+			}
+		}
+	};
+	
+	function genericOnSubmit() 
+	{
+		var hasError = false;
+		//this cannot happen as the submit button is disabled until a file is selected
+		if (selectedFile == null)
+		{
+			GAC.$('#filenameError' + idSuffix).innerHTML = "Please select a file";
+			hasError = true;
+		}
+		
+		var width = parseInt(GAC.$('#width' + idSuffix).value);
+		var height = parseInt(GAC.$('#height' + idSuffix).value);
+		var autoSize = GAC.$('#autoSize' + idSuffix).checked;
+		
+		if (!autoSize && (isNaN(width) || width <= 0))
+		{
+			GAC.$('#widthError' + idSuffix).innerHTML = "Width must be greater than zero";
+			hasError = true;
+		}
+		
+		if (!autoSize && (isNaN(height) || height <= 0))
+		{
+			GAC.$('#heightError' + idSuffix).innerHTML = "Height must be greater than zero";
+			hasError = true;
+		}
+		
+		if (hasError)
+		{
+			return;
+		}
+		
+		if (curViewer != null)
+		{
+			var layerIds = [];
+			
+			var model = curViewer.graph.getModel();
+			var childCount = model.getChildCount(model.root);
+				
+			// Get visible layers
+			for (var i = 0; i < childCount; i++)
+			{
+				var layer = model.getChildAt(model.root, i);
+				
+				if (model.isVisible(layer))
+				{
+					layerIds.push(layer.id);
+				}
+			}
+				
+			selectedFile.aspect = curViewer.diagrams[curViewer.currentPage].getAttribute('id') + ' ' + layerIds.join(' ');
+		}
+		
+		spinner.spin(GAC.$('#preview' + idSuffix));
+		
+		onSubmit(selectedFile, width, height, autoSize, selFileContent);
+	}
+	
+	this.doSubmit = genericOnSubmit;
+
+	function mainAuth()
+	{	
+		if (acceptResponse)
+		{
+			spinner.stop();
+			
+			var chooseLink = document.getElementById('chooseLink');
+			
+			if (chooseLink != null)
+			{
+				chooseLink.style.display = '';
+			}
+			
+			GAC.$('#filePicker' + idSuffix).removeAttribute('disabled');
+			
+			GAC.$('#filePicker' + idSuffix).addEventListener('click', function(evt) 
+			{
+				GAC.pickFile(function(file)
+				{
+					function handleNonDrawFile() //If the file is not a draw.io diagram
+					{
+						if (drawioOnly)
+						{
+							selectedFile = null;
+							spinner.stop();
+							AC.$('#filenameError' + idSuffix).innerHTML = 'Not a draw.io diagram file';
+						}
+						else 
+						{
+							setPreview(file);
+						}
+
+						drawioCheck.checked = false;
+					};
+					
+					function setAutosize()
+					{
+						drawioCheck.checked = true;
+						drawioCheck.setAttribute('disabled', 'disabled');
+						var autoSizeCheck = GAC.$('#autoSize' + idSuffix);
+						autoSizeCheck.checked = true;
+						autoSizeCheck.removeAttribute('disabled');
+						autoSizeChanged(true);
+					};
+					
+					selectedFile = file;
+					GAC.$('#filenameError' + idSuffix).innerHTML = "";
+					GAC.$('#filename' + idSuffix).value = file.title;
+					var mimeType = file.mimeType;
+					var drawioCheck = GAC.$('#useDrawio' + idSuffix);
+					drawioCheck.removeAttribute('disabled');
+					var useDrawio = drawioOnly? false : drawioCheck.checked;
+					var prevDiv = GAC.$('#preview' + idSuffix);
+					prevDiv.innerHTML = '';
+					spinner.spin(prevDiv);
+					
+					if (!drawioOnly && typeof convertVSDXtoMX != 'undefined' &&  /\.v(dx|sdx?)$/i.test(file.title)) //In Google Drive, all vsdx files are previewed with draw.io
+					{
+						GAC.getBinaryFile(file, function(blobFile)
+						{
+							convertVSDXtoMX(blobFile, file.title, function(xml)
+							{
+								selectedFile.isDrawio = true;
+								selFileContent = xml;
+								prevDrawioFile(mxUtils.parseXml(xml), prevDiv, file);
+								setAutosize();
+							}, handleNonDrawFile);
+						}, handleNonDrawFile);
+					}
+					//Handle draw.io potential files (html & xml)
+					else if (useDrawio || mimeType == 'text/html' || mimeType == 'text/xml' || mimeType == 'application/xml'
+							|| mimeType == 'image/png' || mimeType == 'application/vnd.jgraph.mxfile' 
+							|| /\.svg$/i.test(file.title) || /\.html$/i.test(file.title) || /\.xml$/i.test(file.title) 
+							|| /\.png$/i.test(file.title) || /\.drawio$/i.test(file.title))
+					{
+						GAC.checkDrawioFile(file, function(doc, cnt)
+						{
+							selFileContent = cnt;
+							prevDrawioFile(doc, prevDiv, file);
+							setAutosize();
+						}, handleNonDrawFile);
+					}
+					else
+					{
+						handleNonDrawFile();
+					}
+				}, true); //Allow folder selection. If it's not needed in Jira use !notStandalone
+				
+				evt.preventDefault();
+			});
+			
+			function removeErrMsg() 
+			{
+				GAC.$('#' + this.id + 'Error' + idSuffix).innerHTML = "";
+			};
+			
+			GAC.$('#width' + idSuffix).addEventListener('change', removeErrMsg);
+			GAC.$('#height' + idSuffix).addEventListener('change', removeErrMsg);
+			
+			if (getFileInfoFn)
+			{
+				getFileInfoFn(function(fileInfo)
+				{
+					var altSubmitBtn = AP.dialog.createButton({
+						  text: fileInfo? 'Save' : 'Insert',
+						  identifier: 'altSubmitBtn'
+					});
+					altSubmitBtn.bind(genericOnSubmit);
+					altSubmitBtn.disable();
+
+					if (fileInfo && fileInfo.fileId)
+					{
+						var autoSize = fileInfo.autoSize == '1';
+						GAC.$('#width' + idSuffix).value = fileInfo.width;
+						GAC.$('#height' + idSuffix).value = fileInfo.height;
+						GAC.$('#filename' + idSuffix).value = fileInfo.filename;
+						fileInfo.isDrawio = fileInfo.isDrawio == '1';
+						GAC.$('#useDrawio' + idSuffix).checked = fileInfo.isDrawio;
+						GAC.$('#autoSize' + idSuffix).checked = autoSize;
+						autoSizeChanged(autoSize);
+
+						var prevDiv = GAC.$('#preview' + idSuffix);
+						prevDiv.innerHTML = '';
+						spinner.spin(prevDiv);
+						
+						GAC.getFileInfo(fileInfo.fileId, function(file)
+						{
+							function filePrevErr(err)
+							{
+								showError(prevDiv, 'Cannot load file preview.');
+							};
+							
+							selectedFile = file;
+							
+							if (typeof convertVSDXtoMX != 'undefined' &&  /\.v(dx|sdx?)$/i.test(fileInfo.filename)) //In Google Drive, all vsdx files are previewed with draw.io
+							{
+								GAC.getBinaryFile(file, function(blobFile)
+								{
+									convertVSDXtoMX(blobFile, fileInfo.filename, function(xml)
+									{
+										selFileContent = xml;
+										prevDrawioFile(mxUtils.parseXml(xml), prevDiv, file, fileInfo.aspect);
+									}, filePrevErr);
+								}, filePrevErr);
+							}
+							else if (fileInfo.isDrawio)
+							{
+								GAC.getDrawioFileDoc(file, function(doc, cnt)
+								{
+									selFileContent = cnt;
+									prevDrawioFile(doc, prevDiv, file, fileInfo.aspect);
+								}, filePrevErr);
+							}
+							else
+							{
+								setPreview(file);
+							}
+						},
+						function(err)
+						{
+							if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+							{
+								showError(prevDiv, 'Error: Access Denied. You do not have permission to access this file "'+ fileInfo.filename +'".');
+							}
+							else 
+							{
+								showError(prevDiv, 'Cannot load file preview.');
+							}
+						});
+					}
+				});
+			}
+		}
+	};
+	
+	function autoSizeChanged(isChecked)
+	{
+		if(isChecked) 
+		{
+			GAC.$('#width' + idSuffix).setAttribute('disabled', 'disabled');
+			GAC.$('#height' + idSuffix).setAttribute('disabled', 'disabled');
+		}
+		else 
+		{
+			GAC.$('#width' + idSuffix).removeAttribute('disabled');
+			GAC.$('#height' + idSuffix).removeAttribute('disabled');
+		}	
+	};
+	
+	GAC.$('#autoSize' + idSuffix).addEventListener('change', function(evt) 
+	{
+		autoSizeChanged(this.checked);
+	});
+	
+	var signOut = GAC.$('#signout' + idSuffix);
+	
+	if (signOut)
+	{
+		signOut.addEventListener('click', function(evt) 
+		{
+			evt.preventDefault();
+			GAC.setPersistentAuth(null);
+			main(); //To show auth button again
+		});
+	}
+	
+	function loadAtlassianApi() 
+	{
+		var script = document.createElement("script");
+
+		script.onload = function() 
+		{
+			AP.dialog.disableCloseOnSubmit();
+			
+			//TODO when conf bug of submit is fixed, re-enable this and remove the button above 
+			if (getFileInfoFn)
+			{
+				AP.dialog.getButton('submit').hide();
+			}
+			
+			AP.events.on('dialog.submit', genericOnSubmit);
+			AP.dialog.getButton('submit').disable();
+			debug('Atlassian API loaded...');
+			main();
+		};
+		
+		script.src = 'https://connect-cdn.atl-paas.net/all.js';
+		script.setAttribute('data-options', 'resize:false;margin:false');
+		head.appendChild(script);
+	};
+	
+	function loadGoogleApi() 
+	{
+		window.onGApiLoad = function()
+		{
+			debug('Google API loaded...');
+			gapi.load('picker', main);
+		};
+		var script = document.createElement("script");
+		script.src = "https://apis.google.com/js/api.js?onload=onGApiLoad";
+		head.appendChild(script);
+	};
+	
+	// Loads APIs in parallel and waits in main
+	if (!notStandalone)
+	{
+		loadAtlassianApi();
+	}
+	
+	loadGoogleApi();
+};
+
diff --git a/src/main/webapp/connect/gdrive_common/gac.js b/src/main/webapp/connect/gdrive_common/gac.js
new file mode 100644
index 000000000..cc72f2b8f
--- /dev/null
+++ b/src/main/webapp/connect/gdrive_common/gac.js
@@ -0,0 +1,489 @@
+//TODO Some functions are the same as OneDrive AC except for minor changes [sometimes only the URLs and constants are different] 
+//		(note also that google doesn't return the refresh token with every request + in office add-in we save the local storage differently)
+var GAC = {};
+
+GAC.clientId = '850530949725.apps.googleusercontent.com';
+GAC.redirectUri = 'https://' + window.location.hostname + '/google';
+GAC.scopes = ['https://www.googleapis.com/auth/drive.readonly',
+	'https://www.googleapis.com/auth/userinfo.profile']; 
+GAC.isLocalStorage = typeof(Storage) != 'undefined';
+GAC.authLSKeyName = 'oDrawGDrive'; //Should be the same name as in draw.io
+GAC.GDriveBaseUrl = 'https://www.googleapis.com/drive/v2';
+GAC.reqQueue = [];
+GAC.authOnProgress = false;
+
+if (typeof CAC === 'undefined') 
+{
+	throw 'CAC object not found, please include file new_common/cac.js';
+}
+else
+{
+	CAC.applyCAC(GAC);
+}
+
+GAC.authGDrive = function(success, error)
+{
+	GAC.reqQueue.push({success: success, error: error});
+	
+	if (GAC.authOnProgress)
+	{
+		return;
+	}
+	
+	GAC.authOnProgress = true;
+	
+	if (window.onGoogleDriveCallback == null)
+	{
+		var auth = function()
+		{
+			var acceptAuthResponse = true;
+			
+			var url = 'https://accounts.google.com/o/oauth2/v2/auth?client_id=' + GAC.clientId +
+				'&redirect_uri=' + encodeURIComponent(GAC.redirectUri) + 
+				'&response_type=code&access_type=offline&prompt=consent%20select_account&include_granted_scopes=true' +
+				'&scope=' + encodeURIComponent(GAC.scopes.join(' ')) +
+				'&state=' + encodeURIComponent('cId=' + GAC.clientId + '&domain=' + window.location.hostname); //To identify which app/domain is used
+
+			var width = 525,
+				height = 525,
+				screenX = window.screenX,
+				screenY = window.screenY,
+				outerWidth = window.outerWidth,
+				outerHeight = window.outerHeight;
+			
+			var left = screenX + Math.max(outerWidth - width, 0) / 2;
+			var top = screenY + Math.max(outerHeight - height, 0) / 2;
+			
+			var features = ['width=' + width, 'height=' + height,
+			                'top=' + top, 'left=' + left,
+			                'status=no', 'resizable=yes',
+			                'toolbar=no', 'menubar=no',
+			                'scrollbars=yes'];
+			var popup = window.open(url, 'gdauth', features.join(','));
+			
+			if (popup != null)
+			{
+				window.onGoogleDriveCallback = function(authInfo)
+				{
+					try
+					{
+						if (acceptAuthResponse)
+						{
+							window.onGoogleDriveCallback = null;
+							acceptAuthResponse = false;
+							
+							try
+							{
+								if (authInfo == null)
+								{
+									error({message: 'Access Denied', retry: auth});
+								}
+								else
+								{
+									GAC.token = authInfo.access_token;
+									authInfo.expires = Date.now() + parseInt(authInfo.expires_in) * 1000;
+									authInfo.remember = true;
+									authInfo.token = authInfo.access_token;
+									authInfo.refreshToken = authInfo.refresh_token;
+									GAC.setPersistentAuth(authInfo);
+									
+									for (var i = 0; i < GAC.reqQueue.length; i++)
+									{
+										GAC.reqQueue[i].success();
+									}
+									
+									GAC.reqQueue = [];
+									GAC.authOnProgress = false;
+								}
+							}
+							catch (e)
+							{
+								error(e);
+							}
+							finally
+							{
+								popup.close();
+							}
+						}
+						else
+						{
+							popup.close();
+						}
+					}
+					finally
+					{
+						authDialog.parentNode.removeChild(authDialog);
+					}
+				};
+			
+				popup.focus();
+			}
+			else
+			{
+				alert('Error: Google Authentication window blocked');
+			}
+		};
+		
+		if (window.spinner != null)
+		{
+			spinner.stop();
+		}
+		
+		var authDialog = document.createElement('div');
+		var btn = document.createElement('button');
+		btn.innerHTML = 'Authorize draw.io to access Google Drive';
+		btn.className = 'aui-button aui-button-primary';
+		authDialog.appendChild(btn);
+		
+		function adjustAuthBtn()
+		{
+			var w = window.innerWidth, h = window.innerHeight;
+			authDialog.style.cssText = 'position: absolute; top: 0px; left: 0px; width: '+ w +'px; height: '+ h +'px; background: #fff;opacity: 0.85;z-index: 999;';
+			btn.style.cssText = 'position: absolute; width: 320px; height: 50px; top: '+ (h/2 - 25) +'px; left: '+ (w/2 - 160) +'px;opacity: 1;';
+		}
+
+		btn.addEventListener('click', function(evt) 
+		{
+			auth();
+			//Remove the event handler since the user already used the button
+			window.removeEventListener("resize", adjustAuthBtn);
+		});
+		
+		window.addEventListener('resize', adjustAuthBtn);
+		adjustAuthBtn();
+		document.body.appendChild(authDialog);
+	}
+	else
+	{
+		error({message: 'Busy'});
+	}
+};
+
+//JSON request with auth
+GAC.doAuthRequest = function(url, method, params, success, error)
+{
+	GAC.doAuthRequestPlain(GAC.GDriveBaseUrl + url, method, params, function(req)
+	{
+		success(JSON.parse(req.responseText));
+	}, error);
+};
+
+//JSON request with auth
+GAC.doAuthRequestPlain = function(url, method, params, success, error, contentType, isBinary, retryCount, isBlob)
+{
+	retryCount = retryCount || 0;
+	
+	if (retryCount > 4)
+	{
+		//Since we tried multiple times, the token itself maybe corrupted
+		GAC.setPersistentAuth(null);
+		error();
+		return;
+	}
+	
+	if (GAC.token == null)
+	{
+		var token = GAC.getPersistentToken();
+		
+		if (token == null)
+		{
+			GAC.authGDrive(function()
+			{
+				//Retry request after authentication
+				GAC.doAuthRequestPlain(url, method, params, success, error, contentType, isBinary, ++retryCount, isBlob);
+			}, error);
+			
+			return;
+		}
+		else
+		{
+			GAC.token = token;
+		}
+	}
+	
+	var req = new XMLHttpRequest();
+	req.open(method, url);
+	req.setRequestHeader('Authorization', 'Bearer ' + GAC.token);
+	req.setRequestHeader('Content-Type', contentType || 'application/json;charset=UTF-8');
+	
+	req.onreadystatechange = function()
+	{
+		if (this.readyState == 4)
+		{
+			if (this.status >= 200 && this.status <= 299)
+			{
+				success(req);
+			}
+			else if (this.status == 401) // (Unauthorized) [e.g, invalid token]
+			{
+				//Try refresh token before asking for new authentication
+				var authInfo = GAC.getPersistentAuth();
+				
+				if (authInfo != null && authInfo.refreshToken != null)
+				{
+					var req2 = new XMLHttpRequest();
+					req2.open('GET', GAC.redirectUri + '?refresh_token=' + authInfo.refreshToken +
+							'&state=' + encodeURIComponent('cId=' + GAC.clientId + '&domain=' + window.location.hostname)); //To identify which app/domain is used
+					
+					req2.onreadystatechange = function()
+					{
+						if (this.readyState == 4)
+						{
+							if (this.status >= 200 && this.status <= 299)
+							{
+								var newAuthInfo = JSON.parse(req2.responseText);
+								GAC.token = newAuthInfo.access_token;
+								//Update existing authInfo and save it
+								authInfo.access_token = newAuthInfo.access_token;
+								authInfo.refresh_token = newAuthInfo.refresh_token;
+								authInfo.expires = Date.now() + newAuthInfo.expires_in * 1000;
+								authInfo.token = authInfo.access_token;
+								authInfo.refreshToken = authInfo.refresh_token;
+								GAC.setPersistentAuth(authInfo);
+								//Retry request with refreshed token
+								GAC.doAuthRequestPlain(url, method, params, success, error, contentType, isBinary, ++retryCount, isBlob);
+							}
+							else // (Unauthorized) [e.g, invalid refresh token] (sometimes, the server returns errors other than 401 (e.g. 500))
+							{
+								GAC.authGDrive(function()
+								{
+									//Retry request after authentication
+									GAC.doAuthRequestPlain(url, method, params, success, error, contentType, isBinary, ++retryCount, isBlob);
+								}, error);
+							}
+						}
+					}
+					
+					req2.send();
+				}
+				else
+				{
+					GAC.authGDrive(function()
+					{
+						//Retry request after authentication
+						GAC.doAuthRequestPlain(url, method, params, success, error, contentType, isBinary, ++retryCount, isBlob);
+					}, error);
+				}
+			}
+			else
+			{
+				error(this);
+			}
+		}
+	};
+	
+	if (isBinary && req.overrideMimeType)
+	{
+		req.overrideMimeType('text/plain; charset=x-user-defined');
+	}
+	
+	if (isBlob)
+	{
+		req.responseType = 'blob';
+	}
+	
+	req.send(params != null? JSON.stringify(params) : null);
+};
+
+GAC.showError = function(err)
+{
+	alert('Error: ' + e.message);
+};
+
+GAC.getFileInfo = function(id, success, error)
+{
+	GAC.doAuthRequest('/files/' + id +
+	        '?fields=id,title,mimeType,modifiedDate,downloadUrl,thumbnailLink,webViewLink,embedLink,fileSize,lastModifyingUser,owners' +
+	        '&supportsAllDrives=true',
+			 'GET', null, function(obj)
+			 {
+				success(obj);
+			 }, error);
+};
+
+GAC.setOrigin = function(origin)
+{
+	GAC.origin = origin;
+};
+
+GAC.getOrigin = function()
+{
+	return GAC.origin || GAC.getUrlParam('xdm_e', true) || ('https://' + window.location.host);
+};
+
+GAC.pickFile = function(fn, acceptFolders)
+{
+	acceptFolders = acceptFolders || false;
+	
+	var view1 = new google.picker.DocsView(google.picker.ViewId.FOLDERS)
+	    .setParent('root')
+	    .setIncludeFolders(true)
+	    .setSelectFolderEnabled(acceptFolders)
+	    .setMimeTypes('*/*');
+	
+	var view2 = new google.picker.DocsView()
+		.setIncludeFolders(true)
+		.setSelectFolderEnabled(acceptFolders)
+	
+	var view3 = new google.picker.DocsView()
+		.setEnableDrives(true)
+		.setIncludeFolders(true)
+		.setSelectFolderEnabled(acceptFolders)
+	
+	var dim = GAC.getDocDim();
+	
+	var builder = new google.picker.PickerBuilder()
+		.addView(view1)
+		.addView(view2)
+		.addView(view3)
+		.setOAuthToken(GAC.token)
+		.enableFeature(google.picker.Feature.SUPPORT_DRIVES)
+		.setCallback(function(data)
+		{
+			  if (data[google.picker.Response.ACTION] == google.picker.Action.PICKED)
+		      {
+				    var doc = data[google.picker.Response.DOCUMENTS][0];
+				    
+				    GAC.getFileInfo(doc.id, function(fullDoc)
+				    {
+				    	fn(fullDoc);
+				    }, function()
+				    {
+				    	fn(doc);
+				    });
+		      }
+		})
+		.setOrigin(GAC.getOrigin())
+		.setSize(dim.w - 10, dim.h - 10);
+				
+	picker = builder.build();		
+	picker.setVisible(true);
+};
+
+GAC.confirmGDAuth = function(success, error)
+{
+	GAC.doAuthRequestPlain('https://www.googleapis.com/oauth2/v2/userinfo',
+			 'GET', null, success, error);
+};
+
+//This function depends on having GraphViewer loaded
+GAC.extractGraphModelFromPng = function(pngData)
+{
+	return Editor.extractGraphModelFromPng(pngData);
+};
+
+GAC.getBinaryFile = function(file, success, error)
+{
+	if (file['downloadUrl'] == null)
+	{
+		GAC.getFileInfo(file.id, function(completeFile)
+		{
+			GAC.getBinaryFile(completeFile, success, error);
+		}, error);
+		
+		return;
+	}
+	
+	GAC.doAuthRequestPlain(file['downloadUrl'], 'GET', null, function(req)
+	{
+		success(req.response);
+	}, error, null, null, null, true);
+};
+
+//This function depends on having GraphViewer loaded
+GAC.getDrawioFileDoc = function(file, success, error, doCheck)
+{
+	if (file['downloadUrl'] == null)
+	{
+		GAC.getFileInfo(file.id, function(completeFile)
+		{
+			GAC.getDrawioFileDoc(completeFile, success, error, doCheck);
+		}, error);
+		
+		return;
+	}
+	
+	var isPng = file.mimeType == 'image/png';
+	
+	GAC.doAuthRequestPlain(file['downloadUrl'], 'GET', null, function(req)
+	{
+		try 
+		{
+			var cnt = req.responseText;
+			
+			if (isPng)
+			{
+				cnt = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (cnt);
+				cnt = GAC.extractGraphModelFromPng(cnt);
+			}
+			
+			var doc = mxUtils.parseXml(cnt);
+
+			if (!doCheck || new Editor().extractGraphModel(doc.documentElement) != null)
+			{
+				file.isDrawio = true;
+				success(doc, cnt, true);
+				return;
+			}
+		}
+		catch(e) {} //on error and if the doc is null, the following line will call the error
+	
+		error();
+
+	}, error, null, isPng);
+};
+
+//This function depends on having GraphViewer loaded
+GAC.checkDrawioFile = function(file, success, error)
+{
+	GAC.getDrawioFileDoc(file, success, error, true);
+};
+
+GAC.setPersistentAuth = function(authInfo)
+{
+	if (GAC.isLocalStorage)
+	{
+		if (authInfo != null)
+		{
+			//Google Auth doesn't return the refresh_token with every request, so we need to copy it when auth info is saved
+			if (authInfo.refreshToken == null)
+			{
+				var curInfo = GAC.getPersistentAuth();
+				
+				if (curInfo != null) authInfo.refreshToken = curInfo.refreshToken;
+			}
+			
+			localStorage.setItem('.' + GAC.authLSKeyName, JSON.stringify(authInfo));
+		} 
+		else
+		{
+			GAC.token = null;
+			localStorage.removeItem('.' + GAC.authLSKeyName);
+		}
+	}
+};
+
+GAC.getPersistentToken = function()
+{
+	var authInfo = GAC.getPersistentAuth();
+	var token = null;
+	
+	if (authInfo != null)
+	{
+		token = authInfo.access_token;
+	}
+	
+	return token;
+};
+
+GAC.getPersistentAuth = function()
+{
+	var authInfo = null;
+	
+	if (GAC.isLocalStorage)
+	{
+		authInfo = JSON.parse(localStorage.getItem('.' + GAC.authLSKeyName));
+	}
+	
+	return authInfo;
+};
diff --git a/src/main/webapp/connect/gdriveconnector/ac.js b/src/main/webapp/connect/gdriveconnector/ac.js
new file mode 100644
index 000000000..ab77b9431
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/ac.js
@@ -0,0 +1,44 @@
+var AC = {};
+
+AC.getUrlParam = function(param, escape, url){
+    try{
+    	var url = url || window.location.search;
+        var regex = new RegExp(param + '=([^&]+)'),
+        data = regex.exec(url)[1];
+        // decode URI with plus sign fix.
+        return (escape) ? window.decodeURIComponent(data.replace(/\+/g, '%20')) : data;
+    } catch (e){
+        return undefined;
+    }
+};
+
+AC.getMetaTag = function(name) {
+	return document.getElementsByTagName('meta')[name].getAttribute('content');
+};
+
+AC.getMacroData = function(fn) {
+	AP.confluence.getMacroData(fn);
+}
+
+AC.getBaseUrl = function()
+{
+	var baseUrl = AC.getUrlParam('xdm_e', true) + AC.getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+AC.getSiteUrl = function()
+{
+	var siteUrl = AC.getUrlParam('xdm_e', true);
+	//Ensure siteUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	if (/^https:\/\/([^\.])+\.jira\.com$/.test(siteUrl) || /^https:\/\/([^\.])+\.atlassian\.net$/.test(siteUrl)) 
+	{
+		return siteUrl;
+	}
+	throw 'Invalid siteUrl!';
+};
diff --git a/src/main/webapp/connect/gdriveconnector/att-macroEditor.html b/src/main/webapp/connect/gdriveconnector/att-macroEditor.html
new file mode 100644
index 000000000..e00d5a2e8
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/att-macroEditor.html
@@ -0,0 +1,165 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Diagram Upload Editor</title>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../../js/spin/spin.min.js" type="text/javascript"></script>
+<script type="text/javascript">
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with Confluence user language
+var lang = AC.getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.9.12/css/aui.min.css" media="all">
+<style type="text/css">
+body {
+	font-family:Arial, sans-serif;
+	overflow:hidden;
+	height:100%;
+	width:100%;
+	margin:0;
+}
+</style>
+</head>
+<body style="height:100%;">
+<div style="height:100%;">
+	<div style="height:100%;width:350px;border-right:1px solid #cccccc;position:absolute;top:0px;display:inline-block;">
+		<form class="aui top-label" style="height:100%;top:0px;">
+			<div class="field-group" style="padding-left:15px;">
+				<label for="filename">File name</label> 
+				<input type="file" id="fileupload" style="display: none">
+				<input class="text macro-param-input" type="text" id="filename" name="filename" disabled placeholder="Choose a file...">
+				<button class="aui-button aui-button-primary ap-dialog-submit" id="filePicker">Choose</button>
+				<div id="spinner-container"></div>
+				<div class="description">Diagram file name</div>
+				<div class="error" id="filenameError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<label for="width">Width</label> <input class="text medium-field" id="width" value="800">
+				<div class="description">Width of the viewer (px)</div>
+				<div class="error" id="widthError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<label for="height">Height</label> <input class="text medium-field" id="height" value="600">
+				<div class="description">Height of the viewer (px)</div>
+				<div class="error" id="heightError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<input class="checkbox small-field" id="autoSize" type="checkbox" >
+				<label for="autoSize" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+			</div>
+			<div class="error" id="errorMsg">
+			</div>
+		</form>
+	</div>
+	<div id="preview" style="height:100%;left:351px;position:absolute;top:0px;right:0px;display:inline-block;text-align: center;">
+		<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+			onclick="document.getElementById('filename').click();">Choose a file...</a>
+	</div>
+</div>
+<script src="../att_common/att-editor.js" type="text/javascript"></script>
+<script type="text/javascript">
+  	AttViewerEditor(function(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, onError)
+	{
+  		AC.getPageInfo(function(pageId, draftPage)
+ 		{
+			if (selectedFile != null)
+			{
+				//AP.request doesn't support loading binary data, so we store binary data as Base64 strings (which is loaded using DataURL)
+				var attFile = new Blob([selFileContent], {type: selectedFile.type});
+				attFile.name = selectedFile.name;
+				
+				var reqData = {file: attFile, minorEdit: true};
+				var draft = draftPage ? '?status=draft' : '';
+				 
+				AP.request({
+					type: 'PUT',
+					data: reqData,
+					url:  '/rest/api/content/'+ pageId + '/child/attachment' + draft,
+					contentType: 'multipart/form-data',
+					success: function(resp)
+					{
+						resp = JSON.parse(resp).results[0];
+						
+						var macroParams = 
+						{
+							filename : selectedFile.name,
+							attId : resp.id,
+							attVer: resp.version.number,
+							width : width,
+							height : height,
+							isDrawio: isDrawio? '1' : '0',
+							aspect: aspect,
+							mimeType : selectedFile.type,
+							autoSize: autoSize? '1' : '0',
+							dummy: Date.now() //This allows adding the same file more than once
+						};
+		
+						AP.confluence.saveMacro(macroParams);
+						AP.confluence.closeMacroEditor();
+					},
+					error: onError
+				});
+			}
+			else if (editedFile != null)
+			{
+				editedFile.width = width;
+				editedFile.height = height;
+				editedFile.autoSize = autoSize? '1' : '0';
+				editedFile.aspect = aspect;
+				editedFile.dummy = Date.now(); //This allows adding the same file more than once
+
+				AP.confluence.saveMacro(editedFile);
+				AP.confluence.closeMacroEditor();
+			}	
+		});
+	}, function(callback, onError)
+	{
+		AC.getPageInfo(function(pageId, draftPage)
+	   	{
+			AP.confluence.getMacroData(function(fileInfo)
+			{
+				if (fileInfo && fileInfo.attId)
+				{
+					AP.request({
+						url: '/download/attachments/' + pageId + '/' + encodeURIComponent(fileInfo.filename) +
+								'?version=' + fileInfo.attVer,
+						success: function(resp)
+						{
+							callback(fileInfo, resp);
+						},
+						error : function()
+						{
+							onError(fileInfo);
+						}
+					});
+				}
+				else
+				{
+					callback();
+				}
+			});
+		});
+   	});
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdriveconnector/att-viewer.html b/src/main/webapp/connect/gdriveconnector/att-viewer.html
new file mode 100644
index 000000000..98fe7016e
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/att-viewer.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Diagram Upload Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-image:url(/connect/gdriveconnector/spinner.gif);
+	background-repeat:no-repeat;
+	background-position:center;
+}
+</style>
+<script type="text/javascript">
+IMAGE_PATH = '/images';
+</script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+</head>
+<body style='overflow : none'>
+<div id="status" style="display : none"><span>Unable to load the attachment file.</span></div>
+<script type="text/javascript" src="att-viewer.js"></script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdriveconnector/att-viewer.js b/src/main/webapp/connect/gdriveconnector/att-viewer.js
new file mode 100644
index 000000000..fe24d4d0a
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/att-viewer.js
@@ -0,0 +1,278 @@
+(function(){
+	var lightbox = AC.getUrlParam('lightbox') == '1';
+	
+	if (lightbox)
+	{
+		document.body.style.backgroundImage = 'url(/images/drawlogo-text-bottom.svg)';
+		document.body.style.backgroundPosition = 'center 30%';
+		document.body.style.backgroundSize = '128px';
+	}
+
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.onload = main;
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	head.appendChild(script);
+
+	var link = document.createElement('link');
+	link.type = 'text/css';
+	link.rel = 'stylesheet';
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	function showError(errMsg)
+	{
+		document.body.style.backgroundImage = 'none';
+		document.body.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+			errMsg;
+		AP.resize('100%', '20');
+	};
+	
+	function viewAttachment(attId, attVer, pageId, width, height, filename, mimeType, autoSize, isDrawio, aspect)
+	{
+		document.body.innerHTML = '';
+		document.body.style.backgroundImage = 'url(/connect/gdriveconnector/spinner.gif)';
+		document.body.style.backgroundSize = null;
+		
+		AP.request({
+			url: '/download/attachments/' + pageId + '/' + encodeURIComponent(filename) +
+					'?version=' + attVer,
+			success: function(resp)
+			{
+				if (isDrawio)
+				{
+					var isPng = mimeType == 'image/png';
+				
+					//TODO This code is shared with Google Drive viewer also, abstract it
+					try 
+					{
+						if (isPng)
+						{
+							resp = AC.extractGraphModelFromPng(resp);
+						}
+						
+						var viewerPageId, layerIds;
+						
+						if (aspect != null)
+						{
+							var aspectArray = aspect.split(' ');
+							
+							if (aspectArray.length > 1)
+							{
+								viewerPageId = aspectArray[0];
+								layerIds = aspectArray.slice(1);
+							}
+						}
+						
+						if (lightbox) 
+						{
+							AP.resize('100%', '100%');
+							
+							var config = {highlight: '#3572b0', nav: true, lightbox: false,
+									pageId: viewerPageId, layerIds: layerIds};
+							
+							var viewer = new GraphViewer(null, null, config);
+							viewer.lightboxChrome = false;
+							viewer.xml = resp;
+	
+							// Enables layers via flag to avoid toolbar
+							viewer.layersEnabled = true;
+							
+							var ui = viewer.showLocalLightbox();
+							// Destroy lightbox with ui instance
+							var destroy = ui.destroy;
+							ui.destroy = function()
+							{
+								AP.dialog.close();
+								destroy.apply(this, arguments);
+							};
+							
+							// Workaround for ignored header toolbar height for iframe
+							ui.editor.graph.container.style.bottom = '51px';
+						}
+						else 
+						{
+							var refreshImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAhFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8qm6wAAAAK3RSTlMABr4XDQoC07pc+/Yq5dzYtaiSjXlkMx4U8u/NwrKZf1gl8eDKb2lOR0Q6/VKNjQAAAKlJREFUGNOtjlcOwjAQBd1jOwnpvdNh738/kuA4iE/EfI1Gu9JD/4RTyr+bNxDHCS8FKp62CXWAlSYj0n6MNZziLOt90EC2OgXQ5osoF/aagr/GgsBeRUpSsUgeSikHbG4xFpssamCU0lIYZVuMDkFw9oxeTaUOgE74e0T1+Ki1wvOl8iHituojVDJJiAuNhwxlG9+Jhhm3sxGJiaFy7MMuvjFksavRD7wAhtIMKUShI2QAAAAASUVORK5CYII=';
+							
+							var btnDefs = {
+								'refresh': {title: 'Refresh',
+									image: refreshImg, handler: function()
+									{
+										viewAttachment(attId, attVer, pageId, width, height, filename, mimeType, autoSize, isDrawio, aspect);
+									}
+								}
+							};
+
+							var tbHeight = GraphViewer.prototype.toolbarHeight;
+							var doc = mxUtils.parseXml(resp);
+						
+							var container = document.createElement('div');
+		
+							container.style.cssText = 'position:absolute;max-width:100%;border:1px solid transparent;';
+							document.body.appendChild(container);
+							
+							var config = {highlight: '#3572b0', 'toolbar-position': 'top',
+								nav: true, border: 2, title: filename, lightbox: true,
+								toolbar: 'pages refresh zoom layers lightbox', 'toolbar-buttons': btnDefs,
+								pageId: viewerPageId, layerIds: layerIds};
+		
+							if (!autoSize)
+							{
+								config['auto-fit'] = true;
+								config.resize = false;
+							}
+							
+							var viewer = new GraphViewer(container, doc.documentElement, config);
+		
+							viewer.showLightbox = function()
+							{
+								//Create an aspect reflecting current view
+								var layerIds = [], viewerPageId = viewer.diagrams[viewer.currentPage].getAttribute('id');
+
+								var model = viewer.graph.getModel();
+								var childCount = model.getChildCount(model.root);
+									
+								// Get visible layers
+								for (var i = 0; i < childCount; i++)
+								{
+									var layer = model.getChildAt(model.root, i);
+									
+									if (model.isVisible(layer))
+									{
+										layerIds.push(layer.id);
+									}
+								}
+								
+								var curAspect = viewerPageId + ' ' + layerIds.join(' ');
+								
+								AP.dialog.create(
+				                {
+				                    header: filename,
+			                		key: 'DULightbox',
+				                    size: 'fullscreen',
+				                    customData: {attId: attId, pageId: pageId, filename: filename, attVer: attVer,
+				                    	width: width, height: height, mimeType: mimeType, aspect: curAspect},
+				                    chrome: true
+				                });
+							};
+							
+							// Handles resize of iframe after zoom
+							var graphDoResizeContainer = viewer.graph.doResizeContainer;
+							
+							if (!autoSize)
+							{
+								AP.resize(width, height);
+								viewer.graph.doResizeContainer(width, height);
+							}
+							else
+							{
+								function updateHeight(height)
+								{
+									AP.resize('100%', Math.ceil(height) + tbHeight + 4);
+								};
+								
+								viewer.graph.doResizeContainer = function(width, height)
+								{
+									graphDoResizeContainer.apply(this, arguments);
+									updateHeight(height);
+								};
+		
+								// Updates the size of the iframe in responsive cases
+								viewer.updateContainerHeight = function(container, height)
+								{
+									updateHeight(height);
+								};
+								
+								updateHeight(container.offsetHeight);
+							}
+						}
+						
+						document.body.style.backgroundImage = 'none';
+					}
+					catch(e)
+					{
+						console.log(e);
+						showError('Attachment file "' + filename + '" is corrupted');
+					}
+				}
+				else
+				{
+					var img = new Image();
+					
+					img.onload = function()
+					{
+						document.body.style.backgroundImage = 'none';
+						
+						if (!autoSize)
+						{
+							var s = Math.min(width / img.width, height / img.height);
+							
+							img.width = s * img.width;
+							img.height = s * img.height;
+							
+							img.style.verticalAlign = 'middle';
+							document.body.style.lineHeight = height + 'px';
+							document.body.style.textAlign = 'center';
+
+							AP.resize(width, height);
+						}
+						else
+						{
+							AP.resize(img.width, img.height);
+						}
+
+						document.body.appendChild(img);								
+					};
+					
+					img.onerror = function()
+					{
+						showError('Attachment file "' + filename + '" is corrupted');
+					};
+
+					img.src = resp;
+				}
+			}, 
+			error: function()
+			{
+				showError('Failed to load attachment file "' + filename + '"');
+			}
+		});
+	};
+
+	function main()
+	{
+		if (lightbox)
+		{
+			AP.dialog.getCustomData(function (customData) {
+				viewAttachment(customData.attId, customData.attVer, customData.pageId, customData.width, 
+						customData.height, customData.filename, customData.mimeType, null, true, customData.aspect);
+	    	});
+		}
+		else
+		{
+			var pageId = AC.getUrlParam('pageId');
+			var attId = AC.getUrlParam('attId');
+			var attVer = AC.getUrlParam('attVer');
+			var width = AC.getUrlParam('width');
+			var height = AC.getUrlParam('height');
+			var filename = AC.getUrlParam('filename', true);
+			var mimeType = AC.getUrlParam('mimeType', true) || '';
+			var isDrawio = AC.getUrlParam('isDrawio') == '1';
+			var aspect = AC.getUrlParam('aspect', true);
+			var autoSize = AC.getUrlParam('autoSize') == '1';
+		
+			if (attId == null || attVer == null)
+			{
+				showError('Error: Missing File ID');
+			}
+			else
+			{
+				viewAttachment(attId, attVer, pageId, width, 
+						height, filename, mimeType, autoSize, isDrawio, aspect);
+			}
+		}
+	}	
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/gdriveconnector/images/gdriveconnector.png b/src/main/webapp/connect/gdriveconnector/images/gdriveconnector.png
new file mode 100644
index 0000000000000000000000000000000000000000..aaa7c2700fb72b6f26a88b872684e2b5aad16bcf
GIT binary patch
literal 1801
zcmV+k2ln`hP)<h;3K|Lk000e1NJLTq0058x0058(0{{R3(3ld60003~P)t-s-)s!<
zhXpe;Gynhp=aEVG+r#mV5afa|`sv&Ezj^VykKk<!>3j#_bsFP<F8%iL-);`(h&nts
zFyntK{O;oW>)rR)z5o6D@sAbw;LGr~hVz~@{`c?s<kIxXrQmQ9>wX9N=hyt`(CnpZ
z<%Txmcpv`y_5Jkh^1hDkt#|+X`1#|}_}#|#)w%i6q3fe&>6K98d?(_1Bk+a={POAj
z@Z|g9!S&Iz^vtUBz>WCBg6ybo^|E8@pkei`Qs<3A<Z}t;cL@IX^7q=p_{xyta~1yg
z@cZoF`q;1Y$Dr`IiR+$Q@|Gj<z?bpAmF}{B_O@sCvtQ|&SM{h$^rb{qMKb*A*8Jtj
z`Q5_%-@N(RwDiQ2_q%YRgkSQRDe#8|&%UV0w43?PnexGz!mpV4&6oJhmBX%*_{NC!
zuvzq@KXF?>>5x5VQaS03HAFiw=ZGxn!(TZ700nVLL_t(|+U?tEQ`0~g!11R%X^WWH
z)I>{*v{ZUn<tlOs0xBY>_kG{@`Tbv+Zr6EA)ZJ_#VPE9`hG8Z%{bidao9qCHAMYRU
z)1u?|-yuTbd7nl-M|j<*Rj=TCpH_W^pM6?&ANus_cmhg5321K#NLB)pm4IX=AXy10
zwg{Bct4sn)KnZAX2}o7~lBFMLWpQzHZVvx$;xIrf6Q}UMO~efvyo%!H24e-?b5Yjm
z!FWJ4JaSQNpgH7SE4K{80AE=W#RIy^HBX7+1Cb~W&<e61IRF9>7sUYD?N0U<fDlyR
zqUb>r+#><GIWCGCG>DzbAOrR1NfasQB0GIc4gxN6hoS|YMz0bC0R0i28j2D$gq@r~
zAQD9gx`$qA2nHgNE+7&`23ld4P+$;=q5>@{g1{Q)B3(d#M7bedKqNX~Q0Dfhi6;;L
zxoVxa1t2D3T|7Wg=JV!R<cUQDl8VBEGH;kh(0IiU!gNn#4S`4<^ko*Movipk{sbaL
zQ04;$X{{m!$we7ZSwLSIFO5#+>)`7cb{ks{0!okU7qp11+|9fVJU@t6w1R+OWPhN$
z$XZ|nBL?9)E~*&+tknfEQE1TaHS{_=1rPv))j9|=IEahXL9~Eg1{rAf3U=zBmV=lm
zEGW}JuK|#PPVl?>Mq3UdkvixW`!G8I2x?6xa@$f6iPS+4(d#Az0YP@AD{_K>zzhX?
zfnJ4rFc3JiOf>5R0l`QZ&}}w#ARq`Fmx*Sw5)c=uf#?!C85jiZ4JK;Vf`GtO2R%ct
za&Qn#_cKv0F9MNB8FZCRdIb>Ft4wq)F9MNB6?8-y1lGCkjd)cAB2n}pu!>C7Fhn2{
zMGu1YF{JyS3<PFGAWTzZ-TPW$N(3TNL?C}$BnN>R8wd+`L?9By2Eu+Jh(x-9z&s$3
zXu&$E0s>PNq+V7D1g35vFm(fgsT&AP-9TXK1_Dzz5SY4wU_>{Nts4k*10B^3q}^Ah
z-3URfph?|E=mvU~_76I9P$2dQX@Dp@PLPG2Ea-F+snNq4p%QuxgCDd6hXk^6=yk&n
zVje0+PzgIZ1R_uDBSd?zW!MX9!C`>NgN_fhd|0z=vg;{>4^&tUF+vyi3$i9%WDQ$>
z5H_7yL5;PwHTLI_JOpZ$*;ZtXAc{N$S^~R>UU}#(Mo`*<9uT{n+h-AR>u^RWZ9s41
zJM71GL~PozgL3Jz1AB9N4l)!#?8W)h@SqLDF!CVi1R`Ds$_}#EF%ceg4n*-K(wM>s
zu?^QJ5T+V>6+zM{B32bZL&(oSy}SfOt6En9w2NL3AWU}xoy$^3tpLifSMn7I(E!_A
z2T9v>gCmeAwnsPxAu96KskkyC-c$j-5Bu0rDWF#tB)N#VqXJqHOkU~q!5NTbpjS-=
zlwl{j3aZ&|piAf^?IRIL++4UJT0(vz@|ifP23p~dPHNS1e5oUBx`~Lc?OVdiddz12
z4ycsPp?{@Q8L+^YRsH*1kIF$W3fO780zs<}G|)dlRuQYyuqTIks<s-4{v%*x8G>Zx
zIS1VyK)Z8SZ;k?Gk6z&iDT6Yb*sal@mQ`%xpJp7O+Ewf{+-mbdY`Juh$~DA#xrORA
zv(Vf6ICgXAw+9xA{FhTTPykWqOQ>4T|55f^^jFxLR(wB1qHpu4(oCrif3><$z~1Jw
z>aX-jbg8y*qJY6FF8^mnI@cS>n=KpSH)wJZfbC2fl2&U@-4@Nk$*r~Y{PyxO=_@^X
zmmr=}dWqNwDST@&lu{5~h8RleCQ2z4gD9n&D5aO^C=BW)T8FzS)l7)6U-0;)R-#S7
rBPoqUI|zsmZtdzII(ljS$0Nkw$_l`Pt)KA900000NkvXXu0mjfH{4h!

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/gdriveconnector/images/gdriveconnector.svg b/src/main/webapp/connect/gdriveconnector/images/gdriveconnector.svg
new file mode 100644
index 000000000..51413a716
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/images/gdriveconnector.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144.05 144"><defs><style>.cls-1{fill:#f08705;}.cls-2,.cls-3{fill:#333;}.cls-3{fill:#df6c0c;}.cls-4{fill:#fff;}.cls-5{fill:none;stroke:#fff;stroke-miterlimit:10;stroke-width:5px;}</style></defs><g><rect class="cls-1" width="144" height="144" rx="5"/><path class="cls-2" d="M144,22V5a4.959,4.959,0,0,0-4.952-5h-134A5.04,5.04,0,0,0,0,5V22H144Z"/><path class="cls-3" d="M34.39,65.824l1.535,60.384L54.133,144H136.9c5.053,0,7.152-1.156,7.152-6.7S144,88.1,144,88.1L113.879,57.941,88.4,35.353,67.55,36.667,56.573,41.375,51.216,53.583,39.539,58.409Z"/><path class="cls-5" d="M69.216,55.5,92.383,78v31.833s1.75,18-14.167,18H45.883S33.05,128.5,33.05,110.167V70.833S31.55,55.5,51.383,55.5Z"/><polyline class="cls-5" points="70.383 57.833 70.383 76.833 90.383 76.833"/><path class="cls-5" d="M52.05,55V50.833S50.55,35.5,70.383,35.5H87.216L111.383,59V89.833s1.583,18-14.167,18H93.8"/><polyline class="cls-5" points="88.383 37.833 88.383 57.833 110.383 57.833"/><path class="cls-4" d="M131.947,113.832a16.777,16.777,0,0,0-4.932-11.9L131.947,97H119.322v12.625l4.718-4.719a12.625,12.625,0,1,1-18.4,17.278l-3.157,2.784a16.834,16.834,0,0,0,29.459-11.135Z"/></g></svg>
diff --git a/src/main/webapp/connect/gdriveconnector/macroEditor.html b/src/main/webapp/connect/gdriveconnector/macroEditor.html
new file mode 100644
index 000000000..d1494c71b
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/macroEditor.html
@@ -0,0 +1,145 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>GDrive Connector Editor</title>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<script src="../../js/spin/spin.min.js" type="text/javascript"></script>
+<script type="text/javascript">
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with Confluence user language
+var lang = GAC.getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.9.12/css/aui.min.css" media="all">
+<style type="text/css">
+body {
+	font-family:Arial, sans-serif;
+	overflow:hidden;
+	height:100%;
+	width:100%;
+	margin:0;
+}
+.thumbnail {
+	box-sizing: border-box;
+	height: 100px;
+	width: 100px;
+	border: 1px solid #CCCCCC;
+	border-radius: 3px;
+	line-height: 94px;
+	text-align:center;
+}
+#thumbImg {
+	vertical-align:middle;
+	max-width: 96px;
+	max-height: 96px;
+}
+</style>
+</head>
+<body style="height:100%;">
+<div style="height:100%;">
+	<div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:0px;display:inline-block;">
+		<form class="aui top-label" style="height:100%;top:0px;">
+			<div class="field-group" style="padding-left:15px;">
+				<label for="filename">File name</label> 
+				<input class="text macro-param-input" type="text" id="filename" name="filename" disabled placeholder="Choose a file...">
+				<button class="aui-button aui-button-primary ap-dialog-submit" id="filePicker" disabled>Choose</button>
+				<div id="spinner-container"></div>
+				<div class="description">Google Drive file name</div>
+				<div class="error" id="filenameError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<label for="width">Width</label> <input class="text medium-field" id="width" value="800">
+				<div class="description">Width of the viewer (px)</div>
+				<div class="error" id="widthError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<label for="height">Height</label> <input class="text medium-field" id="height" value="600">
+				<div class="description">Height of the viewer (px)</div>
+				<div class="error" id="heightError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<input class="checkbox small-field" id="autoSize" type="checkbox" >
+				<label for="autoSize" style="display:inline-block;">Automatically set the size of the viewer</label>
+			</div>
+			<div id="thumbGroup" class="field-group" style="padding-left:15px;">
+				<label for="thumbImg">Thumbnail</label>
+				<div class="thumbnail">
+					<img class="thumbImg" id="thumbImg">
+				</div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<input type="checkbox" class="checkbox small-fiel" id="useDrawio">
+				<label for="useDrawio" style="display:inline-block;">Preview in draw.io</label>
+			</div>
+		</form>
+	</div>
+	<div id="preview" style="bottom:0px;left:351px;position:absolute;top:0px;right:0px;display:inline-block;">
+		<a id="chooseLink" style="text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer;display:none;"
+			onclick="document.getElementById('filePicker').click();">Choose a file...</a>
+		<span id="status" style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);">
+			Loading...</span>
+	</div>
+</div>
+<script src="../gdrive_common/editor.js" type="text/javascript"></script>
+<script type="text/javascript">
+	GAC.$('#thumbGroup').style.display = 'none';
+	
+	GDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+	{
+		var useDrawio = selectedFile.isDrawio || GAC.$('#useDrawio').checked;
+	
+		function saveMacro()
+		{
+			var macroParams = 
+			{
+				filename : selectedFile.title,
+				fileId : selectedFile.id,
+				width : width,
+				height : height,
+				isDrawio: useDrawio? '1' : '0',
+				aspect: selectedFile.aspect,
+				autoSize: autoSize? '1' : '0',
+				mimeType : selectedFile.mimeType,
+				macroVer: 2, //This version is used by viewer to detect the new macros
+				dummy: Date.now() //This allows adding the same file more than once
+			};
+		
+			AP.confluence.saveMacro(macroParams);
+			AP.confluence.closeMacroEditor();
+		};
+		
+		if (useDrawio && selFileContent != null)
+		{
+			var modifiedTS = new Date(selectedFile.modifiedDate).getTime();
+			GAC.uploadCachedMxFile(selFileContent, modifiedTS + '_' + selectedFile.title, saveMacro, saveMacro); //Save without caching
+		}
+		else
+		{
+			saveMacro();
+		}
+	}, function(cp)
+	{
+		AP.confluence.getMacroData(cp);
+	});
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdriveconnector/od-macroEditor.html b/src/main/webapp/connect/gdriveconnector/od-macroEditor.html
new file mode 100644
index 000000000..f6f133d99
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/od-macroEditor.html
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>OneDrive Connector Editor</title>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../../js/spin/spin.min.js" type="text/javascript"></script>
+<script type="text/javascript">
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with Confluence user language
+var lang = AC.getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.9.12/css/aui.min.css" media="all">
+<style type="text/css">
+body {
+	font-family:Arial, sans-serif;
+	overflow:hidden;
+	height:100%;
+	width:100%;
+	margin:0;
+}
+.thumbnail {
+	box-sizing: border-box;
+	height: 100px;
+	width: 100px;
+	border: 1px solid #CCCCCC;
+	border-radius: 3px;
+	line-height: 94px;
+	text-align:center;
+}
+#thumbImg {
+	vertical-align:middle;
+	max-width: 96px;
+	max-height: 96px;
+}
+</style>
+</head>
+<body style="height:100%;">
+<div style="height:100%;">
+	<div style="height:100%;width:350px;border-right:1px solid #cccccc;position:absolute;top:0px;display:inline-block;">
+		<form class="aui top-label" style="height:100%;top:0px;">
+			<div class="field-group" style="padding-left:15px;">
+				<label for="filename">File name</label> 
+				<input class="text macro-param-input" type="text" id="filename" name="filename" disabled placeholder="Choose a file...">
+				<button class="aui-button aui-button-primary ap-dialog-submit" id="filePicker" disabled>Choose</button>
+				<div id="spinner-container"></div>
+				<div class="description">OneDrive file name</div>
+				<div class="error" id="filenameError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<label for="width">Width</label> <input class="text medium-field" id="width" value="800">
+				<div class="description">Width of the viewer (px)</div>
+				<div class="error" id="widthError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<label for="height">Height</label> <input class="text medium-field" id="height" value="600">
+				<div class="description">Height of the viewer (px)</div>
+				<div class="error" id="heightError"></div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<input class="checkbox small-field" id="autoSize" type="checkbox" >
+				<label for="autoSize" style="display:inline-block;">Automatically set the size of the viewer</label>
+			</div>
+			<div id="thumbGroup" class="field-group" style="padding-left:15px;">
+				<label for="thumbImg">Thumbnail</label>
+				<div class="thumbnail">
+					<img id="thumbImg">
+				</div>
+			</div>
+			<div class="field-group" style="padding-left:15px;">
+				<input type="checkbox" class="checkbox small-fiel" id="useDrawio">
+				<label for="useDrawio" style="display:inline-block;">Preview in draw.io</label>
+			</div>
+		</form>
+	</div>
+	<div id="preview" style="height:100%;left:351px;position:absolute;top:0px;right:0px;display:inline-block;">
+		<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+			onclick="document.getElementById('filePicker').click();">Choose a file...</a>
+	</div>
+</div>
+<script src="../onedrive_common/editor.js" type="text/javascript"></script>
+<script type="text/javascript">
+	AC.$('#thumbGroup').style.display = 'none';
+	
+	OneDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+	{
+		var useDrawio = selectedFile.isDrawio || AC.$('#useDrawio').checked;
+		
+		function saveMacro()
+		{
+			var macroParams = 
+			{
+				filename : selectedFile.name,
+				fileId : selectedFile.id,
+				driveId: selectedFile.parentReference.driveId,
+				width : width,
+				height : height,
+				isDrawio: useDrawio,
+				aspect: selectedFile.aspect,
+				autoSize: autoSize? '1' : '0',
+				mimeType : selectedFile.file.mimeType,
+				embeddedUrl : selectedFile.embeddedUrl,
+				dummy: Date.now() //This allows adding the same file more than once
+			};
+
+			AP.confluence.saveMacro(macroParams);
+			AP.confluence.closeMacroEditor();
+		};
+		
+		if (useDrawio && selFileContent != null)
+		{
+			var modifiedTS = new Date(selectedFile.lastModifiedDateTime).getTime();
+			AC.uploadCachedMxFile(selFileContent, modifiedTS + '_' + selectedFile.name, saveMacro, saveMacro); //Save without caching
+		}
+		else
+		{
+			saveMacro();
+		}
+	}, function(cp)
+	{
+		AP.confluence.getMacroData(cp);
+	});
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdriveconnector/od-viewer.html b/src/main/webapp/connect/gdriveconnector/od-viewer.html
new file mode 100644
index 000000000..048c43cfe
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/od-viewer.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>OneDrive Connector Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-image:url(/connect/gdriveconnector/spinner.gif);
+	background-repeat:no-repeat;
+	background-position:center;
+}
+</style>
+<script type="text/javascript">
+IMAGE_PATH = '/images';
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+</head>
+<body style='overflow : none'>
+<div id="status" style="display : none"><span>Unable to load the OneDrive file.</span></div>
+<script type="text/javascript" src="od-viewer.js"></script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdriveconnector/od-viewer.js b/src/main/webapp/connect/gdriveconnector/od-viewer.js
new file mode 100644
index 000000000..be9626d88
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/od-viewer.js
@@ -0,0 +1,350 @@
+(function(){
+	var lightbox = AC.getUrlParam('lightbox') == '1';
+	
+	if (lightbox)
+	{
+		document.body.style.backgroundImage = 'url(/images/drawlogo-text-bottom.svg)';
+		document.body.style.backgroundPosition = 'center 30%';
+		document.body.style.backgroundSize = '128px';
+	}
+	
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+	
+	var script = document.createElement("script");
+	
+	script.onload = function()
+	{
+		AC.getPageInfo(function(pageId, draftPage)
+		{
+			confPageId = pageId;
+			isDraft = draftPage;
+
+			main();
+		});
+	};
+	
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	head.appendChild(script);
+	
+	var link = document.createElement("link");
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	var confPageId, isDraft;
+	
+	function showError(errMsg)
+	{
+		document.body.style.backgroundImage = 'none';
+		document.body.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+			errMsg;
+		AP.resize('100%', '20');
+	};
+	
+	function getFileInfoErr(err)
+	{
+		if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+		{
+			showError('Error: Access Denied. You do not have permission to access this file.');
+		}
+		else 
+		{
+			showError('Error: Cannot get file information.');
+		}
+	};
+	
+	function showDiagram(fileId, driveId, width, height, name, mimeType, autoSize, aspect)
+	{
+		document.body.innerHTML = '';
+		document.body.style.backgroundImage = 'url(/connect/gdriveconnector/spinner.gif)';
+		document.body.style.backgroundSize = null;
+
+		AC.getFileInfo(fileId, driveId, function(fileInfo)
+		{
+			var isPng = fileInfo.file.mimeType == 'image/png';
+			var isVsdx = /\.v(dx|sdx?)$/i.test(name);
+			
+			function cacheAndRender(fileContent, timestamp, filename)
+			{
+				timestamp = String(timestamp);
+				renderDiagram(fileContent);
+				
+				AC.uploadCachedMxFile(fileContent, timestamp + '_' + filename, AC.noop, AC.noop);
+				
+				//Delete old cached file
+				AC.delOldCachedFiles(confPageId, filename, timestamp);
+			};
+			
+			//TODO This code is shared with Google Drive viewer also, abstract it
+			function renderDiagram(resp)
+			{
+				try 
+				{
+					if (isPng)
+					{
+						resp = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (resp);
+						resp = AC.extractGraphModelFromPng(resp);
+					}
+					
+					var pageId, layerIds;
+					
+					if (aspect != null)
+					{
+						var aspectArray = aspect.split(' ');
+						
+						if (aspectArray.length > 1)
+						{
+							pageId = aspectArray[0];
+							layerIds = aspectArray.slice(1);
+						}
+					}
+					
+					if (lightbox) 
+					{
+						AP.resize('100%', '100%');
+						
+						var config = {highlight: '#3572b0', nav: true, lightbox: false,
+								pageId: pageId, layerIds: layerIds};
+						
+						EditorUi.prototype.lightboxToolbarActions = [{icon: Editor.editLargeImage, tooltip: mxResources.get('edit'), fn: function()
+						{
+							window.open('https://' + window.location.hostname + '/#W' + encodeURIComponent(driveId + '/' + fileId));
+						}}];
+						
+						var viewer = new GraphViewer(null, null, config);
+						viewer.lightboxChrome = false;
+						viewer.xml = resp;
+
+						// Enables layers via flag to avoid toolbar
+						viewer.layersEnabled = true;
+						
+						var ui = viewer.showLocalLightbox();
+						// Destroy lightbox with ui instance
+						var destroy = ui.destroy;
+						ui.destroy = function()
+						{
+							AP.dialog.close();
+							destroy.apply(this, arguments);
+						};
+						
+						// Workaround for ignored header toolbar height for iframe
+						ui.editor.graph.container.style.bottom = '51px';
+					}
+					else 
+					{
+						var refreshImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAhFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8qm6wAAAAK3RSTlMABr4XDQoC07pc+/Yq5dzYtaiSjXlkMx4U8u/NwrKZf1gl8eDKb2lOR0Q6/VKNjQAAAKlJREFUGNOtjlcOwjAQBd1jOwnpvdNh738/kuA4iE/EfI1Gu9JD/4RTyr+bNxDHCS8FKp62CXWAlSYj0n6MNZziLOt90EC2OgXQ5osoF/aagr/GgsBeRUpSsUgeSikHbG4xFpssamCU0lIYZVuMDkFw9oxeTaUOgE74e0T1+Ki1wvOl8iHituojVDJJiAuNhwxlG9+Jhhm3sxGJiaFy7MMuvjFksavRD7wAhtIMKUShI2QAAAAASUVORK5CYII=';
+						
+						var btnDefs = {
+							'refresh': {title: 'Refresh',
+								image: refreshImg, handler: function()
+								{
+									showDiagram(fileId, driveId, width, height, name, mimeType, autoSize, aspect);
+								}
+							}
+						};
+
+						var tbHeight = GraphViewer.prototype.toolbarHeight;
+						var doc = mxUtils.parseXml(resp);
+					
+						var container = document.createElement('div');
+	
+						container.style.cssText = 'position:absolute;max-width:100%;border:1px solid transparent;';
+						document.body.appendChild(container);
+						
+						var config = {highlight: '#3572b0', 'toolbar-position': 'top',
+							nav: true, border: 2, title: name, lightbox: true,
+							toolbar: 'pages refresh zoom layers lightbox', 'toolbar-buttons': btnDefs,
+							pageId: pageId, layerIds: layerIds};
+	
+						if (!autoSize)
+						{
+							config['auto-fit'] = true;
+							config.resize = false;
+						}
+						
+						var viewer = new GraphViewer(container, doc.documentElement, config);
+	
+						viewer.showLightbox = function()
+						{
+							//Create an aspect reflecting current view
+							var layerIds = [], pageId = viewer.diagrams[viewer.currentPage].getAttribute('id');
+
+							var model = viewer.graph.getModel();
+							var childCount = model.getChildCount(model.root);
+								
+							// Get visible layers
+							for (var i = 0; i < childCount; i++)
+							{
+								var layer = model.getChildAt(model.root, i);
+								
+								if (model.isVisible(layer))
+								{
+									layerIds.push(layer.id);
+								}
+							}
+							
+							var curAspect = pageId + ' ' + layerIds.join(' ');
+							
+							AP.dialog.create(
+			                {
+			                    header: name,
+		                		key: 'lightbox',
+			                    size: 'fullscreen',
+			                    customData: {fileId: fileId, driveId: driveId, name: name, width: width, 
+			                    	height: height, mimeType: mimeType, aspect: curAspect},
+			                    chrome: true
+			                });
+						};
+						
+						// Handles resize of iframe after zoom
+						var graphDoResizeContainer = viewer.graph.doResizeContainer;
+						
+						if (!autoSize)
+						{
+							AP.resize(width, height);
+							viewer.graph.doResizeContainer(width, height);
+						}
+						else
+						{
+							function updateHeight(height)
+							{
+								AP.resize('100%', Math.ceil(height) + tbHeight + 4);
+							};
+							
+							viewer.graph.doResizeContainer = function(width, height)
+							{
+								graphDoResizeContainer.apply(this, arguments);
+								updateHeight(height);
+							};
+	
+							// Updates the size of the iframe in responsive cases
+							viewer.updateContainerHeight = function(container, height)
+							{
+								updateHeight(height);
+							};
+							
+							updateHeight(container.offsetHeight);
+						}
+					}
+					
+					document.body.style.backgroundImage = 'none';
+				}
+				catch(e)
+				{
+					console.log(e);
+					showError('File "' + name + '" is corrupted');
+				}
+			};
+			
+			function loadFileErr()
+			{
+				showError('Failed to load OneDrive file "' + name + '"');
+			};
+			
+			var timestamp = new Date(fileInfo.lastModifiedDateTime).getTime();
+			
+			AP.request({
+				url: '/download/attachments/' + confPageId + '/' + encodeURIComponent(timestamp + '_' + fileInfo.name),
+				success: renderDiagram,
+				error : function() //Not found (e.g, file updated), fetch and cache
+				{
+					var req = new XMLHttpRequest();
+					req.open('GET', fileInfo['@microsoft.graph.downloadUrl']);
+					
+					if (isVsdx)
+					{
+						req.responseType = 'blob';
+					}
+					
+					req.onreadystatechange = function()
+					{
+						if (this.readyState == 4)
+						{
+							if (this.status >= 200 && this.status <= 299)
+							{
+								if (isVsdx)
+								{
+									convertVSDXtoMX(req.response, name, function(content)
+									{
+										cacheAndRender(content, timestamp, name);
+									}, loadFileErr);
+								}
+								else
+								{
+									cacheAndRender(req.responseText, timestamp, name);
+								}
+							}
+							else
+							{
+								loadFileErr();
+							}
+						}
+					};
+					
+					if (isPng && req.overrideMimeType)
+					{
+						req.overrideMimeType('text/plain; charset=x-user-defined');
+					}
+					
+					req.send();
+				}
+			});
+		}, getFileInfoErr);
+	};
+	
+	function main() 
+	{
+		if (lightbox)
+		{
+			AP.dialog.getCustomData(function (customData) {
+				showDiagram(customData.fileId, customData.driveId, customData.width, customData.height, 
+						customData.name, customData.mimeType, null, customData.aspect);
+	    	});
+		}
+		else
+		{
+			var fileId = AC.getUrlParam('fileId');
+			var driveId = AC.getUrlParam('driveId');
+			var width = AC.getUrlParam('width');
+			var height = AC.getUrlParam('height');
+			var name = AC.getUrlParam('filename', true);
+			var mimeType = AC.getUrlParam('mimeType', true) || '';
+			var isDrawio = AC.getUrlParam('isDrawio');
+			isDrawio = isDrawio == 'true' || isDrawio == '1';
+			var aspect = AC.getUrlParam('aspect', true);
+			var autoSize = AC.getUrlParam('autoSize') == '1';
+			var embeddedUrl = AC.getUrlParam('embeddedUrl', true);
+			
+			if (fileId == null || driveId == null)
+			{
+				showError('Error: Missing File ID');
+			}
+			else
+			{
+				if (isDrawio)
+				{
+					showDiagram(fileId, driveId, width, height, name, mimeType, autoSize, aspect);
+				}
+				else if (embeddedUrl)
+				{
+					AP.resize(width, height);
+					window.location.href = embeddedUrl;
+				}
+				else
+				{
+					AP.resize(width, height);
+					AC.getPreviewUrl(fileId, driveId, function(url)
+					{
+						window.location.href = url;
+					}, function()
+					{
+						showError('Error: Cannot get file preview.');
+					});
+				}
+			}
+		}
+	};
+})();
diff --git a/src/main/webapp/connect/gdriveconnector/plugin.json b/src/main/webapp/connect/gdriveconnector/plugin.json
new file mode 100644
index 000000000..a7ed94ab3
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/plugin.json
@@ -0,0 +1,411 @@
+{
+    "name": "Diagram Viewer for Confluence",
+    "description": "Diagram Viewer for Confluence",
+    "key": "com.mxgraph.confluence.plugins.driveconnector",
+    "baseUrl": "https://www.draw.io",
+    "apiMigrations": {
+        "gdpr": true
+    },
+    "vendor": 
+    {
+        "name": "draw.io AG",
+        "url": "https://about.draw.io"
+    },
+    "links": {
+        "documentation": "https://desk.draw.io/support/solutions/articles/16000042550"
+    },
+    "version": "1.0.2",
+    "authentication": 
+    {
+        "type": "none"
+    },
+    "modules": 
+    {
+    	"generalPages":
+    	[
+            {
+                "key": "lightbox",
+                "url": "/connect/gdriveconnector/od-viewer.html?lightbox=1",
+                "location": "hidden",
+                "name": {
+                    "value": "Lightbox"
+                }
+            },
+            {
+                "key": "GDLightbox",
+                "location": "hidden",
+                "url": "/connect/gdriveconnector/viewer.html?lightbox=1",
+                "name": {
+                    "value": "Lightbox",
+                    "i18n": "lightbox"
+                }
+            },
+            {
+                "key": "DULightbox",
+                "location": "hidden",
+                "url": "/connect/gdriveconnector/att-viewer.html?lightbox=1",
+                "name": {
+                    "value": "Lightbox",
+                    "i18n": "lightbox"
+                }
+            },
+            {
+            	"key": "macroEditor",
+                "url": "/connect/gdriveconnector/od-macroEditor.html",
+                "location": "hidden",
+                "name": {
+                    "value": "OneDrive Editor"
+                }
+            }
+        ],
+        "dynamicContentMacros":
+       	[
+            {
+                "name": 
+                {
+                    "i18n": "gdriveconnector",
+                    "value": "Google Drive File"
+                },
+                "url": "/connect/gdriveconnector/viewer.html?fileId=${fileId}&filename=${filename}&width=${width}&height=${height}&mimeType=${mimeType}&macroVer={macroVer}&isDrawio=${isDrawio}&autoSize=${autoSize}&aspect=${aspect}",
+                "width": "600px",
+                "height": "400px",
+                "description": 
+                {
+                    "i18n": "description",
+                    "value": "Inserts a Google Drive file"
+                }, "icon": 
+                {
+		          "width": 144,
+		          "height": 144,
+		          "url": "/connect/gdriveconnector/images/gdriveconnector.png"
+		        },
+		        "categories": [
+		          "visuals"
+		        ],
+		        "outputType": "block",
+		        "featured": true,
+                "key": "gdriveconnector",
+			    "editor": {
+				    "url": "/connect/gdriveconnector/macroEditor.html",
+				    "width": "80%",
+				    "height": "60%"
+				},
+			    "parameters": 
+			    [
+				    {
+				      "identifier": "fileId",
+				      "name": 
+				      {
+				        "value": "Google Drive file ID"
+				      },
+				      "type": "string",
+				      "hidden": true,
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "mimeType",
+				      "name": 
+				      {
+				        "value": "Google Drive file mime type"
+				      },
+				      "type": "string",
+				       "hidden": true
+				    },
+				    {
+				      "identifier": "filename",
+				      "name": 
+				      {
+				        "value": "Name of the Google Drive file"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "isDrawio",
+				      "name": 
+				      {
+				        "value": "Is the file a draw.io file"
+				      },
+				      "type": "boolean",
+				      "hidden": true,
+				      "defaultValue": "false"
+				    },
+				    {
+				      "identifier": "macroVer",
+				      "name": 
+				      {
+				        "value": "Macro Version"
+				      },
+				      "type": "string",
+				      "hidden": true
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "width"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Height"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "Auto Size"
+				      },
+				      "type": "string",
+				      "hidden": true
+				    }
+  				]
+            },
+            {
+                "name": 
+                {
+                    "i18n": "onedriveMacro",
+                    "value": "OneDrive File"
+                },
+                "url": "/connect/gdriveconnector/od-viewer.html?fileId=${fileId}&driveId=${driveId}&filename=${filename}&width=${width}&height=${height}&mimeType=${mimeType}&isDrawio=${isDrawio}&embeddedUrl=${embeddedUrl}&autoSize=${autoSize}&aspect=${aspect}",
+                "width": "600px",
+                "height": "400px",
+                "description": 
+                {
+                    "i18n": "description",
+                    "value": "Inserts a OneDrive file"
+                }, "icon": 
+                {
+		          "width": 144,
+		          "height": 144,
+		          "url": "/connect/gdriveconnector/images/gdriveconnector.png"
+		        },
+		        "categories": [
+		          "visuals"
+		        ],
+		        "outputType": "block",
+		        "featured": true,
+                "key": "onedriveconnector",
+			    "parameters": 
+			    [
+			    	{
+				      "identifier": "filename",
+				      "name": 
+				      {
+				        "value": "Name of the OneDrive file"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "fileId",
+				      "name": 
+				      {
+				        "value": "OneDrive file ID"
+				      },
+				      "type": "string",
+				      "hidden": true,
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "driveId",
+				      "name": 
+				      {
+				        "value": "OneDrive drive ID"
+				      },
+				      "type": "string",
+				      "hidden": true,
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "mimeType",
+				      "name": 
+				      {
+				        "value": "OneDrive file mime type"
+				      },
+				      "type": "string",
+				       "hidden": true
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "width"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Height"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "isDrawio",
+				      "name": 
+				      {
+				        "value": "Is the file a draw.io file"
+				      },
+				      "type": "boolean",
+				      "hidden": true,
+				      "defaultValue": "false"
+				    },
+				    {
+				      "identifier": "embeddedUrl",
+				      "name": 
+				      {
+				        "value": "Embedded Url for personal accounts"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "Auto Size"
+				      },
+				      "type": "string",
+				      "hidden": true
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/gdriveconnector/od-macroEditor.html",
+				    "width": "80%",
+				    "height": "60%"
+				}
+            },
+            {
+                "name": 
+                {
+                    "i18n": "attViewerMacro",
+                    "value": "Upload draw.io Diagram"
+                },
+                "url": "/connect/gdriveconnector/att-viewer.html?pageId=${page.id}&attId=${attId}&attVer=${attVer}&filename=${filename}&width=${width}&height=${height}&mimeType=${mimeType}&isDrawio=${isDrawio}&autoSize=${autoSize}&aspect=${aspect}",
+                "width": "600px",
+                "height": "400px",
+                "description": 
+                {
+                    "i18n": "description",
+                    "value": "Upload a diagram file to a page"
+                }, "icon": 
+                {
+		          "width": 144,
+		          "height": 144,
+		          "url": "/connect/gdriveconnector/images/gdriveconnector.png"
+		        },
+		        "categories": [
+		          "visuals"
+		        ],
+		        "outputType": "block",
+		        "featured": true,
+                "key": "attviewerconnector",
+			    "parameters": 
+			    [
+			    	{
+				      "identifier": "filename",
+				      "name": 
+				      {
+				        "value": "Name of the diagram file"
+				      },
+				      "type": "string",
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "attId",
+				      "name": 
+				      {
+				        "value": "Attachment file ID"
+				      },
+				      "type": "string",
+				      "hidden": true,
+				      "required": true,
+            		  "multiple": false,
+            		  "defaultValue": "None"
+				    },
+				    {
+				      "identifier": "attVer",
+				      "name": 
+				      {
+				        "value": "Attachment file version"
+				      },
+				      "type": "string",
+				       "hidden": true
+				    },
+				    {
+				      "identifier": "mimeType",
+				      "name": 
+				      {
+				        "value": "Attachment file mime type"
+				      },
+				      "type": "string",
+				       "hidden": true
+				    },
+				    {
+				      "identifier": "isDrawio",
+				      "name": 
+				      {
+				        "value": "Is the file a draw.io file"
+				      },
+				      "type": "boolean",
+				      "hidden": true,
+				      "defaultValue": "false"
+				    },
+				    {
+				      "identifier": "width",
+				      "name": 
+				      {
+				        "value": "width"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "height",
+				      "name": 
+				      {
+				        "value": "Height"
+				      },
+				      "type": "string"
+				    },
+				    {
+				      "identifier": "autoSize",
+				      "name": 
+				      {
+				        "value": "Auto Size"
+				      },
+				      "type": "string",
+				      "hidden": true
+				    }
+  				],
+  				"editor": {
+				    "url": "/connect/gdriveconnector/att-macroEditor.html",
+				    "width": "80%",
+				    "height": "60%"
+				}
+            }
+        ]
+    },
+    "scopes": [
+    "read",
+    "write",
+    "delete"
+  	]
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/gdriveconnector/spinner.gif b/src/main/webapp/connect/gdriveconnector/spinner.gif
new file mode 100644
index 0000000000000000000000000000000000000000..054973c97b0d1fddec2722cc42cb68e39d27514c
GIT binary patch
literal 1781
zcmaJ>dq7il6ut~dQG_XoqF9#!3dXj(CwG%6unm|p-YQ`x<L<&HZ1=KVWYP;KN&+Db
z@CA~H79k=HpQy<r6T}CGnp$S!n<$26Wmt5Fg8c#Af9~&``<?GQ=XcIMVX{zIpr8U&
zpwSt~&(H7e?d|F5F`Lbuot*;%1J%{lO-)U;wYA;d-R0%wEiEl3lWA~p&}cLc4Gnn?
zO^%et$BBcZrECUdYXblP=}M4CgAxUyAm4$D47dVGLkTb$O;u|}wEp9#XrNjtqAlmi
zAvrEaRqF6;9U7M%8INSAAp#|B(LylLAT(%j4N53LgC<?87aBw~g%V3fh2+`lX41f6
z2$3eD1zSIWR!uRcLqQ$`q9YI=0{JWki^B~F2=E8l5DQ{LY$l6MX9Wm3Y#{`JFCQAI
zrc<T}V<n+4wMa`uQxOC%WHPg|vKUz$2Bu48vIGKwm4nTulL)$gt(H(2=vuwk2!jOG
zBRVxss4*>QWmF_%nS_W&X8NK84L(Y%)iZ|6VIY`>X;9!y76Y=DGy;^%{~xN+jH2~K
zEcz<nF^To@YjKnri|VmV9fFc@FRK(T6zfn0f$8EgEPdn_qg5Dz=~WmGisN{oT!E;y
zR(lvPmkVWDJ)zJds7xZFkqivAS}6<(mhd<*pT`dt@L4P=OTdNTPzjeK;c?;6U}^A3
ztOP?cHK>*tiB-Oe<&PU{9R&?eDoaqEdJU=!)nOWNxMZPv{9HKW^1X~zj-Ly6+*l@=
z4Aa`!|1^5UMNW_PI6AhZF*^9DmYjASIo38q|NQ-Y@ULfo{_*?M-<~`ku=M}>OW)7E
zj~+g_fA8*{p4&g&`tjxu-`}`??Ypa2E_Z)>sq5l}^XEFxcC?@Q=JeNXtu4)`zB+m0
zc+;_?M-Cr4*l7N;;XwWVx_z}@)O`Ng-aXa3t9E@_xwE2t$M$Vox0IEZm_8}qT=a2a
zLH?$X@-}YBU2j~M^Wg{YzxQtTT0_>FOhT{Az%i{RJ#DpGm70Pokz_^Es&`hty(00g
zgyqYY#>d6RL`Ox+BbF?dg@=VoCE}3aphXKsfeVBJIDpUNa@gcA#i0AYIp5EB-drDV
zFPbO##_MxDX3uh;Im2zbtIM>hRA;9tj*}-jOq}qVy`3$ETn?Vk>>MTm&VWC;C&-0E
z1pvDUONVUV$wPi;b_Om%)I06qh+@{gl7>Q<{*ce>3(;%}^>MP_u--GW(EaZEF!!TI
z*Tg=!JqEAI-NV^ymykmb^E}RQ>dA0#(?-$85=gel+=1=zlKZ7y35`Icdrnky*#!$%
zdKGuP4M?k@DTm<`dC3Dk)OnM_Ld?oFkWaLi(C;ZXUS__onp;`23a|1N7MZs13!-(^
zms~@dDV0GsZb>#1988YBv+RH@m#JgPCR#cK1ywU$wwlumdSKwX(uPxi$H<%C?cmiF
zQ_xlswb0^vY5xoZcUpZ%`;&zEb1FB+nZqk69bv6i?cCRjy!{Jhr5;AaF&y1L^YrpZ
zbqNiAD<~Yqx6f-Vxya#bJaFj77G059l^<m9SR*`_x>$bJJJw|EZ)}+T{C0_L4*!`A
zt35C2Sf65<?P3bPt7dn}Hbh~6p3ASCp0R>ODN{X|r<;4rGI1;kvLdomN9p$}63;J%
zRz8ASc#v#caRj_~vp?_d<2^=>tDDib83=^M#op`ssJTAUWHUgxI`1w^@^kbs-b6CY
zS3(ZXuDfFJJ7)qq2udQi-Pxn9KW@yvy^u>_Jh;4iStB*7H6tR(C&!kX)B#7NS6m3<
zJ)up{bqnLM{CquHTJs1lvSUMzI0l|p+UyYIt5S8H0aA-CDhFzveRCwG(S<+YK(BL3
MNx67L0sssC1r+s*?f?J)

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/gdriveconnector/viewer.html b/src/main/webapp/connect/gdriveconnector/viewer.html
new file mode 100644
index 000000000..4efb623f7
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/viewer.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>GDrive Connector Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-image:url(/connect/gdriveconnector/spinner.gif);
+	background-repeat:no-repeat;
+	background-position:center;
+}
+</style>
+<script type="text/javascript">
+IMAGE_PATH = '/images';
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+</head>
+<body style='overflow : none'>
+<div id="status" style="display : none"><span>Unable to load the Google Drive file.</span></div>
+<script src="viewer.js" type="text/javascript"></script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/gdriveconnector/viewer.js b/src/main/webapp/connect/gdriveconnector/viewer.js
new file mode 100644
index 000000000..5bf2c9c2a
--- /dev/null
+++ b/src/main/webapp/connect/gdriveconnector/viewer.js
@@ -0,0 +1,376 @@
+(function()
+{
+	var lightbox = GAC.getUrlParam('lightbox') == '1';
+	
+	if (lightbox)
+	{
+		document.body.style.backgroundImage = 'url(/images/drawlogo-text-bottom.svg)';
+		document.body.style.backgroundPosition = 'center 30%';
+		document.body.style.backgroundSize = '128px';
+	}
+	
+	var connectUrl = GAC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+	
+	var script = document.createElement('script');
+	
+	script.onload = function()
+	{
+		GAC.getPageInfo(function(pageId, draftPage)
+		{
+			confPageId = pageId;
+			isDraft = draftPage;
+
+			main();
+		});
+	};
+	
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = 'text/css';
+	link.rel = 'stylesheet';
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	var diagramMimeTypes = 'application/mxe,application/vnd.jgraph.mxfile,' +
+		'application/mxr,application/vnd.jgraph.mxfile.realtime,' +
+		'application/vnd.jgraph.mxfile.rtlegacy';
+	
+	var formsMimeType = 'application/vnd.google-apps.form';
+	var folderMimeType = 'application/vnd.google-apps.folder';
+	
+	var confPageId, isDraft;
+	
+	function showError(errMsg)
+	{
+		document.body.style.backgroundImage = 'none';
+		document.body.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+			errMsg;
+		AP.resize('100%', '20');
+	};
+	
+	function getFileInfoErr(err)
+	{
+		if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+		{
+			showError('Error: Access Denied. You do not have permission to access this file.');
+		}
+		else 
+		{
+			showError('Error: Cannot get file information.');
+		}
+	};
+	
+	function showDiagram(fileId, width, height, name, mimeType, autoSize, macroVer, aspect)
+	{
+		document.body.innerHTML = '';
+		document.body.style.backgroundImage = 'url(/connect/gdriveconnector/spinner.gif)';
+		document.body.style.backgroundSize = null;
+		
+		GAC.getFileInfo(fileId, function(fileInfo)
+		{
+			var isPng = fileInfo.mimeType == 'image/png';
+			
+			function cacheAndRender(fileContent, timestamp, filename)
+			{
+				timestamp = String(timestamp);
+				renderDiagram(fileContent);
+				
+				GAC.uploadCachedMxFile(fileContent, timestamp + '_' + filename, GAC.noop, GAC.noop);
+				
+				//Delete old cached file
+				GAC.delOldCachedFiles(confPageId, filename, timestamp);
+			};
+			
+			function renderDiagram(resp)
+			{
+				try
+				{
+					if (isPng)
+					{
+						resp = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (resp);
+						resp = GAC.extractGraphModelFromPng(resp);
+					}
+					
+					var pageId, layerIds;
+					
+					if (aspect != null)
+					{
+						var aspectArray = aspect.split(' ');
+						
+						if (aspectArray.length > 1)
+						{
+							pageId = aspectArray[0];
+							layerIds = aspectArray.slice(1);
+						}
+					}
+					
+					if (lightbox) 
+					{
+						AP.resize('100%', '100%');
+						
+						var config = {highlight: '#3572b0', nav: true, lightbox: false,
+								pageId: pageId, layerIds: layerIds};
+						
+						EditorUi.prototype.lightboxToolbarActions = [{icon: Editor.editLargeImage, tooltip: mxResources.get('edit'), fn: function()
+						{
+							window.open('https://' + window.location.hostname + '/#G' + encodeURIComponent(fileId));
+						}}];
+						
+						var viewer = new GraphViewer(null, null, config);
+						viewer.lightboxChrome = false;
+						viewer.xml = resp;
+
+						// Enables layers via flag to avoid toolbar
+						viewer.layersEnabled = true;
+						
+						var ui = viewer.showLocalLightbox();
+						// Destroy lightbox with ui instance
+						var destroy = ui.destroy;
+						ui.destroy = function()
+						{
+							AP.dialog.close();
+							destroy.apply(this, arguments);
+						};
+						
+						// Workaround for ignored header toolbar height for iframe
+						ui.editor.graph.container.style.bottom = '51px';
+					}
+					else 
+					{
+						var refreshImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAhFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8qm6wAAAAK3RSTlMABr4XDQoC07pc+/Yq5dzYtaiSjXlkMx4U8u/NwrKZf1gl8eDKb2lOR0Q6/VKNjQAAAKlJREFUGNOtjlcOwjAQBd1jOwnpvdNh738/kuA4iE/EfI1Gu9JD/4RTyr+bNxDHCS8FKp62CXWAlSYj0n6MNZziLOt90EC2OgXQ5osoF/aagr/GgsBeRUpSsUgeSikHbG4xFpssamCU0lIYZVuMDkFw9oxeTaUOgE74e0T1+Ki1wvOl8iHituojVDJJiAuNhwxlG9+Jhhm3sxGJiaFy7MMuvjFksavRD7wAhtIMKUShI2QAAAAASUVORK5CYII=';
+						
+						var btnDefs = {
+							'refresh': {title: 'Refresh',
+								image: refreshImg, handler: function()
+								{
+									showDiagram(fileId, width, height, name, mimeType, autoSize, macroVer, aspect);
+								}
+							}
+						};
+						var tbHeight = GraphViewer.prototype.toolbarHeight;
+						var doc = mxUtils.parseXml(resp);
+					
+						var container = document.createElement('div');
+	
+						container.style.cssText = 'position:absolute;max-width:100%;border:1px solid transparent;';
+						document.body.appendChild(container);
+						
+						var config = {highlight: '#3572b0', 'toolbar-position': 'top',
+							nav: true, border: 8, title: name, lightbox: true,
+							toolbar: 'pages refresh zoom layers lightbox', 'toolbar-buttons': btnDefs,
+							pageId: pageId, layerIds: layerIds};
+	
+						if (!autoSize)
+						{
+							config['auto-fit'] = true;
+							config.resize = false;
+						}
+						
+						var viewer = new GraphViewer(container, doc.documentElement, config);
+	
+						viewer.showLightbox = function()
+						{
+							//Create an aspect reflecting current view
+							var layerIds = [], pageId = viewer.diagrams[viewer.currentPage].getAttribute('id');
+
+							var model = viewer.graph.getModel();
+							var childCount = model.getChildCount(model.root);
+								
+							// Get visible layers
+							for (var i = 0; i < childCount; i++)
+							{
+								var layer = model.getChildAt(model.root, i);
+								
+								if (model.isVisible(layer))
+								{
+									layerIds.push(layer.id);
+								}
+							}
+							
+							var curAspect = pageId + ' ' + layerIds.join(' ');
+							
+							AP.dialog.create(
+			                {
+			                    header: name,
+		                		key: 'GDLightbox',
+			                    size: 'fullscreen',
+			                    customData: {fileId: fileId, name: name, width: width, height: height, mimeType: mimeType, macroVer: macroVer, aspect: curAspect},
+			                    chrome: true
+			                });
+						};
+						
+						// Handles resize of iframe after zoom
+						var graphDoResizeContainer = viewer.graph.doResizeContainer;
+						
+						if (!autoSize)
+						{
+							AP.resize(width, height);
+							viewer.graph.doResizeContainer(width, height);
+						}
+						else
+						{
+							function updateHeight(height)
+							{
+								AP.resize('100%', Math.ceil(height) + tbHeight + 4);
+							};
+							
+							viewer.graph.doResizeContainer = function(width, height)
+							{
+								graphDoResizeContainer.apply(this, arguments);
+								updateHeight(height);
+							};
+	
+							// Updates the size of the iframe in responsive cases
+							viewer.updateContainerHeight = function(container, height)
+							{
+								updateHeight(height);
+							};
+							
+							updateHeight(container.offsetHeight);
+						}
+					}
+				}
+				catch(e)
+				{
+					console.log(e);
+					showError('File "' + name + '" is corrupted');
+				}
+				
+				document.body.style.backgroundImage = 'none';
+			};
+			
+			function loadFileErr()
+			{
+				showError('Failed to load Google Drive file "' + name + '"');
+			};
+			
+			var timestamp = new Date(fileInfo.modifiedDate).getTime();
+			
+			AP.request({
+				url: '/download/attachments/' + confPageId + '/' + encodeURIComponent(timestamp + '_' + fileInfo.title),
+				success: renderDiagram,
+				error : function() //Not found (e.g, file updated), fetch and cache
+				{
+					if (/\.v(dx|sdx?)$/i.test(name))
+					{
+						GAC.getBinaryFile(fileInfo, function(blobFile)
+						{
+							convertVSDXtoMX(blobFile, name, function(content)
+							{
+								cacheAndRender(content, timestamp, name);
+							}, loadFileErr);
+						}, loadFileErr);
+					}
+					else
+					{
+						GAC.doAuthRequestPlain(fileInfo['downloadUrl'], 'GET', null, function(req)
+						{
+							cacheAndRender(req.responseText, timestamp, name);
+						}, loadFileErr, null, isPng);
+					}
+				}
+			});
+		}, getFileInfoErr);
+	};
+	
+	function main() 
+	{
+		if (lightbox)
+		{
+			AP.dialog.getCustomData(function (customData) {
+				showDiagram(customData.fileId, customData.width, customData.height, customData.name, 
+						customData.mimeType, null, customData.macroVer, customData.aspect);
+	    	});
+		}
+		else
+		{
+			var fileId = GAC.getUrlParam('fileId');
+			var width = GAC.getUrlParam('width');
+			var height = GAC.getUrlParam('height');
+			var name = GAC.getUrlParam('filename', true);
+			var mimeType = GAC.getUrlParam('mimeType', true);
+			var isDrawio = GAC.getUrlParam('isDrawio') == '1';
+			var aspect = GAC.getUrlParam('aspect', true);
+			var autoSize = GAC.getUrlParam('autoSize') == '1';
+			var macroVer = GAC.getUrlParam('macroVer');
+		
+			if (fileId == null)
+			{
+				showError('Error: Missing File ID');
+			}
+			else if (macroVer == 2)
+			{
+				if (isDrawio || /\.v(dx|sdx?)$/i.test(name))
+				{
+					showDiagram(fileId, width, height, name, mimeType, autoSize, macroVer, aspect);
+				}
+				else
+				{
+					AP.resize(width, height);
+					GAC.getFileInfo(fileId, function(fileInfo)
+					{
+						window.location.href = fileInfo.embedLink;
+					}, getFileInfoErr);
+				}
+			}
+			else
+			{
+				// Forces reload of document to override browser cache
+				var nocache = 't=' + new Date().getTime();
+				var url = null;
+						
+				if (mimeType == 'image')
+				{
+					document.body.style.backgroundImage = 'none';
+					document.body.innerHTML = '<img width="100%" src="' + decodeURIComponent(fileId) +
+						'" border="0"/>';
+				}
+				else if (mimeType == 'thumb')
+				{
+					document.body.style.backgroundImage = 'none';
+					document.body.innerHTML = '<a target="_blank" href="' + decodeURIComponent(name) +
+						'"><img width="100%" src="' + decodeURIComponent(fileId) + '" border="0"/></a>';
+				}
+				else
+				{
+					var drawioFile = diagramMimeTypes.indexOf(mimeType) > -1 || (name != null &&
+						(/(\.xml)($|\?)/i.test(name) || /(\.drawio)($|\?)/i.test(name)));
+					
+					if (drawioFile || mimeType == 'application/json' || mimeType == 'application/octet-stream' ||
+						(name != null && (/(\.v(dx|sdx?))($|\?)/i.test(name) || /(\.gliffy)($|\?)/i.test(name))))
+					{
+						// Uses public file URL, fallback implemented in editor
+						var pubUrl = encodeURIComponent('https://drive.google.com/uc?id=' + fileId + '&export=download');
+						var editUrl = (drawioFile) ? encodeURIComponent('https://www.draw.io/#G' + fileId) : '_blank';
+						
+						url = 'https://www.draw.io/?lightbox=1&toolbar-config=%7B"refreshBtn"%3Atrue%2C"fullscreenBtn"%3Atrue%2C"closeBtn"%3Atrue%7D&layers=1&' +
+							'edit=' + editUrl + ((name != null) ? ('&template-filename=' + encodeURIComponent(name)) : '') + '#U' + pubUrl;
+					}
+					else if (mimeType == formsMimeType)
+					{
+						url = 'https://docs.google.com/forms/d/' + fileId + '/viewform?' + nocache;
+					}
+					else if (mimeType == folderMimeType)
+					{
+						// Possible view options are #list and #grid
+						url = 'https://drive.google.com/embeddedfolderview?id=' + fileId + '&authuser=0&' + nocache + '#list';
+					}
+					else if (mimeType == 'url')
+					{
+						url = decodeURIComponent(fileId);
+					}
+					else 
+					{
+						url = 'https://drive.google.com/file/d/' + fileId + '/preview?authuser=0&' + nocache;
+					}
+					
+					window.location.href = url;
+				}
+			}
+		}
+	};
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/ac.js b/src/main/webapp/connect/jira/ac.js
new file mode 100644
index 000000000..9a7db6146
--- /dev/null
+++ b/src/main/webapp/connect/jira/ac.js
@@ -0,0 +1,372 @@
+var AC = {};
+
+AC.getUrlParam = function(param, escape, url){
+    try{
+    	var url = url || window.location.search;
+        var regex = new RegExp(param + '=([^&]+)'),
+        data = regex.exec(url)[1];
+        // decode URI with plus sign fix.
+        return (escape) ? window.decodeURIComponent(data.replace(/\+/g, '%20')) : data;
+    } catch (e){
+        return '';
+    }
+};
+
+AC.getMetaTag = function(name) {
+	return document.getElementsByTagName('meta')[name].getAttribute('content');
+};
+
+AC.openEditor = function(baseUrl, issueId, diagramName)
+{
+	var diagramXml = null;
+	var link = document.createElement('a');
+	link.href = location.href;
+	link.href = link.href; //to have 'host' populated under IE
+	var hostUrl = link.protocol + '//' + link.hostname; 
+	
+	var lang = AC.getUrlParam['loc'];
+	
+	if (lang != null)
+	{
+		var dash = lang.indexOf('-');
+		
+		if (dash >= 0)
+		{
+			lang = lang.substring(0, dash);
+		}
+	}
+
+	var editor = $('<iframe id="editorFrame" frameborder="0" style="overflow:hidden;height:99.5%;width:100%" height="99%" width="100%">');
+	editorUrl = hostUrl + '/?ui=atlas&p=acj&embed=1&modified=unsavedChanges&spin=1&proto=json' + ((lang != null) ? '&lang=' + lang : '');
+	editorUrl += (hostUrl == "http://test.draw.io") ? '&https=0&dev=1' : '';
+	editorUrl += '&issueId=' + issueId;
+	editor.attr('src', editorUrl);
+	editor.appendTo('body');
+	editor = editor[0];
+
+	var messageListener = function(evt)
+	{
+		if (typeof window.AC !== 'undefined' && evt.origin == hostUrl)
+		{
+			var drawMsg = JSON.parse(evt.data);
+			
+			if(drawMsg.event == 'init')
+			{
+				if(diagramName == null)
+					editor.contentWindow.postMessage(JSON.stringify({action: 'load', xml: ''}), '*');
+				else 
+				{
+					AC.loadDiagram(issueId, diagramName, 
+					function(resp) 
+					{
+						editor.contentWindow.postMessage(JSON.stringify({action: 'load', xml: resp}), '*');
+					}, 
+					function(resp) 
+					{
+						if(resp.status == 404)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'status', messageKey: 'fileNotFound', modified : false}), '*');
+						}
+						else 
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'status', messageKey: 'errorLoadingFile', modified : false}), '*');
+						}
+					});
+				}
+			} 
+			else if (drawMsg.event == 'exit') 
+			{
+				AP.require('dialog', function(dialog){
+					 dialog.close();
+				});
+			}
+			else if (drawMsg.event == 'save')
+			{
+				// Maintains modified state while editor is open
+				editor.contentWindow.postMessage(JSON.stringify({action: 'status', modified: true}), '*');
+				diagramXml = drawMsg.xml;
+				
+				var onSave = function() 
+				{
+					AP.require(['jira', 'dialog'], function (jira, dialog) {
+			            jira.refreshIssuePage();
+			            dialog.close();
+				    });
+				};
+				
+				var onError = function(resp) 
+				{
+					// Post to save servlet to log the diagram XML
+					var payload = {issueId : issueId, filename : diagramName, xml : diagramXml};
+					
+					$.ajax({
+						url : "/connect/jira/save",
+						type : "POST",
+						contentType : "application/json; charset=UTF-8",
+						data : JSON.stringify(payload)
+					});
+
+					var msgKey = null;
+					
+					if (resp.status != null && resp.status == 403)
+					{
+						msgKey = 'errorSavingFileForbidden';
+						alert('Please see this article - https://support.draw.io/pages/viewpage.action?pageId=12877897');
+					}
+					else
+					{
+						msgKey = 'errorSavingFile';
+					}
+					
+					editor.contentWindow.postMessage(JSON.stringify({action: 'status', messageKey: msgKey, modified : true}), '*');
+				};
+				
+				var onErrorNew = function(resp) 
+				{
+					diagramName = null;
+					onError(resp);
+				}
+
+				var askName = function(fileExists)
+				{
+					diagramName = prompt((fileExists) ? 'File exists! Please enter another name' : 'Please name your diagram', diagramName || '');
+
+					if (diagramName != null)
+					{
+						if (diagramName.length < 3)
+						{
+							diagramName = null;
+							alert('Invalid filename, filename too short');
+						}
+						else if (/[&\*+=\\;/{}|\":<>\?]/g.test(diagramName))
+						{
+							diagramName = null;
+							alert('Invalid filename, remove special characters    \\ / | : { } < > & + ? = ; * "');
+						}
+						else
+						{
+							AC.hasDiagram(issueId, diagramName, function(fileExists) 
+							{
+								if (fileExists) 
+								{
+									askName(true);
+								}
+								else 
+								{
+									AC.saveDiagram(issueId, diagramName, diagramXml, onSave, onErrorNew);
+								}
+							});
+						}
+					}
+				};
+				
+				if (diagramName == null)
+				{
+					askName(false);
+				}
+				else
+				{
+					AC.deleteDiagram(issueId, diagramName, function() 
+					{
+						AC.saveDiagram(issueId, diagramName, diagramXml, onSave, onError);
+					}, onError);
+				}
+			}
+			/*else if (drawMsg.event == 'save') 
+			{
+				editor.contentWindow.postMessage(JSON.stringify({action: 'export', format: 'xmlpng', spinKey: 'saving'}), '*');
+			}*/
+		}
+	};
+
+	window.addEventListener('message', messageListener);
+};
+
+AC.loadDiagram = function (issueId, diagramName, success, error) 
+{
+	function load(diagramId) 
+	{
+		AP.require('request', function(request) {
+			request({
+				url: '/secure/attachment/' + diagramId + '/',
+				success: success,
+				error : error
+			});
+		});
+	};
+	
+	AC.getDiagramId(issueId, diagramName, load, error); 
+	
+};
+
+AC.getDiagramId = function(issueId, diagramName, success, error) 
+{
+	AC.listDiagrams(issueId, function(diagrams) 
+	{
+		var diagramId = null;
+		for(var i=0; i< diagrams.length; i++) 
+		{
+			if(diagrams[i].filename == diagramName)
+			{
+				diagramId = diagrams[i].id;
+				break;
+			}
+		} 
+		success(diagramId);
+		
+	}, error);
+	
+};
+
+AC.saveDiagram = function(issueId, diagramName, xml, success, error) 
+{
+	var blob = new Blob([xml], {type : 'application/drawio'});
+	var file = new File([blob], diagramName, {type : 'application/drawio'});
+
+    var headers = new Object();
+    headers["X-Atlassian-Token"] = "nocheck";
+
+    AP.require('request', function (request) {
+        request({
+            url: "/rest/api/2/issue/" + issueId + "/attachments",
+            type: "POST",
+            data: {file : file},
+            contentType: "multipart/form-data",
+            headers: headers,
+            success: success,
+            error : error
+        });
+    });
+};
+
+AC.deleteDiagram = function(issueId, diagramName, success, error) 
+{
+	//files creates via server are owned by the "addon_com.mxgraph.jira.plugins.drawio" user, so they can only be deleted by it
+	deleteViaServer = function() 
+	{
+		var payload = {clientKey : AC.getClientKey(), issueId : issueId, filename : diagramName};
+		$.ajax({
+			url : "/connect/jira/delete",
+			type : "POST",
+			contentType : "application/json; charset=UTF-8",
+			data : JSON.stringify(payload),
+			success : success,
+			error : error
+		});
+	};
+	
+	deleteViaClient = function(attachmentId) 
+	{
+		AP.require('request', function (request) {
+	        request({
+	            url: "/rest/api/2/attachment/" + attachmentId,
+	            type: "DELETE",
+	            success: success,
+	            error : error
+	        });
+	    });
+	};
+	
+	doDelete = function(attachmentId) 
+	{
+		getMetaSuccess = function(resp) 
+		{
+			resp = JSON.parse(resp);
+			
+			if (resp.author.key == "addon_com.mxgraph.jira.plugins.drawio")
+			{
+				deleteViaServer();
+			}
+			else
+			{
+				deleteViaClient(attachmentId);
+				
+			}
+		};
+		
+		AC.getAttachmentMetaData(attachmentId, getMetaSuccess, error);
+	}
+	
+	AC.getDiagramId(issueId, diagramName, doDelete, error);
+};
+
+AC.getAttachmentMetaData = function(attachmentId, success, error) 
+{
+	AP.require('request', function (request) {
+        request({
+            url: "/rest/api/2/attachment/" + attachmentId,
+            type: "GET",
+            success: success,
+            error : error
+        });
+    });
+};
+
+AC.getUser = function(success, fail) 
+{
+	AP.require(['request'], function(request) 
+	{
+		request({
+			url: '/rest/api/2/myself/',
+			type: 'GET',
+			success: success,
+			error: fail
+		});
+	});
+}
+
+/*
+ * Lists attachments for a given issue
+ */
+AC.listDiagrams = function(issueId, success, fail) 
+{
+	AP.require(['request'], function(request) 
+	{
+		request({
+			url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+			type: 'GET',
+			success: function(resp) 
+			{
+				var respObj = JSON.parse(resp);
+				var names = [];
+				$.each(respObj.fields.attachment, function(index, value) 
+				{
+					if(value.mimeType == 'application/drawio')
+						names.push({filename : value.filename, id : value.id});
+				});
+				success(names);
+			},
+			error: fail
+		});
+	});
+};
+
+AC.hasDiagram = function(issueId, diagramName, success) 
+{
+	AC.listDiagrams(issueId, function(diagrams)
+	{
+		var hasDiagram = false;
+		for(var i = 0; i < diagrams.length; i++) 
+		{
+			if(diagrams[i].filename == diagramName) 
+			{
+				hasDiagram = true;
+				break;
+			}
+		}
+		
+		success(hasDiagram);
+	}, 
+	function()
+	{
+		console.log(arguments);
+	});
+};
+
+AC.getClientKey = function() 
+{
+	jwt = AC.getUrlParam('jwt');
+	jwtParts = jwt.split('.');
+	claims = JSON.parse(atob(jwtParts[1]));
+	return claims.iss;
+};
\ 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
new file mode 100644
index 000000000..b5c7412e0
--- /dev/null
+++ b/src/main/webapp/connect/jira/connect-dev.json
@@ -0,0 +1,93 @@
+{
+     "name": "draw.io gaudenz",
+     "description": "draw.io add-on for Jira",
+     "key": "com.mxgraph.jira.plugins.drawio",
+     "baseUrl": "https://45b6ce5b.ngrok.io",
+     "vendor": {
+         "name": "JGraph Ltd.",
+         "url": "https://www.jgraph.com"
+     },
+     "authentication": 
+     {
+         "type": "none"
+     },
+     "version": "1.3.3",
+     "scopes": 
+     [
+     	"READ",
+     	"WRITE",
+     	"DELETE"
+	 ],
+     "modules": 
+     {
+      "generalPages": 
+      [
+      	{
+			"url":"/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
+			"key":"drawioEditor",
+			"name":
+			{
+				"value":"draw.io Editor"
+			},
+			"location":"hidden"
+		},
+		{
+			"url":"/connect/jira/fullScreenViewer-1-3-3.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/editor-1-3-3.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/editor-1-3-3.html?issueId=${issue.id}",
+	        "location": "none",
+	        "context": "addon"
+	    }
+	  ],
+	  "webPanels": 
+	  [
+      {
+        "url": "/connect/jira/viewerPanel-1-3-3.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/connect/jira/connect.json b/src/main/webapp/connect/jira/connect.json
new file mode 100644
index 000000000..020a5d25a
--- /dev/null
+++ b/src/main/webapp/connect/jira/connect.json
@@ -0,0 +1,236 @@
+{
+     "name": "draw.io",
+     "description": "draw.io add-on for Jira",
+     "key": "com.mxgraph.jira.plugins.drawio",
+     "baseUrl": "https://jira.draw.io",
+     "enableLicensing": true,
+     "apiMigrations": {
+         "gdpr": true
+     },
+     "vendor": {
+         "name": "JGraph Ltd.",
+         "url": "https://www.jgraph.com"
+     },
+     "authentication": 
+     {
+         "type": "none"
+     },
+     "version": "1.3.3",
+     "scopes": 
+     [
+     	"READ",
+     	"WRITE",
+     	"DELETE"
+	 ],
+     "modules": 
+     {
+      "generalPages": 
+      [
+      	{
+			"url":"/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
+			"key":"drawioEditor",
+			"name":
+			{
+				"value":"draw.io Editor"
+			},
+			"location":"hidden"
+		},
+		{
+			"url":"/connect/jira/fullScreenViewer-1-3-3.html?issueId=${issue.id}",
+			"key":"drawioFullScreenViewer",
+			"name":
+			{
+				"value":"draw.io Full Screen Viewer"
+			},
+			"location":"hidden"
+		},
+		{
+			"url": "/connect/jira/embed.html?issueId=${issue.id}",
+			"key": "embedDiagram",
+			"name": {
+			    "value": "Embed draw.io diagram"
+			},
+			"location":"hidden"
+	    }
+      ],
+	  "webItems": [
+	    {
+	      "location": "operations-attachments",
+	      "weight": 50,
+	      "key": "drawioEditorBlank",
+	      "url": "/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
+	      "name": {
+	        "value": "Add draw.io diagram"
+	      },
+	      "target": 
+	      {
+			"type":"dialog",
+			"options": 
+			{
+				"width":"100%",
+				"height":"100%",
+				"chrome":false
+			}
+		  }
+	    },
+	    {
+	      "location": "operations-attachments",
+	      "weight": 50,
+	      "key": "linkDiagram",
+	      "url": "/connect/jira/embed.html?issueId=${issue.id}",
+	      "name": {
+	        "value": "Embed draw.io diagram"
+	      },
+	      "target": 
+	      {
+			"type":"dialog",
+			"options": 
+			{
+				"width":"70%",
+				"height":"70%",
+				"chrome":true
+			}
+		  }
+	    }, 
+	    {
+       	   "key": "drawioEditorDialog",
+	        "name": 
+	        {
+	            "value": "draw.io Editor"
+	        },
+	        "url": "/connect/jira/editor-1-3-3.html?issueId=${issue.id}",
+	        "location": "none",
+	        "context": "addon"
+	    },
+	    {
+			"key": "drawioSearch",
+			"location": "system.top.navigation.bar",
+			"name": {
+				"value": "draw.io Diagrams"
+			},
+			"url": "/connect/jira/search.html",
+	      	"target": 
+		    {
+				"type":"dialog",
+				"options": 
+				{
+					"width":"100%",
+					"height":"100%",
+					"chrome":true
+				}
+			},
+			"icon": 
+			{
+				"width": 16,
+				"height": 16,
+				"url": "/images/drawlogo48.png"
+			}
+		}
+	  ],
+	  "webPanels": 
+	  [
+      {
+        "url": "/connect/jira/viewerPanel-1-3-3.html?issueId=${issue.id}",
+        "location": "atl.jira.view.issue.left.context",
+        "layout": 
+        {
+          "width": "300px"
+        },
+        "weight": 200,
+        "key": "drawioViewerPanel",
+        "name": 
+        {
+          "value": "draw.io Diagrams"
+        }
+      }
+    ],
+    "jiraEntityProperties": [
+      {
+        "keyConfigurations": [
+          {
+            "extractions": [
+              {
+                "objectName": "name",
+                "type": "text",
+                "alias": "diagramName"
+              },
+              {
+                "objectName": "txtContent",
+                "type": "text",
+                "alias": "diagramTextContent"
+              },
+              {
+                "objectName": "updated",
+                "type": "date",
+                "alias": "diagramUpdatedDate"
+              },
+              {
+                "objectName": "hasDiagram",
+                "type": "number",
+                "alias": "hasDiagram"
+              }
+            ],
+            "propertyKey": "drawio-metadata"
+          }
+        ],
+        "entityType": "issue",
+        "name": {
+          "value": "draw.io Diagrams Index"
+        },
+        "key": "drawio-entity-property"
+      }
+    ],
+    "jiraIssueContents": [
+      {
+        "icon": {
+          "width": 24,
+          "height": 24,
+          "url": "/images/drawlogo48.png"
+        },
+        "target": {
+          "type": "web_panel",
+          "url": "/connect/jira/viewerPanel-1-3-3.html?issueId=${issue.id}"
+        },
+        "tooltip": {
+          "value": "Show draw.io Diagrams Panel"
+        },
+        "name": {
+          "value": "draw.io Diagrams"
+        },
+        "key": "drawioViewerPanelNew"
+      }
+    ],
+    "jiraIssueGlances": [
+      {
+        "icon": {
+          "width": 24,
+          "height": 24,
+          "url": "/images/drawlogo48.png"
+        },
+        "content": {
+          "type": "label",
+          "label": {
+            "value": "draw.io Diagrams"
+          }
+        },
+        "target": {
+          "type": "web_panel",
+          "url": "/connect/jira/viewerPanel-1-3-3.html?issueId=${issue.id}&glance=1"
+        },
+        "name": {
+          "value": "draw.io Diagrams"
+        },
+        "key": "drawioViewerGlance",
+        "conditions": [
+            {
+                "condition": "entity_property_exists",
+                "params": {
+                    "entity": "issue",
+                    "propertyKey": "drawio-metadata"
+                }
+            }
+        ]
+      }
+    ]
+	}
+ }
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/connectUtils-1-3-3.js b/src/main/webapp/connect/jira/connectUtils-1-3-3.js
new file mode 100644
index 000000000..fed546b2a
--- /dev/null
+++ b/src/main/webapp/connect/jira/connectUtils-1-3-3.js
@@ -0,0 +1,354 @@
+var AC = {};
+
+AC.getUrlParam = function(param, escape, url){
+    try{
+    	var url = url || window.location.search;
+        var regex = new RegExp(param + '=([^&]+)'),
+        data = regex.exec(url)[1];
+        // decode URI with plus sign fix.
+        return (escape) ? window.decodeURIComponent(data.replace(/\+/g, '%20')) : data;
+    } catch (e){
+        return '';
+    }
+};
+
+AC.getMetaTag = function(name) {
+	return document.getElementsByTagName('meta')[name].getAttribute('content');
+};
+
+AC.openEditor = function(baseUrl, issueId, diagramName)
+{
+	var diagramXml = null;
+	var link = document.createElement('a');
+	link.href = location.href;
+	link.href = link.href; //to have 'host' populated under IE
+	var hostUrl = link.protocol + '//' + link.hostname; 
+	
+	var lang = AC.getUrlParam['loc'];
+	
+	if (lang != null)
+	{
+		var dash = lang.indexOf('-');
+		
+		if (dash >= 0)
+		{
+			lang = lang.substring(0, dash);
+		}
+	}
+
+	var editor = $('<iframe id="editorFrame" frameborder="0" style="overflow:hidden;height:99.5%;width:100%" height="99%" width="100%">');
+	editorUrl = hostUrl + '/?ui=atlas&p=acj&embed=1&modified=unsavedChanges&spin=1&proto=json' + ((lang != null) ? '&lang=' + lang : '');
+	editorUrl += (hostUrl == "http://test.draw.io") ? '&https=0&dev=1' : '';
+	editorUrl += '&issueId=' + issueId;
+	editor.attr('src', editorUrl);
+	editor.appendTo('body');
+	editor = editor[0];
+
+	var messageListener = function(evt)
+	{
+		if (typeof window.AC !== 'undefined' && evt.origin == hostUrl)
+		{
+			var drawMsg = JSON.parse(evt.data);
+			
+			if(drawMsg.event == 'init')
+			{
+				if(diagramName == null)
+					editor.contentWindow.postMessage(JSON.stringify({action: 'load', xml: ''}), '*');
+				else 
+				{
+					AC.loadDiagram(issueId, diagramName, 
+					function(resp) 
+					{
+						editor.contentWindow.postMessage(JSON.stringify({action: 'load', xml: resp}), '*');
+					}, 
+					function(resp) 
+					{
+						if(resp.status == 404)
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'status', messageKey: 'fileNotFound', modified : false}), '*');
+						}
+						else 
+						{
+							editor.contentWindow.postMessage(JSON.stringify({action: 'status', messageKey: 'errorLoadingFile', modified : false}), '*');
+						}
+					});
+				}
+			} 
+			else if (drawMsg.event == 'exit') 
+			{
+					AP.dialog.close();
+			}
+			else if (drawMsg.event == 'save')
+			{
+				// Maintains modified state while editor is open
+				editor.contentWindow.postMessage(JSON.stringify({action: 'status', modified: true}), '*');
+				diagramXml = drawMsg.xml;
+				
+				var onSave = function() 
+				{
+			            AP.jira.refreshIssuePage();
+			            AP.dialog.close();
+				};
+				
+				var onError = function(resp) 
+				{
+					// Post to save servlet to log the diagram XML
+					var payload = {issueId : issueId, filename : diagramName, xml : diagramXml};
+					
+					$.ajax({
+						url : "/connect/jira/save",
+						type : "POST",
+						contentType : "application/json; charset=UTF-8",
+						data : JSON.stringify(payload)
+					});
+
+					var msgKey = null;
+					
+					if (resp.status != null && resp.status == 403)
+					{
+						msgKey = 'errorSavingFileForbidden';
+						alert('Please see this article - https://support.draw.io/pages/viewpage.action?pageId=12877897');
+					}
+					else
+					{
+						msgKey = 'errorSavingFile';
+					}
+					
+					editor.contentWindow.postMessage(JSON.stringify({action: 'status', messageKey: msgKey, modified : true}), '*');
+				};
+				
+				var onErrorNew = function(resp) 
+				{
+					diagramName = null;
+					onError(resp);
+				}
+
+				var askName = function(fileExists)
+				{
+					diagramName = prompt((fileExists) ? 'File exists! Please enter another name' : 'Please name your diagram', diagramName || '');
+
+					if (diagramName != null)
+					{
+						if (diagramName.length < 3)
+						{
+							diagramName = null;
+							alert('Invalid filename, filename too short');
+						}
+						else if (/[&\*+=\\;/{}|\":<>\?]/g.test(diagramName))
+						{
+							diagramName = null;
+							alert('Invalid filename, remove special characters    \\ / | : { } < > & + ? = ; * "');
+						}
+						else
+						{
+							AC.hasDiagram(issueId, diagramName, function(fileExists) 
+							{
+								if (fileExists) 
+								{
+									askName(true);
+								}
+								else 
+								{
+									AC.saveDiagram(issueId, diagramName, diagramXml, onSave, onErrorNew);
+								}
+							});
+						}
+					}
+				};
+				
+				if (diagramName == null)
+				{
+					askName(false);
+				}
+				else
+				{
+					AC.deleteDiagram(issueId, diagramName, function() 
+					{
+						AC.saveDiagram(issueId, diagramName, diagramXml, onSave, onError);
+					}, onError);
+				}
+			}
+			/*else if (drawMsg.event == 'save') 
+			{
+				editor.contentWindow.postMessage(JSON.stringify({action: 'export', format: 'xmlpng', spinKey: 'saving'}), '*');
+			}*/
+		}
+	};
+
+	window.addEventListener('message', messageListener);
+};
+
+AC.loadDiagram = function (issueId, diagramName, success, error) 
+{
+	function load(diagramId) 
+	{
+			AP.request({
+				url: '/secure/attachment/' + diagramId + '/',
+				success: success,
+				error : error
+			});
+	};
+	
+	AC.getDiagramId(issueId, diagramName, load, error); 
+	
+};
+
+AC.getDiagramId = function(issueId, diagramName, success, error) 
+{
+	AC.listDiagrams(issueId, function(diagrams) 
+	{
+		var diagramId = null;
+		for(var i=0; i< diagrams.length; i++) 
+		{
+			if(diagrams[i].filename == diagramName)
+			{
+				diagramId = diagrams[i].id;
+				break;
+			}
+		} 
+		success(diagramId);
+		
+	}, error);
+	
+};
+
+AC.saveDiagram = function(issueId, diagramName, xml, success, error) 
+{
+	var blob = new Blob([xml], {type : 'application/drawio'});
+	var file = new File([blob], diagramName, {type : 'application/drawio'});
+
+    var headers = new Object();
+    headers["X-Atlassian-Token"] = "nocheck";
+
+    	AP.request({
+            url: "/rest/api/2/issue/" + issueId + "/attachments",
+            type: "POST",
+            data: {file : file},
+            contentType: "multipart/form-data",
+            headers: headers,
+            success: success,
+            error : error
+        });
+};
+
+AC.deleteDiagram = function(issueId, diagramName, success, error) 
+{
+	//files creates via server are owned by the "addon_com.mxgraph.jira.plugins.drawio" user, so they can only be deleted by it
+	deleteViaServer = function() 
+	{
+		var payload = {clientKey : AC.getClientKey(), issueId : issueId, filename : diagramName};
+		$.ajax({
+			url : "/connect/jira/delete",
+			type : "POST",
+			contentType : "application/json; charset=UTF-8",
+			data : JSON.stringify(payload),
+			success : success,
+			error : error
+		});
+	};
+	
+	deleteViaClient = function(attachmentId) 
+	{
+			AP.request({
+	            url: "/rest/api/2/attachment/" + attachmentId,
+	            type: "DELETE",
+	            success: success,
+	            error : error
+	        });
+	};
+	
+	doDelete = function(attachmentId) 
+	{
+		getMetaSuccess = function(resp) 
+		{
+			resp = JSON.parse(resp);
+			
+			if (resp.author.key == "addon_com.mxgraph.jira.plugins.drawio")
+			{
+				deleteViaServer();
+			}
+			else
+			{
+				deleteViaClient(attachmentId);
+				
+			}
+		};
+		
+		AC.getAttachmentMetaData(attachmentId, getMetaSuccess, error);
+	}
+	
+	AC.getDiagramId(issueId, diagramName, doDelete, error);
+};
+
+AC.getAttachmentMetaData = function(attachmentId, success, error) 
+{
+		AP.request({
+            url: "/rest/api/2/attachment/" + attachmentId,
+            type: "GET",
+            success: success,
+            error : error
+        });
+};
+
+AC.getUser = function(success, fail) 
+{
+		AP.request({
+			url: '/rest/api/2/myself/',
+			type: 'GET',
+			success: success,
+			error: fail
+		});
+}
+
+/*
+ * Lists attachments for a given issue
+ */
+AC.listDiagrams = function(issueId, success, fail) 
+{
+		AP.request({
+			url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+			type: 'GET',
+			success: function(resp) 
+			{
+				var respObj = JSON.parse(resp);
+				var names = [];
+				$.each(respObj.fields.attachment, function(index, value) 
+				{
+					if(value.mimeType == 'application/drawio')
+						names.push({filename : value.filename, id : value.id});
+				});
+				success(names);
+			},
+			error: fail
+		});
+};
+
+AC.hasDiagram = function(issueId, diagramName, success) 
+{
+	AC.listDiagrams(issueId, function(diagrams)
+	{
+		var hasDiagram = false;
+		for(var i = 0; i < diagrams.length; i++) 
+		{
+			if(diagrams[i].filename == diagramName) 
+			{
+				hasDiagram = true;
+				break;
+			}
+		}
+		
+		success(hasDiagram);
+	}, 
+	function()
+	{
+		console.log(arguments);
+	});
+};
+
+AC.getClientKey = function() 
+{
+	jwt = AC.getUrlParam('jwt');
+	jwtParts = jwt.split('.');
+	claims = JSON.parse(atob(jwtParts[1]));
+	return claims.iss;
+};
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/editor-1-3-3.html b/src/main/webapp/connect/jira/editor-1-3-3.html
new file mode 100644
index 000000000..cfd8f7826
--- /dev/null
+++ b/src/main/webapp/connect/jira/editor-1-3-3.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Editor</title>
+<style type="text/css">
+html, body {
+  height:100%;
+  overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/logo-flat.png);
+	background-repeat:no-repeat;
+	background-position:center;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+iframe {
+	border:0;
+	position:fixed;
+	top:0;
+	left:0;
+	right:0;
+	bottom:0;
+	width:100%;
+	height:100%;
+}
+</style>
+</head>
+<body>
+<script src="editor.js" type="text/javascript"></script>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/editor.js b/src/main/webapp/connect/jira/editor.js
new file mode 100644
index 000000000..036a09f0c
--- /dev/null
+++ b/src/main/webapp/connect/jira/editor.js
@@ -0,0 +1,618 @@
+(function()
+{
+	// Parses URL parameters
+	function getUrlParam(param)
+	{
+		var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+		
+		if (result != null && result.length > 0)
+		{
+			return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+		}
+		
+		return null;
+	};
+
+	function getBaseUrl()
+	{
+		var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+		//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+		//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+		if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+		{
+			return baseUrl;
+		}
+		throw 'Invalid baseUrl!';
+	};
+
+	// Overrides browser language with Confluence user language
+	var lang = getUrlParam('loc');
+
+	// Language is in the Connect URL
+	if (lang != null)
+	{
+		var dash = lang.indexOf('-');
+		
+		if (dash >= 0)
+		{
+			lang = lang.substring(0, dash);
+		}
+	}
+	
+   	var AC = {};
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+
+	var script = document.createElement('script');
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+
+	script.onload = main;
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = 'text/css';
+	link.rel = 'stylesheet';
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	// Gets current domain and protocol
+	var link2 = document.createElement('a');
+	link2.href = location.href;
+	link2.href = link2.href; //to have 'host' populated under IE
+	var editorHost = link2.protocol + '//' + link2.hostname;
+	var editorUrl = editorHost + '/?embed=1&p=acj&modified=unsavedChanges&keepmodified=1&spin=1&ui=atlas&proto=json&libraries=1&lang=' + lang;
+	
+	// Injects iframe into page
+	var iframe = document.createElement('iframe');
+	iframe.setAttribute('frameborder', '0');
+
+	var initReceived = false;
+	var startCalled = false;
+	var xmlReceived = null;
+	var filename = null;
+	var diagInfo = null;
+	var timeout = 25000;
+	
+	function startEditor()
+	{
+		// InitReceived is usually last (iframe loads slower than data)
+		if (initReceived && xmlReceived != null && !startCalled)
+		{
+			startCalled = true;
+			
+			// Shows template dialog if diagram is empty
+			if (xmlReceived == '')
+			{
+				iframe.contentWindow.postMessage(JSON.stringify({action: 'template'}), '*');
+			}
+			else
+			{
+				iframe.contentWindow.postMessage(JSON.stringify({action: 'load',
+					xml: xmlReceived, title: filename, diagInfo: diagInfo}), '*');
+			}
+		}
+	};
+	
+	window.addEventListener('message', function(evt)
+	{
+		if (evt.origin == editorHost)
+		{
+			var msg = JSON.parse(evt.data);
+			
+			if (msg.event == 'init')
+			{
+				document.body.style.backgroundImage = 'none';
+				initReceived = true;
+				startEditor();
+			}
+		}
+	});
+	
+	iframe.setAttribute('src', editorUrl);
+	document.body.appendChild(iframe);
+	
+	function main()
+	{
+		var issueId = getUrlParam('issueId');
+
+		AP.resize('100%', '100%');
+		
+		//keeping the block of AP.require to minimize the number of changes!
+		function doMain(customData) 
+		{
+			var serverName = getBaseUrl();
+			var index1 = serverName.indexOf('//');
+			
+			if (index1 > 0)
+			{
+				var index2 = serverName.indexOf('/', index1 + 2);
+				
+				if (index2 > index1)
+				{
+					serverName = serverName.substring(index1 + 2, index2);
+				}
+			}
+			
+			// LATER: Add fallback diagramName lookup via attachment list if name is unique
+			var diagramId = (customData != null) ? customData.diagramId : null;
+			var diagramName = (customData != null) ? customData.diagramName : null;
+			diagInfo = (customData != null) ? customData.diagInfo : {};
+			
+			if (!issueId && customData != null)
+			{
+				issueId = customData.issueId;
+			}
+			
+		    function error(err, modified)
+		   	{
+		    	iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+            	var obj = err.responseText? JSON.parse(err.responseText) : null;
+            	iframe.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+            		titleKey: 'error', message: obj? obj.errorMessages[0] : ("Unknown Error " + err.status),
+            		modified: modified, buttonKey: 'close'}), '*');
+		   	};
+		   	
+		   	function done(newDiagramId)
+		   	{
+		   		iframe.contentWindow.postMessage(JSON.stringify({action: 'textContent', diagramId: newDiagramId}), '*');
+		   	};
+		   	
+		   	function saveDiagram(xml, insert)
+		   	{
+		   		try
+		   		{
+					var blob = new Blob([xml], {type: 'application/drawio'});
+				    blob.name = diagramName;
+
+		   			iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+							messageKey: (insert) ? 'inserting' : 'saving'}), '*');
+
+				    // LATER: Update existing attachment if rest call available
+			        AP.request(
+			        {
+			            url: '/rest/api/2/issue/' + issueId + '/attachments',
+			            type: 'POST',
+						//data: formData,
+			            data: {file: blob},
+			            contentType: 'multipart/form-data',
+			            headers: {'X-Atlassian-Token': 'no-check'},
+			            success: function(resp)
+			            {
+			            	resp = JSON.parse(resp);
+			            	var newId = resp[0].id;
+			            	if (insert)
+			            	{
+			            		done(newId);
+			            	}
+			            	else
+			            	{
+			            		// Deletes previous diagram
+				    	        AP.request({
+				    	            url: '/rest/api/2/attachment/' + diagramId,
+				    	            type: 'DELETE',
+				    	            success: function () 
+				    	            {
+				    	            	done(newId);
+				    	            },
+				    	            error: function(err)
+				    	            {
+				    	            	// Error deleting last version means concurrent save
+				    	            	// in which case a copy of the attachment is created
+				    	            	// or server-side flow was used, in which case a
+				    	            	// manual delete of the attachment is required.
+				    	            	done(newId);
+				    	            }
+				    	        });
+			            	}
+			            },
+			            error: function(err)
+	    	            {
+	    	            	error(err, true);
+	    	            }
+			        });
+		   		}
+		   		catch (e)
+		   		{
+		   			error({responseText: JSON.stringify({errorMessages: [e.message]})}, true);
+		   		}
+		   	};
+		   	
+            var closeDialog = function()
+            {
+                AP.jira.refreshIssuePage();
+                AP.dialog.close();
+            };
+
+		   	var saveContentSearchBody = function(issueId, diagramName, diagramId, textContent, success, error) 
+		   	{
+		   		var emptyInfo = {name: [], txtContent: [], updated: [], id: [], other: []};
+		   	    var diagramsInfo = emptyInfo; 
+		   	    
+		   	    if (diagInfo == null)
+	   	    	{
+		   	    	diagInfo = {};
+	   	    	}
+		   	    
+		   	    diagInfo.aspect = AC.aspect;
+		   	    
+		   	    var updateInfo = function(resp)
+		   	    {
+		   	        if (!resp.status) //no error
+		   	        {
+		   	        	resp = JSON.parse(resp);
+		   	            diagramsInfo = resp.value;
+		   	            
+		   	            if (diagramsInfo.other == null)
+	   	            	{
+		   	            	diagramsInfo.other = [];
+	   	            	}
+		   	        }
+		   	        
+	   	        	var updated = false;
+		   	        try 
+		   	        {
+			   	        for (var i = 0; i < diagramsInfo.name.length; i++)
+		   	        	{
+		   	        		if (diagramName == diagramsInfo.name[i])
+	   	        			{
+				   	        	diagramsInfo.txtContent[i] = textContent;
+				   	        	diagramsInfo.updated[i] = new Date();
+				   	        	diagramsInfo.id[i] = diagramId;
+				   	        	diagramsInfo.other[i] = diagInfo;
+				   	        	updated = true;
+	   	        				break;
+	   	        			}
+		   	        	}
+		   	        } 
+		   	        catch(e) 
+		   	        {
+		   	        	//Error in the format, so reset
+		   	        	diagramsInfo = emptyInfo;
+		   	        }
+
+		   	     	if (!updated)
+	   	        	{
+		   	        	diagramsInfo.name.push(diagramName);
+		   	        	diagramsInfo.txtContent.push(textContent);
+		   	        	diagramsInfo.updated.push(new Date());
+		   	        	diagramsInfo.id.push(diagramId);
+		   	        	diagramsInfo.other.push(diagInfo);
+	   	        	}
+
+		   	     	diagramsInfo.hasDiagram = 1;
+		   	     	
+		   	     	//Glance counter properties
+		   	     	AP.request({
+		   	            url: "/rest/api/2/issue/" + issueId + "/properties/com.atlassian.jira.issue:com.mxgraph.jira.plugins.drawio:drawioViewerGlance:status",
+		   	            type: "PUT",
+		   	            data: JSON.stringify({ type: 'badge', value: { label: String(diagramsInfo.id.length + 
+		   	            		(diagramsInfo.embeddedDiagrams != null? diagramsInfo.embeddedDiagrams.length : 0)) } }),
+		   	            contentType: "application/json"
+		   	        });
+
+		   	     	AP.request({
+		   	            url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+		   	            type: "PUT",
+		   	            data: JSON.stringify(diagramsInfo),
+		   	            contentType: "application/json",
+		   	            success: success,
+		   	            error : error
+		   	        });
+		   	    };
+		   	    
+		   	    AP.request({
+		   	        url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+		   	        type: "GET",
+		   	        success: updateInfo,
+		   	        error : updateInfo
+		   	    });
+		   	};
+
+			function sendRemoteInvReady()
+			{
+				iframe.contentWindow.postMessage(JSON.stringify({action: 'remoteInvokeReady'}), '*');
+				AC.remoteWin = iframe.contentWindow;
+			};
+			
+			AC.setAspect = function(aspect, success, error)
+			{
+				AC.aspect = aspect;
+			};
+
+			//White-listed functions and some info about it
+			AC.remoteInvokableFns = {
+				setAspect: {isAsync: false}
+			};
+
+		   	//TODO This should be abstracted and handled in one place (currently it is copied from Conf Cloud)
+		   	function handleRemoteInvoke(msg)
+		   	{
+		   		function sendResponse(resp, error)
+		   		{
+		   			var respMsg = {action: 'remoteInvokeResponse', msgMarkers: msg.msgMarkers};
+		   			
+		   			if (error != null)
+		   			{
+		   				respMsg.error = {errResp: error};
+		   			}
+		   			else if (resp != null) 
+		   			{
+		   				respMsg.resp = resp;
+		   			}
+		   			
+		   			AC.remoteWin.postMessage(JSON.stringify(respMsg), '*');
+		   		}
+		   		
+		   		try
+		   		{
+		   			//Remote invoke are allowed to call functions in AC
+		   			var funtionName = msg.funtionName;
+		   			var functionInfo = AC.remoteInvokableFns[funtionName];
+		   			
+		   			if (functionInfo != null && typeof AC[funtionName] === 'function')
+		   			{
+		   				var functionArgs = msg.functionArgs;
+		   				
+		   				//Confirm functionArgs are not null and is array, otherwise, discard it
+		   				if (!Array.isArray(functionArgs))
+		   				{
+		   					functionArgs = [];
+		   				}
+		   				
+		   				//for functions with callbacks (async) we assume last two arguments are success, error
+		   				if (functionInfo.isAsync)
+		   				{
+		   					//success
+		   					functionArgs.push(function() 
+		   					{
+		   						sendResponse(Array.prototype.slice.apply(arguments));
+		   					});
+		   					
+		   					//error
+		   					functionArgs.push(function(err) 
+		   					{
+		   						sendResponse(null, err || mxResources.get('unknownError'));
+		   					});
+		   					
+		   					AC[funtionName].apply(this, functionArgs);
+		   				}
+		   				else
+		   				{
+		   					var resp = AC[funtionName].apply(this, functionArgs);
+		   					
+		   					sendResponse([resp]);
+		   				}
+		   			}
+		   			else
+		   			{
+		   				sendResponse(null, mxResources.get('invalidCallFnNotFound', [funtionName]));
+		   			}
+		   		}
+		   		catch(e)
+		   		{
+		   			sendResponse(null, mxResources.get('invalidCallErrOccured', [e.message]));
+		   		}
+		   	};
+		   	
+		   	// Creates a new diagram
+		   	if (diagramName == null)
+		   	{
+		   		xmlReceived = '';
+		   		startEditor();
+		   		filename = null;
+		   		
+				function promptName(name, err, errKey)
+				{
+					iframe.contentWindow.postMessage(JSON.stringify({action: 'prompt',
+						titleKey: 'filename', okKey: 'save', defaultValue: name || '' }), '*');
+					
+					if (err != null || errKey != null)
+					{
+						iframe.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+							titleKey: 'error', message: err, messageKey: errKey,
+							buttonKey: 'ok'}), '*');
+					}
+				};
+				
+				function checkName(name, fn, err)
+				{
+					if (name == null || name.length < 3)
+					{
+						err(name, 'Filename too short');
+					}
+					else if (/[&\*+=\\;/{}|\":<>\?~]/g.test(name))
+					{
+						err(name, 'Invalid characters \\ / | : { } < > & + ? = ; * " ~');
+					}
+					else
+					{
+						AP.request({
+							url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+							type: 'GET',
+							success: function(resp) 
+							{
+								var respObj = JSON.parse(resp);
+								
+								for (var i = 0; i < respObj.fields.attachment.length; i++)
+								{
+									var attachment = respObj.fields.attachment[i];
+									
+									if (attachment.filename == name)
+									{
+										err(name, null, 'fileExists');
+										
+										return;
+									}
+								}
+								
+								fn(name);
+							},
+							error: function(res) 
+							{
+								var msg = (res.responseText != null && res.responseText) ?
+									res.responseText : res.statusText;
+								
+								try
+								{
+									var tmp = JSON.parse(msg);
+									
+									if (tmp != null && tmp.errorMessages != null &&
+										tmp.errorMessages.length > 0)
+									{
+										msg = tmp.errorMessages[0];
+									}
+								}
+								catch (e)
+								{
+									// ignore
+								}
+								
+								err(name, msg);
+							}
+						});
+					}
+				};
+				
+				var currentXml = null;
+				
+				window.addEventListener('message', function(evt)
+				{
+					if (evt.origin == editorHost)
+					{
+						var msg = JSON.parse(evt.data);
+						
+						if (msg.event == 'save')
+						{
+							currentXml = msg.xml;
+							
+							if (diagramName != null)
+							{
+								saveDiagram(msg.xml, true);
+							}
+							else
+							{
+								promptName('');
+							}
+						}
+						else if (msg.event == 'prompt')
+						{
+							iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: true, messageKey: 'inserting'}), '*');
+
+							checkName(msg.value, function(name)
+							{
+								iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+									show: false}), '*');
+								diagramName = name;
+								saveDiagram(currentXml, true);
+							},
+							function(name, err, errKey)
+							{
+								iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+									show: false}), '*');
+								promptName(name, err, errKey);
+							});
+						}
+						else if (msg.event == 'exit')
+						{
+							AP.dialog.close();
+						}
+			            else if (msg.event == 'textContent')
+			            {
+			                saveContentSearchBody(issueId, diagramName, msg.message.diagramId, msg.data,
+			                		closeDialog, closeDialog);    //ignore error and just exit
+			            }
+			            else if (msg.event == 'remoteInvoke')
+		            	{
+			            	handleRemoteInvoke(msg);
+		            	}
+					}
+				});
+				
+				sendRemoteInvReady();
+		   	}
+		   	else
+		   	{
+				var acceptResponse = true;
+				
+				var timeoutThread = window.setTimeout(function()
+				{
+					acceptResponse = false;
+					
+					var flag = AP.flag.create({
+						  title: 'The connection has timed out',
+						  body: 'The server at ' +
+									serverName + ' is taking too long to respond.',
+						  type: 'error',
+						  close: 'manual'
+						});
+					
+					iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+					
+					//TODO find how to listen to flag close event, currently just close the editor immediately
+    				//messages.onClose(message, function()
+    				//{
+    					AP.dialog.close();
+    				//});
+				}, timeout);
+				
+				AP.request({
+					url: '/secure/attachment/' + diagramId + '/',
+					success: function(xml)
+					{
+			    		window.clearTimeout(timeoutThread);
+			    		
+			    		if (acceptResponse)
+				    	{
+							filename = diagramName;
+							xmlReceived = xml;
+							startEditor();
+							
+							window.addEventListener('message', function(evt)
+							{
+								if (evt.origin == editorHost)
+								{
+									var msg = JSON.parse(evt.data);
+									
+									if (msg.event == 'save')
+									{
+										saveDiagram(msg.xml, false);
+									}
+									else if (msg.event == 'exit')
+									{
+										AP.dialog.close();
+									}
+									//TODO Merge message event listener into one only!
+									else if (msg.event == 'textContent')
+						            {
+						                saveContentSearchBody(issueId, diagramName, msg.message.diagramId, msg.data,
+						                		closeDialog, closeDialog);    //ignore error and just exit
+						            }
+									else if (msg.event == 'remoteInvoke')
+					            	{
+						            	handleRemoteInvoke(msg);
+					            	}
+								}
+							});
+							
+							sendRemoteInvReady();
+						}
+					},
+					error: function()
+					{
+			    		window.clearTimeout(timeoutThread);
+			    		
+			    		if (acceptResponse)
+				    	{
+			    			closeDialog();
+				    	}
+					}
+				});
+		   	}
+		};
+		AP.dialog.getCustomData(doMain);
+	};
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/editor2.html b/src/main/webapp/connect/jira/editor2.html
new file mode 100644
index 000000000..b346d11f2
--- /dev/null
+++ b/src/main/webapp/connect/jira/editor2.html
@@ -0,0 +1,427 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Draw.io Editor</title>
+<style type="text/css">
+html, body {
+  height:100%;
+  overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/logo-flat.png);
+	background-repeat:no-repeat;
+	background-position:center;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+iframe {
+	border:0;
+	position:fixed;
+	top:0;
+	left:0;
+	right:0;
+	bottom:0;
+	width:100%;
+	height:100%;
+}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+(function()
+{
+	// Parses URL parameters
+	function getUrlParam(param)
+	{
+		var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+		
+		if (result != null && result.length > 0)
+		{
+			return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+		}
+		
+		return null;
+	};
+
+	function getBaseUrl()
+	{
+		var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+		//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+		//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+		if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+		{
+			return baseUrl;
+		}
+		throw 'Invalid baseUrl!';
+	};
+
+	// Overrides browser language with Confluence user language
+	var lang = getUrlParam('loc');
+
+	// Language is in the Connect URL
+	if (lang != null)
+	{
+		var dash = lang.indexOf('-');
+		
+		if (dash >= 0)
+		{
+			lang = lang.substring(0, dash);
+		}
+	}
+	
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+
+	var script = document.createElement('script');
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+
+	script.onload = main;
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = 'text/css';
+	link.rel = 'stylesheet';
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	// Gets current domain and protocol
+	var link2 = document.createElement('a');
+	link2.href = location.href;
+	link2.href = link2.href; //to have 'host' populated under IE
+	var editorHost = link2.protocol + '//' + link2.hostname;
+	var editorUrl = editorHost + '/?embed=1&p=acj&modified=unsavedChanges&keepmodified=1&spin=1&ui=atlas&proto=json&libraries=1&lang=' + lang;
+	
+	// Injects iframe into page
+	var iframe = document.createElement('iframe');
+	iframe.setAttribute('frameborder', '0');
+
+	var initReceived = false;
+	var xmlReceived = null;
+	var filename = null;
+	var timeout = 25000;
+	
+	function startEditor()
+	{
+		// InitReceived is usually last (iframe loads slower than data)
+		if (initReceived && xmlReceived != null)
+		{
+			// Shows template dialog if diagram is empty
+			if (xmlReceived == '')
+			{
+				iframe.contentWindow.postMessage(JSON.stringify({action: 'template'}), '*');
+			}
+			else
+			{
+				iframe.contentWindow.postMessage(JSON.stringify({action: 'load',
+					xml: xmlReceived, title: filename}), '*');
+			}
+		}
+	};
+	
+	window.addEventListener('message', function(evt)
+	{
+		if (evt.origin == editorHost)
+		{
+			var msg = JSON.parse(evt.data);
+			
+			if (msg.event == 'init')
+			{
+				document.body.style.backgroundImage = 'none';
+				initReceived = true;
+				startEditor();
+			}
+		}
+	});
+	
+	iframe.setAttribute('src', editorUrl);
+	document.body.appendChild(iframe);
+	
+	function main()
+	{
+		var issueId = getUrlParam('issueId');
+
+		AP.sizeToParent(true);
+		AP.require(['dialog', 'request', 'jira', 'messages'], function(dialog, request, jira, messages)
+		{
+			var serverName = document.referrer;
+			var index1 = serverName.indexOf('//');
+			
+			if (index1 > 0)
+			{
+				var index2 = serverName.indexOf('/', index1 + 2);
+				
+				if (index2 > index1)
+				{
+					serverName = serverName.substring(index1 + 2, index2);
+				}
+			}
+			
+			// LATER: Add fallback diagramName lookup via attachment list if name is unique
+			var diagramId = (dialog.customData != null) ? dialog.customData.diagramId : null;
+			var diagramName = (dialog.customData != null) ? dialog.customData.diagramName : null;
+
+		    function error(err, modified)
+		   	{
+		    	iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+            	var obj = JSON.parse(err.responseText);
+            	iframe.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+            		titleKey: 'error', message: obj.errorMessages[0],
+            		modified: modified, buttonKey: 'close'}), '*');
+		   	};
+		   	
+		   	function done(arg)
+		   	{
+		   		jira.refreshIssuePage();
+            	dialog.close();
+		   	};
+		   	
+		   	function saveDiagram(xml, insert)
+		   	{
+		   		try
+		   		{
+					var blob = new Blob([xml], {type: 'application/drawio'});
+				    blob.name = diagramName;
+
+		   			iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+							messageKey: (insert) ? 'inserting' : 'saving'}), '*');
+
+				    // LATER: Update existing attachment if rest call available
+			        request(
+			        {
+			            url: '/rest/api/2/issue/' + issueId + '/attachments',
+			            type: 'POST',
+						//data: formData,
+			            data: {file: blob},
+			            contentType: 'multipart/form-data',
+			            headers: {'X-Atlassian-Token': 'no-check'},
+			            success: function()
+			            {
+			            	if (insert)
+			            	{
+			            		done();
+			            	}
+			            	else
+			            	{
+			            		// Deletes previous diagram
+				    	        request({
+				    	            url: '/rest/api/2/attachment/' + diagramId,
+				    	            type: 'DELETE',
+				    	            success: done,
+				    	            error: function(err)
+				    	            {
+				    	            	// Error deleting last version means concurrent save
+				    	            	// in which case a copy of the attachment is created
+				    	            	// or server-side flow was used, in which case a
+				    	            	// manual delete of the attachment is required.
+				    	            	done();
+				    	            }
+				    	        });
+			            	}
+			            },
+			            error: function(err)
+	    	            {
+	    	            	error(err, true);
+	    	            }
+			        });
+		   		}
+		   		catch (e)
+		   		{
+		   			error({responseText: JSON.stringify({errorMessages: [e.message]})}, true);
+		   		}
+		   	};
+
+		   	// Creates a new diagram
+		   	if (diagramName == null)
+		   	{
+		   		xmlReceived = '';
+		   		filename = null;
+		   		
+				function promptName(name, err, errKey)
+				{
+					iframe.contentWindow.postMessage(JSON.stringify({action: 'prompt',
+						titleKey: 'filename', okKey: 'save', defaultValue: name || '' }), '*');
+					
+					if (err != null || errKey != null)
+					{
+						iframe.contentWindow.postMessage(JSON.stringify({action: 'dialog',
+							titleKey: 'error', message: err, messageKey: errKey,
+							buttonKey: 'ok'}), '*');
+					}
+				};
+				
+				function checkName(name, fn, err)
+				{
+					if (name == null || name.length < 3)
+					{
+						err(name, 'Filename too short');
+					}
+					else if (/[&\*+=\\;/{}|\":<>\?~]/g.test(name))
+					{
+						err(name, 'Invalid characters \\ / | : { } < > & + ? = ; * " ~');
+					}
+					else
+					{
+						request({
+							url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+							type: 'GET',
+							success: function(resp) 
+							{
+								var respObj = JSON.parse(resp);
+								
+								for (var i = 0; i < respObj.fields.attachment.length; i++)
+								{
+									var attachment = respObj.fields.attachment[i];
+									
+									if (attachment.filename == name)
+									{
+										err(name, null, 'fileExists');
+										
+										return;
+									}
+								}
+								
+								fn(name);
+							},
+							error: function(res) 
+							{
+								var msg = (res.responseText != null && res.responseText) ?
+									res.responseText : res.statusText;
+								
+								try
+								{
+									var tmp = JSON.parse(msg);
+									
+									if (tmp != null && tmp.errorMessages != null &&
+										tmp.errorMessages.length > 0)
+									{
+										msg = tmp.errorMessages[0];
+									}
+								}
+								catch (e)
+								{
+									// ignore
+								}
+								
+								err(name, msg);
+							}
+						});
+					}
+				};
+				
+				var currentXml = null;
+				
+				window.addEventListener('message', function(evt)
+				{
+					if (evt.origin == editorHost)
+					{
+						var msg = JSON.parse(evt.data);
+						
+						if (msg.event == 'save')
+						{
+							currentXml = msg.xml;
+							
+							if (diagramName != null)
+							{
+								saveDiagram(msg.xml, true);
+							}
+							else
+							{
+								promptName('');
+							}
+						}
+						else if (msg.event == 'prompt')
+						{
+							iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+								show: true, messageKey: 'inserting'}), '*');
+
+							checkName(msg.value, function(name)
+							{
+								iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+									show: false}), '*');
+								diagramName = name;
+								saveDiagram(currentXml, true);
+							},
+							function(name, err, errKey)
+							{
+								iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner',
+									show: false}), '*');
+								promptName(name, err, errKey);
+							});
+						}
+						else if (msg.event == 'exit')
+						{
+							dialog.close();
+						}
+					}
+				});
+		   	}
+		   	else
+		   	{
+				var acceptResponse = true;
+				
+				var timeoutThread = window.setTimeout(function()
+				{
+					acceptResponse = false;
+					var message = messages.error('The connection has timed out', 'The server at ' +
+						serverName + ' is taking too long to respond.');
+					
+    				messages.onClose(message, function()
+    				{
+    					dialog.close();
+    				});
+    				
+					iframe.contentWindow.postMessage(JSON.stringify({action: 'spinner', show: false}), '*');
+				}, timeout);
+				
+				request({
+					url: '/secure/attachment/' + diagramId + '/'),
+					success: function(xml)
+					{
+			    		window.clearTimeout(timeoutThread);
+			    		
+			    		if (acceptResponse)
+				    	{
+							filename = diagramName;
+							xmlReceived = xml;
+							startEditor();
+							
+							window.addEventListener('message', function(evt)
+							{
+								if (evt.origin == editorHost)
+								{
+									var msg = JSON.parse(evt.data);
+									
+									if (msg.event == 'save')
+									{
+										saveDiagram(msg.xml, false);
+									}
+									else if (msg.event == 'exit')
+									{
+										dialog.close();
+									}
+								}
+							});
+						}
+					},
+					error: function()
+					{
+			    		window.clearTimeout(timeoutThread);
+			    		
+			    		if (acceptResponse)
+				    	{
+							done();
+				    	}
+					}
+				});
+		   	}
+		});
+	};
+})();
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/embed.html b/src/main/webapp/connect/jira/embed.html
new file mode 100644
index 000000000..4923385ec
--- /dev/null
+++ b/src/main/webapp/connect/jira/embed.html
@@ -0,0 +1,317 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Embed draw.io Diagram</title>
+<script type="text/javascript">
+	// To Avoid NPE in connectUtils
+	urlParams = {};
+</script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script src="../onedrive_common/editor.js" type="text/javascript"></script>
+<script src="../gdrive_common/editor.js" type="text/javascript"></script>
+<script src="../att_common/att-editor.js" type="text/javascript"></script>
+<script src="embedDiagram.js" type="text/javascript"></script>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.9.12/css/aui.min.css" media="all">
+<style type="text/css">
+body {
+	font-family:Arial, sans-serif;
+	overflow:hidden;
+	height:100%;
+	width:100%;
+	margin:0;
+}
+
+/* Style the tab */
+.tab {
+    overflow: hidden;
+    border: 1px solid #ccc;
+    background-color: #f1f1f1;
+}
+
+/* Style the buttons that are used to open the tab content */
+.tab button {
+    background-color: inherit;
+    float: left;
+    border: none;
+    outline: none;
+    cursor: pointer;
+    padding: 14px 16px;
+    transition: 0.3s;
+}
+
+/* Change background color of buttons on hover */
+.tab button:hover {
+    background-color: #ddd;
+}
+
+/* Create an active/current tablink class */
+.tab button.active {
+    background-color: #ccc;
+}
+
+/* Style the tab content */
+.tabcontent {
+	width: 100%;
+	height: calc(100% - 43px);
+	box-sizing: border-box;
+    display: none;
+    padding: 6px 12px;
+    border: 1px solid #ccc;
+    border-top: none;
+    animation: fadeEffect 1s; /* Fading effect takes 1 second */
+}
+
+/* Go from zero to full opacity */
+@keyframes fadeEffect {
+    from {opacity: 0;}
+    to {opacity: 1;}
+}
+
+.diagram {
+	border:1px solid #ddd;
+	display:inline-block;
+	vertical-align:top;
+	border-radius:3px;
+	overflow:hidden;
+	font-size:14pt;
+	cursor:pointer;
+	margin:5px;
+}
+
+#errorMsg {
+  position:absolute;
+  bottom:10px;
+  left:0px;
+  right:0px;
+  text-align:center;
+  overflow:hidden;
+  color:red;
+  opacity: 0;
+  transition: opacity 1s; 
+}
+
+#errorMsg.fade {
+  opacity: 1;
+}
+</style>
+</head>
+<body>
+	<!-- Tab links -->
+	<div class="tab">
+	  <button id="uploadTab" class="tablinks" data-tabContetn="upload">Upload</button>
+	  <button id="gDriveTab" class="tablinks" data-tabContetn="gDrive">Google Drive</button>
+	  <button id="oneDriveTab" class="tablinks" data-tabContetn="oneDrive">OneDrive</button>
+	  <button id="extUrlTab" class="tablinks" data-tabContetn="extUrl">From URL</button>
+	</div>
+	
+	<!-- Tab content -->
+	<div id="gDrive" class="tabcontent" style="padding: 0;">
+		<div style="bottom:0;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="filename">File name</label> 
+					<input class="text macro-param-input" type="text" id="filenameGD" name="filename" disabled placeholder="Choose a file...">
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerGD" disabled>Choose</button>
+					<div id="spinner-containerGD"></div>
+					<div class="description">Google Drive file name</div>
+					<div class="error" id="filenameErrorGD"></div>
+				</div>
+				<div style="display: none">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="widthGD">Width</label> <input class="text medium-field" id="widthGD" value="800">
+						<div class="description">Width of the viewer (px)</div>
+						<div class="error" id="widthErrorGD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="heightGD">Height</label> <input class="text medium-field" id="heightGD" value="600">
+						<div class="description">Height of the viewer (px)</div>
+						<div class="error" id="heightErrorGD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input class="checkbox small-field" id="autoSizeGD" type="checkbox" >
+						<label for="autoSizeGD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<label for="thumbImg">Thumbnail</label>
+						<div class="thumbnail">
+							<img class="thumbImg" id="thumbImgGD">
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<input type="checkbox" class="checkbox small-fiel" id="useDrawioGD">
+						<label for="useDrawio" style="display:inline-block;">Preview in draw.io</label>
+					</div>
+				</div>
+				<a id="signoutGD" style="position: absolute;bottom: 2px;right: 5px;font-size: 11px;cursor: pointer;" onclick="javascript:void(0);">Sign Out</a>
+			</form>
+		</div>
+		<div id="previewGD" style="bottom:0;left:351px;position:absolute;top:42px;right:0px;display:inline-block;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('filePickerGD').click();">Choose a file...</a>
+		</div>
+	</div>
+	
+	<div id="oneDrive" class="tabcontent" style="padding: 0;">
+		<div style="bottom:0;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="filenameOD">File name</label> 
+					<input class="text macro-param-input" type="text" id="filenameOD" name="filename" disabled placeholder="Choose a file...">
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerOD" disabled>Choose</button>
+					<div id="spinner-containerOD"></div>
+					<div class="description">OneDrive file name</div>
+					<div class="error" id="filenameErrorOD"></div>
+				</div>
+				<div style="display: none">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="widthOD">Width</label> <input class="text medium-field" id="widthOD" value="800">
+						<div class="description">Width of the viewer (px)</div>
+						<div class="error" id="widthErrorOD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="heightOD">Height</label> <input class="text medium-field" id="heightOD" value="600">
+						<div class="description">Height of the viewer (px)</div>
+						<div class="error" id="heightErrorOD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input class="checkbox small-field" id="autoSizeOD" type="checkbox" >
+						<label for="autoSizeOD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<label for="thumbImgOD">Thumbnail</label>
+						<div class="thumbnail">
+							<img class="thumbImg" id="thumbImgOD">
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px">
+						<input type="checkbox" class="checkbox small-fiel" id="useDrawioOD">
+						<label for="useDrawioOD" style="display:inline-block;">Preview in draw.io</label>
+					</div>
+				</div>
+				<a id="signoutOD" style="position: absolute;bottom: 2px;right: 5px;font-size: 11px;cursor: pointer;" onclick="javascript:void(0);">Sign Out</a>
+			</form>
+		</div>
+		<div id="previewOD" style="bottom:0;left:351px;position:absolute;top:42px;right:0px;display:inline-block;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('filePickerOD').click();">Choose a file...</a>
+		</div>
+	</div>
+	
+	<div id="upload" class="tabcontent" style="padding: 0;">
+		<div style="bottom:0;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="filenameUD">File name</label> 
+					<input type="file" id="fileuploadUD" style="display: none">
+					<input class="text macro-param-input" type="text" id="filenameUD" name="filename" disabled placeholder="Choose a file...">
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerUD">Choose</button>
+					<div id="spinner-containerUD"></div>
+					<div class="description">Diagram file name</div>
+					<div class="error" id="filenameErrorUD"></div>
+				</div>
+				<div style="display: none">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="widthUD">Width</label> <input class="text medium-field" id="widthUD" value="800">
+						<div class="description">Width of the viewer (px)</div>
+						<div class="error" id="widthErrorUD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="heightUD">Height</label> <input class="text medium-field" id="heightUD" value="600">
+						<div class="description">Height of the viewer (px)</div>
+						<div class="error" id="heightErrorUD"></div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input class="checkbox small-field" id="autoSizeUD" type="checkbox" >
+						<label for="autoSizeUD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+					</div>
+				</div>
+				<div class="error" id="errorMsgUD">
+				</div>
+			</form>
+		</div>
+		<div id="previewUD" style="bottom:0;left:351px;position:absolute;top:42px;right:0px;display:inline-block;text-align: center;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('fileuploadUD').click();">Choose a file...</a>
+		</div>
+	</div>
+	
+	<div id="extUrl" class="tabcontent" style="padding: 0;">
+		<div style="bottom:0;width:350px;border-right:1px solid #cccccc;position:absolute;top:42px;display:inline-block;">
+			<form class="aui top-label" style="height:100%;top:0px;">
+				<div class="field-group" style="padding-left:15px;">
+					<label for="diagramName">Diagram Name</label>
+					<input class="text macro-param-input" id="diagramName" value="" placeholder="Diagram Name">
+					<div class="description">Choose a diagram name</div>
+					<div class="error" id="diagramNameError"></div>
+				</div>
+				<div class="field-group" style="padding-left:15px;">
+					<label for="diagramUrl">Diagram URL</label> 
+					<input class="text medium-field" id="diagramUrl" value="" placeholder="Diagram URL" style="max-width: 325px;">
+					<div class="description">Diagram URL on the web</div>
+					<div class="error" id="diagramUrlError"></div>
+					<button class="aui-button aui-button-primary ap-dialog-submit" id="showDiagBtn" style="float: right; margin-right: 10px;">Show Diagram</button>
+				</div>
+			</form>
+		</div>
+		<div id="previewEU" style="bottom:0;left:351px;position:absolute;top:42px;right:0px;display:inline-block;">
+			<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+				onclick="document.getElementById('diagramUrl').focus();">Enter Diagram URL</a>
+		</div>
+	</div>
+	
+	<div id="errorMsg">
+		Please select a diagram to insert it. 
+	</div>
+	<script type="text/javascript">
+	//Parses URL parameters
+	function getUrlParam(param)
+	{
+		var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+		
+		if (result != null && result.length > 0)
+		{
+			return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+		}
+		
+		return null;
+	};
+	
+	function getBaseUrl()
+	{
+		var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+		//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+		//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+		if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+		{
+			return baseUrl;
+		}
+		throw 'Invalid baseUrl!';
+	};
+	</script>
+	<script type="text/javascript">
+	(function()
+	{
+		// Specifies connection mode for touch devices (at least one should be true)
+		var baseUrl = getBaseUrl();
+		var connectUrl = baseUrl + '/atlassian-connect';
+		var head = document.getElementsByTagName("head")[0];
+		
+		var script = document.createElement("script");
+		script.setAttribute('data-options', 'resize:false;margin:false');
+	
+		head.appendChild(script);
+		
+		var link = document.createElement("link");
+		link.type = "text/css";
+		link.rel = "stylesheet";
+		link.href = connectUrl + '/all.css';
+		head.appendChild(link);
+		script.onload = embedDiagramMain;
+		script.src = 'https://connect-cdn.atl-paas.net/all.js';		
+	})();
+	</script>
+</html>
diff --git a/src/main/webapp/connect/jira/embedDiagram.js b/src/main/webapp/connect/jira/embedDiagram.js
new file mode 100644
index 000000000..0f1a7bb4f
--- /dev/null
+++ b/src/main/webapp/connect/jira/embedDiagram.js
@@ -0,0 +1,449 @@
+function embedDiagramMain()
+{
+	var selectedDiagramInfo = null;
+	var selectedElt = null;
+	var activeTab = 'upload';
+	var issueId = getUrlParam('issueId');
+	var attEditor, odEditor = null, gdEditor = null;
+	var curViewer = null;
+	var lastDiagramUrl = null;
+	
+	var opts =
+	{
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	var spinner = new Spinner(opts);
+
+	function htmlEntities(s, newline)
+	{
+		s = String(s || '');
+		
+		s = s.replace(/&/g,'&amp;'); // 38 26
+		s = s.replace(/"/g,'&quot;'); // 34 22
+		s = s.replace(/\'/g,'&#39;'); // 39 27
+		s = s.replace(/</g,'&lt;'); // 60 3C
+		s = s.replace(/>/g,'&gt;'); // 62 3E
+
+		if (newline == null || newline)
+		{
+			s = s.replace(/\n/g, '&#xa;');
+		}
+		
+		return s;
+	};
+	
+	function showError(msg)
+	{
+		var errorMsg = document.getElementById("errorMsg");
+       	errorMsg.innerHTML = msg;
+		errorMsg.className = "fade";
+		setTimeout(function()
+		{
+			errorMsg.className = "";
+		}, 5000);
+	};
+	
+	function doSubmit(newDiag, fileContent, fileModifiedTS)
+	{
+		var updateInfo = function(resp)
+   	    {
+			var diagramsInfo = {name: [], txtContent: [], updated: [], id: []};
+			
+   	        if (!resp.status) //no error
+   	        {
+   	        	resp = JSON.parse(resp);
+   	            diagramsInfo = resp.value;
+   	        }
+   	        
+   	        if (diagramsInfo.embeddedDiagrams != null)
+	        {
+   	        	diagramsInfo.embeddedDiagrams.push(newDiag);
+	        }
+   	        else
+	        {
+   	        	diagramsInfo.embeddedDiagrams = [newDiag];
+	        }
+   	        
+   	     	diagramsInfo.hasDiagram = 1;
+   	     	
+   	     	//Glance counter properties
+   	     	AP.request({
+   	            url: "/rest/api/2/issue/" + issueId + "/properties/com.atlassian.jira.issue:com.mxgraph.jira.plugins.drawio:drawioViewerGlance:status",
+   	            type: "PUT",
+   	            data: JSON.stringify({ type: 'badge', value: { label: String((diagramsInfo.id? diagramsInfo.id.length : 0) + diagramsInfo.embeddedDiagrams.length) } }),
+   	            contentType: "application/json"
+   	        });
+
+   	     	AP.request({
+   	            url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+   	            type: "PUT",
+   	            data: JSON.stringify(diagramsInfo),
+   	            contentType: "application/json",
+   	            success: function()
+   	            {
+   	            	AP.jira.refreshIssuePage();
+   	            	AP.dialog.close();
+   	            },
+   	            error : function()
+   	            {
+   	            	showError('Error occured during saving, please try again later.');
+   	            }
+   	        });
+   	    };
+		
+   	    function startUpdateInfo(resp)
+   	    {
+   	    	if (resp != null)
+    		{
+   	    		try
+   	    		{
+   	    			resp = JSON.parse(resp);
+   	    			newDiag.cacheAttId = resp[0].id;
+   	    		}
+   	    		catch(e){} // Ignore
+    		}
+
+	   	    AP.request({
+	   	        url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+	   	        type: "GET",
+	   	        success: updateInfo,
+	   	        error : updateInfo
+	   	    });
+   	    };
+   	    
+   	    //We don't cache extUrl files
+   	    if (newDiag.service == 'extUrl')
+    	{
+   	    	startUpdateInfo();
+    	}
+   	    else
+   	    {
+   	    	var postfix = newDiag.displayName, prefix = '';
+   	    	
+   	    	if (newDiag.service != 'AttFile')
+   	    	{
+    			prefix = fileModifiedTS + '_';
+    			postfix = (newDiag.service == 'OneDrive'? 'W' : 'G') + newDiag.sFileId;
+   	    	};
+   	    	
+	   	    AC.getJiraAttList(issueId, function(attList)
+	   	    {
+	   	    	var fileExists = false;
+	   	    	newDiag.diagramName = prefix + postfix;
+				var lc = newDiag.diagramName.toLowerCase();
+				
+				// Checks if any file will be overwritten
+				for (var i = 0; i < attList.length && !fileExists; i++)
+				{
+					var an = attList[i].filename.toLowerCase();
+	
+					if (an == lc)
+					{
+						fileExists = true;
+					}
+				}
+				
+				if (fileExists)
+				{
+					//Make filename unique
+					newDiag.nameDiff = Date.now();
+					newDiag.diagramName = prefix + newDiag.nameDiff + '-' + postfix;
+				}
+				
+				AC.uploadToJira(fileContent, issueId, newDiag.diagramName, 
+						'application/vnd.jgraph.mxfile', startUpdateInfo, startUpdateInfo); //On error save also as caching is not blocking
+	   	    }, startUpdateInfo);
+   	    }
+	};
+	
+	function onSubmit()
+	{
+		if (activeTab == 'extUrl')
+		{
+			showDiagFromUrl(null, function(diagramUrl, diagramName)
+			{
+				var aspect = null;
+				
+				if (curViewer != null)
+				{
+					var layerIds = [];
+					
+					var model = curViewer.graph.getModel();
+					var childCount = model.getChildCount(model.root);
+						
+					// Get visible layers
+					for (var i = 0; i < childCount; i++)
+					{
+						var layer = model.getChildAt(model.root, i);
+						
+						if (model.isVisible(layer))
+						{
+							layerIds.push(layer.id);
+						}
+					}
+						
+					aspect = curViewer.diagrams[curViewer.currentPage].getAttribute('id') + ' ' + layerIds.join(' ');
+				}
+				
+				doSubmit({
+	        		diagramUrl: diagramUrl,
+	        		diagramName: diagramName,
+	        		aspect: aspect,
+	        		service: 'extUrl'
+	   	        });
+			});
+		}
+		else if (activeTab == 'gDrive') 
+		{
+			gdEditor.doSubmit();
+		}
+		else if (activeTab == 'oneDrive') 
+		{
+			odEditor.doSubmit();
+		}
+		else if (activeTab == 'upload') 
+		{
+			attEditor.doSubmit();
+		}
+	};
+	 
+	function activateTab()
+	{
+		switch (activeTab)
+    	{
+		case 'gDrive':
+	    	if (gdEditor == null)
+    		{
+    			gdEditor = new GDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+    			{
+    				doSubmit({
+    					displayName: selectedFile.title,
+    					service: 'GDrive',
+    					sFileId: selectedFile.id,
+    					aspect: selectedFile.aspect,
+    					mime: selectedFile.mimeType,
+    					createdBy: selectedFile.owners && selectedFile.owners[0]? selectedFile.owners[0].displayName : null,
+    	        		lastModifiedBy: selectedFile.lastModifyingUser? selectedFile.lastModifyingUser.displayName : null,
+    					modifiedDate: selectedFile.modifiedDate,
+    					size: selectedFile.fileSize
+    				}, selFileContent, new Date(selectedFile.modifiedDate).getTime());
+    			}, null, 'GD', true, true);
+			}
+	    	else
+    		{
+	    		gdEditor.spinner.stop();
+    		}
+	    	break;
+	    case 'oneDrive':
+	    	if (odEditor == null)
+    		{
+    			odEditor = new OneDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+ 				{
+    				doSubmit({
+    					displayName: selectedFile.name,
+    					service: 'OneDrive',
+    					sFileId: selectedFile.id,
+    					odriveId: selectedFile.parentReference.driveId,
+    					aspect: selectedFile.aspect,
+    					mime: selectedFile.file.mimeType
+    				}, selFileContent, new Date(selectedFile.lastModifiedDateTime).getTime());
+ 				}, null, 'OD', true, true);
+    		}
+	    	else
+    		{
+	    		odEditor.spinner.stop();
+    		}
+	    	break;
+	    case 'upload':
+	    	attEditor.spinner.stop();
+	    	break;
+    	}
+	}
+	
+	function openTab(evt) 
+	{
+		var tabName = this.getAttribute("data-tabContetn");
+	    // Declare all variables
+	    var i, tabcontent, tablinks;
+
+	    // Get all elements with class="tabcontent" and hide them
+	    tabcontent = document.getElementsByClassName("tabcontent");
+	    for (i = 0; i < tabcontent.length; i++) {
+	        tabcontent[i].style.display = "none";
+	    }
+
+	    // Get all elements with class="tablinks" and remove the class "active"
+	    tablinks = document.getElementsByClassName("tablinks");
+	    for (i = 0; i < tablinks.length; i++) {
+	        tablinks[i].className = tablinks[i].className.replace(" active", "");
+	    }
+
+	    // Show the current tab, and add an "active" class to the button that opened the tab
+	    document.getElementById(tabName).style.display = "block";
+	    evt.currentTarget.className += " active";
+	    
+	    activeTab = tabName;
+	    activateTab();
+	}
+
+	function showElemError(id, errMsg)
+	{
+		AC.$('#' + id).style.border = '1px solid red';
+		AC.$('#' + id + 'Error').innerHTML = errMsg;
+	};
+
+	function showDiagFromUrl(evt, callback)
+	{
+		if (evt)
+		{
+			evt.preventDefault();
+		}
+		
+		var hasErr = false;
+		var diagramName = AC.$('#diagramName').value;
+		
+		if (!diagramName)
+		{
+			showElemError('diagramName', 'Please enter Diagram Name');
+			hasErr = true;
+		}
+		
+		var diagramUrl = AC.$('#diagramUrl').value;
+		
+		if (!diagramUrl)
+		{
+			showElemError('diagramUrl', 'Please enter Diagram URL');
+			hasErr = true;
+		}
+		
+		if (hasErr)
+		{
+			return;
+		} 
+		else if (lastDiagramUrl == diagramUrl) //No need to render diagram again since URL didn't change
+		{
+			if (callback)
+			{
+				callback(diagramUrl, diagramName);
+			}
+			return;
+		}
+		
+		lastDiagramUrl = diagramUrl;
+		
+		var prevDiv = AC.$('#previewEU');
+		spinner.spin(prevDiv);
+		
+		var xhr = new XMLHttpRequest();
+		xhr.open('GET', diagramUrl);
+		
+		xhr.onreadystatechange = function()
+		{
+			if (xhr.readyState == 4)
+			{	
+				spinner.stop();
+				prevDiv.innerHTML = '';
+				curViewer = null;
+				
+				if (xhr.status >= 200 && xhr.status <= 299)
+				{
+					//TODO Png support?
+					var doc = mxUtils.parseXml(xhr.responseText);
+					
+					if (new Editor().extractGraphModel(doc.documentElement) != null)
+					{
+						if (callback)
+						{
+							callback(diagramUrl, diagramName);
+						}
+						else
+						{
+							var container = document.createElement('div');
+							container.style.cssText = 'position:absolute;width:100%;height:auto;bottom:0px;top:0px;border:1px solid transparent;';
+							prevDiv.appendChild(container);
+		
+							curViewer = new GraphViewer(container, doc.documentElement,
+									{highlight: '#3572b0', border: 8, 'auto-fit': true,
+									resize: false, nav: true, lightbox: false, title: diagramName,
+									'toolbar-nohide': true, 'toolbar-position': 'top', toolbar: 'pages layers'});
+						}
+					}
+					else
+					{
+						showElemError('diagramUrl', 'Not a draw.io diagram');
+					}
+				}
+				else
+				{
+					showElemError('diagramUrl', 'Invalid Diagram URL: ' + (xhr.status == 404? 'File Not Found' : 'Error Code ' + xhr.status));
+				}
+			}
+		};
+		
+		xhr.send();
+	};
+	
+	//=======Upload==========
+	attEditor = new AttViewerEditor(function(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, onError)
+	{
+		//We only have add in Jira
+		if (selectedFile != null)
+		{
+			doSubmit({
+				diagramName: selectedFile.name,
+				displayName: selectedFile.name,
+				service: 'AttFile',
+				aspect: aspect,
+				mime: selectedFile.type,
+				size: selectedFile.size,
+				modifiedDate: selectedFile.lastModified
+			}, selFileContent);
+		}
+	}, null, 'UD', true, true);
+
+	//Staring the editor
+	//Setting events listeners
+	document.getElementById("showDiagBtn").addEventListener('click', showDiagFromUrl);
+	
+	function resetBorder()
+	{
+		if (this.value)
+			this.style.border = '';
+		
+		AC.$('#' + this.id + 'Error').innerHTML = '';
+	};
+	
+	var diagramUrl = document.getElementById('diagramUrl');
+	var diagramName = document.getElementById('diagramName');
+	
+	diagramUrl.addEventListener('keypress', resetBorder);
+	diagramName.addEventListener('keypress', resetBorder);
+	diagramUrl.addEventListener('change', resetBorder);
+	diagramName.addEventListener('change', resetBorder);
+	
+	var tabs = document.getElementsByClassName("tablinks");
+	
+	for (var i = 0; i < tabs.length; i++)
+	{
+		tabs[i].addEventListener('click', openTab);
+	}
+
+	AP.sizeToParent(true);
+	
+	document.getElementById('uploadTab').click();
+	
+	AP.dialog.disableCloseOnSubmit();
+	AP.events.on('dialog.submit', onSubmit);
+};
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/fullScreenViewer-1-3-3.html b/src/main/webapp/connect/jira/fullScreenViewer-1-3-3.html
new file mode 100644
index 000000000..53731891d
--- /dev/null
+++ b/src/main/webapp/connect/jira/fullScreenViewer-1-3-3.html
@@ -0,0 +1,255 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/drawlogo-text-bottom.svg);
+	background-position:center 30%;
+	background-repeat:no-repeat;
+	background-size: 128px;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+<script type="text/javascript">
+// Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with Confluence user language
+var lang = getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+	// Logs uncaught errors
+	EditorUi.enableLogging = true;
+	
+	window.onerror = function(message, url, linenumber, colno, err)
+	{
+		message = 'Jira Cloud: ' + ((message != null) ? message : '');
+		
+		EditorUi.logError(message, url, linenumber, colno, err);
+	};
+	
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	function main()
+	{
+		AP.resize('100%', '100%');
+		
+		//keeping the block of AP.require to minimize the number of changes!
+		function doMain(customData)
+		{
+			var diagramId = (customData != null) ? customData.diagramId : null;
+	       	var diagramName = (customData != null) ? customData.diagramName : null;
+	       	var diagramUrl = (customData != null) ? customData.diagramUrl : null;
+	       	var pageId = (customData != null) ? customData.pageId : null;
+	       	var layerIds = (customData != null) ? customData.layerIds : null;
+	    	var serverName = getBaseUrl();
+	    	var timeout = 25000;
+	    	var index1 = serverName.indexOf('//');
+	    	
+	    	if (index1 > 0)
+	    	{
+	    		var index2 = serverName.indexOf('/', index1 + 2);
+	    		
+	    		if (index2 > index1)
+	    		{
+	    			serverName = serverName.substring(index1 + 2, index2);
+	    		}
+	    	}
+	    	
+			var acceptResponse = true;
+			
+			var timeoutThread = window.setTimeout(function()
+			{
+				acceptResponse = false;
+				
+				var flag = AP.flag.create({
+					  title: 'The connection has timed out',
+					  body: 'The server at ' +
+								serverName + ' is taking too long to respond.',
+					  type: 'error',
+					  close: 'manual'
+					});
+
+				//TODO find how to listen to flag close event, currently just close the editor immediately
+				//messages.onClose(message, function()
+				//{
+					AP.dialog.close();
+				//});
+			}, timeout);
+	    	
+			var renderDiagram = function(xml)
+			{
+	    		window.clearTimeout(timeoutThread);
+	    		
+	    		if (acceptResponse)
+		    	{
+	    			document.body.style.backgroundImage = 'none';
+					var viewer = new GraphViewer(null, null, {highlight: '#3572b0', nav: true, lightbox: false, pageId: pageId, layerIds: layerIds});
+					viewer.lightboxChrome = false;
+					viewer.xml = xml;
+
+					// Enables layers via flag to avoid toolbar
+					viewer.layersEnabled = true;
+					
+					var ui = viewer.showLocalLightbox();
+					
+					// Destroy lightbox with ui instance
+					var destroy = ui.destroy;
+					ui.destroy = function()
+					{
+						AP.dialog.close();
+						destroy.apply(this, arguments);
+					};
+		    	}
+			};
+			
+			var renderDiagramError = function() 
+			{
+	    		window.clearTimeout(timeoutThread);
+	    		
+	    		if (acceptResponse)
+		    	{
+	    			AP.jira.refreshIssuePage();
+					AP.dialog.close();
+		    	}
+			};
+			
+			if (diagramUrl != null)
+			{
+				 var xhr = new XMLHttpRequest();
+		 		 xhr.open('GET', diagramUrl);
+		 		
+		 		 xhr.onreadystatechange = function()
+		 		 {
+		 			if (xhr.readyState == 4)
+		 			{	
+		 				if (xhr.status >= 200 && xhr.status <= 299)
+						{
+		 					renderDiagram(xhr.responseText);
+						}
+		 				else
+	 					{
+		 					renderDiagramError();
+	 					}
+		 			}
+		 		 };
+		 		
+		 		 xhr.send();
+			}
+			else
+			{
+		       	// LATER: Add fallback using diagramName lookup via attachment list
+				AP.request({
+					url: '/secure/attachment/' + diagramId + '/',
+					success: renderDiagram,
+					error : renderDiagramError
+				});
+			}
+	    };
+	    AP.dialog.getCustomData(doMain);
+	}
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	
+	function mainBarrier()
+	{
+		if (bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+	
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+</script>
+
+</body>
+</html>
diff --git a/src/main/webapp/connect/jira/fullScreenViewer2.html b/src/main/webapp/connect/jira/fullScreenViewer2.html
new file mode 100644
index 000000000..bc9f3f39e
--- /dev/null
+++ b/src/main/webapp/connect/jira/fullScreenViewer2.html
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Draw.io Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/drawlogo-text-bottom.svg);
+	background-position:center 30%;
+	background-repeat:no-repeat;
+	background-size: 128px;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+<script type="text/javascript">
+// Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with Confluence user language
+var lang = getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+</head>
+<body>
+<script type="text/javascript">
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	function main()
+	{
+		AP.resize('100%', '100%');
+		
+		AP.require(['request', 'dialog', 'jira', 'messages'], function(request, dialog, jira, messages)
+		{
+			var diagramId = (dialog.customData != null) ? dialog.customData.diagramId : null;
+	       	var diagramName = (dialog.customData != null) ? dialog.customData.diagramName : null;  
+	    	var serverName = document.referrer;
+	    	var timeout = 25000;
+	    	var index1 = serverName.indexOf('//');
+	    	
+	    	if (index1 > 0)
+	    	{
+	    		var index2 = serverName.indexOf('/', index1 + 2);
+	    		
+	    		if (index2 > index1)
+	    		{
+	    			serverName = serverName.substring(index1 + 2, index2);
+	    		}
+	    	}
+	    	
+			var acceptResponse = true;
+			
+			var timeoutThread = window.setTimeout(function()
+			{
+				acceptResponse = false;
+				var message = messages.error('The connection has timed out', 'The server at ' +
+					serverName + ' is taking too long to respond.');
+				
+				messages.onClose(message, function()
+				{
+					dialog.close();
+				});
+			}, timeout);
+	    	
+	       	// LATER: Add fallback using diagramName lookup via attachment list
+			request({
+				url: '/secure/attachment/' + diagramId + '/',
+				success: function(xml)
+				{
+		    		window.clearTimeout(timeoutThread);
+		    		
+		    		if (acceptResponse)
+			    	{
+		    			document.body.style.backgroundImage = 'none';
+						var viewer = new GraphViewer(null, null, {highlight: '#3572b0', nav: true, lightbox: false});
+						viewer.currentPage = parseInt(((dialog.customData != null) ? dialog.customData.page : null) || 0);
+						viewer.lightboxChrome = false;
+						viewer.xml = xml;
+	
+						// Enables layers via flag to avoid toolbar
+						viewer.layersEnabled = true;
+						
+						var ui = viewer.showLocalLightbox();
+						
+						// Destroy lightbox with ui instance
+						var destroy = ui.destroy;
+						ui.destroy = function()
+						{
+							dialog.close();
+							destroy.apply(this, arguments);
+						};
+			    	}
+				},
+				error : mxUtils.bind(this,  function() 
+				{
+		    		window.clearTimeout(timeoutThread);
+		    		
+		    		if (acceptResponse)
+			    	{
+						jira.refreshIssuePage();
+						dialog.close();
+			    	}
+				})
+			});
+	    });			
+	}
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	
+	function mainBarrier()
+	{
+		if (bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+	
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+</script>
+
+</body>
+</html>
diff --git a/src/main/webapp/connect/jira/search.html b/src/main/webapp/connect/jira/search.html
new file mode 100644
index 000000000..9c0c0d41a
--- /dev/null
+++ b/src/main/webapp/connect/jira/search.html
@@ -0,0 +1,326 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Search</title>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.7.1/css/aui.css" media="all">
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin: 0;
+	padding: 10px !important;
+	background-color: #fff;
+}
+.btn {
+	float: right;
+	margin: 2px;
+}
+.diagramName {
+	padding-right: 3px;
+}
+.gridHeader, .gridRow {
+	border: 1px solid #e9e9e9;
+	height: 40px;
+}
+
+.gridHeader>.gridHeaderCell {
+    border-top: 0;
+    border-bottom: 0;
+    padding-left: 4px;
+    text-align: left;
+}
+
+.gridHeader>.gridHeaderCell:first-child {
+    border-left: none;
+}
+
+.gridHeader>.gridHeaderCell:last-child {
+    border-right: none;
+}
+
+.gridHeader {
+    background: #e5e5e5;
+    color: black;
+}
+
+.gridRowCell {
+    border-left: 1px solid #f3f3f3;
+    padding-left: 4px;
+}
+
+.gridRow>.gridRowCell {
+    background: #fff;
+}
+
+.gridRowAlt>.gridRowCell {
+    background: #f5f5f5;
+}
+
+#searchTxt {
+	width: 350px;
+	height: 30px;
+}
+.content {
+    max-width: 900px;
+    margin: auto;
+}
+</style>
+</head>
+<body>
+<div class="content">
+  <h1>draw.io Diagrams</h1>
+  <div style="padding: 10px 0 10px">
+	<input id="searchTxt" type="search" placeholder="Search draw.io diagrams content"> <button id="searchBtn" class="aui-button">Search</button>
+  </div>
+  <div id="resultsPanel"></div>
+</div>
+<script type="text/javascript">
+//Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+</script>
+<script type="text/javascript">
+(function()
+{
+	// Specifies connection mode for touch devices (at least one should be true)
+	var baseUrl = getBaseUrl();
+	var connectUrl = baseUrl + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+	
+	var script = document.createElement("script");
+	script.setAttribute('data-options', 'resize:false;margin:false');
+
+	head.appendChild(script);
+	
+	var link = document.createElement("link");
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	script.onload = main;
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	
+	function htmlEntities(s, newline)
+	{
+		s = String(s || '');
+		
+		s = s.replace(/&/g,'&amp;'); // 38 26
+		s = s.replace(/"/g,'&quot;'); // 34 22
+		s = s.replace(/\'/g,'&#39;'); // 39 27
+		s = s.replace(/</g,'&lt;'); // 60 3C
+		s = s.replace(/>/g,'&gt;'); // 62 3E
+
+		if (newline == null || newline)
+		{
+			s = s.replace(/\n/g, '&#xa;');
+		}
+		
+		return s;
+	};
+	
+	function attachButtonEvents(issueId, diagramName, diagramId, diagramDate, openBtn, editBtn, searchTxt)
+	{
+		openBtn.addEventListener('click', function()
+		{
+			AP.dialog.create(
+			{
+               header: diagramName + ' (' + diagramDate + ')',
+			   key: 'drawioFullScreenViewer',
+               size: 'fullscreen',
+			   chrome: true,
+			   customData: {diagramName: diagramName, diagramId: diagramId}
+			});
+		});
+		
+		editBtn.addEventListener('click', function()
+		{
+			AP.dialog.create(
+			{
+			   key: 'drawioEditor',
+			   width: '100%',
+			   height: '100%',
+			   chrome: false,
+			   customData : {issueId: issueId, diagramName: diagramName, diagramId: diagramId}
+			}).on("close", function()
+			{
+				doSearch(searchTxt);
+			});
+		});
+	};
+	
+	function createIssueDiagramsRows(issue, grid, isAlt, searchTxt)
+	{
+		var props = issue.properties["drawio-metadata"];		
+		var isFirst = true;
+		
+		for (var i = 0; i < props.name.length; i++)
+		{
+			if (searchTxt != null && searchTxt.length > 0)
+			{
+				var searchTest = new RegExp(searchTxt, "i");
+				//do per diagram filtering
+				if (!searchTest.test(props.name[i]) && !searchTest.test(props.txtContent[i]))
+					continue;
+			}
+			var row = document.createElement('tr');
+			row.className = isAlt? "gridRowAlt" : "gridRow";
+			var td = document.createElement('td');
+			td.className = "gridRowCell";
+			td.innerHTML = isFirst? ("<a href='" + baseUrl + "/browse/" + issue.key + "' target='_blank'>"+ htmlEntities(issue.key) + "</a>"): "";
+			row.appendChild(td);
+			td = document.createElement('td');
+			td.className = "gridRowCell";
+			var div =  document.createElement('div');
+			var span = document.createElement('span');
+			var modDate = new Date(props.updated[i]).toLocaleString();
+			span.innerHTML = htmlEntities(props.name[i]) + " (" + modDate + ")";
+			span.className = "diagramName";
+			div.appendChild(span);
+			var editBtn = document.createElement('button');
+			editBtn.innerHTML = "Edit Diagram";
+			editBtn.className = "aui-button btn";
+			div.appendChild(editBtn);
+			var openBtn = document.createElement('button');
+			openBtn.innerHTML = "Open Diagram";
+			openBtn.className = "aui-button btn";
+			div.appendChild(openBtn);
+			attachButtonEvents(issue.id, props.name[i], props.id[i], modDate, openBtn, editBtn, searchTxt);
+			td.appendChild(div);
+			row.appendChild(td);
+			grid.appendChild(row);
+			isFirst = false;
+		};
+	};
+	
+	function fillResults(issues, searchTxt)
+	{
+		var resultsPanel = document.getElementById("resultsPanel");
+		resultsPanel.innerHTML = "";
+		
+		var grid = document.createElement('table');
+		grid.style.whiteSpace = 'nowrap';
+		grid.style.width = '100%';
+		//create header row
+		var hrow = document.createElement('tr');
+		hrow.className = "gridHeader";
+		var th = document.createElement('th');
+		th.className = "gridHeaderCell";
+		th.innerHTML = "Issue";
+		hrow.appendChild(th);
+		th = document.createElement('th');
+		th.className = "gridHeaderCell";
+		th.innerHTML = "Diagrams";
+		hrow.appendChild(th);
+		grid.appendChild(hrow)
+		resultsPanel.appendChild(grid);
+		
+		var isAlt = false;
+		
+		if (issues.length == 0)
+		{
+			var emptyNote = document.createElement('div');
+			emptyNote.innerHTML = "No diagrams found!";
+			resultsPanel.appendChild(emptyNote);
+		}
+		else
+		{
+			for (var i = 0; i < issues.length; i++)
+			{
+				createIssueDiagramsRows(issues[i], grid, isAlt, searchTxt);
+				isAlt = !isAlt;
+			}
+		}
+	};
+	
+	var searchTxtInput = document.getElementById("searchTxt");
+	
+	document.getElementById("searchBtn").addEventListener('click', function()
+	{ 
+		doSearch();
+	});
+	
+	searchTxtInput.addEventListener('keypress', function(e) 
+	{
+		if (e.keyCode == 13) 
+		{
+			doSearch();
+		}
+	});
+	
+	function doSearch(searchTxt)
+	{
+		searchTxt = searchTxt != null? searchTxt : searchTxtInput.value;
+		
+		var jql = "";
+		
+		if (searchTxt.length > 0)
+		{
+			jql = encodeURIComponent('diagramTextContent ~ "' + searchTxt.replace('"', '\"') + '*" OR diagramName ~ "' + searchTxt.replace('"', '\"') + '*"');
+		}
+		else
+		{
+			jql = "hasDiagram%3D1";
+		}
+		
+		AP.request({
+			url: '/rest/api/2/search?jql=' + jql + '&properties=drawio-metadata',
+			type: 'GET',
+			success: function(resp) 
+			{
+				resp = JSON.parse(resp);
+				fillResults(resp.issues, searchTxt);
+			},
+			error: function() 
+			{
+				//TODO handle errors
+			}
+		});
+	};
+	
+	function main()
+	{
+		AP.request({
+			url: '/rest/api/2/search?jql=hasDiagram%3D1&properties=drawio-metadata',
+			type: 'GET',
+			success: function(resp) 
+			{
+				resp = JSON.parse(resp);
+				fillResults(resp.issues);
+			},
+			error: function() 
+			{
+				//TODO handle errors
+			}
+		});
+	};
+	
+})();
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/jira/spinner.gif b/src/main/webapp/connect/jira/spinner.gif
new file mode 100644
index 0000000000000000000000000000000000000000..054973c97b0d1fddec2722cc42cb68e39d27514c
GIT binary patch
literal 1781
zcmaJ>dq7il6ut~dQG_XoqF9#!3dXj(CwG%6unm|p-YQ`x<L<&HZ1=KVWYP;KN&+Db
z@CA~H79k=HpQy<r6T}CGnp$S!n<$26Wmt5Fg8c#Af9~&``<?GQ=XcIMVX{zIpr8U&
zpwSt~&(H7e?d|F5F`Lbuot*;%1J%{lO-)U;wYA;d-R0%wEiEl3lWA~p&}cLc4Gnn?
zO^%et$BBcZrECUdYXblP=}M4CgAxUyAm4$D47dVGLkTb$O;u|}wEp9#XrNjtqAlmi
zAvrEaRqF6;9U7M%8INSAAp#|B(LylLAT(%j4N53LgC<?87aBw~g%V3fh2+`lX41f6
z2$3eD1zSIWR!uRcLqQ$`q9YI=0{JWki^B~F2=E8l5DQ{LY$l6MX9Wm3Y#{`JFCQAI
zrc<T}V<n+4wMa`uQxOC%WHPg|vKUz$2Bu48vIGKwm4nTulL)$gt(H(2=vuwk2!jOG
zBRVxss4*>QWmF_%nS_W&X8NK84L(Y%)iZ|6VIY`>X;9!y76Y=DGy;^%{~xN+jH2~K
zEcz<nF^To@YjKnri|VmV9fFc@FRK(T6zfn0f$8EgEPdn_qg5Dz=~WmGisN{oT!E;y
zR(lvPmkVWDJ)zJds7xZFkqivAS}6<(mhd<*pT`dt@L4P=OTdNTPzjeK;c?;6U}^A3
ztOP?cHK>*tiB-Oe<&PU{9R&?eDoaqEdJU=!)nOWNxMZPv{9HKW^1X~zj-Ly6+*l@=
z4Aa`!|1^5UMNW_PI6AhZF*^9DmYjASIo38q|NQ-Y@ULfo{_*?M-<~`ku=M}>OW)7E
zj~+g_fA8*{p4&g&`tjxu-`}`??Ypa2E_Z)>sq5l}^XEFxcC?@Q=JeNXtu4)`zB+m0
zc+;_?M-Cr4*l7N;;XwWVx_z}@)O`Ng-aXa3t9E@_xwE2t$M$Vox0IEZm_8}qT=a2a
zLH?$X@-}YBU2j~M^Wg{YzxQtTT0_>FOhT{Az%i{RJ#DpGm70Pokz_^Es&`hty(00g
zgyqYY#>d6RL`Ox+BbF?dg@=VoCE}3aphXKsfeVBJIDpUNa@gcA#i0AYIp5EB-drDV
zFPbO##_MxDX3uh;Im2zbtIM>hRA;9tj*}-jOq}qVy`3$ETn?Vk>>MTm&VWC;C&-0E
z1pvDUONVUV$wPi;b_Om%)I06qh+@{gl7>Q<{*ce>3(;%}^>MP_u--GW(EaZEF!!TI
z*Tg=!JqEAI-NV^ymykmb^E}RQ>dA0#(?-$85=gel+=1=zlKZ7y35`Icdrnky*#!$%
zdKGuP4M?k@DTm<`dC3Dk)OnM_Ld?oFkWaLi(C;ZXUS__onp;`23a|1N7MZs13!-(^
zms~@dDV0GsZb>#1988YBv+RH@m#JgPCR#cK1ywU$wwlumdSKwX(uPxi$H<%C?cmiF
zQ_xlswb0^vY5xoZcUpZ%`;&zEb1FB+nZqk69bv6i?cCRjy!{Jhr5;AaF&y1L^YrpZ
zbqNiAD<~Yqx6f-Vxya#bJaFj77G059l^<m9SR*`_x>$bJJJw|EZ)}+T{C0_L4*!`A
zt35C2Sf65<?P3bPt7dn}Hbh~6p3ASCp0R>ODN{X|r<;4rGI1;kvLdomN9p$}63;J%
zRz8ASc#v#caRj_~vp?_d<2^=>tDDib83=^M#op`ssJTAUWHUgxI`1w^@^kbs-b6CY
zS3(ZXuDfFJJ7)qq2udQi-Pxn9KW@yvy^u>_Jh;4iStB*7H6tR(C&!kX)B#7NS6m3<
zJ)up{bqnLM{CquHTJs1lvSUMzI0l|p+UyYIt5S8H0aA-CDhFzveRCwG(S<+YK(BL3
MNx67L0sssC1r+s*?f?J)

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/jira/viewerPanel-1-3-3.html b/src/main/webapp/connect/jira/viewerPanel-1-3-3.html
new file mode 100644
index 000000000..ea18a925d
--- /dev/null
+++ b/src/main/webapp/connect/jira/viewerPanel-1-3-3.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Viewer</title>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.7.1/css/aui.css" media="all">
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+	background-color: #fff;
+	background-image:url(/connect/jira/spinner.gif);
+	background-repeat:no-repeat;
+	background-position:center;
+}
+.drawio-add-diagram {
+	float: right;
+	margin-right: 5px;
+}
+.loading {
+	background-color: #fff;
+	background-image:url(/connect/jira/spinner.gif);
+	background-repeat:no-repeat;
+	background-position:center;
+}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+//Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+function getDocDim()
+{
+	var body = document.body,
+    html = document.documentElement;
+
+	var height = Math.max(body.offsetHeight, html.clientHeight, html.offsetHeight);
+
+	var width = Math.max(body.offsetWidth, html.clientWidth, html.offsetWidth);
+	
+	return {w: width, h: height};
+};
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with JIRA user language
+var lang = getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script src="/js/viewer.min.js" type="text/javascript"></script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<script src="viewerPanel.js" type="text/javascript"></script>
+<script type="text/javascript">
+// Logs uncaught errors
+EditorUi.enableLogging = true;
+
+window.onerror = function(message, url, linenumber, colno, err)
+{
+	message = 'Jira Cloud: ' + ((message != null) ? message : '');
+	
+	EditorUi.logError(message, url, linenumber, colno, err);
+};
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/jira/viewerPanel.js b/src/main/webapp/connect/jira/viewerPanel.js
new file mode 100644
index 000000000..71a81dd60
--- /dev/null
+++ b/src/main/webapp/connect/jira/viewerPanel.js
@@ -0,0 +1,892 @@
+(function()
+{
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+	
+	var script = document.createElement("script");
+	script.setAttribute('data-options', 'resize:false;margin:false');
+
+	head.appendChild(script);
+	
+	var link = document.createElement("link");
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	
+	function mainBarrier()
+	{
+		if (bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+
+	function main()
+	{
+		var glanceMode = getUrlParam('glance') == '1';
+		
+		//Create draw.io panel toolbar (currently, we only have "Add Diagram" button)
+		var toolbar = document.createElement('div');
+		toolbar.style.cssText = "width:100%;height:35px";
+		var addDiagramBtn = document.createElement('button');
+		addDiagramBtn.className = "aui-button drawio-add-diagram";
+		mxUtils.write(addDiagramBtn, mxResources.get('addDiagram', null, 'Add Diagram'));
+		
+		addDiagramBtn.addEventListener('click', function()
+		{
+			AP.dialog.create(
+			{
+			   key: 'drawioEditor',
+			   width: '100%',
+			   height: '100%',
+			   chrome: false
+			});
+		});
+		
+		toolbar.appendChild(addDiagramBtn);
+
+		//FIXME Jira open the dialog with incorrect body size (body size is 100% while viewport is the correct size!
+//		var embedDiagramBtn = document.createElement('button');
+//		embedDiagramBtn.className = "aui-button drawio-add-diagram";
+//		mxUtils.write(embedDiagramBtn, mxResources.get('embedDiagram', null, 'Embed Diagram'));
+//		
+//		embedDiagramBtn.addEventListener('click', function()
+//		{
+//			AP.dialog.create(
+//			{
+//			   key: 'embedDiagram',
+//			   width: '70%',
+//			   height: '70%',
+//			   chrome: true
+//			});
+//		});
+//		
+//		toolbar.appendChild(embedDiagramBtn);
+		document.body.appendChild(toolbar);
+		
+		var editImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAQEBBycnIgICBqwj3hAAAAAXRSTlMAQObYZgAAADlJREFUCNdjoBwoChrAmCyGggJwYWVBBSiTSVDICKFa0AEuLCiEJKyAX5gBSZgBSZgBKGwMBKQ7HAAWzQSfKKAyBgAAAABJRU5ErkJggg==';
+		var removeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVAQMAAACT2TfVAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABlJREFUCNdjQAF/GBj4/x8AYxBg/k80RgYApAUPr950a4AAAAAASUVORK5CYII=';
+		var issueId = getUrlParam('issueId');
+		var serverName = getBaseUrl();
+		var timeout = 25000;
+		var index1 = serverName.indexOf('//');
+		var updateTiles, updateHeight;
+		
+		if (index1 > 0)
+		{
+			var index2 = serverName.indexOf('/', index1 + 2);
+			
+			if (index2 > index1)
+			{
+				serverName = serverName.substring(index1 + 2, index2);
+			}
+		}
+		
+		// Delayed invocation see below
+		function init()
+		{
+			// Workaround to ignore scrollbars when applying fit to available width in all but FF
+			if (!mxClient.IS_FF)
+			{
+				document.body.style.width = document.documentElement.offsetWidth + 'px';
+			}
+			
+			AP.resize('100%', '200px');
+			
+			var embeddedDiagrams = null;
+			var attDiagrams = null;
+			var allAttachments = null;
+			var diagInfoMap = {};
+			
+			AP.request({
+	   	        url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+	   	        type: "GET",
+	   	        success: function(resp)
+	   	        {
+	   	        	resp = JSON.parse(resp);
+	   	            var diagramsInfo = resp.value;
+	   	         	embeddedDiagrams = [];
+	   	         
+		   	        if (diagramsInfo.embeddedDiagrams != null)
+	   	        	{
+		   	        	embeddedDiagrams = diagramsInfo.embeddedDiagrams;
+	   	        	}
+		   	        
+		   	        if (diagramsInfo.other != null)
+	   	        	{
+		   	        	for (var i = 0; i < diagramsInfo.name.length; i++)
+	   	        		{
+		   	        		diagInfoMap[diagramsInfo.name[i]] = diagramsInfo.other[i];
+	   	        		}
+	   	        	}
+		   	        
+		   	     	checkDone();
+	   	        },
+	   	        error : function()
+	   	        {
+	   	        	embeddedDiagrams = [];
+	   	        	checkDone();
+	   	        }
+	   	    });
+			
+			//keeping the block of AP.require to minimize the number of changes!
+			{
+				AP.request({
+					url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+					type: 'GET',
+					success: function(resp) 
+					{
+						var respObj = JSON.parse(resp);
+						attDiagrams = [];
+						allAttachments = [];
+						
+						for (var i = 0; i < respObj.fields.attachment.length; i++)
+						{
+							var attachment = respObj.fields.attachment[i];
+							allAttachments.push(attachment);
+							
+							if (attachment.mimeType == 'application/drawio')
+							{
+								attachment.createDate = new Date(attachment.created.replace("+0000", "+00:00")); //The replace is needed for IE11
+								attDiagrams.push(attachment);	
+							}
+						}
+
+						//sort diagrams by date
+						attDiagrams.sort(function(a,b)
+						{
+							return b.createDate - a.createDate;
+						});
+						
+						checkDone();
+					},
+					error: function() 
+					{
+						attDiagrams = [];
+						allAttachments = [];
+						checkDone();
+					}
+				});
+				
+				function checkDone()
+				{
+					if (embeddedDiagrams != null && attDiagrams != null)
+					{
+						var tbHeight = GraphViewer.prototype.toolbarHeight;
+						var tiles = [];
+						var count = 0;
+						var tilesPerRow, tileWidth, tileWidthCss, tileHeightCss, lastWidth;
+						
+						function showError(container, errMsg)
+						{
+							container.style.cssText = '';
+							container.className = '';
+							container.style.textAlign = 'center';
+							container.style.color = 'red';
+							container.style.marginTop = tbHeight + 'px';
+							container.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+								errMsg;
+						};
+						
+						function updateTileSize()
+						{
+							var dim = getDocDim();
+							
+							if (glanceMode)
+							{
+								tilesPerRow = 1; //one per row is good as size is predefined and we have all the area
+								tileWidth = dim.w - 20; //potential scrollbar width (usually 17px)
+							}
+							else 
+							{
+								tilesPerRow = Math.max(Math.round(dim.w / 250), 1);
+								//floor and -1 to avoid IE issues of moving last tile to next row
+								tileWidth = Math.floor(dim.w / tilesPerRow) - 1;
+							}
+
+							tileWidthCss = tileWidth + "px";
+							tileHeightCss = (tileWidth + tbHeight) + "px";
+						};
+						
+						updateTileSize();
+						AP.resize('100%', tileWidth + tbHeight + 35);
+						
+						updateHeight = function ()
+						{
+							var dim = getDocDim();
+							
+							lastWidth = dim.w;
+							var rows = Math.ceil(tiles.length / tilesPerRow);
+
+							// +5 is needed to include margin, 35 is the panel toolbar height
+							var h = rows == 0? 30 : rows * (tiles[0].tile.offsetHeight + 5) + 50;
+							
+							// Restricts the max sidebar panel height
+							var maxH = screen.height * 1.5;
+							
+							//In right panel, no need to set max as the size is automatically controlled by Jira. This avoids double scrollbars
+							if (!glanceMode) 
+							{
+								h = Math.min(maxH, h);
+							}
+							else
+							{
+								h += 150; //To have the last viewer visible especially in the issue viewer	
+							}
+							
+							AP.resize('100%', h);
+							
+							// Workaround for iframe scrollbars
+							document.body.style.height = h + 'px';
+							
+							if (glanceMode)
+							{
+								document.body.style.width = (tileWidth * tilesPerRow) + 'px';
+							}
+							
+							document.body.style.overflowY = (!glanceMode && maxH == h)? "auto" : "hidden";
+						};
+						
+						updateTiles = function() 
+						{
+							var dim = getDocDim();
+							
+							if (lastWidth != dim.w)
+							{
+								updateTileSize();
+								
+								for (var i = 0; i < tiles.length; i++)
+								{
+									tiles[i].title.style.width = tileWidthCss;
+
+									tiles[i].container.style.width = tileWidthCss;
+									tiles[i].container.style.height = tileWidthCss;
+									
+									tiles[i].tile.style.width = tileWidthCss;
+									tiles[i].tile.style.height = tileHeightCss;
+								}
+								
+								updateHeight();
+								
+								return true;
+							}
+							
+							return false;
+						};
+						
+						//TODO FIXME Jira resize is not stable now, the panel is not resized in issues viewer unless it is closed, then open 
+						//In glance mode, resize handler cause many issues and it is not actually needed!
+						if (!glanceMode)
+						{
+							window.addEventListener('resize', updateTiles);
+						}
+
+						function finish() 
+						{
+							count--;
+							
+			 				if (count == 0) 
+			 				{
+			 					document.body.style.backgroundImage = 'none';
+			 					document.body.style.width = '';
+								updateHeight();
+			 				}
+						};
+	
+						function loadDiagram(value)
+						{
+							var attId = null;
+							count++;
+							var tile = document.createElement('div');
+							tile.style.cssText = 'width:' + tileWidthCss + ';height:' + tileHeightCss + ';display:inline-block;overflow: hidden;';							
+							document.body.appendChild(tile);
+							
+							var container = document.createElement('div');
+							container.style.cssText = 'position:relative;box-sizing:border-box;margin-bottom:2px;' +
+								'width:' + tileWidthCss + ';height:' + tileWidthCss + ';border:1px solid transparent;overflow: hidden;'; 
+							container.className = 'loading';
+							
+							// Adds filename and ID to side panel
+							var title = document.createElement('div');
+							
+							if (value.createDate != null)
+							{
+								var createDate = value.createDate.toLocaleString();
+								mxUtils.write(title, value.filename + ' (' + createDate + ')');
+								var displayName = value.author != null ? value.author.displayName : '';
+								title.setAttribute('title', value.filename + ' (' + createDate + ') - ' + displayName +
+										' [ID: ' + value.id + ']');
+							}
+							else
+							{
+								var t = value.displayName || value.diagramName;
+								mxUtils.write(title, t);
+								var modifiedDate = value.modifiedDate? ' (' + new Date(value.modifiedDate).toLocaleString() + ')' : '';
+								title.setAttribute('title', t + modifiedDate + (value.createdBy? ' - ' + value.createdBy : '') +
+										(value.lastModifiedBy? ' [Last Modified By: ' + value.lastModifiedBy + ']' : ''));
+							}
+							
+							title.style.cssText = 'position:relative;box-sizing:border-box;width:' + tileWidthCss + ';padding: 6px 0 0 3px;height:' + tbHeight +
+								'px;margin-bottom:-' + tbHeight + 'px;text-align:left;white-space:nowrap;cursor:pointer;overflow:hidden;';
+							tile.appendChild(title);					
+							tile.appendChild(container);
+							tiles.push({tile: tile, container: container, title: title});
+							var acceptResponse = true;
+							
+							var timeoutThread = window.setTimeout(function()
+							{
+								acceptResponse = false;
+								
+								showError(container, 'The connection has timed out: The server at ' +
+										serverName + ' is taking too long to respond.');
+	 							finish();
+							}, timeout);
+							
+							function renderDiagram(xml)
+							{
+						 		window.clearTimeout(timeoutThread);
+								
+						 		if (acceptResponse)
+						 		{
+						 			var pageId, layerIds;
+						 			
+						 			var aspect = value.aspect || (diagInfoMap[value.filename] != null? diagInfoMap[value.filename].aspect : null);
+									
+									if (aspect != null)
+									{
+										var aspectArray = aspect.split(' ');
+										
+										if (aspectArray.length > 1)
+										{
+											pageId = aspectArray[0];
+											layerIds = aspectArray.slice(1);
+										}
+									}
+									
+									container.innerHTML = '';
+									
+									var doc = typeof xml === 'string'? mxUtils.parseXml(xml) : xml;
+		
+									var btnDefs = {
+										'edit': {title: mxResources.get('edit'), enabled: typeof window.Blob !== 'undefined',
+											image: editImage, handler: function()
+										{
+											AP.dialog.create(
+											{
+											   key: 'drawioEditor',
+											   width: '100%',
+											   height: '100%',
+											   chrome: false,
+											   customData : {diagramName: value.filename, diagramId: value.id, page: viewer.currentPage, diagInfo: diagInfoMap[value.filename]}
+											});
+											
+											//TODO Edit for service based files??
+										}},
+										'remove': {title: mxResources.get('delete'), image: removeImage, handler: function()
+										{
+											if (confirm(mxResources.get('removeIt', [value.filename || value.displayName || value.diagramName]) + '?'))
+											{
+												if (value.diagramUrl != null || value.service != null)
+												{
+													var doDelete = function(resp)
+											   	    {
+										   	        	resp = JSON.parse(resp);
+										   	            var diagramsInfo = resp.value;
+											   	        
+											   	        if (diagramsInfo.embeddedDiagrams != null)
+										   	        	{
+											   	        	var list = diagramsInfo.embeddedDiagrams;
+											   	        	var found = false;
+											   	        	
+											   	        	for (var i = 0; i < list.length; i++)
+										   	        		{
+											   	        		if (list[i].diagramUrl == value.diagramUrl && list[i].diagramName == value.diagramName)
+										   	        			{
+											   	        			list.splice(i, 1);
+											   	        			found = true;
+											   	        			break;
+										   	        			}
+										   	        		}
+											   	        	
+											   	        	if (found)
+											   	        	{
+											   	        		if (diagramsInfo.id == null)
+										   	        			{
+											   	        			diagramsInfo.id = [];
+										   	        			}
+											   	        		
+													   	     	//Glance counter properties
+													   	     	AP.request({
+													   	            url: "/rest/api/2/issue/" + issueId + "/properties/com.atlassian.jira.issue:com.mxgraph.jira.plugins.drawio:drawioViewerGlance:status",
+													   	            type: "PUT",
+													   	            data: JSON.stringify({ type: 'badge', value: { label: String(diagramsInfo.id.length + diagramsInfo.embeddedDiagrams.length) } }),
+													   	            contentType: "application/json"
+													   	        });
+										
+													   	     	AP.request({
+													   	            url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+													   	            type: "PUT",
+													   	            data: JSON.stringify(diagramsInfo),
+													   	            contentType: "application/json",
+													   	            success: function()
+													   	            {
+														   	        	AP.jira.refreshIssuePage();
+													   	            },
+													   	            error : function()
+													   	            {
+													   	            	alert('Remove failed, please try again later.');
+													   	            }
+													   	        });
+											   	        	}
+											   	        	else
+										   	        		{
+											   	        		alert('Diagram not found.');
+											   	        		
+												   	        	AP.jira.refreshIssuePage();
+										   	        		}
+										   	        	}
+											   	        else
+										   	        	{
+											   	        	alert('Unexpected Error.');
+										   	        	}
+											   	    };
+														
+											   	    AP.request({
+											   	        url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+											   	        type: "GET",
+											   	        success: doDelete,
+											   	        error : function() 
+											   	        {
+											   	        	alert('Unexpected Error, please try again later.')
+											   	        }
+											   	    });
+											   	    
+											   	    if (attId != null)
+													{
+														AP.request({
+										    	            url: '/rest/api/2/attachment/' + attId,
+										    	            type: 'DELETE',
+										    	            success: AC.noop,
+										    	            error: AC.noop
+														});
+													}
+												}
+												else
+												{
+													AP.request({
+									    	            url: '/rest/api/2/attachment/' + value.id,
+									    	            type: 'DELETE',
+									    	            success: function()
+									    	            {
+									    	            	AP.request({
+													   	        url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+													   	        type: "GET",
+													   	        success: function(resp)
+														   	    {
+													   	        	resp = JSON.parse(resp);
+													   	            var diagramsInfo = resp.value;
+														   	        
+														   	        if (diagramsInfo.id != null)
+													   	        	{
+														   	        	var list = diagramsInfo.id;
+														   	        	var found = false;
+														   	        	
+														   	        	for (var i = 0; i < list.length; i++)
+													   	        		{
+														   	        		if (list[i] == value.id)
+													   	        			{
+														   	        			list.splice(i, 1);
+														   	        			diagramsInfo.name.splice(i, 1);
+														   	        			diagramsInfo.txtContent.splice(i, 1);
+																   	        	diagramsInfo.updated.splice(i, 1);
+														   	        			found = true;
+														   	        			break;
+													   	        			}
+													   	        		}
+														   	        	
+														   	        	if (diagramsInfo.id.length == 0)
+													   	        		{
+														   	        		diagramsInfo.hasDiagram = 0;
+													   	        		}
+														   	        	
+														   	        	if (found)
+														   	        	{
+														   	        		if (diagramsInfo.embeddedDiagrams == null)
+													   	        			{
+														   	        			diagramsInfo.embeddedDiagrams = [];
+													   	        			}
+
+																   	     	//Glance counter properties
+																   	     	AP.request({
+																   	            url: "/rest/api/2/issue/" + issueId + "/properties/com.atlassian.jira.issue:com.mxgraph.jira.plugins.drawio:drawioViewerGlance:status",
+																   	            type: "PUT",
+																   	            data: JSON.stringify({ type: 'badge', value: { label: String(diagramsInfo.id.length + diagramsInfo.embeddedDiagrams.length) } }),
+																   	            contentType: "application/json"
+																   	        });
+													
+																   	     	AP.request({
+																   	            url: "/rest/api/2/issue/" + issueId + "/properties/drawio-metadata",
+																   	            type: "PUT",
+																   	            data: JSON.stringify(diagramsInfo),
+																   	            contentType: "application/json",
+																   	            success: function()
+																   	            {
+																	   	        	AP.jira.refreshIssuePage();
+																   	            },
+																   	            error : function()
+																   	            {
+																   	            	AP.jira.refreshIssuePage();
+																   	            }
+																   	        });
+														   	        	}
+														   	        	else
+													   	        		{
+															   	        	AP.jira.refreshIssuePage();
+													   	        		}
+													   	        	}
+														   	    },
+													   	        error : function() 
+													   	        {
+													   	        	AP.jira.refreshIssuePage();
+													   	        }
+													   	    });
+									    	            },
+									    	            error : function()
+									    	            {
+									    	            	AP.jira.refreshIssuePage();
+									    	            }
+									    	        });
+												}
+											}
+										}}
+									};
+									
+									var viewer = new GraphViewer(container, doc.documentElement, {highlight: '#3572b0',
+										'toolbar-position': 'top', toolbar: (value.diagramUrl != null || value.service != null? '' : 'edit ') +
+										'pages layers lightbox remove', border: 8, 'auto-fit': true, resize: false,
+										pageId: pageId, layerIds: layerIds,
+										nav: true, title: value.filename || value.displayName || value.diagramName, 'toolbar-buttons': btnDefs});
+									
+									// Handles resize of iframe after zoom
+									var graphDoResizeContainer = viewer.graph.doResizeContainer;
+									
+									viewer.graph.doResizeContainer = function(width, height)
+									{
+										graphDoResizeContainer.apply(this, arguments);
+										updateHeight();
+									};
+									
+									// Updates the size of the iframe in responsive cases
+									viewer.updateContainerHeight = function(container, height)
+									{
+										updateHeight();
+									};
+		
+									viewer.showLightbox = function()
+									{
+										//Create an aspect reflecting current view
+										var layerIds = [], pageId = viewer.diagrams[viewer.currentPage].getAttribute('id');
+		
+										var model = viewer.graph.getModel();
+										var childCount = model.getChildCount(model.root);
+											
+										// Get visible layers
+										for (var i = 0; i < childCount; i++)
+										{
+											var layer = model.getChildAt(model.root, i);
+											
+											if (model.isVisible(layer))
+											{
+												layerIds.push(layer.id);
+											}
+										}
+										
+										AP.dialog.create(
+										{
+						                   header: value.diagramUrl != null || value.service != null? (value.displayName || value.diagramName) : value.filename + ' (' + createDate + ')',
+										   key: 'drawioFullScreenViewer',
+						                   size: 'fullscreen',
+										   chrome: true,
+										   customData: {diagramUrl: value.diagramUrl, diagramName: value.filename || value.displayName || value.diagramName, 
+											   diagramId: value.id || attId, pageId: pageId, layerIds: layerIds, diagInfo: value}
+										});					
+									};
+
+									finish();
+						 		}
+							};
+							
+							// Loads attachment content
+							if (value.diagramUrl != null)
+							{
+								 var xhr = new XMLHttpRequest();
+						 		 xhr.open('GET', value.diagramUrl);
+						 		
+						 		 xhr.onreadystatechange = function()
+						 		 {
+						 			if (xhr.readyState == 4)
+						 			{	
+						 				if (xhr.status >= 200 && xhr.status <= 299)
+										{
+						 					renderDiagram(xhr.responseText);
+										}
+						 				else
+					 					{
+											showError(container, 'Error: Cannot fetch diagram "' + value.diagramName + '"');
+											finish();
+					 					}
+						 			}
+						 		 };
+						 		
+						 		 xhr.send();
+							}
+							else if (value.service != null)
+							{
+								var tryCachedFile = function(prefix, postfix, nameDiff, onError)
+								{
+									var notFound = true;
+									
+									for (var i = 0; i < allAttachments.length; i++)
+									{
+										var attInfo = allAttachments[i].filename.match(/(\d+_)(\d+-)?(.*)/);
+										
+										if (attInfo != null && attInfo[3] == postfix && (nameDiff == null || (attInfo[2] == nameDiff + '-')))
+										{
+											if (attInfo[1] != prefix)
+											{
+												AP.request({
+								    	            url: '/rest/api/2/attachment/' + allAttachments[i].id,
+								    	            type: 'DELETE',
+								    	            success: AC.noop,
+								    	            error: AC.noop
+												});
+											}
+											else
+											{
+												notFound = false;
+												attId = allAttachments[i].id;
+												
+												AP.request({
+													url: '/secure/attachment/' + attId + '/',
+													success: renderDiagram,
+													error: onError
+												});
+											}
+										}
+									}
+									
+									if (notFound)
+									{
+										onError();
+									}
+								};
+								
+								function cacheAndRender(fileContent, fileDoc, cachedFilename)
+								{
+									renderDiagram(fileDoc);
+									
+		        					AC.uploadToJira(fileContent, issueId, cachedFilename, 
+		        							'application/vnd.jgraph.mxfile', function(resp)
+		        							{
+				        						resp = JSON.parse(resp);
+				        						attId = resp[0].id;
+		        							}, GAC.noop);
+								};
+								
+								var getFileErr = function(err)
+								{
+									window.clearTimeout(timeoutThread);
+									
+							 		if (acceptResponse)
+							 		{
+										showError(container, 'Error: ' + ((err? err.message : '') || 'Unknown'));
+										finish();
+							 		}
+								};
+								
+								var getFileInfoErr = function(err)
+								{
+									window.clearTimeout(timeoutThread);
+										
+							 		if (acceptResponse)
+							 		{
+										if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+										{
+											showError(container, 'Error: Access Denied. You do not have permission to access this file.');
+										}
+										else
+										{
+											showError(container, 'Error: ' + ((err? err.message : '') || 'Unknown'));
+										}
+										
+										finish();
+							 		}
+								};
+								
+								if (value.service == 'GDrive')
+								{
+									GAC.getFileInfo(value.sFileId, function(fileInfo)
+									{
+										var prefix = new Date(fileInfo.modifiedDate).getTime() + '_';
+										var postfix = 'G' + fileInfo.id;
+										
+										tryCachedFile(prefix, postfix, value.nameDiff, function()
+										{
+											GAC.getDrawioFileDoc(fileInfo, function(doc, cnt)
+											{
+												cacheAndRender(cnt, doc, prefix + (value.nameDiff? value.nameDiff + '-' : '') + postfix);
+											}, getFileErr);
+										});
+									}, getFileInfoErr);
+								}
+								else if (value.service == 'AttFile')
+								{
+									attId = value.cacheAttId;
+									
+									AP.request({
+										url: '/secure/attachment/' + attId + '/',
+										success: function(resp)
+										{
+											var isPng = value.mime == 'image/png';
+										
+											try 
+											{
+												if (isPng)
+												{
+													resp = AC.extractGraphModelFromPng(resp);
+												}
+												
+												renderDiagram(resp);
+											}
+											catch(e)
+											{
+												getFileErr();
+											}
+										},
+										error: getFileErr
+									});
+								}
+								else if (value.service == 'OneDrive')
+								{
+									AC.getFileInfo(value.sFileId, value.odriveId, function(fileInfo)
+									{
+										var prefix = new Date(fileInfo.lastModifiedDateTime).getTime() + '_';
+										var postfix = 'W' + fileInfo.id;
+										
+										tryCachedFile(prefix, postfix, value.nameDiff, function()
+										{
+											AC.getDrawioFileDoc(fileInfo, function(doc, cnt)
+											{
+												cacheAndRender(cnt, doc, prefix + (value.nameDiff? value.nameDiff + '-' : '') + postfix);
+											}, getFileErr);
+										});
+									}, getFileInfoErr);
+								}
+							}
+							else
+							{
+								AP.request({
+									url: '/secure/attachment/' + value.id + '/',
+									success: renderDiagram,
+									error: mxUtils.bind(this,  function(err, statusText, exc) 
+									{
+								 		window.clearTimeout(timeoutThread);
+										
+								 		if (acceptResponse)
+								 		{
+											showError(container, 'Error: ' + err.status);
+											finish();
+								 		}
+								    })
+								});
+							}
+						};
+						
+						for (var i = 0; i < attDiagrams.length; i++)
+						{
+							loadDiagram(attDiagrams[i]);
+						}
+						
+						for (var i = 0; i < embeddedDiagrams.length; i++)
+						{
+							loadDiagram(embeddedDiagrams[i]);
+						}
+						
+						// Shows message if no files are found
+						if (count == 0)
+						{
+							mxUtils.write(document.body, mxResources.get('noFiles'));
+							document.body.style.backgroundImage = 'none';
+							AP.resize('100%', '60px');
+						}
+					}
+				};
+			};
+		}; // end of init
+		
+		// Workaround for collapsed side panel is to delay init until size is not 0
+		// NOTE: Since container.offsetWidth is 2 in this case the delayed rendering
+		// in the viewer does not triggger. We disable is here to make sure this does
+		// not change in case the container width is zero in the future.
+		GraphViewer.prototype.checkVisibleState = false;
+		
+		if (document.documentElement.offsetWidth == 0)
+		{
+			var listener = function()
+			{
+				if (document.documentElement.offsetWidth > 0)
+				{
+					window.removeEventListener('resize', listener);
+					init();
+				}
+			};
+			
+			window.addEventListener('resize', listener);
+		}
+		else
+		{
+			init();
+		}
+		
+		AP.events.on('ISSUE_GLANCE_OPENED', function() 
+		{
+			AP.resize('100%', '0px');
+			
+			setTimeout(function() 
+			{
+				if (updateTiles && !updateTiles())
+					updateHeight();
+			}, 1000); //Size take about half a second to stabilize (finish the animation)
+	  	});
+	}
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/jira/viewerPanel2.html b/src/main/webapp/connect/jira/viewerPanel2.html
new file mode 100644
index 000000000..a6377bcae
--- /dev/null
+++ b/src/main/webapp/connect/jira/viewerPanel2.html
@@ -0,0 +1,393 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Draw.io Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+//Parses URL parameters
+function getUrlParam(param)
+{
+	var result = (new RegExp(param + '=([^&]*)')).exec(window.location.search);
+	
+	if (result != null && result.length > 0)
+	{
+		return decodeURIComponent(result[1].replace(/\+/g, '%20'))
+	}
+	
+	return null;
+};
+
+function getBaseUrl()
+{
+	var baseUrl = getUrlParam('xdm_e', true) + getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+
+// Overrides browser language with JIRA user language
+var lang = getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script src="/js/viewer.min.js" type="text/javascript"></script>
+<script type="text/javascript">
+(function()
+{
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName("head")[0];
+	
+	var script = document.createElement("script");
+	script.setAttribute('data-options', 'resize:false;margin:false');
+
+	head.appendChild(script);
+	
+	var link = document.createElement("link");
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	
+	function mainBarrier()
+	{
+		if (bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	
+	function main()
+	{
+		var editImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAQEBBycnIgICBqwj3hAAAAAXRSTlMAQObYZgAAADlJREFUCNdjoBwoChrAmCyGggJwYWVBBSiTSVDICKFa0AEuLCiEJKyAX5gBSZgBSZgBKGwMBKQ7HAAWzQSfKKAyBgAAAABJRU5ErkJggg==';
+		var removeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVAQMAAACT2TfVAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABlJREFUCNdjQAF/GBj4/x8AYxBg/k80RgYApAUPr950a4AAAAAASUVORK5CYII=';
+		var issueId = getUrlParam('issueId');
+		var serverName = document.referrer;
+		var timeout = 25000;
+		var index1 = serverName.indexOf('//');
+		
+		if (index1 > 0)
+		{
+			var index2 = serverName.indexOf('/', index1 + 2);
+			
+			if (index2 > index1)
+			{
+				serverName = serverName.substring(index1 + 2, index2);
+			}
+		}
+		
+		// Delayed invocation see below
+		function init()
+		{
+			// Workaround to ignore scrollbars when applying fit to available width in all but FF
+			if (!mxClient.IS_FF)
+			{
+				document.body.style.width = document.documentElement.offsetWidth + 'px';
+			}
+			
+			AP.resize('100%', '0px');
+			AP.require(['request', 'dialog', 'jira'], function(request, dialog, jira) 
+			{
+				request({
+					url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+					type: 'GET',
+					success: function(resp) 
+					{
+						var tbHeight = GraphViewer.prototype.toolbarHeight;
+						var containers = [];
+						var count = 0;
+						
+						function updateHeight()
+						{
+							var h = 0;
+
+							// +2 is needed to include margin
+							for (var i = 0; i < containers.length; i++)
+							{
+								h += containers[i].offsetHeight + tbHeight + 2;
+							}
+							
+							// Restricts the max sidebar panel height
+							h = Math.min(screen.height * 1.5, h);
+							AP.resize('100%', h);
+							
+							// Workaround for iframe scrollbars
+							document.body.style.height = h + 'px';
+						}
+						
+						function finish() 
+						{
+							count--;
+							
+			 				if (count == 0) 
+			 				{
+			 					document.body.style.width = '';
+								updateHeight();
+			 				}
+						}
+	
+						function loadDiagram(value)
+						{
+							count++;
+							var container = document.createElement('div');
+							container.style.cssText = 'position:relative;box-sizing:border-box;margin-bottom:2px;' +
+								'max-width:100%;min-width:100%;border:1px solid transparent;';
+								
+							// Adds filename and ID to side panel
+							var title = document.createElement('div');
+							title.innerHTML = '&ndash; ';
+							mxUtils.write(title, value.filename + ' [' + value.id + ']');
+							var displayName = value.author != null ? value.author.displayName : '';
+							title.setAttribute('title', value.filename + ' [' + value.id + '] - ' + displayName +
+									' ' + new Date(value.created).toLocaleString());
+							title.style.cssText = 'position:relative;box-sizing:border-box;width:100%;padding-top:6px;height:' + tbHeight +
+								'px;margin-bottom:-' + tbHeight + 'px;text-align:left;white-space:nowrap;cursor:pointer;';
+							document.body.appendChild(title);
+							
+							// Simple collapse-expand for diagrams
+							title.addEventListener('click', function()
+							{
+								if (container.style.display != 'none')
+								{
+									title.innerHTML = '+ ';
+									mxUtils.write(title, value.filename + ' [' + value.id + ']');
+									container.style.display = 'none';
+									title.style.marginBottom = '0px';
+								}
+								else
+								{
+									title.innerHTML = '&ndash; ';
+									mxUtils.write(title, value.filename + ' [' + value.id + ']');
+									container.style.display = '';
+									title.style.marginBottom = -tbHeight + 'px';
+								}
+								
+								updateHeight();
+							});
+							
+							document.body.appendChild(container);
+							containers.push(container);
+							var acceptResponse = true;
+							
+							var timeoutThread = window.setTimeout(function()
+							{
+								acceptResponse = false;
+								
+	 							container.style.height = '24px';
+	 							container.style.textAlign = 'center';
+	 							container.style.marginTop = tbHeight + 'px';
+	 							mxUtils.write(container, 'The connection has timed out: The server at ' +
+										serverName + ' is taking too long to respond.');
+	 							finish();
+							}, timeout);
+							
+							// Loads attachment content
+							request({
+								url: '/secure/attachment/' + value.id + '/',
+								success: function(xml)
+								{
+							 		window.clearTimeout(timeoutThread);
+									
+							 		if (acceptResponse)
+							 		{
+										var doc = mxUtils.parseXml(xml);
+			
+										var btnDefs = {
+											'edit': {title: mxResources.get('edit'), enabled: typeof window.Blob !== 'undefined',
+												image: editImage, handler: function()
+											{
+												dialog.create(
+												{
+												   key: 'drawioEditor',
+												   width: '100%',
+												   height: '100%',
+												   chrome: false,
+												   customData : {diagramName: value.filename, diagramId: value.id, page: viewer.currentPage}
+												});
+											}},
+											'remove': {title: mxResources.get('delete'), image: removeImage, handler: function()
+											{
+												if (confirm(mxResources.get('removeIt', [value.filename]) + '?'))
+												{
+									    	        request({
+									    	            url: '/rest/api/2/attachment/' + value.id,
+									    	            type: 'DELETE',
+									    	            success: function()
+									    	            {
+									    	            	jira.refreshIssuePage();
+									    	            },
+									    	            error : function()
+									    	            {
+									    	            	jira.refreshIssuePage();
+									    	            }
+									    	        });
+												}
+											}}
+										};
+										
+										var viewer = new GraphViewer(container, doc.documentElement, {highlight: '#3572b0',
+											'toolbar-position': 'top', toolbar: 'edit pages layers lightbox remove', 'max-height':
+											Math.max(280, document.documentElement.offsetWidth / 1.5), border: 8,
+											/* disables automatic zoom with no buttons */'auto-fit': false,
+											nav: true, title: value.filename + ' [' + value.id + ']', 'toolbar-buttons': btnDefs});
+										
+										// Handles resize of iframe after zoom
+										var graphDoResizeContainer = viewer.graph.doResizeContainer;
+										
+										viewer.graph.doResizeContainer = function(width, height)
+										{
+											graphDoResizeContainer.apply(this, arguments);
+											updateHeight();
+										};
+										
+										// Updates the size of the iframe in responsive cases
+										viewer.updateContainerHeight = function(container, height)
+										{
+											updateHeight();
+										};
+			
+										viewer.showLightbox = function()
+										{
+											dialog.create(
+											{
+							                   header: value.filename + ' [' + value.id + ']',
+											   key: 'drawioFullScreenViewer',
+							                   size: 'fullscreen',
+											   chrome: true,
+											   customData: {diagramName: value.filename, diagramId: value.id, page: viewer.currentPage}
+											});					
+										};
+										
+										finish();
+							 		}
+								},
+								error: mxUtils.bind(this,  function(err, statusText, exc) 
+								{
+							 		window.clearTimeout(timeoutThread);
+									
+							 		if (acceptResponse)
+							 		{
+										container.style.height = '24px';
+										container.style.textAlign = 'center';
+										container.style.marginTop = tbHeight + 'px';
+										mxUtils.write(container, 'Error: ' + err.status);
+										finish();
+							 		}
+							    })
+							});
+						};
+						
+						var respObj = JSON.parse(resp);
+						
+						for (var i = 0; i < respObj.fields.attachment.length; i++)
+						{
+							var attachment = respObj.fields.attachment[i];
+							
+							if (attachment.mimeType == 'application/drawio')
+							{
+								loadDiagram(attachment);
+							}
+						}
+						
+						// Shows message if no files are found
+						if (count == 0)
+						{
+							mxUtils.write(document.body, mxResources.get('noFiles'));
+							AP.resize('100%', '20px');
+						}
+					},
+					error: function() 
+					{
+						AP.resize('100%', '0px');
+					}
+				});
+			});
+		}; // end of init
+		
+		// Workaround for collapsed side panel is to delay init until size is not 0
+		// NOTE: Since container.offsetWidth is 2 in this case the delayed rendering
+		// in the viewer does not triggger. We disable is here to make sure this does
+		// not change in case the container width is zero in the future.
+		GraphViewer.prototype.checkVisibleState = false;
+		
+		if (document.documentElement.offsetWidth == 0)
+		{
+			var listener = function()
+			{
+				if (document.documentElement.offsetWidth > 0)
+				{
+					window.removeEventListener('resize', listener);
+					init();
+				}
+			};
+			
+			window.addEventListener('resize', listener);
+		}
+		else
+		{
+			init();
+		}
+	}
+})();
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/new_common/cac.js b/src/main/webapp/connect/new_common/cac.js
new file mode 100644
index 000000000..93c72db6c
--- /dev/null
+++ b/src/main/webapp/connect/new_common/cac.js
@@ -0,0 +1,246 @@
+var CAC = {};
+
+//Extend object with all CAC functions
+CAC.applyCAC = function(obj)
+{
+	for (var fn in CAC)
+	{
+		obj[fn] = CAC[fn];
+	}
+};
+
+CAC.$ = function(selector, elem)
+{
+	elem = elem || document;
+	return elem.querySelector(selector);
+};
+
+CAC.$$ = function(selector, elem)
+{
+	elem = elem || document;
+	return elem.querySelectorAll(selector);
+};
+
+CAC.getUrlParam = function(param, escape, url)
+{
+    try
+    {
+    	var url = url || window.location.search;
+
+		var result = (new RegExp(param + '=([^&]*)')).exec(url);
+		
+		if (result != null && result.length > 0)
+		{
+			// decode URI with plus sign fix.
+			return (escape) ? decodeURIComponent(result[1].replace(/\+/g, '%20')) : result[1];
+		}
+		
+		return null;
+    }
+    catch (e)
+    {
+        return undefined;
+    }
+};
+
+CAC.getMetaTag = function(name) 
+{
+	return document.getElementsByTagName('meta')[name].getAttribute('content');
+};
+
+CAC.getBaseUrl = function()
+{
+	var baseUrl = CAC.getUrlParam('xdm_e', true) + CAC.getUrlParam('cp', true);
+	//Ensure baseUrl belongs to attlasian (*.jira.com and *.atlassian.net)
+	//Since we add cp to xdm_e, we had to ensure that there is a slash after the domain. Since if xdm_e is ok, cp can corrupt is such as cp = '.fakedomain.com' such that baseUrl is atlassian.net.fakedomain.com
+	if (/^https:\/\/([^\.])+\.jira\.com\//.test(baseUrl + '/') || /^https:\/\/([^\.])+\.atlassian\.net\//.test(baseUrl + '/')) 
+	{
+		return baseUrl;
+	}
+	throw 'Invalid baseUrl!';
+};
+
+CAC.getDocDim = function() 
+{
+	var body = document.body,
+    html = document.documentElement;
+
+	var height = Math.max(body.scrollHeight, body.offsetHeight, 
+                       html.clientHeight, html.scrollHeight, html.offsetHeight);
+
+	var width = Math.max(body.scrollWidth, body.offsetWidth, 
+            html.clientWidth, html.scrollWidth, html.offsetWidth);
+	
+	return {w: width, h: height};
+};
+
+CAC.htmlEntities = function(s, newline)
+{
+	s = String(s || '');
+	
+	s = s.replace(/&/g,'&amp;'); // 38 26
+	s = s.replace(/"/g,'&quot;'); // 34 22
+	s = s.replace(/\'/g,'&#39;'); // 39 27
+	s = s.replace(/</g,'&lt;'); // 60 3C
+	s = s.replace(/>/g,'&gt;'); // 62 3E
+
+	if (newline == null || newline)
+	{
+		s = s.replace(/\n/g, '&#xa;');
+	}
+	
+	return s;
+};
+
+CAC.getPageInfo = function(callback)
+{
+	AP.navigator.getLocation(function (data)
+    {
+    	if (data != null && data.context != null)
+   		{
+    		var draftPage = (data.target == 'contentcreate');
+    		var pageId = data.context.contentId;
+    		
+    		callback(pageId, draftPage);
+   		}
+    	else
+		{
+    		alert('Unexpected Error: Cannot get content id or type.');
+		}
+    });
+};
+
+CAC.uploadCachedMxFile = function(fileContent, filename, success, error)
+{
+	CAC.uploadAttachment(fileContent, filename, 'application/vnd.jgraph.mxfile', 'Diagram Viewer Cached file', success, error)
+};
+
+CAC.delOldCachedFiles = function(pageId, filename, timestamp)
+{
+	CAC.collectAllAttachments(pageId, function(atts)
+	{
+		for (var i = 0; i < atts.length; i++)
+		{
+			var cacheFilename = atts[i].title.match(/(\d+)_(.*)/);
+			
+			if (cacheFilename != null && cacheFilename[2] == filename && cacheFilename[1] != timestamp)
+			{
+				CAC.deleteAttachment(atts[i].id, CAC.noop, CAC.noop); //ignore deletion errors
+			}
+		}
+	}, CAC.noop);//ignore deletion errors
+};
+
+CAC.uploadAttachment = function(fileContent, filename, fileType, comment, success, error)
+{
+	CAC.getPageInfo(function(pageId, draftPage)
+	{
+		var attFile = new Blob([fileContent], {type: fileType});
+		attFile.name = filename;
+		
+		var reqData = {file: attFile, minorEdit: true, comment: comment};
+		var draft = draftPage ? '?status=draft' : '';
+		 
+		AP.request({
+			type: 'PUT',
+			data: reqData,
+			url:  '/rest/api/content/'+ pageId + '/child/attachment' + draft,
+			contentType: 'multipart/form-data',
+			success: success,
+			error: error
+		});
+	});
+};
+
+CAC.collectAllAttachments = function(pageId, callback, error)
+{
+	var start = 0, limit = 200;
+	var attachments = [];
+	
+	function getChunck()
+	{
+		AP.request({
+			type: 'GET',
+			url: '/rest/api/content/' + pageId + '/child/attachment?start=' + start + '&limit=' + limit,
+			contentType: 'application/json;charset=UTF-8',
+			success: function(resp) {
+				var resp = JSON.parse(resp);
+				
+				for (var i = 0; i < resp.results.length; i++)
+				{
+					attachments.push({
+						id: resp.results[i].id,
+						title: resp.results[i].title
+					});
+				}
+				
+				//Support pageing
+				if (resp._links && resp._links.next) 
+				{
+					start += resp.limit; //Sometimes the limit is changed by the server
+					getChunck();
+				}
+				else
+				{
+					callback(attachments);
+				}
+			},
+			error: error
+		});
+	};
+	
+	getChunck();	
+};
+
+CAC.deleteAttachment = function(attId, success, error)
+{
+	AP.request({
+		type: 'DELETE',
+		url: '/rest/api/content/' + attId,
+		contentType: 'application/json;charset=UTF-8',
+		success: success,
+		error: error
+	});
+};
+
+CAC.uploadToJira = function(fileContent, issueId, filename, fileType, success, error)
+{
+	var attFile = new Blob([fileContent], {type: fileType});
+	attFile.name = filename;
+	
+	var reqData = {file: attFile};
+
+    AP.request(
+    {
+        url: '/rest/api/2/issue/' + issueId + '/attachments',
+        type: 'POST',
+		data: reqData,
+        contentType: 'multipart/form-data',
+        headers: {'X-Atlassian-Token': 'no-check'},
+        success: success,
+        error: error
+    });	
+};
+
+CAC.getJiraAttList = function(issueId, success, error)
+{
+	AP.request({
+		url: '/rest/api/2/issue/' + issueId + '?fields=attachment',
+		type: 'GET',
+		success: function(resp) 
+		{
+			var respObj = JSON.parse(resp);
+			attDiagrams = [];
+			
+			for (var i = 0; i < respObj.fields.attachment.length; i++)
+			{
+				attDiagrams.push(respObj.fields.attachment[i]);	
+			}
+
+			success(attDiagrams);
+		},
+		error: error
+	});	
+};
+
+CAC.noop = function(){};
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/app.css b/src/main/webapp/connect/office365/app.css
new file mode 100644
index 000000000..3c536993d
--- /dev/null
+++ b/src/main/webapp/connect/office365/app.css
@@ -0,0 +1,458 @@
+body {
+	background-color: white;
+	font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
+}
+
+.padding {
+    padding: 15px;
+}
+
+/* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. */
+
+#notification-message {
+    background-color: #818285;
+    color: #fff;
+    position: absolute;
+    width: 100%;
+    min-height: 80px;
+    transition: all .5s ease-in-out;
+    transform-origin: left top;
+  	transform: scaleY(0);
+    right: 0;
+    z-index: 100;
+    bottom: 0;
+    display: none; /* Hidden until invoked */
+}
+
+#notification-message #notification-message-header {
+    font-size: medium;
+    margin-bottom: 10px;
+}
+
+#notification-message #notification-message-close {
+    background-image: url("/images/close.png");
+    background-repeat: no-repeat;
+    background-size: 12px;
+    width: 12px;
+    height: 12px;
+    position: absolute;
+    right: 10px;
+    top: 7px;
+    cursor: pointer;
+}
+
+.footer {
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    height: 160px;
+    display: block;
+    box-sizing: border-box;
+    font-family: 'Segoe UI';
+}
+
+.footer .brand-text {
+    padding-right: 15px;
+    padding-left: 15px;
+    margin: 10px;
+    margin-left: 5px;
+    margin-bottom: 20px;
+}
+
+.header {
+    position: fixed;
+    top: 0;
+    width: 100%;
+    height: 40px;
+    display: block;
+    box-sizing: border-box;
+    font-family: 'Segoe UI';
+    z-index: 5;
+}
+
+.cancelDefaultBrowserIndentation {
+    margin:0;
+    margin-top:-14px
+}
+
+.indentFromPaneEdge {
+    padding:20px
+}
+
+.centeredText {
+    text-align:center;
+}
+
+.headerText {    
+    padding-top: 10px;
+    padding-bottom: 10px;
+
+}
+
+.headerGap {
+    padding-top:70px;
+}
+
+.pointerCursor {
+    cursor:pointer
+}
+
+/* Overriding Fabric styles to format the Welcome page and workbook list page. */
+ul.ordered-list {
+    list-style-type: none;
+}
+
+/* Overriding Fabric styles to format the Welcome page and workbook list page. */
+.ordered-list.ms-List .ms-ListItem {
+    padding: 0;
+    margin: 0;
+    margin-bottom: 20px;
+    
+}
+
+/* Overriding Fabric styles to format the Welcome page and workbook list page. */
+.ordered-list .ms-ListItem-primaryText {
+    color: rgba(0, 119, 214, 1);
+    background-color: rgba(198, 223, 243, 1);
+    border-radius: 100%;
+    font-size: 12pt;
+    width: 30px;
+    height: 30px;
+    line-height: 30px;
+    padding: 0;
+    text-align: center;
+
+    position: absolute; /* override fabric positioning */
+}
+
+/* Overriding Fabric styles to format the Welcome page and workbook list page. */
+.ordered-list .ms-ListItem-secondaryText {
+    color: rgba(51, 51, 51, 1);
+    margin-bottom: 10px;
+    position: inherit;
+    top: 0; /* override fabric positioning */
+    padding-left: 40px; /* offset by 30px + 10px so that large bullet sits in that place */
+    white-space: normal;
+    overflow: auto;
+    line-height: normal;
+}
+
+/* Similar to ms-ListItem-secondaryText, but does inherit parent style from Fabric. 
+    This prevents unnecessary scrollbars appearing next to each file name.
+*/
+.ordered-list .ms-ListItem-fileName {
+    color: rgba(51, 51, 51, 1);
+    margin-bottom: 10px;
+
+    position: inherit;
+    top: 0; /* override fabric positioning */
+    padding-left: 0px; 
+    white-space: normal;
+    overflow: auto;
+}
+
+.clearfix {
+    display: block;
+    height: 0;
+    clear: both;
+}
+
+.welcome{  
+    padding: 15px;
+}
+
+.welcome-body{  
+}
+
+.welcome-intro {
+    padding-top: 6px;
+    padding-bottom: 6px;
+}
+
+.file-item-intro {
+    margin-bottom: 20px;
+}
+
+.back-icon {
+    float:left;
+    padding-left:15px;
+}
+
+
+.file-item-status{
+    padding-bottom: 20px;
+}
+
+.allAreaContainer {
+	position:absolute;
+	top:0px;
+	bottom:0px;
+	left:6px;
+	right:6px;
+	cursor:default;
+}
+
+.ms-Button {
+	cursor:default;
+}
+
+#filePickerTitle {
+	position:absolute;
+	display:none;
+	top:0px;
+	height:32px;
+	width:100%;
+}
+
+#filePickerWithPreview {
+	position:absolute;
+	top:15px;
+	bottom:48px;
+	width:100%;
+}
+
+.bottomBtns {
+	padding-top:4px;
+	position:absolute;
+	bottom:0px;
+	height:48px;
+	width:100%;
+	text-align: center;	
+}
+
+.odCatsList {
+	box-sizing: border-box;
+	position:absolute;
+	top:0px;
+	bottom:50%;
+	width:30%;
+	border: 1px solid #CCCCCC;
+	border-bottom:none;
+	background-color: #FFFFFF;
+	display: inline-block;
+	overflow-x: hidden;
+	overflow-y: auto;
+}
+.odCatsListLbl {
+	height: 17px;
+	color: #6D6D6D;
+	font-size: 14px;
+	font-weight: bold;
+	line-height: 17px;
+	margin: 10px 0 3px 5px;
+}
+.odFilesSec {
+	box-sizing: border-box;
+	position:absolute;
+	left:30%;
+	top:0px;
+	bottom:50%;
+	width: 70%;
+	border: 1px solid #CCCCCC;
+	border-left:none;
+	border-bottom:none;
+	background-color: #FFFFFF;
+	display: inline-block;
+	overflow: hidden;
+}
+#preview {
+    position:absolute;
+	overflow:hidden;
+	border: 1px solid #CCCCCC;
+    bottom:0px;
+    top: 50%;
+    left:0px;
+    right:0px;
+}
+.previewStatus {
+	position:absolute;
+	text-align:center;
+	width:100%;
+	top:50%;
+	transform: translateY(-50%);
+	font-size:13px;
+	opacity:0.5;
+}
+.odFilesBreadcrumb {
+	box-sizing: border-box;
+	position:absolute;
+	min-height: 32px;
+	left:0px;
+	right:20px;
+	text-overflow:ellipsis;
+	overflow:hidden;
+	font-size: 13px;
+	color: #6D6D6D;
+	padding: 5px;
+}
+.odRefreshButton {
+	box-sizing: border-box;
+	position:absolute;
+	right:0px;
+	top:0px;
+	padding: 4px;
+	margin: 1px;
+	height:24px;
+	cursor:default;
+}
+.odRefreshButton>img {
+	opacity:0.5;
+}
+.odRefreshButton:hover {
+	background-color:#ddd;
+	border-radius:50%;
+}
+.odRefreshButton:active {
+	opacity:0.7;
+}
+.odFilesList {
+	box-sizing: border-box;
+	position:absolute;
+	top:32px;
+	bottom:0px;
+	width: 100%;
+	overflow-x: hidden;
+	overflow-y: auto;
+}
+.odFileImg {
+	padding-left: 5px;
+	padding-right: 5px;
+}
+.odFileTitle {
+	font-weight: normal;
+	color: #666666 !important;
+}
+.odFileListGrid {
+	width: 100%;
+	white-space: nowrap;
+	font-size: 13px;
+    box-sizing: border-box;
+    border-spacing: 0;
+}
+.odOddRow {
+	background-color: #eeeeee;
+}
+.odEvenRow {
+	background-color: #FFFFFF;
+}
+.odRowSelected {
+	background-color: #cadfff;
+}
+.odCatListTitle {
+	box-sizing: border-box;
+	height: 17px;
+	color: #666666;
+	font-size: 14px;
+	line-height: 17px;
+	margin: 5px 0 5px 0px;
+    padding-left: 10px;
+}
+.odCatSelected {
+	font-weight: bold;
+	background-color: #cadfff;
+}
+.odEmptyFolder {
+	height: 17px;
+	color: #6D6D6D;
+	font-size: 14px;
+	font-weight: bold;
+	line-height: 17px;
+	margin: 10px 0 3px 5px;
+	width: 100%;
+    text-align: center;
+}
+.odBCFolder {
+	cursor: pointer;
+	color: #0432ff;
+}
+
+#odSearchBox {
+    color:#888888;
+    background:url("/images/icon-search.svg") no-repeat;
+	background-color: #FFFFFF;
+	background-position: 15px;
+	height: 30px;
+	width: 100%;
+	max-width: 400px;
+	border: 1px solid #CCCCCC;
+	border-radius: 3px;
+    font-size:13px;
+    line-height:36px;
+    outline:medium none;
+    padding:0 0 0 36px;
+    text-shadow:1px 1px 0 white;
+}
+.smallBtn {
+	padding: 4px 15px 6px;
+    min-width: unset;
+}
+
+.menuBar {
+	width: 20px;
+    height: 2px;
+    background-color: #999;
+    margin: 5px 0;
+    cursor: pointer;
+}
+.menuBtn {
+  position: absolute;
+  left: 0px;
+  width: 30px;
+}
+
+#inserErrMsg {
+	max-height: 50%;
+	overflow-y: auto;
+}
+
+#imgContainer {
+	width: 100%;
+    position:absolute;
+    top: 50%;
+    bottom:50px;
+    text-align: center;
+}
+
+#manualCopyImg {
+	padding-top: 5px;
+	max-width: 95%;
+	max-height: 95%;
+}
+
+#insertErrorBtns {
+	position: absolute;
+    bottom: 5px;
+}
+
+#editableDiv {
+	width: 100%;
+	height: 100px;
+	border: 1px solid #cccccc;
+}
+
+a.ms-Button {
+	font-weight: bold;
+	text-decoration: none;
+}
+
+.serviceBtn {
+	width: 185px;	
+}
+
+#backLnk {
+	top: -4px;
+    position: absolute;
+}
+
+.backLnk {
+	font-size: 12px;
+	cursor: pointer;
+	color: #6D6D6D;
+}
+
+.signOutLnk {
+	font-size: 12px;
+	cursor: pointer;
+	color: #6D6D6D;
+	float: right;
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/dev/manifest-dev.xml b/src/main/webapp/connect/office365/dev/manifest-dev.xml
new file mode 100644
index 000000000..8a08a6d82
--- /dev/null
+++ b/src/main/webapp/connect/office365/dev/manifest-dev.xml
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OfficeApp
+          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
+          xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
+          xsi:type="TaskPaneApp">
+
+  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
+
+  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
+  <Id>e849ddb8-6bbd-4833-bd4b-59030099d63e</Id>
+
+  <!--Version. Updates from the store only get triggered if there is a version change. -->
+  <Version>1.0.0.0</Version>
+  <ProviderName>JGraph Ltd</ProviderName>
+  <DefaultLocale>en-US</DefaultLocale>
+  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
+  <DisplayName DefaultValue="draw.io" />
+  <Description DefaultValue="Adds draw.io diagrams from OneDrive">
+  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+  	  <Override Locale="de-de" Value="draw.io Diagramme von OneDrive einfügen"/>
+  </Description>
+
+  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
+  <IconUrl DefaultValue="https://test.draw.io/images/favicon-32x32.png" />
+  <HighResolutionIconUrl DefaultValue="https://test.draw.io/images/drawlogo80.png"/>
+
+  <SupportUrl DefaultValue="https://desk.draw.io/" />
+
+  <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
+  <AppDomains>
+    <AppDomain>https://login.microsoftonline.com</AppDomain>
+    <AppDomain>https://exp.draw.io</AppDomain>
+    <AppDomain>https://graph.microsoft.com</AppDomain>
+    <AppDomain>https://test.draw.io</AppDomain>
+  </AppDomains>
+  <!--End Basic Settings. -->
+
+  <!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
+  <Hosts>
+    <Host Name="Document" />
+    <Host Name="Presentation" />
+    <Host Name="Workbook" />
+  </Hosts>
+  <DefaultSettings>
+    <SourceLocation DefaultValue="https://test.draw.io/connect/office365/index.html" />
+  </DefaultSettings>
+  <!-- End TaskPane Mode integration.  -->
+
+  <Permissions>ReadWriteDocument</Permissions>
+
+  <!-- Begin Add-in Commands Mode integration. -->
+  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
+
+    <!-- The Hosts node is required. -->
+    <Hosts>
+      <!-- Each host can have a different set of commands. -->
+      <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
+      <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
+      <Host xsi:type="Document">
+        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
+        <DesktopFormFactor>
+          <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
+          <GetStarted>
+            <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
+            <Title resid="drawio.GetStarted.Title"/>
+
+            <!-- Description of the Getting Started callout. resid points to a LongString resource -->
+            <Description resid="drawio.GetStarted.Description"/>
+
+            <!-- Point to a url resource which details how the add-in should be used. -->
+            <LearnMoreUrl resid="drawio.GetStarted.LearnMoreUrl"/>
+          </GetStarted>
+          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
+            Think of the FunctionFile as the code behind ExecuteFunction. -->
+          <FunctionFile resid="drawio.FunctionFile.Url" />
+
+          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
+          <ExtensionPoint xsi:type="PrimaryCommandSurface">
+            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
+            <OfficeTab id="TabInsert">
+              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
+              <Group id="drawio.Group1">
+                <!-- Label for your group. resid must point to a ShortString resource. -->
+                <Label resid="drawio.Group1Label" />
+                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
+                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
+                <Icon>
+                  <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                  <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                  <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                </Icon>
+
+                <!-- Control. It can be of type "Button" or "Menu". -->
+                <Control xsi:type="Button" id="drawio.TaskpaneButton">
+                  <Label resid="drawio.TaskpaneButton.Label" />
+                  <Supertip>
+                    <!-- ToolTip title. resid must point to a ShortString resource. -->
+                    <Title resid="drawio.TaskpaneButton.Label" />
+                    <!-- ToolTip description. resid must point to a LongString resource. -->
+                    <Description resid="drawio.TaskpaneButton.Tooltip" />
+                  </Supertip>
+                  <Icon>
+                    <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                    <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                    <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                  </Icon>
+
+                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
+                  <Action xsi:type="ShowTaskpane">
+                    <TaskpaneId>drawioBtn</TaskpaneId>
+                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
+                    <SourceLocation resid="drawio.Taskpane.Url" />
+                  </Action>
+                </Control>
+                <Control xsi:type="Button" id="drawio.refreshButton">
+				  <Label resid="drawio.refreshButton.label" />
+				  <Supertip>
+				    <Title resid="drawio.refreshButton.toolTipLbl" />
+				    <Description resid="drawio.refreshButton.toolTip" />
+				  </Supertip>
+				  <Icon>
+				    <bt:Image size="16" resid="drawio.refreshIcon_16x16" />
+				    <bt:Image size="32" resid="drawio.refreshIcon_32x32" />
+				    <bt:Image size="80" resid="drawio.refreshIcon_80x80" />
+				  </Icon>
+				  <Action xsi:type="ExecuteFunction">
+				    <FunctionName>refreshSelImages</FunctionName>
+				  </Action>
+				</Control>
+				<Control xsi:type="Button" id="drawio.refreshAllBtn">
+				  <Label resid="drawio.refreshAllBtn.label" />
+				  <Supertip>
+				    <Title resid="drawio.refreshAllBtn.toolTipLbl" />
+				    <Description resid="drawio.refreshAllBtn.toolTip" />
+				  </Supertip>
+				  <Icon>
+				    <bt:Image size="16" resid="drawio.refreshIcon_16x16" />
+				    <bt:Image size="32" resid="drawio.refreshIcon_32x32" />
+				    <bt:Image size="80" resid="drawio.refreshIcon_80x80" />
+				  </Icon>
+				  <Action xsi:type="ExecuteFunction">
+				    <FunctionName>refreshAllImages</FunctionName>
+				  </Action>
+				</Control>
+				<Control xsi:type="Button" id="drawio.editButton">
+				  <Label resid="drawio.editButton.label" />
+				  <Supertip>
+				    <Title resid="drawio.editButton.toolTipLbl" />
+				    <Description resid="drawio.editButton.toolTip" />
+				  </Supertip>
+				  <Icon>
+				    <bt:Image size="16" resid="drawio.editIcon_16x16" />
+				    <bt:Image size="32" resid="drawio.editIcon_32x32" />
+				    <bt:Image size="80" resid="drawio.editIcon_80x80" />
+				  </Icon>
+				  <Action xsi:type="ExecuteFunction">
+				    <FunctionName>editSelImage</FunctionName>
+				  </Action>
+				</Control>
+              </Group>
+            </OfficeTab>
+          </ExtensionPoint>
+        </DesktopFormFactor>
+      </Host>
+      <Host xsi:type="Presentation">
+        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
+        <DesktopFormFactor>
+          <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
+          <GetStarted>
+            <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
+            <Title resid="drawio.GetStarted.Title"/>
+
+            <!-- Description of the Getting Started callout. resid points to a LongString resource -->
+            <Description resid="drawio.GetStarted.Description"/>
+
+            <!-- Point to a url resource which details how the add-in should be used. -->
+            <LearnMoreUrl resid="drawio.GetStarted.LearnMoreUrl"/>
+          </GetStarted>
+          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
+            Think of the FunctionFile as the code behind ExecuteFunction. -->
+          <FunctionFile resid="drawio.FunctionFile.Url" />
+
+          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
+          <ExtensionPoint xsi:type="PrimaryCommandSurface">
+            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
+            <OfficeTab id="TabInsert">
+              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
+              <Group id="drawio.Group1">
+                <!-- Label for your group. resid must point to a ShortString resource. -->
+                <Label resid="drawio.Group1Label" />
+                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
+                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
+                <Icon>
+                  <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                  <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                  <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                </Icon>
+
+                <!-- Control. It can be of type "Button" or "Menu". -->
+                <Control xsi:type="Button" id="drawio.TaskpaneButton">
+                  <Label resid="drawio.TaskpaneButton.Label" />
+                  <Supertip>
+                    <!-- ToolTip title. resid must point to a ShortString resource. -->
+                    <Title resid="drawio.TaskpaneButton.Label" />
+                    <!-- ToolTip description. resid must point to a LongString resource. -->
+                    <Description resid="drawio.TaskpaneButton.Tooltip" />
+                  </Supertip>
+                  <Icon>
+                    <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                    <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                    <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                  </Icon>
+
+                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
+                  <Action xsi:type="ShowTaskpane">
+                    <TaskpaneId>drawioBtn</TaskpaneId>
+                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
+                    <SourceLocation resid="drawio.Taskpane.Url" />
+                  </Action>
+                </Control>
+              </Group>
+            </OfficeTab>
+          </ExtensionPoint>
+        </DesktopFormFactor>
+      </Host>
+      <Host xsi:type="Workbook">
+        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
+        <DesktopFormFactor>
+          <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
+          <GetStarted>
+            <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
+            <Title resid="drawio.GetStarted.Title"/>
+
+            <!-- Description of the Getting Started callout. resid points to a LongString resource -->
+            <Description resid="drawio.GetStarted.Description"/>
+
+            <!-- Point to a url resource which details how the add-in should be used. -->
+            <LearnMoreUrl resid="drawio.GetStarted.LearnMoreUrl"/>
+          </GetStarted>
+          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
+            Think of the FunctionFile as the code behind ExecuteFunction. -->
+          <FunctionFile resid="drawio.FunctionFile.Url" />
+
+          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
+          <ExtensionPoint xsi:type="PrimaryCommandSurface">
+            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
+            <OfficeTab id="TabInsert">
+              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
+              <Group id="drawio.Group1">
+                <!-- Label for your group. resid must point to a ShortString resource. -->
+                <Label resid="drawio.Group1Label" />
+                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
+                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
+                <Icon>
+                  <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                  <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                  <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                </Icon>
+
+                <!-- Control. It can be of type "Button" or "Menu". -->
+                <Control xsi:type="Button" id="drawio.TaskpaneButton">
+                  <Label resid="drawio.TaskpaneButton.Label" />
+                  <Supertip>
+                    <!-- ToolTip title. resid must point to a ShortString resource. -->
+                    <Title resid="drawio.TaskpaneButton.Label" />
+                    <!-- ToolTip description. resid must point to a LongString resource. -->
+                    <Description resid="drawio.TaskpaneButton.Tooltip" />
+                  </Supertip>
+                  <Icon>
+                    <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                    <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                    <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                  </Icon>
+
+                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
+                  <Action xsi:type="ShowTaskpane">
+                    <TaskpaneId>drawioBtn</TaskpaneId>
+                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
+                    <SourceLocation resid="drawio.Taskpane.Url" />
+                  </Action>
+                </Control>
+              </Group>
+            </OfficeTab>
+          </ExtensionPoint>
+        </DesktopFormFactor>
+      </Host>
+    </Hosts>
+
+    <!-- You can use resources across hosts and form factors. -->
+    <Resources>
+      <bt:Images>
+        <bt:Image id="drawio.tpicon_16x16" DefaultValue="https://test.draw.io/images/favicon-16x16.png" />
+        <bt:Image id="drawio.tpicon_32x32" DefaultValue="https://test.draw.io/images/favicon-32x32.png" />
+        <bt:Image id="drawio.tpicon_80x80" DefaultValue="https://test.draw.io/images/drawlogo80.png" />
+        
+        <bt:Image id="drawio.refreshIcon_16x16" DefaultValue="https://test.draw.io/images/update16.png" />
+        <bt:Image id="drawio.refreshIcon_32x32" DefaultValue="https://test.draw.io/images/update32.png" />
+        <bt:Image id="drawio.refreshIcon_80x80" DefaultValue="https://test.draw.io/images/update80.png" />
+
+        <bt:Image id="drawio.editIcon_16x16" DefaultValue="https://test.draw.io/images/edit16.png" />
+        <bt:Image id="drawio.editIcon_32x32" DefaultValue="https://test.draw.io/images/edit32.png" />
+        <bt:Image id="drawio.editIcon_80x80" DefaultValue="https://test.draw.io/images/edit80.png" />
+      </bt:Images>
+      <bt:Urls>
+        <bt:Url id="drawio.Taskpane.Url" DefaultValue="https://test.draw.io/connect/office365/index.html" />
+        <bt:Url id="drawio.GetStarted.LearnMoreUrl" DefaultValue="https://about.draw.io/" >
+          <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="https://about.draw.io/"/>
+        </bt:Url>
+        <bt:Url id="drawio.FunctionFile.Url" DefaultValue="https://test.draw.io/connect/office365/function-file/function-file.html" />
+      </bt:Urls>
+      <!-- ShortStrings max characters==125. -->
+      <bt:ShortStrings>
+        <bt:String id="drawio.TaskpaneButton.Label" DefaultValue="draw.io" />
+        <bt:String id="drawio.Group1Label" DefaultValue="draw.io" />
+        <bt:String id="drawio.GetStarted.Title" DefaultValue="Get started with draw.io" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Erste Schritte mit draw.io"/>
+        </bt:String>
+        <bt:String id="drawio.refreshButton.label" DefaultValue="Update Selected" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markierung aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.refreshButton.toolTipLbl" DefaultValue="Update selected diagram" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markiertes Diagramm aktualisieren"/>
+        </bt:String>
+         <bt:String id="drawio.refreshAllBtn.label" DefaultValue="Update All" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Alle aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.refreshAllBtn.toolTipLbl" DefaultValue="Update all draw.io diagrams" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Alle draw.io Diagramme aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.editButton.label" DefaultValue="Edit Selected" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markierung bearbeiten"/>
+        </bt:String>
+        <bt:String id="drawio.editButton.toolTipLbl" DefaultValue="Edit selected draw.io diagram" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markiertes draw.io Diagramm bearbeiten"/>
+        </bt:String>
+      </bt:ShortStrings>
+      <!-- LongStrings max characters==250. -->
+      <bt:LongStrings>
+        <bt:String id="drawio.TaskpaneButton.Tooltip" DefaultValue="Click to manage draw.io diagrams">
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Hier klicken, um draw.io Diagramme zu verwalten"/>
+        </bt:String>
+        <bt:String id="drawio.GetStarted.Description" DefaultValue="draw.io add-in loaded succesfully. Go to the INSERT tab and click the 'draw.io' button to get started." >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Das draw.io Add-in wurde erfolgreich geladen. Gehen Sie jetzt zum Reiter 'Einfügen' und klicken Sie auf draw.io."/>
+        </bt:String>
+        <bt:String id="drawio.refreshButton.toolTip" DefaultValue="Update selected draw.io diagram using its associated file" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markiertes draw.io Diagramm von verknüpfter Datei aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.refreshAllBtn.toolTip" DefaultValue="Update all draw.io diagrams using their associated files" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Alle draw.io Diagramme von verknüpfter Datei aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.editButton.toolTip" DefaultValue="Edit selected draw.io diagram from its associated file" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Verknüpfte Datei bearbeiten"/>
+        </bt:String>
+      </bt:LongStrings>
+    </Resources>
+  </VersionOverrides>
+  <!-- End Add-in Commands Mode integration. -->
+
+</OfficeApp>
diff --git a/src/main/webapp/connect/office365/drive.html b/src/main/webapp/connect/office365/drive.html
new file mode 100644
index 000000000..c6921b204
--- /dev/null
+++ b/src/main/webapp/connect/office365/drive.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+    <title>Google Picker</title>
+
+	<script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
+	<script src="../new_common/cac.js" type="text/javascript"></script>
+	<script type="text/javascript" src="../onedrive_common/ac.js"></script>
+    <script type="text/javascript" src="js/drive.js"></script>
+  </head>
+  <body>
+  	<script type="text/javascript">
+	  	Office.initialize = function () 
+	    { 
+	  		window.officeInitialized = true;
+	    }
+  	</script>
+    <!-- The Google API Loader script. -->
+    <script type="text/javascript" src="https://apis.google.com/js/api.js?onload=onApiLoad"></script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/function-file/function-file.html b/src/main/webapp/connect/office365/function-file/function-file.html
new file mode 100644
index 000000000..a872bbb35
--- /dev/null
+++ b/src/main/webapp/connect/office365/function-file/function-file.html
@@ -0,0 +1,31 @@
+<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+    <!-- Office JavaScript API -->
+    <script type="text/javascript" src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js"></script>
+    
+    <script type="text/javascript" src="/js/viewer.min.js"></script>
+    <script src="../../new_common/cac.js" type="text/javascript"></script>
+  	<script type="text/javascript" src="../../onedrive_common/ac.js"></script>
+    <script type="text/javascript" src="../js/app.js"></script>
+    <script type="text/javascript" src="../js/drive.js"></script>
+    <script type="text/javascript" src="function-file.js"></script>
+    <script type="text/javascript">
+		// The initialize function must be run each time a new page is loaded
+	    Office.initialize = function (reason) {
+	        
+	    };
+    </script>
+</head>
+
+<body>
+  <!-- NOTE: The body is empty on purpose. Since function in function-file.js are
+       invoked via a button, there is no UI to render. -->
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/function-file/function-file.js b/src/main/webapp/connect/office365/function-file/function-file.js
new file mode 100644
index 000000000..8ea639c5b
--- /dev/null
+++ b/src/main/webapp/connect/office365/function-file/function-file.js
@@ -0,0 +1,286 @@
+AC.headless = true;
+AC.msgDlg = null;
+
+AC.authOneDrive = function(success, error)
+{
+	AC.showError(mxResources.get('officeNotLoggedOD'));
+};
+
+AC.showError = function(errMsg)
+{
+	AC.showMsg(errMsg, true);
+};
+
+AC.hideMsg = function(callback)
+{
+	if (AC.msgDlg != null)
+	{
+		dialogCloseAsync(AC.msgDlg, function()
+		{
+			AC.msgDlg = null;
+			
+			if (callback != null)
+			{
+				callback();
+			}
+		});
+	}
+	else if (callback != null)
+	{
+		callback();
+	}
+};
+
+AC.showMsg = function(msg, isError, isInfo, isSuccess, showBusy, openLinkId)
+{
+	function closeDialog(openLater)
+	{
+		dialogCloseAsync(AC.msgDlg, function()
+		{
+			AC.msgDlg = null;
+			
+			if (openLater == true)
+			{
+				AC.showMsg(msg, isError, isInfo, isSuccess, showBusy);
+			}
+		});
+	};
+	
+	if (AC.msgDlg == null)
+	{
+		Office.context.ui.displayDialogAsync('https://' + window.location.hostname + '/connect/office365/function-file/msg.html?msg=' + 
+				encodeURIComponent(msg) + '&error=' + (isError? '1' : '0') + '&info=' + (isInfo? '1' : '0') + '&success=' + (isSuccess? '1' : '0') +
+				'&busy=' + (showBusy? '1' : '0') + (openLinkId != null? '&openLinkId=' + encodeURIComponent(openLinkId) : ''),
+	            {height: 20, width: 20, displayInIframe: true, promptBeforeOpen: false}, function (result)
+	    {
+	        if (result.value)
+	        {
+		    	AC.msgDlg = result.value;
+		    	AC.msgDlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogMessageReceived, closeDialog);
+		    	AC.msgDlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, closeDialog);
+	        }
+	    });
+	}
+	else
+	{
+		closeDialog(true);
+	}
+};
+
+function getDiagramsFilesInfo(selectionOnly, callback, onerror)
+{
+	if (Office.context.requirements.isSetSupported('WordApi', 1.2)) 
+	{
+		Word.run(function (context) 
+		{
+			var docPart = selectionOnly? context.document.getSelection() : context.document.body;
+			var pics = docPart.inlinePictures;
+			
+			pics.load('altTextDescription');
+			var diagramsFound = [];
+			
+			return context.sync().then(function () 
+			{
+	        	for (var i = 0; i < pics.items.length; i++)
+        		{
+	        		var altTextDescription = pics.items[i].altTextDescription;
+	        		var fileInfo = null;
+	        		
+	        		try
+	        		{
+	        			fileInfo = JSON.parse(AC.getUrlParam('local-data', true, altTextDescription));
+	        		}
+	        		catch(e) {}
+	        		
+	        		if (fileInfo != null)
+	        		{
+	        			diagramsFound.push({index: i, fileInfo: fileInfo});
+	        		}
+        		}
+		        
+		        if (diagramsFound.length > 0)
+	        	{
+		        	callback(diagramsFound, selectionOnly);
+	        	}
+		        else
+	        	{
+		        	onerror(selectionOnly? mxResources.get('officeNoDiagramsSelected', null, 'No diagrams found in the selection') : mxResources.get('officeNoDiagramsInDoc', null, 'No diagrams found in the document'));
+	        	}
+			});
+        })
+        .catch(function (error) 
+        {
+        	var errMsg = error.message;
+            console.log('Error: ' + JSON.stringify(error));
+            
+            if (error instanceof OfficeExtension.Error) 
+            {
+                errMsg = error.debugInfo? error.debugInfo.message : errMsg;
+            }
+            
+            errMsg = errMsg || 'Unknown Error';
+            onerror(errMsg);
+        });
+	}
+	else
+	{
+		onerror(mxResources.get('officeNotSupported', null, 'This feature is not supported in this host application'));
+	}
+};
+
+function updateImage(fileInfo, index, selectionOnly, processedCallback)
+{
+	function doUpdate(file)
+	{
+		AC.getDrawioFileDoc(file, function(fileDoc, content)
+		{
+			var container = document.createElement('div');
+			container.style.display = 'none';
+			document.body.appendChild(container);
+			var viewer = new GraphViewer(container, fileDoc.documentElement, 
+					{'check-visible-state': false, pageId: fileInfo.pageId, layers: fileInfo.layers != null && fileInfo.layers.join != null? fileInfo.layers.join(' ') : null});
+
+			app.addToRecent(file);
+
+			app.insertImageInDoc(viewer, fileDoc, fileInfo,
+					processedCallback, function(errorMsg)
+					{
+						processedCallback(errorMsg);
+					}, index, selectionOnly, true);
+		}, function()
+		{
+			processedCallback(mxResources.get('errorLoadingFile'));
+		});
+	};
+	
+	function updateErr(err)
+	{
+		if (err && err.status == 404)
+		{
+			processedCallback(mxResources.get('fileNotFound'));
+		}
+		else
+		{
+			processedCallback(mxResources.get('errorLoadingFile'));
+		}
+	};
+	
+	if (fileInfo.type == 'OneDrive')
+	{
+		//fetch file from OneDrive
+		AC.getFileInfo(fileInfo.id, fileInfo.driveId, doUpdate, updateErr);
+	}
+	else if (fileInfo.type == 'Drive')
+	{
+		getGDriveFileInfo(fileInfo.id, function(driveFile)
+		{
+			doUpdate(toODriveObj(driveFile));
+		}, updateErr);
+	}
+};
+
+function refreshImages(event, selectionOnly)
+{
+	app.initI18n(function()
+	{
+		AC.showMsg(mxResources.get('updatingDocument'), false, true, false, true);
+		
+		var updatedImages = 0, errNo = 0, errMsgs = [];
+		
+		getDiagramsFilesInfo(selectionOnly, function(diagramsFound, selectionOnly)
+		{
+			for (var i = 0; i < diagramsFound.length; i++)
+			{
+				updateImage(diagramsFound[i].fileInfo, diagramsFound[i].index, selectionOnly, function(errMsg)
+				{
+					if (errMsg == null)
+					{
+						updatedImages++;
+					}
+					else
+					{
+						errNo++;
+						errMsgs.push(errMsg);
+					}
+					
+					if (updatedImages + errNo == diagramsFound.length) //All Done
+					{
+						if (errNo > 0)
+							AC.showError(mxResources.get('someImagesFailed', [errNo, diagramsFound.length], '{0} out of {1} failed due to the following errors') + ': ' + errMsgs.join(', '));
+						else
+							AC.hideMsg();
+						
+						event.completed();
+					}
+				});			
+			}
+		}, 
+		function(errMsg)
+		{
+			if (errMsg != null) 
+			{
+				AC.showError(errMsg);
+			}
+			
+			event.completed();
+		});
+	});
+};
+
+function refreshAllImages(event) 
+{
+	refreshImages(event, false);
+};
+
+function refreshSelImages(event) 
+{
+	refreshImages(event, true);
+};
+
+function editSelImage(event)
+{
+	app.initI18n(function()
+	{
+		getDiagramsFilesInfo(true, function(diagramsFound, selectionOnly)
+		{
+			if (diagramsFound.length > 1)
+			{
+				AC.showError(mxResources.get('officeSelectSingleDiag'));
+			}
+			else
+			{
+				var fileInfo = diagramsFound[0].fileInfo;
+				var index = diagramsFound[0].index;
+				
+				app.editDiagram(fileInfo, function()
+				{
+					AC.showMsg(mxResources.get('updatingDocument'), false, true, false, true);
+
+					updateImage(fileInfo, index, selectionOnly, function(errMsg)
+					{
+						if (errMsg != null)
+						{
+							AC.showError(errMsg);
+						}
+						else
+						{
+							AC.hideMsg();
+						}
+					});	
+				}, true, fileInfo.pageId);
+			}
+			
+			//Notify office that even is completed since editing can take a long time and something wrong can occur
+			event.completed();
+		}, 
+		function(errMsg)
+		{
+			if (errMsg != null) 
+			{
+				AC.showError(errMsg);
+			}
+			
+			event.completed();
+		});
+	});
+};
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/function-file/msg.html b/src/main/webapp/connect/office365/function-file/msg.html
new file mode 100644
index 000000000..015ef8c66
--- /dev/null
+++ b/src/main/webapp/connect/office365/function-file/msg.html
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8" />
+    
+    <!-- This office.js library holds the JavaScript API for Office. -->
+    <script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
+    
+    <!-- The following two files hold the Office UI Fabric styles and components. -->
+	<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
+	<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
+    <script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/js/fabric.min.js"></script>
+    
+    <script src="../../new_common/cac.js" type="text/javascript"></script>
+    <script type="text/javascript" src="../../onedrive_common/ac.js"></script>
+</head>
+
+<body>
+	<div id="infoMsg" class="ms-MessageBar" style="display: none">
+	  <div class="ms-MessageBar-content">
+	    <div class="ms-MessageBar-icon">
+	      <img class="busyImg" src="/images/spin.gif" style="display: none">
+	      <i class="ms-Icon ms-Icon--Info"></i>
+	    </div>
+	    <div class="ms-MessageBar-text" style="font-size: 14px">
+	    </div>
+	  </div>
+	</div>
+	<div id="errorMsg" class="ms-MessageBar ms-MessageBar--error" style="display: none">
+	  <div class="ms-MessageBar-content">
+	    <div class="ms-MessageBar-icon">
+	      <img class="busyImg" src="/images/spin.gif" style="display: none">
+	      <i class="ms-Icon ms-Icon--ErrorBadge"></i>
+	    </div>
+	    <div class="ms-MessageBar-text" style="font-size: 14px">
+	    </div>
+	  </div>
+	</div>
+	<div id="successMsg" class="ms-MessageBar ms-MessageBar--success" style="display: none">
+	  <div class="ms-MessageBar-content">
+	    <div class="ms-MessageBar-icon">
+	      <img class="busyImg" src="/images/spin.gif" style="display: none">
+	      <i class="ms-Icon ms-Icon--Completed"></i>
+	    </div>
+	    <div class="ms-MessageBar-text" style="font-size: 14px">
+	    </div>
+	  </div>
+	</div>
+	<div id="openLink" style="display: none;width: 100%;text-align: center;"></div>
+	<div style="width:100%;text-align: center;position: fixed;bottom: 0px;height: 50px;margin-left: -8px;" id="okBtn">
+		<button class="ms-Button ms-Button--primary">
+		  <span class="ms-Button-label">OK</span> 
+		</button>
+	</div>
+	
+	<script type="text/javascript">
+		var msgTypeId = '#infoMsg';
+	
+		function updateUI(msg, openLinkId, isError, isInfo, isSuccess, showBusy)
+		{
+			var msgs = AC.$$('.ms-MessageBar-text');
+			
+			for (var i = 0; i < msgs.length; i++)
+			{
+				msgs[i].innerHTML = AC.htmlEntities(msg);
+			}
+			
+			AC.$(msgTypeId).style.display = 'none';
+			msgTypeId = '#infoMsg';
+			
+			if (isError) msgTypeId = '#errorMsg';
+			else if (isSuccess) msgTypeId = '#successMsg';			
+			
+			AC.$(msgTypeId).style.display = 'block';
+			AC.$('#okBtn').style.display = isInfo? 'none' : 'block';
+			
+			var busyImgs = AC.$$('.busyImg');
+			
+			for (var i = 0; i < busyImgs.length; i++)
+			{
+				busyImgs[i].style.display = showBusy? '' : 'none';
+			}
+			
+			if (openLinkId != null)
+			{
+				var openLink = AC.$('#openLink');
+				openLink.style.display = 'block';
+				openLink.innerHTML = '<a href="https://' + window.location.hostname + '/?open=' + openLinkId + '" target="_blank"><img src=/images/edit32.png></a>';
+			}
+		};
+		
+		var msg = AC.getUrlParam('msg', true);
+		var isError = AC.getUrlParam('error') == '1';
+		var isInfo = AC.getUrlParam('info') == '1';
+		var isSuccess = AC.getUrlParam('success') == '1';
+		var showBusy =  AC.getUrlParam('busy') == '1';
+		var openLinkId = AC.getUrlParam('openLinkId');
+
+		updateUI(msg, openLinkId, isError, isInfo, isSuccess, showBusy);
+		
+		Office.initialize = function () 
+		{
+			new fabric['Button'](AC.$('#okBtn'), function() 
+			{
+				Office.context.ui.messageParent('closeMe');	
+		    });
+		};
+	</script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/img-viewer.html b/src/main/webapp/connect/office365/img-viewer.html
new file mode 100644
index 000000000..df33350b4
--- /dev/null
+++ b/src/main/webapp/connect/office365/img-viewer.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <meta charset="UTF-8" /> 
+
+    <!-- The following two files hold the Office UI Fabric styles. -->
+	<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
+	<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
+
+    <link href="app.css" rel="stylesheet" type="text/css" />
+
+	<script src="../new_common/cac.js" type="text/javascript"></script>
+    <script type="text/javascript" src="../onedrive_common/ac.js"></script>
+</head>
+
+<body>
+	<div id="insertErrorContainer" class="allAreaContainer">
+	    <div id="inserErrMsg">
+		    <div class="ms-MessageBar ms-MessageBar--error" style="width: 100%; box-sizing: border-box;">
+			  <div class="ms-MessageBar-content">
+			    <div class="ms-MessageBar-icon">
+			      <i class="ms-Icon ms-Icon--ErrorBadge"></i>
+			    </div>
+			    <div class="ms-MessageBar-text" style="font-size: 15px">
+			    	An error prevented draw.io from adding the image directly to the document. This is due to some limitations in the host application.
+	         		Please manually copy the image then paste it to the document.
+			    </div>
+			  </div>
+			</div>
+		    <p id="instMsg">
+		    	Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu. 
+		    </p>
+	    </div>
+	    <div id="imgContainer" style="bottom: 5px;">
+	    	<img id="manualCopyImg">
+	    </div>
+	</div>
+	<script type="text/javascript">
+		var errMsg = AC.getUrlParam('errMsg', true);
+		var instMsg = AC.getUrlParam('instMsg', true);
+		var imgData = window.location.hash.substr(1);
+	
+		document.querySelector('.ms-MessageBar-text').innerHTML = AC.htmlEntities(errMsg, false).replace(/\n/g, '<br>');
+		document.querySelector('#instMsg').innerHTML = AC.htmlEntities(instMsg, false).replace(/\n/g, '<br>');
+		document.querySelector('#manualCopyImg').src = 'data:image/png;base64,' + imgData;
+	</script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/index.html b/src/main/webapp/connect/office365/index.html
new file mode 100644
index 000000000..b801e2672
--- /dev/null
+++ b/src/main/webapp/connect/office365/index.html
@@ -0,0 +1,184 @@
+<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. -->
+<!-- See LICENSE in the project root for license information -->
+
+<!DOCTYPE html>
+<html>
+
+<head>  
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>draw.io</title>
+    <!-- This office.js library holds the JavaScript API for Office. -->
+    <script src="https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js" type="text/javascript"></script>
+
+    <!-- The following two files hold the Office UI Fabric styles and components. -->
+	<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.min.css" />
+	<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/css/fabric.components.min.css" />
+    <script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.4.0/js/fabric.min.js"></script>
+    
+    <link href="app.css" rel="stylesheet" type="text/css" />
+    
+    <script type="text/javascript" src="/js/viewer.min.js"></script>
+    <script src="../new_common/cac.js" type="text/javascript"></script>
+  	<script type="text/javascript" src="../onedrive_common/ac.js"></script>
+  	<script type="text/javascript" src="function-file/function-file.js"></script>
+  	<script type="text/javascript" src="js/drive.js"></script>
+    <script type="text/javascript" src="js/app.js"></script>
+</head>
+
+<body>
+
+	 <div id="connectContainer">
+
+        <div id="loading" style="width:100%;height: 0px"></div>
+
+	    <div class="welcome-body" style="display:none"> 
+		    <div class="ms-bgColor-neutralLight welcome">
+		        <div><img src="/images/draw.io-logo.svg" height="32px"></div>
+		        <div class="ms-font-l" data-i18n="officeMainHeader">Adds draw.io diagrams to your document.</div>
+		    </div>
+		    
+	        <p class="ms-font-xs welcome-intro" data-i18n="officeStepsHeader">This add-in performs the following steps:</p>
+	       
+	        <ul class="ms-List ordered-list">
+	            <li class="ms-ListItem">
+	                <span class="ms-ListItem-primaryText">1</span>
+	                <span class="ms-ListItem-secondaryText" data-i18n="officeStep1">Connects to Microsoft OneDrive, Google Drive, or your device.</span>
+	                <div class="clearfix"></div>
+	            </li>
+	            <li class="ms-ListItem">
+	                <span class="ms-ListItem-primaryText">2</span>
+	                <span class="ms-ListItem-secondaryText" data-i18n="officeStep2">Select a draw.io diagram.</span>
+	                <div class="clearfix"></div>
+	            </li>
+	            <li class="ms-ListItem">
+	                <span class="ms-ListItem-primaryText">3</span>
+	                <span class="ms-ListItem-secondaryText" data-i18n="officeStep3">Insert the diagram into the document.</span>
+	                <div class="clearfix"></div>
+	            </li>
+	        </ul>
+	        <div style="height:160px"></div>
+	    </div>
+	</div>
+	
+	<div id="waitContainer" style="display:none">
+	    <div class="ms-Spinner"></div>
+	    <p class="ms-font-l ms-fontColor-themePrimary indentFromPaneEdge centeredText" data-i18n="officePopupInfo">
+	    	Please complete the process in the pop-up window.
+	    </p>
+	</div>
+	
+	<div id="selectFileContainer" style="display:none" class="allAreaContainer">
+		<div id="backLnk"><span class="backLnk">&lt; <span data-i18n="back">Back</span></span></div>
+		<div id="signOutLnk" class="signOutLnk" data-i18n="signout">Sign Out</div>
+		<div class="ms-ContextualMenuExample" style="display: none">
+		  <div class="menuBtn" >
+		    <div class="menuBar"></div>
+			<div class="menuBar"></div>
+			<div class="menuBar"></div>
+		  </div>
+		  <ul class="ms-ContextualMenu is-hidden">
+		    <li class="ms-ContextualMenu-item">
+		      <a class="ms-ContextualMenu-link" id="updateSel" tabindex="1">Update Selected</a> 
+		    </li>
+		    <li class="ms-ContextualMenu-item">
+		      <a class="ms-ContextualMenu-link" id="editSel" tabindex="1">Edit Selected</a> 
+		    </li>
+		    <li class="ms-ContextualMenu-item">
+		      <a class="ms-ContextualMenu-link" id="manualUpdate" tabindex="1">Manual Update</a> 
+		    </li>
+		  </ul>
+		</div>
+		<div id="filePickerTitle" class="ms-font-l ms-fontColor-themePrimary centeredText" style="padding-top:0px;">
+			<div data-i18n="officeSelDiag" style="display: inline-block;">Select draw.io Diagram:</div>
+		</div>
+		<div id="filePickerWithPreview">
+			<div class="odCatsList">
+				<div class="odCatsListLbl">OneDrive</div>
+				<div id="odFiles" class="odCatListTitle odCatSelected" data-i18n="files">Files</div>
+				<div id="odRecent" class="odCatListTitle" data-i18n="recent">Recent</div>
+				<div id="odShared" class="odCatListTitle" data-i18n="shared">Shared</div>
+				<div id="odSharepoint" class="odCatListTitle" data-i18n="sharepoint">Sharepoint</div>
+			</div>
+			<div class="odFilesSec">
+				<div class="searchBar"  style="display:none">
+					<input type="search" id="odSearchBox" placeholder="Search">
+				</div>
+				<div class="odFilesBreadcrumb">
+				</div>
+				<div id="refreshOD" class="odRefreshButton">
+					<img src="https://www.draw.io/images/update32.png" width="16" height="16" title="Refresh" border="0" data-i18n-title="refresh"/>
+				</div>
+				<div class="odFilesList">
+				</div>
+			</div>
+	        <div style="text-align: center;" id="preview">
+	        </div>
+		</div>
+    	 <div class="bottomBtns">
+            <button id="addODFile" class="ms-Button ms-Button--primary" style="margin-top: 5px"><span class="ms-Button-label" data-i18n="insert">Insert</span></button>
+         	<button style="display: none" id="editODFile" class="ms-Button ms-Button smallBtn"><span class="ms-Button-label" data-i18n="edit">Edit</span></button>
+         	<button style="display: none" id="newFile" class="ms-Button ms-Button smallBtn"><span class="ms-Button-label" data-i18n="new">New</span></button>
+         	<a class="ms-Button smallBtn" id="editODFile2" href="https://www.draw.io/?mode=onedrive" target="_blank"><span class="ms-Button-label" data-i18n="edit">Edit</span></a>
+         	<a class="ms-Button smallBtn" id="newFile2" href="https://www.draw.io/?mode=onedrive" target="_blank"><span class="ms-Button-label" data-i18n="new">New</span></a>
+        </div>
+    </div>
+    
+    <div id="insertErrorContainer" style="display:none"  class="allAreaContainer">
+	    <div id="inserErrMsg">
+		    <div class="ms-MessageBar ms-MessageBar--error">
+			  <div class="ms-MessageBar-content">
+			    <div class="ms-MessageBar-icon">
+			      <i class="ms-Icon ms-Icon--ErrorBadge"></i>
+			    </div>
+			    <div class="ms-MessageBar-text" style="font-size: 15px" data-i18n="officeCopyImgErrMsg">
+			    	An error prevented draw.io from adding the image directly to the document. This is due to some limitations in the host application.
+	         		Please manually copy the image then paste it to the document.
+			    </div>
+			  </div>
+			</div>
+		    <p data-i18n="officeCopyImgInst">
+		    	Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu. 
+		    </p>
+	    </div>
+	    <div id="imgContainer">
+	    	<img id="manualCopyImg">
+	    </div>
+	    <div id="insertErrorBtns" class="bottomBtns">
+	    	<button id="backBtn" class="ms-Button ms-Button--primary" style="margin-top: 5px"><span class="ms-Button-label" data-i18n="cancel">Cancel</span></button>
+	    </div>
+	</div>
+    
+    <div id="manualUpdateContainer" style="display:none"  class="allAreaContainer">
+   		<p data-i18n="officeManualUpdateInst">
+	    	Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.
+	    </p>
+		<div id="editableDiv" contenteditable="true" data-i18n="pasteDiagram">Paste draw.io diagram here</div>
+		<div id="manualUpdateBtns" class="bottomBtns">
+	    	<button id="backBtn2" class="ms-Button ms-Button--primary" style="margin-top: 5px"><span class="ms-Button-label" data-i18n="cancel">Cancel</span></button>
+	    </div>
+    </div>
+
+	<footer id="footerButton" class="footer ms-bgColor-neutralLight" style="display:none">
+	    <div class="container">
+	        <p align="center">
+	            <button id="loginO365PopupButton" class="serviceBtn ms-Button ms-Button--primary"><span class="ms-Button-label" data-i18n="pickODFile">Pick OneDrive File</span></button>
+	        </p>
+	        <p align="center">
+	            <button id="driveBtn" class="serviceBtn ms-Button ms-Button--primary"><span class="ms-Button-label" data-i18n="pickGDriveFile">Pick Google Drive File</span></button>
+	        </p>
+	        <p align="center">
+	            <button id="deviceBtn" class="serviceBtn ms-Button ms-Button--primary"><span class="ms-Button-label" data-i18n="pickDeviceFile">Pick Device File</span></button>
+	        </p>
+	    </div>
+	</footer>
+	<div id="notification-message">
+	   <div class="padding">
+	       <div id="notification-message-close"></div>
+	       <div id="notification-message-header"></div>
+	       <div id="notification-message-body"></div>
+	   </div>
+    </div>
+    <script type="text/javascript" src="js/index.js"></script>
+</body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/js/app.js b/src/main/webapp/connect/office365/js/app.js
new file mode 100644
index 000000000..098bf9ca7
--- /dev/null
+++ b/src/main/webapp/connect/office365/js/app.js
@@ -0,0 +1,587 @@
+/* Common app functionality */
+
+(function ()
+{
+	RESOURCE_BASE = '/resources/dia';
+	var EXPORT_URL = 'https://exp.draw.io/ImageExport4/export';
+	var PIXELS_TO_POINTS = 72 / 96;
+	
+	if (!window.AC)
+	{
+		alert('Error: this application requires ac.js to be loaded first');
+		return;
+	}
+	
+    var app = {};
+    var _dlg;
+    
+    // Common initialization function (to be called from each page)
+    app.initialize = function (spinner) 
+    {
+    	app.hideNotification = function()
+        {
+        	AC.$('#notification-message').style.transform = 'scaleY(0)';
+        	//Older browsers
+        	setTimeout(function()
+			{
+            	AC.$('#notification-message').style.display = 'none';		
+			}, 500);
+        };
+        
+    	AC.$('#notification-message-close').addEventListener('click', app.hideNotification);
+
+        // After initialization, expose a common notification function
+        app.showNotification = function (header, text) 
+        {
+        	AC.$('#notification-message-header').innerHTML = AC.htmlEntities(header);
+        	AC.$('#notification-message-body').innerHTML = AC.htmlEntities(text);
+        	AC.$('#notification-message').style.display = 'block';
+        	//Older browsers
+        	setTimeout(function()
+			{
+	        	AC.$('#notification-message').style.transform = 'scaleY(1)';
+			}, 50);
+        };
+        
+        app.spinner = spinner;
+    };
+ 
+    app.initI18n = function(callback)
+    {
+    	var lang = window.Office != null? Office.context.displayLanguage : null;
+    	
+    	if (lang != null)
+    	{
+    		var dash = lang.indexOf('-');
+    		
+    		if (dash >= 0)
+    		{
+    			lang = lang.substring(0, dash);
+    		}
+    		
+    		lang = lang.toLowerCase();
+    	}
+    	
+    	app.lang = lang;
+    	window.mxLanguage = lang;
+    	
+    	mxResources.loadDefaultBundle = false;
+    	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, lang) ||
+    		mxResources.getSpecialBundle(RESOURCE_BASE, lang);
+    	
+    	mxUtils.getAll([bundle], function(xhr)
+		{
+			// Adds bundle text to resources
+			mxResources.parse(xhr[0].getText());
+			callback();
+		});
+    };
+    
+    // This handler responds to the success or failure message that the pop-up dialog receives from the identity provider
+    // and access token provider.
+    function processODMessage(arg) 
+    {
+    	var authInfo = null;
+    
+    	try
+    	{
+    		authInfo = JSON.parse(arg.message);
+    	}
+    	catch(e){}
+    	
+        if (authInfo != null && authInfo.access_token != null) 
+        {
+        	if (app.resume) 
+        	{
+        		app.spinner.spin();
+        		app.resume = false;
+        	}
+        	
+            // We now have a valid access token.
+            _dlg.close();
+            //save the tokens
+            AC.token = authInfo.access_token;
+			authInfo.expiresOn = Date.now() + authInfo.expires_in * 1000;
+			authInfo.remember = true;
+			AC.setPersistentAuth(authInfo);
+			
+			for (var i = 0; i < AC.reqQueue.length; i++)
+			{
+				AC.reqQueue[i].success();
+			}
+			
+			AC.reqQueue = [];
+        } 
+        else 
+        {
+            // Something went wrong with authentication or the authorization of the web application.
+            _dlg.close();
+            app.showNotification(mxResources.get('authFailed'), mxResources.get('officeFailedAuthMsg'));
+        }
+    };
+
+    // This handler responds to the success of Google Drive picker
+    function processDriveMessage(arg, callback) 
+    {
+    	var fileInfo = null;
+    
+    	try
+    	{
+    		fileInfo = JSON.parse(arg.message);
+    	}
+    	catch(e){}
+    	
+        if (fileInfo != null) 
+        {
+        	if (fileInfo.error)
+        	{
+        		AC.showError(fileInfo.error);
+        		app.showStartPage();
+        	}
+        	else
+        	{
+	    		app.spinner.spin();
+	    		app.resume = false;
+	        	
+	            callback(fileInfo);
+        	}
+            _dlg.close();
+        } 
+        else 
+        {
+            // Something went wrong
+            _dlg.close();
+            app.showStartPage();
+        }
+    };
+    
+    app.showStartPage = function()
+    {
+    	AC.$('#connectContainer').style.display = 'block';
+    	AC.$('.welcome-body').style.display = 'block';
+    	AC.$('#footerButton').style.display = 'block';
+    	AC.$('#waitContainer').style.display = 'none';
+        AC.$('#selectFileContainer').style.display = 'none';
+    };
+    
+    // Use the Office dialog API to open a pop-up and display the sign-in page for the identity provider.
+    function showODLoginPopup() 
+    {
+    	AC.$('#connectContainer').style.display = 'none';
+    	AC.$('#footerButton').style.display = 'none';
+    	AC.$('#waitContainer').style.display = 'block';
+        var url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' +
+			'?client_id=' + AC.clientId + '&response_type=code' +
+			'&redirect_uri=' + encodeURIComponent(AC.redirectUri) +
+			'&scope=' + encodeURIComponent(AC.scopes) +
+			'&state=' + encodeURIComponent('cId=' + AC.clientId + '&domain=' + window.location.hostname); //To identify which app/domain is used
+
+        // height and width are percentages of the size of the parent Office application, e.g., PowerPoint, Excel, Word, etc.
+        Office.context.ui.displayDialogAsync(url,
+                {height: 50, width: 50, promptBeforeOpen: false}, function (result) 
+        {
+            _dlg = result.value;
+            _dlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogMessageReceived, processODMessage);
+            _dlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, app.showStartPage);
+        });
+    };
+
+    app.showDrivePopup = function(callback)
+	{
+    	AC.$('#connectContainer').style.display = 'none';
+    	AC.$('#footerButton').style.display = 'none';
+    	AC.$('#waitContainer').style.display = 'block';
+		var url = 'https://' + window.location.hostname + '/connect/office365/drive.html';
+	  				
+	  	  //height and width are percentages of the size of the parent Office application, e.g., PowerPoint, Excel, Word, etc.
+		Office.context.ui.displayDialogAsync(url,
+		    {height: 65, width: 65, promptBeforeOpen: false}, function (result) 
+		    {
+		        _dlg = result.value;
+		        
+		        _dlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogMessageReceived, function(arg)
+		       	{
+		        	processDriveMessage(arg, callback);
+		   		});
+		        
+		        _dlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, app.showStartPage);
+		    });
+	};
+    
+    function fetchImage(fileDoc, fileInfo, callback)
+    {
+		var acceptResponse = true;
+		
+		var timeoutThread = window.setTimeout(function()
+		{
+			acceptResponse = false;
+			callback(null);
+		}, 25000);
+    	
+    	var req = new mxXmlRequest(EXPORT_URL, 'format=png&base64=1&scale=auto' +
+    			 (fileInfo.layers != null? '&extras=' + encodeURIComponent(JSON.stringify({layers: fileInfo.layers})) : '') + 
+				 (fileInfo.pageId != null? '&pageId=' + fileInfo.pageId : '') + '&xml=' + encodeURIComponent(mxUtils.getXml(fileDoc)));
+
+		req.send(function(req)
+		{
+	    	window.clearTimeout(timeoutThread);
+			
+			if (acceptResponse)
+			{
+				callback(req.getStatus() >= 200 && req.getStatus() <= 299? req.getText() : null);
+			}
+		}, 
+		function()
+		{
+	    	window.clearTimeout(timeoutThread);
+			
+			if (acceptResponse)
+			{
+				callback(null);
+			}
+		});
+    };
+
+    app.getRecentList = function()
+    {
+    	return JSON.parse(Office.context.document.settings.get('drawioRecentList'));
+    };
+    
+    app.addToRecent = function(file)
+    {
+    	var recentList = app.getRecentList() || {};
+    	
+    	//@microsoft.graph.downloadUrl is valid for a short time only, so remove it
+    	delete file['@microsoft.graph.downloadUrl'];
+    	recentList[file.id] = file;
+    	Office.context.document.settings.set('drawioRecentList', JSON.stringify(recentList));
+    	
+    	Office.context.document.settings.saveAsync(function (asyncResult) 
+    	{
+    		//Currently we ignore saving errors and just log it to console
+    	    if (asyncResult.status == Office.AsyncResultStatus.Failed) 
+    	    {
+    	        console.log('Settings save failed. Error: ' + asyncResult.error.message);
+    	    }
+    	});
+    };
+    
+    app.insertImageInDoc = function(diagViewer, fileDoc, fileInfo, callback, error, picIndex, selectionOnly, forceServer)
+    {
+    	// TODO: How to get pageWidth in Word/PPT
+    	var pageWidth = 800;
+    	var scale = diagViewer.graph.currentScale;
+		var b = diagViewer.graph.getGraphBounds();
+
+		var page = diagViewer.currentPage;
+		var imgW = b.width / scale * PIXELS_TO_POINTS, imgH = b.height / scale * PIXELS_TO_POINTS;
+		var layers = [];
+		
+		var model = diagViewer.graph.getModel();
+		var childCount = model.getChildCount(model.root);
+			
+		// Get visible layers
+		for (var i = 0; i < childCount; i++)
+		{
+			if (model.isVisible(model.getChildAt(model.root, i)))
+				layers.push(i);
+		}
+			
+		fileInfo['pageId'] = diagViewer.diagrams[diagViewer.currentPage].getAttribute('id');
+		fileInfo['layers'] = layers;
+
+		function doInsertImage(base64Img)
+		{
+			if (base64Img == null)
+			{
+				error(mxResources.get('convertingDiagramFailed'))
+				return;
+			}
+			
+			var config = {
+                coercionType: Office.CoercionType.Image,
+                imageWidth: imgW,
+                imageHeight: imgH
+            };
+            
+			function onErrorFallback(errMsg)
+			{
+				if (AC.headless)
+        		{
+            		var copyImgErrMsg = mxResources.get('officeCopyImgErrMsg', null, 
+            				'An error prevented draw.io from adding the image directly to the document. This is due to some limitations in the host application. \n' +
+            				'Please manually copy the image then paste it to the document. \n\n' +
+                    		mxResources.get('officeInsertImgFailed', null, 'Inserting image failed') + ': ' + errMsg);
+
+            		var copyImgInstMsg = mxResources.get('officeCopyImgInst');
+            		
+            		AC.hideMsg(function()
+            		{
+            			Office.context.ui.displayDialogAsync('https://' + window.location.hostname + '/connect/office365/img-viewer.html?errMsg=' + 
+            				encodeURIComponent(copyImgErrMsg) + 
+            				'&instMsg=' + encodeURIComponent(copyImgInstMsg) + 
+            				'#' + base64Img,
+                            {height: 50, width: 50});
+            		});
+            		
+            		error();
+        		}
+        		else
+    			{
+            		error(mxResources.get('insertingImageFailed') + ': ' + errMsg);
+
+        			AC.$('#selectFileContainer').style.display = 'none';
+        			AC.$('#insertErrorContainer').style.display = 'block';
+        			AC.$('#manualCopyImg').src = 'data:image/png;base64,' + base64Img;
+    			}
+			};
+			
+			if (Office.context.requirements.isSetSupported('WordApi', 1.2)) 
+			{
+				Word.run(function (context) 
+				{
+					function doReplace(replaceItem)
+					{
+						var picture = replaceItem.insertInlinePictureFromBase64(base64Img, Word.InsertLocation.replace);
+			            picture.load('width, height');
+			            
+			            
+			            return context.sync().then(function () 
+			            {
+			            	var props = {};
+			            	
+			            	//Exclude device files as it cannot be refreshed
+			            	if (fileInfo.type != null)
+		            		{
+			            		props.altTextDescription = 'https://' + window.location.hostname + '/?open=' +
+										encodeURIComponent(fileInfo.type == 'OneDrive'? ('W' + fileInfo.driveId + '/' + fileInfo.id)
+												: ('G' + fileInfo.id)) +
+										'&local-data=' + encodeURIComponent(JSON.stringify(fileInfo))
+		            		}
+			            	
+			            	//Word will resize the image to fit the page and if we set the actual size, then it will go beyond the page boundaries
+			            	if (picture.width > imgW && picture.height > imgH)
+		            		{
+			            		props.width = imgW;
+			            		props.height = imgH;
+			            	}
+			            	
+			                picture.set(props);
+			                
+			                context.sync().then(function () 
+	    		            {
+			                	callback();
+	    		            });
+			            });
+					}
+					
+					if (picIndex != null) 
+                	{
+						var docPart = selectionOnly? context.document.getSelection() : context.document.body;
+						var pics = docPart.inlinePictures;
+						pics.load('items');
+						
+						return context.sync().then(function () 
+						{
+							doReplace(pics.items[picIndex]);
+						});
+                	}
+					else
+					{
+						return doReplace(context.document.getSelection());
+					}
+		        })
+		        .catch(function (error) 
+		        {
+		        	var errMsg = error.message;
+		            console.log('Error: ' + JSON.stringify(error));
+		            
+		            if (error instanceof OfficeExtension.Error) 
+		            {
+		                errMsg = error.debugInfo? error.debugInfo.message : errMsg;
+		            }
+		            
+		            errMsg = errMsg || 'Unknown Error';
+		            onErrorFallback(errMsg);
+		        });
+			}
+			else
+			{
+				Office.context.document.setSelectedDataAsync(base64Img, config, function (asyncResult) 
+	            {
+	            	if (asyncResult.status === Office.AsyncResultStatus.Failed) 
+	            	{
+	            		onErrorFallback(asyncResult.error.message);
+	                }
+	            	else
+	        		{
+	            		callback();
+	        		}
+	            });
+			}
+		};
+		
+		function serverFallback()
+		{
+			fetchImage(fileDoc, fileInfo, doInsertImage);	
+		};
+		
+    	try
+    	{
+	    	if (!forceServer && diagViewer.editor.isExportToCanvas())
+	    	{
+	    		var s = 1; //default scale
+	    		
+	    		//automatic scaling
+				if (b.width < pageWidth & b.height < 1.5 * pageWidth)
+				{
+					s = 4;
+				}
+				else if (b.width < 2 * pageWidth & b.height < 3 * pageWidth)
+				{
+					s = 3;
+				}
+				else if (b.width < 4 * pageWidth && b.height < 6 * pageWidth)
+				{
+					s = 2;
+				}
+
+	    		diagViewer.editor.exportToCanvas(function(canvas)
+		    	{
+		    		var data = canvas.toDataURL('image/png');
+		   	   		doInsertImage(data.substring(data.lastIndexOf(',') + 1));
+		    	}
+		    	, null, null, null, serverFallback /* on error go to server*/, null,
+				null, s);
+	    	}
+	    	else
+    		{
+	    		serverFallback();
+    		}
+    	}
+    	catch(e)
+    	{
+    		serverFallback();
+    	}
+    };
+    
+    app.editDiagram = function(fileInfo, closeCallback, showPrompt, pageId)
+    {
+		var id;
+		
+		if (fileInfo.fromDrive || fileInfo.type == 'Drive')
+		{
+			id = 'G' + fileInfo.id;
+		}
+		else 
+		{
+			id = 'W' + (fileInfo.driveId || fileInfo.parentReference.driveId) + '/' + fileInfo.id;
+		}
+		
+		if (Office.context.platform == Office.PlatformType.PC) // PC has caching issues with draw.io
+		{
+			AC.showMsg(mxResources.get('officeClickToEdit'), false, true, false, false, id);
+		}
+		else
+		{
+			var params = [];
+			
+			if (app.lang != null)
+			{
+				params.push('lang=' + app.lang);
+			}
+			
+			if (pageId != null)
+			{
+				params.push('page-id=' + encodeURIComponent(pageId));
+			}
+			
+			Office.context.ui.displayDialogAsync('https://' + window.location.hostname + '/' +
+				(params.length > 0 ? '?' + params.join('&') : '') +
+				'#' + encodeURIComponent(id), 
+				{height: 90, width: 90, promptBeforeOpen: showPrompt? true : false}, function (result) 
+		        {
+		            if (result.value != null && closeCallback != null)
+	            	{
+		            	result.value.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, function()
+		            	{
+		            		dialogCloseAsync(result.value, closeCallback);
+		            	});
+	            	}
+		        });
+		}
+    };
+    
+    //Override AC functionalities to match office 365
+    AC.authOneDrive = function(success, error)
+    {
+    	if (app.spinner) 
+    	{
+    		app.spinner.stop();
+    		app.resume = true;
+    	}
+    	
+    	AC.reqQueue.push({success: success, error: error});
+    	
+    	showODLoginPopup();
+    };
+    
+    AC.showError = function(err)
+    {
+    	app.showNotification(mxResources.get('error'), err);
+    };
+    
+    //TODO add support for openLinkId if menu is re-enabled
+    AC.showMsg = function(msg, isError, isInfo, isSuccess, showBusy)
+    {
+    	app.showNotification('', msg);
+    	var header = ''
+    		
+    	if (showBusy) 
+    	{
+    		header = '<img src="/images/spin.gif">';
+    	}
+    	
+    	AC.$('#notification-message-header').innerHTML = header;
+    };
+    
+    AC.hideMsg = function()
+    {
+    	app.hideNotification();
+    };
+    
+    window.app = app;
+}());
+
+//Source: https://theofficecontext.com/2017/07/27/officejs-second-dialog-does-not-display/
+/**
+ * Closes the currently open dialog asynchronously.
+ * This has an ugly workaround which is to try to set a new
+ * event handler on the dialog until it fails. When it failed
+ * we know the original dialog object was destroyed and we
+ * can then proceed. The issue we are working around is that
+ * if you call two dialogs back to back, the second one will
+ * likely not open at all.
+ * @param {Office.context.ui.dialog} dialog The dialog to be closed
+ * @param {function()} asyncResult The callback when close is complete
+ */
+ function dialogCloseAsync(dialog, asyncResult)
+ {
+    // issue the close
+    dialog.close();
+    // and then try to add a handler
+    // when that fails it is closed
+    setTimeout(function() 
+    {
+        try
+        {
+            dialog.addEventHandler(Office.EventType.DialogMessageReceived, function() {});
+            dialogCloseAsync(dialog, asyncResult);
+        }
+        catch(e) 
+        {
+            asyncResult(); // done - closed
+        }
+    }, 0);
+}
+	
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/js/drive.js b/src/main/webapp/connect/office365/js/drive.js
new file mode 100644
index 000000000..dc8948830
--- /dev/null
+++ b/src/main/webapp/connect/office365/js/drive.js
@@ -0,0 +1,214 @@
+  var oauthToken, officeInitialized = false, refreshToken;
+  var LS_KEY = 'oDrawGDrive';
+  
+  // See https://console.cloud.google.com/apis/credentials/oauthclient/850530949725.apps.googleusercontent.com?project=drawio-viewer
+  // must match contents in WEB-INF/google_client_secret and WEB-INF/google_client_id
+  var driveClientId = '850530949725.apps.googleusercontent.com';
+
+  function onGDriveCallback(authInfo, callback)
+  {
+	  oauthToken = authInfo.access_token;
+	  var expiresIn = authInfo.expires_in;
+	  refreshToken = authInfo.refresh_token || refreshToken;
+
+	  localStorage.setItem(LS_KEY, JSON.stringify({token: oauthToken, expires: Date.now() + parseInt(expiresIn) * 1000, refreshToken: refreshToken}));
+	  
+	  if (callback != null)
+	  {
+		  callback();
+	  }
+	  else
+	  {
+		  window.location = 'https://' + window.location.hostname + '/connect/office365/drive.html';
+	  }
+  };
+  
+  function gotoAuthPage()
+  {
+	  window.location = 'https://accounts.google.com/o/oauth2/v2/auth?client_id=' + driveClientId +
+		'&redirect_uri=' + encodeURIComponent('https://' + window.location.hostname + '/google') + 
+		'&response_type=code&access_type=offline&prompt=consent%20select_account&include_granted_scopes=true' +
+		'&scope=' + encodeURIComponent('https://www.googleapis.com/auth/drive.readonly') +
+		'&state=' + encodeURIComponent('cId=' + driveClientId + '&domain=' + window.location.hostname);
+  };
+  
+  function getAccessToken(onSuccess, onError)
+  {
+	  var authInfo = localStorage.getItem(LS_KEY);
+
+	  if (authInfo != null)
+	  {
+		  try
+		  {
+			  authInfo = JSON.parse(authInfo);
+
+			  refreshToken = authInfo.refreshToken;
+			  
+			  //Almost expired, so new login is needed
+			  if (Date.now() - authInfo.expires > -300000)
+			  {
+				  if (refreshToken != null)
+				  {
+					  //Get another refresh token
+					  var req = new XMLHttpRequest();
+					  req.open('GET', 'https://' + window.location.hostname + '/google?state=' + encodeURIComponent('cId=' + driveClientId + '&domain=' + window.location.hostname) + '&refresh_token=' + refreshToken);
+						
+					  req.onreadystatechange = function()
+					  {
+						  if (this.readyState == 4)
+						  {
+							  if (this.status >= 200 && this.status <= 299)
+							  {
+								  onGDriveCallback(JSON.parse(req.responseText), onSuccess);
+							  }
+							  else // (Unauthorized) [e.g, invalid refresh token] (sometimes, the server returns errors other than 401 (e.g. 500))
+							  {
+								  onError();
+							  }
+							}
+					  }
+						
+					  req.send();
+				  }
+				  else
+				  {
+					  authInfo = null; //No refresh token, then auth again (sometimes google doesn't return the refresh token!)
+				  }
+			  }
+		  }
+		  catch(e)
+		  {
+			  authInfo = null;
+		  }
+	  }
+
+	  if (authInfo == null)
+	  {
+		  onError();
+	  }
+	  else
+	  {
+		  oauthToken = authInfo.token;
+		  onSuccess();
+	  }
+  };
+  
+  // Use the API Loader script to load google.picker and gapi.auth.
+  function onApiLoad() 
+  {
+	  getAccessToken(function()
+	  {
+		  gapi.load('picker', onPickerApiLoad);
+	  }, gotoAuthPage);
+  };
+
+  // Create and render a Picker object for picking user files.
+  function onPickerApiLoad() 
+  {
+      var view1 = new google.picker.DocsView(google.picker.ViewId.FOLDERS)
+	      .setParent('root')
+	      .setIncludeFolders(true)
+	      .setMimeTypes('*/*');
+	
+      var view2 = new google.picker.DocsView()
+		  .setIncludeFolders(true)
+      
+      var view3 = new google.picker.DocsView()
+			.setEnableDrives(true)
+			.setIncludeFolders(true)
+      
+      var dim = AC.getDocDim();
+      
+      var builder = new google.picker.PickerBuilder()
+			.addView(view1)
+			.addView(view2)
+			.addView(view3)
+			.setOAuthToken(oauthToken)
+			.enableFeature(google.picker.Feature.SUPPORT_DRIVES)
+			.setCallback(pickerCallback)
+			.setSize(dim.w - 10, dim.h - 10);
+				
+	  picker = builder.build();		
+      picker.setVisible(true);
+  };
+  
+  function toODriveObj(driveFile)
+  {
+	  //Map Drive file to OneDrive expected fields
+	  driveFile.file = {mimeType: driveFile.mimeType};
+	  driveFile['@microsoft.graph.downloadUrl'] = driveFile.downloadUrl;
+	  driveFile.name = driveFile.title;
+	  driveFile.fromDrive = true;
+	  
+	  return driveFile;
+  };
+  
+  function fetchFileInfo(id, callback, error)
+  {
+	  var xhr = new XMLHttpRequest();
+      xhr.open('GET',
+          'https://www.googleapis.com/drive/v2/files/' + id +
+          '?fields=id,title,mimeType,modifiedDate,downloadUrl' +
+          '&supportsAllDrives=true');
+      xhr.setRequestHeader('Authorization', 'Bearer ' + oauthToken);
+      xhr.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
+      
+      xhr.onreadystatechange = function (e) {
+        if (xhr.readyState === 4 && xhr.status === 200) {
+          var obj = JSON.parse(xhr.response);
+          obj.accessToken = oauthToken;
+          
+          callback(obj);
+        } else if (xhr.readyState === 4) {
+        	error(xhr);
+        }
+      };
+      xhr.send(null);
+  };
+
+  function pickerCallback(data) 
+  {
+      if (data[google.picker.Response.ACTION] == google.picker.Action.PICKED)
+      {
+			var doc = data[google.picker.Response.DOCUMENTS][0];
+
+			if (officeInitialized)
+			{
+				fetchFileInfo(doc.id, function(doc)
+				{
+					Office.context.ui.messageParent(JSON.stringify(doc));
+				}, function(xhr)
+				{
+					//Since the picker worked, it is unexpected to face an error while fetching more info about the file
+					Office.context.ui.messageParent(JSON.stringify({'error': 'Unexpected Error! ' + xhr.response.replace()}));
+				});
+			}
+			else
+			{
+				Office.context.ui.messageParent('{error: "Unexpected Error!"}'); //Very unlikely
+			}
+      }
+      
+      if (data[google.picker.Response.ACTION] == google.picker.Action.CANCEL)
+      {
+    	  window.close();
+      }
+  };
+
+  function getGDriveFileInfo(id, callback, error)
+  {
+	  getAccessToken(function()
+	  {
+		  fetchFileInfo(id, callback, error);
+	  }, function()
+	  {
+		  AC.showError(mxResources.get('officeNotLoggedGD'));
+	  });
+  };
+  
+  function logoutGDrive()
+  {
+	  oauthToken = null;
+	  refreshToken = null;
+	  localStorage.removeItem(LS_KEY);
+  };
\ No newline at end of file
diff --git a/src/main/webapp/connect/office365/js/index.js b/src/main/webapp/connect/office365/js/index.js
new file mode 100644
index 000000000..541c53aec
--- /dev/null
+++ b/src/main/webapp/connect/office365/js/index.js
@@ -0,0 +1,1048 @@
+(function () 
+{
+	AC.headless = false;
+	
+	document.body.onselectstart = function()
+	{
+		return false;
+	};
+
+	var opts =
+	{
+		left: '50%',
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	var spinner = new Spinner(opts);
+	var selectedFile = null;
+	var selectedDriveId = null;
+	var selectedFileDoc = null;
+	var selectedSiteId = null;
+	var diagViewer = null;
+	var requestInProgress = false;
+	var breadcrumb = [];
+	var tbHeight = GraphViewer.prototype.toolbarHeight;
+    var prevDiv = AC.$('#preview');
+    var prevW, prevH;
+    var lastFolderArgs = null;
+    var lastRenderedFile = null;
+    var mode = null;
+    var openFileInputElt = null;
+    
+	mxCellRenderer.prototype.minSvgStrokeWidth = 0.01;
+    
+	function renderBreadcrumb() 
+	{
+		var bcDiv = AC.$('.odFilesBreadcrumb');
+		bcDiv.innerHTML = '';
+		
+		for (var i = 0; i < breadcrumb.length - 1; i++)
+		{
+			var folder = document.createElement('span');
+			folder.className = 'odBCFolder';
+			folder.innerHTML = AC.htmlEntities(breadcrumb[i].name || mxResources.get('home'));
+			bcDiv.appendChild(folder);
+			
+			(function(bcItem, index)
+			{
+				folder.addEventListener('click', function()
+				{
+					renderODFile(null);
+					breadcrumb = breadcrumb.slice(0, index);
+					fillFolderFiles(bcItem.driveId, bcItem.folderId, bcItem.siteId, bcItem.name);
+				});
+			})(breadcrumb[i], i);
+			
+			var sep = document.createElement('span');
+			sep.innerHTML = ' &gt; ';
+			bcDiv.appendChild(sep);
+		}
+		
+		if (breadcrumb[breadcrumb.length - 1] != null)
+		{
+			var curr = document.createElement('span');
+			curr.innerHTML = AC.htmlEntities((breadcrumb.length == 1) ?
+					mxResources.get('officeSelDiag') : (breadcrumb[breadcrumb.length - 1].name || mxResources.get('home')));
+			bcDiv.appendChild(curr);
+		}
+	}
+	
+	function openFile()
+	{
+		if (selectedFile == null || requestInProgress) return;
+		
+		if (selectedDriveId == 'sharepoint')
+		{
+			fillFolderFiles('site', null, selectedFile.id, selectedFile.displayName);
+		}
+		else if (selectedDriveId == 'site')
+		{
+			fillFolderFiles('subsite', null, selectedFile.id, selectedFile.name);
+		}
+		else
+		{
+			var isFolder = selectedFile.folder;
+			selectedFile = selectedFile.remoteItem? selectedFile.remoteItem : selectedFile; //handle remote items which is accessed indirectly
+			var folderDI = (selectedFile.parentReference? selectedFile.parentReference.driveId : null) || selectedDriveId;
+			var id = selectedFile.id;
+			
+			if (isFolder) 
+			{
+				fillFolderFiles(folderDI, id, null, selectedFile.name);
+			}
+			else
+			{
+				insertImage();
+			}
+		}
+	};
+	
+	function fillFolderFiles(driveId, folderId, siteId, folderName, searchTxt)
+	{
+		if (requestInProgress) return;
+		
+        AC.$('.odCatsList').style.display = 'block';
+        AC.$('.odFilesSec').style.display = 'block';
+        AC.$('#signOutLnk').style.display = '';
+        prevDiv.innerHTML = '';
+		prevDiv.style.top = '50%';
+
+		requestInProgress = true;
+		var acceptRequest = true;
+		var isSharepointSites = 0;
+		lastFolderArgs = arguments;
+	
+		function renderList(potintialDrawioFiles)
+		{
+			spinner.stop();
+			
+			if (potintialDrawioFiles.length == 0)
+			{
+				var emptyMsg = document.createElement('div');
+				emptyMsg.className = 'odEmptyFolder';
+				emptyMsg.innerHTML = AC.htmlEntities(mxResources.get('folderEmpty', null, 'Folder is empty!'));
+				filesList.appendChild(emptyMsg);
+				requestInProgress = false;
+				renderBreadcrumb();
+				return;
+			}
+			
+			var grid = document.createElement('table');
+			grid.className = 'odFileListGrid';
+			filesList.appendChild(grid);
+			var currentItem = null;
+			var count = 0;
+			
+			//TODO support paging
+			for (var i = 0; i < potintialDrawioFiles.length; i++)
+			{
+				var item = potintialDrawioFiles[i];
+				
+				if (isSharepointSites == 1 && item.webUrl && !(item.webUrl.indexOf('sharepoint.com/sites/') > 0 || item.webUrl.indexOf('sharepoint.com/') < 0))
+				{
+					continue;
+				}
+				
+				var title = item.displayName || item.name;
+				var tooltip = AC.htmlEntities(item.description || title);
+				var titleLimit = 25;
+						
+				if (title != null && title.length > titleLimit)
+				{
+					title = AC.htmlEntities(title.substring(0, titleLimit)) + '&hellip;';
+				}
+				else
+				{
+					title = AC.htmlEntities(title);
+				}
+				
+				if (isSharepointSites)
+				{
+					item.folder = true;
+				}
+				
+				var isFolder = item.folder !=  null;
+				var row = document.createElement('tr');
+				row.className = (count++) % 2? 'odOddRow' : 'odEvenRow';
+				var td = document.createElement('td');
+				td.style.width = "24px";
+				var typeImg = document.createElement('img');
+				typeImg.src = '/images/'  + (isFolder? 'folder.png' : 'file.png');
+				typeImg.className = 'odFileImg';
+				typeImg.width = 24;
+				td.appendChild(typeImg);
+				
+				row.appendChild(td);
+				td = document.createElement('td');
+				var titleSpan = document.createElement('span');
+				titleSpan.className = "odFileTitle";
+				titleSpan.innerHTML = title;
+				titleSpan.setAttribute('title', tooltip);
+				td.appendChild(titleSpan);
+				row.appendChild(td);
+				grid.appendChild(row);
+				
+				if (currentItem == null)
+				{
+					currentItem = row;
+					currentItem.className += ' odRowSelected';
+					selectedFile = item;
+					selectedDriveId = driveId;
+					renderODFile(selectedFile);
+				}
+				
+				(function(item2, row2)
+				{
+					row.addEventListener('dblclick', openFile);
+					
+					row.addEventListener('click', function()
+					{
+						if (currentItem != row2)
+						{
+							currentItem.className = currentItem.className.replace('odRowSelected', '');
+							currentItem = row2;
+							currentItem.className += ' odRowSelected';
+							selectedFile = item2;
+							selectedDriveId = driveId;
+							
+							renderODFile(selectedFile);
+						}
+					});
+				})(item, row);
+			}
+			renderBreadcrumb();
+			requestInProgress = false;
+		};
+		
+		var timeoutThread = setTimeout(function()
+		{
+			acceptRequest = false;
+			requestInProgress = false;
+			spinner.stop();
+			AC.showError(mxResources.get('timeout'));
+		}, 20000); //20 sec timeout
+		
+		var filesList = AC.$('.odFilesList');
+        filesList.innerHTML = '';
+        spinner.spin(filesList);
+        
+        var url;
+        
+        switch(driveId)
+        {
+        	case 'recent':
+        		breadcrumb = [{name: mxResources.get('recent', null, 'Recent'), driveId: driveId}];
+        		var recentList = app.getRecentList() || {};
+        		var list = [];
+        		
+        		for (var id in recentList)
+    			{
+        			list.push(recentList[id]);
+    			}
+        		
+        		clearTimeout(timeoutThread);
+        		renderList(list);
+        		return;
+        	case 'shared':
+        		url = '/me/drive/sharedWithMe';
+        		breadcrumb = [{name: mxResources.get('sharedWithMe', null, 'Shared With Me'), driveId: driveId}];
+        		break;
+        	case 'sharepoint':
+        		url = '/sites?search=';
+        		breadcrumb = [{name: mxResources.get('sharepointSites', null, 'Sharepoint Sites'), driveId: driveId}];
+        		isSharepointSites = 1;
+        		break;
+        	case 'site':
+        		breadcrumb.push({name: folderName, driveId: driveId, folderId: folderId, siteId: siteId});
+        		url = '/sites/' + siteId + '/drives';
+        		isSharepointSites = 2;
+        		break;
+        	case 'subsite':
+        		breadcrumb.push({name: folderName, driveId: driveId, folderId: folderId, siteId: siteId});
+        		url = '/drives/' + siteId + (folderId? '/items/' + folderId : '/root') + '/children';
+        		break;
+        	case 'search': //TODO search doesn't return any results, find out why then remove display: none from the searchBox
+        		driveId = selectedDriveId;
+        		breadcrumb = [{driveId: driveId, name: mxResources.get('back', null, 'Back')}];
+        		searchTxt = encodeURIComponent(searchTxt.replace(/\'/g, '\\\''));
+        		url = selectedSiteId? '/sites/' + selectedSiteId + '/drive/root/search(q=\'' + searchTxt + '\')' : (driveId? '/drives/' + driveId + '/root/search(q=\'' + searchTxt + '\')' : '/me/drive/root/search(q=\'' + searchTxt + '\')');
+        		break;
+        	default:
+        		if (folderId == null)
+    			{
+        			breadcrumb = [{driveId: driveId}];
+    			}
+        		else
+        		{
+        			breadcrumb.push({name: folderName, driveId: driveId, folderId: folderId});
+        		}
+        		
+        		url = (driveId?  '/drives/' + driveId : '/me/drive') + (folderId? '/items/' + folderId : '/root') + '/children';
+        }
+        
+        if (!isSharepointSites)
+        {
+        	url += (url.indexOf('?') > 0 ? '&' : '?') + 'select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl';
+        }
+        
+		AC.doAuthRequest(url, 'GET', null, function(resp) 
+		{
+			if (!acceptRequest) return;
+			clearTimeout(timeoutThread);
+			
+			var list = resp.value;
+
+			var potintialDrawioFiles = isSharepointSites? list : [];
+			
+			for (var i = 0; !isSharepointSites && i < list.length; i++)
+			{
+				var file = list[i];
+				var mimeType = file.file? file.file.mimeType : null;
+				
+				if (file.folder || mimeType == 'text/html' || mimeType == 'text/xml' || mimeType == 'application/xml' || mimeType == 'image/png' 
+					|| /\.svg$/.test(file.name) || /\.html$/.test(file.name) || /\.xml$/.test(file.name) || /\.png$/.test(file.name)
+					|| /\.drawio$/.test(file.name))
+				{
+					potintialDrawioFiles.push(file);
+				}
+			}
+			
+			renderList(potintialDrawioFiles);
+		}, 
+		function(err)
+		{
+			if (!acceptRequest) return;
+			clearTimeout(timeoutThread);
+			
+			var errMsg = null;
+			
+			try
+			{
+				errMsg = JSON.parse(err.responseText).error.message;
+			}
+			catch(e){} //ignore errors
+			
+			AC.showError(mxResources.get('errorFetchingFolder', null, 'Error fetching folder items') +
+				(errMsg != null? ' (' + errMsg + ')' : ''));
+			requestInProgress = false;
+			spinner.stop();
+		});
+	};
+	
+	var selectedCat = AC.$('#odFiles');
+	
+	var cats = AC.$$('.odCatListTitle');
+	
+	for (var i = 0; i < cats.length; i++)
+	{
+		cats[i].addEventListener('click', function()
+		{
+			if (requestInProgress) return;
+			
+			selectedCat.className = selectedCat.className.replace('odCatSelected', '');
+			selectedCat = this;
+			selectedCat.className += ' odCatSelected';
+			
+			switch(this.id)
+			{
+				case 'odFiles':
+					fillFolderFiles();
+				break;
+				case 'odRecent':
+					fillFolderFiles('recent');
+				break;
+				case 'odShared':
+					fillFolderFiles('shared');
+				break;
+				case 'odSharepoint':
+					fillFolderFiles('sharepoint');
+				break;
+			}
+		});
+	}
+	
+	var insertingImage = false;
+	var loadingPreviewFile = null;
+
+	function renderDeviceFile(deviceFile)
+	{
+        AC.$('#footerButton').style.display = 'none';
+        AC.$('#waitContainer').style.display = 'none';
+        AC.$('#selectFileContainer').style.display = 'block';
+        AC.$(".welcome-body").style.display = 'none';
+        AC.$("#connectContainer").style.display = 'block';
+
+        AC.$('.odCatsList').style.display = 'none';
+        AC.$('.odFilesSec').style.display = 'none';
+        prevDiv.style.top = '0px';
+        
+        AC.$('#signOutLnk').style.display = 'none';
+
+        AC.$('#addODFile').setAttribute('disabled', 'disabled');
+		AC.$('#editODFile2').setAttribute('href', 'javascript:void(0);');
+		AC.$('#editODFile2').style.opacity = 0.5;
+		AC.$('#newFile2').setAttribute('href', 'https://' + window.location.hostname + '/?mode=device');
+		prevDiv.innerHTML = '';
+		
+		mode = 'D';
+		selectedFile = deviceFile;
+		spinner.spin(prevDiv);
+		var reader = new FileReader();
+		
+		reader.onload = function(e)
+		{
+			try
+			{
+				var isPng = (deviceFile.type == 'image/png');
+				
+				var cnt = e.target.result;
+				
+				if (isPng)
+				{
+					cnt = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (cnt);
+					cnt = AC.extractGraphModelFromPng(cnt);
+				}
+				
+				var doc = mxUtils.parseXml(cnt);
+
+				if (new Editor().extractGraphModel(doc.documentElement) != null)
+				{
+					renderDoc(doc, cnt, deviceFile.name, true);
+					lastRenderedFile = deviceFile;
+					AC.$('#addODFile').removeAttribute('disabled');
+				}
+				else
+				{
+					reportRenderError(true);
+				}
+			}
+			catch (e)
+			{
+				reportRenderError(false, e);
+			}
+			
+			spinner.stop();
+		};
+
+		reader.readAsText(deviceFile);
+	};
+	
+	function renderDriveFile(driveFile, callback)
+	{
+		toODriveObj(driveFile);
+		mode = 'G';
+		selectedFile = driveFile;
+		
+        AC.$('#footerButton').style.display = 'none';
+        AC.$('#waitContainer').style.display = 'none';
+        AC.$('#selectFileContainer').style.display = 'block';
+        AC.$(".welcome-body").style.display = 'none';
+        AC.$("#connectContainer").style.display = 'block';
+
+        AC.$('.odCatsList').style.display = 'none';
+        AC.$('.odFilesSec').style.display = 'none';
+        prevDiv.style.top = '0px';
+        
+        AC.$('#signOutLnk').style.display = '';
+        
+        renderFile(driveFile, callback, true);
+	};
+	
+	function renderODFile(file, callback)
+	{
+		if (file != null) 
+		{
+			file.fromOD = true;
+		}
+		
+		mode = 'W';
+		renderFile(file, callback);
+	};
+	
+	function renderDoc(doc, xml, filename, fullHeight, refreshFn)
+	{
+		selectedFileDoc = doc;
+		var temp = AC.getDocDim();
+    	prevW = temp.w - 14;
+    	prevH = (fullHeight? temp.h - 67 : temp.h / 2 - 50) - tbHeight;
+		
+		var container = document.createElement('div');
+		container.style.cssText = 'position:absolute;box-sizing:border-box;' +
+			'width:' + (prevW - 2) + 'px;height:' + prevH + 'px;margin-bottom:2px;border:1px solid transparent;';
+
+		prevDiv.innerHTML = '';
+		prevDiv.appendChild(container);
+
+		var refreshImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAhFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8qm6wAAAAK3RSTlMABr4XDQoC07pc+/Yq5dzYtaiSjXlkMx4U8u/NwrKZf1gl8eDKb2lOR0Q6/VKNjQAAAKlJREFUGNOtjlcOwjAQBd1jOwnpvdNh738/kuA4iE/EfI1Gu9JD/4RTyr+bNxDHCS8FKp62CXWAlSYj0n6MNZziLOt90EC2OgXQ5osoF/aagr/GgsBeRUpSsUgeSikHbG4xFpssamCU0lIYZVuMDkFw9oxeTaUOgE74e0T1+Ki1wvOl8iHituojVDJJiAuNhwxlG9+Jhhm3sxGJiaFy7MMuvjFksavRD7wAhtIMKUShI2QAAAAASUVORK5CYII=';
+		
+		var btnDefs = refreshFn != null? {
+			'refresh': {title: mxResources.get('refresh'),
+				image: refreshImg, handler: refreshFn
+			}
+		} : null;
+		
+		// Layers are enabled to allow selecting the visible layers in the image
+		// LATER: Add visible layers to image data and support server-side flow.
+		diagViewer = new GraphViewer(container, doc.documentElement,
+			{highlight: '#3572b0', 'toolbar-buttons': btnDefs,
+			border: 8, 'auto-fit': true, resize: false,
+			nav: false, lightbox: false, 'toolbar-nohide': true,
+			'toolbar-position': 'top', toolbar: 'pages refresh layers', title: filename});
+	};
+	
+	function reportRenderError(notDiag, error)
+	{
+		function addWarning(status)
+		{
+			var warnImg = document.createElement('img');
+			warnImg.src = '/mxgraph/images/warning.png';
+			warnImg.width = 16;
+			warnImg.height = 16;
+			status.appendChild(warnImg);
+			mxUtils.br(status);
+		};
+		
+		spinner.stop();
+		
+		var status = document.createElement('div');
+		status.className = 'previewStatus';
+		
+		if (notDiag)
+		{
+			addWarning(status);
+			mxUtils.write(status, mxResources.get('notADiagramFile'));
+		}
+		else
+		{
+			mxUtils.write(status, mxResources.get('error') + ':');
+			mxUtils.br(status);
+			mxUtils.write(status, error.message);
+		}
+		
+		prevDiv.appendChild(status);
+	};
+	
+	function renderFile(file, callback, fullHeight)
+	{
+		if (insertingImage) return;
+		
+		lastRenderedFile = null;
+		prevDiv.innerHTML = '';
+		
+		AC.$('#addODFile').setAttribute('disabled', 'disabled');
+		AC.$('#editODFile2').setAttribute('href', 'javascript:void(0);');
+		AC.$('#editODFile2').style.opacity = 0.5;
+
+		if (file == null || file.folder) 
+		{
+			var status = document.createElement('div');
+			status.className = 'previewStatus';
+			mxUtils.write(status, mxResources.get('noPreview'));
+			prevDiv.appendChild(status);
+
+			return;
+		}
+		
+		spinner.spin(prevDiv);
+		
+		try
+		{
+			// Workaround for parentReference access
+			if (file.remoteItem != null)
+			{
+				file = file.remoteItem;
+			}
+
+			loadingPreviewFile = file;
+			
+			AC.checkDrawioFile(file, function(doc, xml, isDrawio)
+			{
+				file.isDrawio = isDrawio;
+				
+				if (loadingPreviewFile != file)
+				{
+					return;
+				}
+
+				lastRenderedFile = file;
+	
+				renderDoc(doc, xml, file.name, fullHeight, function()
+				{
+					renderFile(file, null, fullHeight);
+				});
+				
+				AC.$('#addODFile').removeAttribute('disabled');
+				
+				// Open URL parameter is workaround for broken hash property in Word for Windows
+				if (mode == 'G')
+				{
+					AC.$('#editODFile2').setAttribute('href', 'https://' + window.location.hostname + '/?open=' +
+							encodeURIComponent('G' + file.id));
+					AC.$('#newFile2').setAttribute('href', 'https://' + window.location.hostname + '/?mode=google');
+				}
+				else
+				{
+					AC.$('#editODFile2').setAttribute('href', 'https://' + window.location.hostname + '/?open=' +
+						encodeURIComponent('W' + file.parentReference.driveId + '/' + file.id));
+					AC.$('#newFile2').setAttribute('href', 'https://' + window.location.hostname + '/?mode=onedrive');
+				}
+				
+				AC.$('#editODFile2').style.opacity = 1;
+
+				spinner.stop();
+				
+				if (callback)
+				{
+					callback();
+				}
+			}, 
+			function() //If the file is not a draw.io diagram
+			{
+				reportRenderError(true);
+			});
+		}
+		catch (e)
+		{
+			reportRenderError(false, e);
+		}
+	};
+	
+	function insertImage() 
+	{
+		if (insertingImage || (selectedFile != null && selectedFile.folder)) return;
+		
+		if (lastRenderedFile != selectedFile)
+		{
+			renderODFile(selectedFile, insertImage);
+			return;
+		}
+		
+		insertingImage = true;
+		spinner.spin(AC.$('#loading'));
+		
+		var fileInfo = {};
+		
+		if (mode == 'W')
+		{
+			fileInfo = {
+	    		type: 'OneDrive',
+	    		id: selectedFile.id,
+	    		driveId: selectedFile.parentReference.driveId,
+	    		lastModifiedDate: selectedFile.lastModifiedDateTime
+	    	};
+			
+			app.addToRecent(selectedFile);
+		}
+		else if (mode == 'G')
+		{
+			fileInfo = {
+	    		type: 'Drive',
+	    		id: selectedFile.id,
+	    		lastModifiedDate: selectedFile.modifiedDate
+	    	};
+		}
+		
+		app.insertImageInDoc(diagViewer, selectedFileDoc, fileInfo, 
+			function()
+			{
+				spinner.stop();
+            	insertingImage = false;
+			}, function(errorMsg)
+			{
+				AC.showError(errorMsg);
+				spinner.stop();
+				insertingImage = false;
+			});
+	};
+	
+    // The initialize function must be run each time a new page is loaded
+    Office.initialize = function ()
+    {
+    	var winDim = AC.getDocDim();
+//    	spinner.spin(AC.$('#loading'));
+        app.initialize(spinner);
+
+        app.initI18n(function()
+        {
+	        prevW = winDim.w - 14;
+	        prevH = winDim.h / 2 - 50 - tbHeight;
+	        
+	        app.showStartPage();
+	        
+			AC.$('#loginO365PopupButton').addEventListener('click', function()
+			{
+				var tmpAuth = localStorage.getItem('tmpODAuth');
+				
+				if (tmpAuth != null)
+				{
+					try
+			    	{
+			    		var authInfo = JSON.parse(tmpAuth);
+			    		
+			    		if (authInfo != null && authInfo.access_token != null) 
+				        {
+				            //save the tokens
+				            AC.token = authInfo.access_token;
+							authInfo.expiresOn = Date.now() + authInfo.expires_in * 1000;
+							authInfo.remember = true;
+							AC.setPersistentAuth(authInfo);
+				        }
+			    	}
+			    	catch(e){}
+			    	
+			    	localStorage.removeItem('tmpODAuth');
+				}
+				
+		        //OneDrive Auth before proceeding
+				AC.confirmODAuth(function()
+				{
+			        AC.$('#footerButton').style.display = 'none';
+			        AC.$('#waitContainer').style.display = 'none';
+			        AC.$('#selectFileContainer').style.display = 'block';
+			        AC.$(".welcome-body").style.display = 'none';
+			        AC.$("#connectContainer").style.display = 'block';
+			        fillFolderFiles();
+			        
+			        AC.$('#odSharepoint').style.display = AC.isPersonal ? 'none' : '';
+				}, 
+				function()
+				{
+					AC.showError(mxResources.get('errorAuthOD', null, 'Error authenticating to OneDrive!'));
+				});
+			});
+			
+			AC.$('#driveBtn').addEventListener('click', function()
+			{
+				app.showDrivePopup(renderDriveFile);
+			});
+			
+			AC.$('#deviceBtn').addEventListener('click', function()
+			{
+				if (openFileInputElt == null) 
+				{
+					var input = document.createElement('input');
+					input.setAttribute('type', 'file');
+					
+					input.addEventListener('change', function()
+					{
+						if (input.files != null)
+						{
+							renderDeviceFile(input.files[0]);
+							
+				    		// Resets input to force change event for same file (type reset required for IE)
+							input.type = '';
+							input.type = 'file';
+				    		input.value = '';
+						}
+					});
+					
+					input.style.display = 'none';
+					document.body.appendChild(input);
+					openFileInputElt = input;
+				}
+				
+				openFileInputElt.click();
+			});
+			
+			AC.$('#backLnk').addEventListener('click', app.showStartPage);
+			AC.$('#signOutLnk').addEventListener('click', function()
+			{
+				if (mode == 'G')
+				{
+					logoutGDrive();
+				}
+				else
+				{
+					AC.setPersistentAuth(null); //Logout from OneDrive
+					Office.context.ui.displayDialogAsync('https://login.microsoftonline.com/common/oauth2/v2.0/logout',
+			                {height: 50, width: 50, promptBeforeOpen: false});
+				}
+				
+				app.showStartPage();
+			});
+			
+			var delayTimer = null;
+			
+			function doSearch(searchStr)
+			{
+				if (requestInProgress) return;
+				delayTimer = null;
+				fillFolderFiles('search', null, null, null, searchStr)
+			};
+			
+			//Use keyup to detect delete and backspace
+			AC.$('#odSearchBox').addEventListener('keyup', function(evt)
+			{
+				var searchInput = this;
+				
+				if (delayTimer != null)
+				{
+					clearTimeout(delayTimer);
+				}
+				
+				if (evt.keyCode == 13)
+				{
+					doSearch(searchInput.value);
+				}
+				else
+				{
+					delayTimer = setTimeout(function()
+					{
+						doSearch(searchInput.value);	
+					}, 500);
+				}
+			});
+	
+			function refreshFolder()
+			{
+				if (lastFolderArgs != null)
+				{
+					renderODFile(null);
+					fillFolderFiles.apply(this, lastFolderArgs);
+				}
+			};
+			
+			//HTML elements localization
+			var i18nElems = AC.$$('*[data-i18n]'); //get all elements having data-i18n attribute, should be fine given a small html file
+			
+			for (var i = 0; i < i18nElems.length; i++)
+			{
+				var i18nKey = i18nElems[i].getAttribute('data-i18n');
+				i18nElems[i].innerHTML = AC.htmlEntities(mxResources.get(i18nKey, null, i18nElems[i].innerHTML));
+			}
+			
+			var i18nTitleElems = AC.$$('*[data-i18n-title]'); //get all elements having data-i18n attribute, should be fine given a small html file
+			
+			for (var i = 0; i < i18nTitleElems.length; i++)
+			{
+				var i18nKey = i18nTitleElems[i].getAttribute('data-i18n-title');
+				i18nTitleElems[i].setAttribute('title', AC.htmlEntities(mxResources.get(i18nKey, null, i18nTitleElems[i].getAttribute('title'))));
+			}
+			
+			AC.$('#newFile').addEventListener('click', function()
+			{
+				Office.context.ui.displayDialogAsync('https://' + window.location.hostname + '/?mode=' + (mode == 'G'? 'google' : 'onedrive') + '&dt=' + Date.now() + (app.lang != null? '&lang=' + app.lang : ''), 
+						{height: 90, width: 90, promptBeforeOpen: false}, function (result) 
+				        {
+							//TODO open the new file's folder in the file manager
+				            _dlg = result.value;
+				            
+				            if (mode == 'W')
+				            {
+				            	_dlg.addEventHandler(Microsoft.Office.WebExtension.EventType.DialogEventReceived, refreshFolder);
+				            }
+				        });
+			});
+
+			// Workaround for caching issues in Windows inside popup is to use a link with target blank instead
+			AC.$('#editODFile').addEventListener('click', function()
+			{
+				if (selectedFile == null || selectedFile.folder) return;
+				
+				app.editDiagram(selectedFile);
+			});
+			
+			AC.$('#refreshOD').addEventListener('click', refreshFolder);
+			
+			AC.$('#addODFile').addEventListener('click', insertImage);
+			
+			AC.$('#backBtn').addEventListener('click', function()
+			{
+				AC.$('#selectFileContainer').style.display = 'block';
+				AC.$('#insertErrorContainer').style.display = 'none';
+			});
+
+			AC.$('#backBtn2').addEventListener('click', function()
+			{
+				AC.$('#selectFileContainer').style.display = 'block';
+				AC.$('#manualUpdateContainer').style.display = 'none';
+			});
+
+			var ContextualMenuElements = document.querySelectorAll(".ms-ContextualMenuExample");
+			  
+			for (var i = 0; i < ContextualMenuElements.length; i++) 
+			{
+			    var ButtonElement = ContextualMenuElements[i].querySelector(".menuBtn");
+			    var ContextualMenuElement = ContextualMenuElements[i].querySelector(".ms-ContextualMenu");
+			    new fabric['ContextualMenu'](ContextualMenuElement, ButtonElement);
+			}
+
+			AC.$('#updateSel').addEventListener('click', function()
+			{
+				this.className = this.className.replace('is-selected', '');
+				refreshSelImage({completed: function(){}});
+			});
+
+			AC.$('#editSel').addEventListener('click', function()
+			{
+				this.className = this.className.replace('is-selected', '');
+				editSelImage({completed: function(){}});
+			});
+
+			AC.$('#manualUpdate').addEventListener('click', function()
+			{
+				this.className = this.className.replace('is-selected', '');
+				AC.$('#manualUpdateContainer').style.display = 'block';
+				AC.$('#selectFileContainer').style.display = 'none';
+				AC.$('#insertErrorContainer').style.display = 'none';
+			});
+			
+//			//Add selection change handler
+//			Office.context.document.addHandlerAsync("documentSelectionChanged", selectionHandler, function(result){console.log(result)} 
+//			);
+//
+//			// Event handler function.
+//			function selectionHandler(eventArgs){
+//				console.log(eventArgs)
+//			}
+			
+			var editableDiv = AC.$('#editableDiv');
+
+			function handlepaste (e) 
+			{
+			    var types, pastedData, savedContent;
+			    
+			    // Browsers that support the 'text/html' type in the Clipboard API (Chrome, Firefox 22+)
+			    if (e && e.clipboardData && e.clipboardData.types && e.clipboardData.getData) 
+			    {
+			        // Check for 'text/html' in types list. See abligh's answer below for deatils on
+			        // why the DOMStringList bit is needed
+			        types = e.clipboardData.types;
+			        
+			        if (((types instanceof DOMStringList) && types.contains("text/html")) || 
+			        				(types.indexOf && types.indexOf('text/html') !== -1)) 
+			        {
+			        
+			        	// Extract data and pass it to callback
+			            pastedData =  e.clipboardData.getData('text/html');
+			            processPaste(pastedData);
+			            
+						// Stop the data from actually being pasted
+			            e.stopPropagation();
+			            e.preventDefault();
+			            return false;
+			        }
+			        else
+		        	{
+			        	var imageFound = false;
+						var items = e.clipboardData.items;
+						
+						for (index in items)
+						{
+							var item = items[index];
+							
+							if (item.kind === 'file')
+							{
+								var file = item.getAsFile();
+								
+								if (file && file.type == 'image/png')
+								{
+									imageFound = true;
+									var reader = new FileReader();
+									
+									reader.onload = function(e)
+									{
+										handlePastedImage(e.target.result);
+									};
+									
+									reader.readAsDataURL(file);
+									break;
+								}
+							}
+						}
+						
+						if (imageFound)
+						{
+							// Stop the data from actually being pasted
+				            e.stopPropagation();
+				            e.preventDefault();
+				            return false;
+						}
+		        	}
+			    }
+			    
+			    // Everything else: Move existing element contents to a DocumentFragment for safekeeping
+			    savedContent = document.createDocumentFragment();
+			    
+			    while(editableDiv.childNodes.length > 0) 
+			    {
+			    	savedContent.appendChild(editableDiv.childNodes[0]);
+			    }
+			    
+			    // Then wait for browser to paste content into it and cleanup
+			    waitForPastedData(editableDiv, savedContent);
+			    return true;
+			}
+
+			function waitForPastedData (elem, savedContent) 
+			{
+				// If data has been processes by browser, process it
+			    if (elem.childNodes && elem.childNodes.length > 0) 
+			    {
+			    	// Retrieve pasted content via innerHTML
+			        // (Alternatively loop through elem.childNodes or elem.getElementsByTagName here)
+			    	var pastedData = elem.innerHTML;
+			        
+			        // Restore saved content
+			        elem.innerHTML = "";
+			        elem.appendChild(savedContent);
+			        
+			        // Call callback
+			        processPaste(pastedData);
+			    }
+			    // Else wait 20ms and try again
+			    else 
+			    {
+			        setTimeout(function () 
+			        {
+			            waitForPastedData(elem, savedContent)
+			        }, 20);
+			    }
+			};
+
+			function handlePastedImage(base64Img)
+			{
+				fileInfo = null;
+				
+				try
+				{
+					fileInfo = JSON.parse(AC.extractDataFromPng(base64Img, 'drawioFileInfo'));
+				}
+				catch(e){}
+	
+				if (fileInfo == null)
+				{
+					AC.showError(mxResources.get('noDiagrams'));
+				}
+				else
+				{
+					updateSelected(fileInfo, {completed: function(){}});
+				}
+			};
+
+			function processPaste (pastedData) 
+			{
+	            var imgElems = mxUtils.parseXml(pastedData).getElementsByTagName('img');
+
+	            for (var i = 0; i < imgElems.length; i++)
+            	{
+	            	handlePastedImage(imgElems[i].getAttribute('src'));
+	            	break;
+            	}
+			};
+
+			editableDiv.addEventListener('paste', handlepaste, false);
+        });		
+    };    
+}());
diff --git a/src/main/webapp/connect/office365/manifest.xml b/src/main/webapp/connect/office365/manifest.xml
new file mode 100644
index 000000000..b6c34f26e
--- /dev/null
+++ b/src/main/webapp/connect/office365/manifest.xml
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<OfficeApp
+          xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
+          xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
+          xsi:type="TaskPaneApp">
+
+  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
+
+  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
+  <Id>e849ddb8-6bbd-4833-bd4b-59030099d63e</Id>
+
+  <!--Version. Updates from the store only get triggered if there is a version change. -->
+  <Version>1.0.0.0</Version>
+  <ProviderName>JGraph Ltd</ProviderName>
+  <DefaultLocale>en-US</DefaultLocale>
+  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
+  <DisplayName DefaultValue="draw.io" />
+  <Description DefaultValue="Adds draw.io diagrams from OneDrive">
+  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+  	  <Override Locale="de-de" Value="draw.io Diagramme von OneDrive einfügen"/>
+  </Description>
+
+  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
+  <IconUrl DefaultValue="https://www.draw.io/images/favicon-32x32.png" />
+  <HighResolutionIconUrl DefaultValue="https://www.draw.io/images/drawlogo80.png"/>
+
+  <SupportUrl DefaultValue="https://desk.draw.io/" />
+
+  <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
+  <AppDomains>
+    <AppDomain>https://login.microsoftonline.com</AppDomain>
+    <AppDomain>https://exp.draw.io</AppDomain>
+    <AppDomain>https://graph.microsoft.com</AppDomain>
+    <AppDomain>https://www.draw.io</AppDomain>
+  </AppDomains>
+  <!--End Basic Settings. -->
+
+  <!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
+  <Hosts>
+    <Host Name="Document" />
+    <Host Name="Presentation" />
+    <Host Name="Workbook" />
+  </Hosts>
+  <DefaultSettings>
+    <SourceLocation DefaultValue="https://www.draw.io/connect/office365/index.html" />
+  </DefaultSettings>
+  <!-- End TaskPane Mode integration.  -->
+
+  <Permissions>ReadWriteDocument</Permissions>
+
+  <!-- Begin Add-in Commands Mode integration. -->
+  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
+
+    <!-- The Hosts node is required. -->
+    <Hosts>
+      <!-- Each host can have a different set of commands. -->
+      <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
+      <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
+      <Host xsi:type="Document">
+        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
+        <DesktopFormFactor>
+          <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
+          <GetStarted>
+            <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
+            <Title resid="drawio.GetStarted.Title"/>
+
+            <!-- Description of the Getting Started callout. resid points to a LongString resource -->
+            <Description resid="drawio.GetStarted.Description"/>
+
+            <!-- Point to a url resource which details how the add-in should be used. -->
+            <LearnMoreUrl resid="drawio.GetStarted.LearnMoreUrl"/>
+          </GetStarted>
+          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
+            Think of the FunctionFile as the code behind ExecuteFunction. -->
+          <FunctionFile resid="drawio.FunctionFile.Url" />
+
+          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
+          <ExtensionPoint xsi:type="PrimaryCommandSurface">
+            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
+            <OfficeTab id="TabInsert">
+              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
+              <Group id="drawio.Group1">
+                <!-- Label for your group. resid must point to a ShortString resource. -->
+                <Label resid="drawio.Group1Label" />
+                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
+                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
+                <Icon>
+                  <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                  <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                  <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                </Icon>
+
+                <!-- Control. It can be of type "Button" or "Menu". -->
+                <Control xsi:type="Button" id="drawio.TaskpaneButton">
+                  <Label resid="drawio.TaskpaneButton.Label" />
+                  <Supertip>
+                    <!-- ToolTip title. resid must point to a ShortString resource. -->
+                    <Title resid="drawio.TaskpaneButton.Label" />
+                    <!-- ToolTip description. resid must point to a LongString resource. -->
+                    <Description resid="drawio.TaskpaneButton.Tooltip" />
+                  </Supertip>
+                  <Icon>
+                    <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                    <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                    <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                  </Icon>
+
+                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
+                  <Action xsi:type="ShowTaskpane">
+                    <TaskpaneId>drawioBtn</TaskpaneId>
+                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
+                    <SourceLocation resid="drawio.Taskpane.Url" />
+                  </Action>
+                </Control>
+                <Control xsi:type="Button" id="drawio.refreshButton">
+				  <Label resid="drawio.refreshButton.label" />
+				  <Supertip>
+				    <Title resid="drawio.refreshButton.toolTipLbl" />
+				    <Description resid="drawio.refreshButton.toolTip" />
+				  </Supertip>
+				  <Icon>
+				    <bt:Image size="16" resid="drawio.refreshIcon_16x16" />
+				    <bt:Image size="32" resid="drawio.refreshIcon_32x32" />
+				    <bt:Image size="80" resid="drawio.refreshIcon_80x80" />
+				  </Icon>
+				  <Action xsi:type="ExecuteFunction">
+				    <FunctionName>refreshSelImages</FunctionName>
+				  </Action>
+				</Control>
+				<Control xsi:type="Button" id="drawio.refreshAllBtn">
+				  <Label resid="drawio.refreshAllBtn.label" />
+				  <Supertip>
+				    <Title resid="drawio.refreshAllBtn.toolTipLbl" />
+				    <Description resid="drawio.refreshAllBtn.toolTip" />
+				  </Supertip>
+				  <Icon>
+				    <bt:Image size="16" resid="drawio.refreshIcon_16x16" />
+				    <bt:Image size="32" resid="drawio.refreshIcon_32x32" />
+				    <bt:Image size="80" resid="drawio.refreshIcon_80x80" />
+				  </Icon>
+				  <Action xsi:type="ExecuteFunction">
+				    <FunctionName>refreshAllImages</FunctionName>
+				  </Action>
+				</Control>
+				<Control xsi:type="Button" id="drawio.editButton">
+				  <Label resid="drawio.editButton.label" />
+				  <Supertip>
+				    <Title resid="drawio.editButton.toolTipLbl" />
+				    <Description resid="drawio.editButton.toolTip" />
+				  </Supertip>
+				  <Icon>
+				    <bt:Image size="16" resid="drawio.editIcon_16x16" />
+				    <bt:Image size="32" resid="drawio.editIcon_32x32" />
+				    <bt:Image size="80" resid="drawio.editIcon_80x80" />
+				  </Icon>
+				  <Action xsi:type="ExecuteFunction">
+				    <FunctionName>editSelImage</FunctionName>
+				  </Action>
+				</Control>
+              </Group>
+            </OfficeTab>
+          </ExtensionPoint>
+        </DesktopFormFactor>
+      </Host>
+      <Host xsi:type="Presentation">
+        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
+        <DesktopFormFactor>
+          <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
+          <GetStarted>
+            <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
+            <Title resid="drawio.GetStarted.Title"/>
+
+            <!-- Description of the Getting Started callout. resid points to a LongString resource -->
+            <Description resid="drawio.GetStarted.Description"/>
+
+            <!-- Point to a url resource which details how the add-in should be used. -->
+            <LearnMoreUrl resid="drawio.GetStarted.LearnMoreUrl"/>
+          </GetStarted>
+          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
+            Think of the FunctionFile as the code behind ExecuteFunction. -->
+          <FunctionFile resid="drawio.FunctionFile.Url" />
+
+          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
+          <ExtensionPoint xsi:type="PrimaryCommandSurface">
+            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
+            <OfficeTab id="TabInsert">
+              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
+              <Group id="drawio.Group1">
+                <!-- Label for your group. resid must point to a ShortString resource. -->
+                <Label resid="drawio.Group1Label" />
+                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
+                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
+                <Icon>
+                  <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                  <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                  <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                </Icon>
+
+                <!-- Control. It can be of type "Button" or "Menu". -->
+                <Control xsi:type="Button" id="drawio.TaskpaneButton">
+                  <Label resid="drawio.TaskpaneButton.Label" />
+                  <Supertip>
+                    <!-- ToolTip title. resid must point to a ShortString resource. -->
+                    <Title resid="drawio.TaskpaneButton.Label" />
+                    <!-- ToolTip description. resid must point to a LongString resource. -->
+                    <Description resid="drawio.TaskpaneButton.Tooltip" />
+                  </Supertip>
+                  <Icon>
+                    <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                    <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                    <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                  </Icon>
+
+                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
+                  <Action xsi:type="ShowTaskpane">
+                    <TaskpaneId>drawioBtn</TaskpaneId>
+                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
+                    <SourceLocation resid="drawio.Taskpane.Url" />
+                  </Action>
+                </Control>
+              </Group>
+            </OfficeTab>
+          </ExtensionPoint>
+        </DesktopFormFactor>
+      </Host>
+      <Host xsi:type="Workbook">
+        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
+        <DesktopFormFactor>
+          <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."-->
+          <GetStarted>
+            <!-- Title of the Getting Started callout. resid points to a ShortString resource -->
+            <Title resid="drawio.GetStarted.Title"/>
+
+            <!-- Description of the Getting Started callout. resid points to a LongString resource -->
+            <Description resid="drawio.GetStarted.Description"/>
+
+            <!-- Point to a url resource which details how the add-in should be used. -->
+            <LearnMoreUrl resid="drawio.GetStarted.LearnMoreUrl"/>
+          </GetStarted>
+          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called.
+            Think of the FunctionFile as the code behind ExecuteFunction. -->
+          <FunctionFile resid="drawio.FunctionFile.Url" />
+
+          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
+          <ExtensionPoint xsi:type="PrimaryCommandSurface">
+            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
+            <OfficeTab id="TabInsert">
+              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
+              <Group id="drawio.Group1">
+                <!-- Label for your group. resid must point to a ShortString resource. -->
+                <Label resid="drawio.Group1Label" />
+                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
+                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
+                <Icon>
+                  <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                  <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                  <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                </Icon>
+
+                <!-- Control. It can be of type "Button" or "Menu". -->
+                <Control xsi:type="Button" id="drawio.TaskpaneButton">
+                  <Label resid="drawio.TaskpaneButton.Label" />
+                  <Supertip>
+                    <!-- ToolTip title. resid must point to a ShortString resource. -->
+                    <Title resid="drawio.TaskpaneButton.Label" />
+                    <!-- ToolTip description. resid must point to a LongString resource. -->
+                    <Description resid="drawio.TaskpaneButton.Tooltip" />
+                  </Supertip>
+                  <Icon>
+                    <bt:Image size="16" resid="drawio.tpicon_16x16" />
+                    <bt:Image size="32" resid="drawio.tpicon_32x32" />
+                    <bt:Image size="80" resid="drawio.tpicon_80x80" />
+                  </Icon>
+
+                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
+                  <Action xsi:type="ShowTaskpane">
+                    <TaskpaneId>drawioBtn</TaskpaneId>
+                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
+                    <SourceLocation resid="drawio.Taskpane.Url" />
+                  </Action>
+                </Control>
+              </Group>
+            </OfficeTab>
+          </ExtensionPoint>
+        </DesktopFormFactor>
+      </Host>
+    </Hosts>
+
+    <!-- You can use resources across hosts and form factors. -->
+    <Resources>
+      <bt:Images>
+        <bt:Image id="drawio.tpicon_16x16" DefaultValue="https://www.draw.io/images/favicon-16x16.png" />
+        <bt:Image id="drawio.tpicon_32x32" DefaultValue="https://www.draw.io/images/favicon-32x32.png" />
+        <bt:Image id="drawio.tpicon_80x80" DefaultValue="https://www.draw.io/images/drawlogo80.png" />
+        
+        <bt:Image id="drawio.refreshIcon_16x16" DefaultValue="https://www.draw.io/images/update16.png" />
+        <bt:Image id="drawio.refreshIcon_32x32" DefaultValue="https://www.draw.io/images/update32.png" />
+        <bt:Image id="drawio.refreshIcon_80x80" DefaultValue="https://www.draw.io/images/update80.png" />
+
+        <bt:Image id="drawio.editIcon_16x16" DefaultValue="https://www.draw.io/images/edit16.png" />
+        <bt:Image id="drawio.editIcon_32x32" DefaultValue="https://www.draw.io/images/edit32.png" />
+        <bt:Image id="drawio.editIcon_80x80" DefaultValue="https://www.draw.io/images/edit80.png" />
+      </bt:Images>
+      <bt:Urls>
+        <bt:Url id="drawio.Taskpane.Url" DefaultValue="https://www.draw.io/connect/office365/index.html" />
+        <bt:Url id="drawio.GetStarted.LearnMoreUrl" DefaultValue="https://about.draw.io/" >
+          <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="https://about.draw.io/"/>
+        </bt:Url>
+        <bt:Url id="drawio.FunctionFile.Url" DefaultValue="https://www.draw.io/connect/office365/function-file/function-file.html" />
+      </bt:Urls>
+      <!-- ShortStrings max characters==125. -->
+      <bt:ShortStrings>
+        <bt:String id="drawio.TaskpaneButton.Label" DefaultValue="draw.io" />
+        <bt:String id="drawio.Group1Label" DefaultValue="draw.io" />
+        <bt:String id="drawio.GetStarted.Title" DefaultValue="Get started with draw.io" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Erste Schritte mit draw.io"/>
+        </bt:String>
+        <bt:String id="drawio.refreshButton.label" DefaultValue="Update Selected" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markierung aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.refreshButton.toolTipLbl" DefaultValue="Update selected diagram" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markiertes Diagramm aktualisieren"/>
+        </bt:String>
+         <bt:String id="drawio.refreshAllBtn.label" DefaultValue="Update All" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Alle aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.refreshAllBtn.toolTipLbl" DefaultValue="Update all draw.io diagrams" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Alle draw.io Diagramme aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.editButton.label" DefaultValue="Edit Selected" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markierung bearbeiten"/>
+        </bt:String>
+        <bt:String id="drawio.editButton.toolTipLbl" DefaultValue="Edit selected draw.io diagram" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markiertes draw.io Diagramm bearbeiten"/>
+        </bt:String>
+      </bt:ShortStrings>
+      <!-- LongStrings max characters==250. -->
+      <bt:LongStrings>
+        <bt:String id="drawio.TaskpaneButton.Tooltip" DefaultValue="Click to manage draw.io diagrams">
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Hier klicken, um draw.io Diagramme zu verwalten"/>
+        </bt:String>
+        <bt:String id="drawio.GetStarted.Description" DefaultValue="draw.io add-in loaded successfully. Go to the INSERT tab and click the 'draw.io' button to get started." >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Das draw.io Add-in wurde erfolgreich geladen. Gehen Sie jetzt zum Reiter 'Einfügen' und klicken Sie auf draw.io."/>
+        </bt:String>
+        <bt:String id="drawio.refreshButton.toolTip" DefaultValue="Update selected draw.io diagram using its associated file" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Markiertes draw.io Diagramm von verknüpfter Datei aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.refreshAllBtn.toolTip" DefaultValue="Update all draw.io diagrams using their associated files" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Alle draw.io Diagramme von verknüpfter Datei aktualisieren"/>
+        </bt:String>
+        <bt:String id="drawio.editButton.toolTip" DefaultValue="Edit selected draw.io diagram from its associated file" >
+	  	  <!-- For a list of office supported languages, see https://docs.microsoft.com/en-us/previous-versions/office/office-2013-resource-kit/cc179219(v=office.15) -->
+	  	  <bt:Override Locale="de-de" Value="Verknüpfte Datei bearbeiten"/>
+        </bt:String>
+      </bt:LongStrings>
+    </Resources>
+  </VersionOverrides>
+  <!-- End Add-in Commands Mode integration. -->
+
+</OfficeApp>
diff --git a/src/main/webapp/connect/onedrive_common/ac.js b/src/main/webapp/connect/onedrive_common/ac.js
new file mode 100644
index 000000000..5e7a48b03
--- /dev/null
+++ b/src/main/webapp/connect/onedrive_common/ac.js
@@ -0,0 +1,742 @@
+//Add compatibility with existing AC of confluence
+if (typeof AC === 'undefined')
+{
+	AC = {};
+}
+
+switch(window.location.hostname)
+{
+	case 'test.draw.io':
+		AC.clientId = '2e598409-107f-4b59-89ca-d7723c8e00a4';
+	break;
+	case 'confluence.draw.io':
+		AC.clientId = 'aae1c620-4caf-41b3-9633-f6d0b6347dd9';
+	break;
+	case 'jira.draw.io':
+		AC.clientId = '1afa9b7e-2533-4d86-83c0-c4d4678eca0e';
+	break;
+	default:
+		AC.clientId = '45c10911-200f-4e27-a666-9e9fca147395';
+}
+
+AC.redirectUri = 'https://' + window.location.hostname + '/microsoft';
+AC.pickerRedirectUri = 'https://' + window.location.hostname + '/onedrive3.html';
+AC.defEndpoint = 'api.onedrive.com'; //This is the default endpoint for personal accounts
+AC.scopes = 'user.read files.read.all offline_access files.readwrite.all sites.read.all'; //Files.ReadWrite.All is needed for personal accounts createLink (embedded) and also for editing diagrams on draw.io
+AC.isLocalStorage = typeof(Storage) != 'undefined';
+AC.authLSKeyName = 'oneDriveAuthInfo'; //The same name as in draw.io
+AC.OneDriveBaseUrl = 'https://graph.microsoft.com/v1.0';
+AC.reqQueue = [];
+AC.authOnProgress = false;
+
+if (typeof CAC === 'undefined') 
+{
+	throw 'CAC object not found, please include file new_common/cac.js';
+}
+else
+{
+	CAC.applyCAC(AC);
+}
+
+AC.authOneDrive = function(success, error)
+{
+	AC.reqQueue.push({success: success, error: error});
+	
+	if (AC.authOnProgress)
+	{
+		return;
+	}
+	
+	AC.authOnProgress = true;
+	
+	if (window.onOneDriveCallback == null)
+	{
+		var auth = function()
+		{
+			var acceptAuthResponse = true;
+			
+			var url = 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize' +
+				'?client_id=' + AC.clientId + '&response_type=code' +
+				'&redirect_uri=' + encodeURIComponent(AC.redirectUri) +
+				'&scope=' + encodeURIComponent(AC.scopes) +
+				'&state=' + encodeURIComponent('cId=' + AC.clientId + '&domain=' + window.location.hostname); //To identify which app/domain is used
+
+			var width = 525,
+				height = 525,
+				screenX = window.screenX,
+				screenY = window.screenY,
+				outerWidth = window.outerWidth,
+				outerHeight = window.outerHeight;
+			
+			var left = screenX + Math.max(outerWidth - width, 0) / 2;
+			var top = screenY + Math.max(outerHeight - height, 0) / 2;
+			
+			var features = ['width=' + width, 'height=' + height,
+			                'top=' + top, 'left=' + left,
+			                'status=no', 'resizable=yes',
+			                'toolbar=no', 'menubar=no',
+			                'scrollbars=yes'];
+			var popup = window.open(url, 'odauth', features.join(','));
+			
+			if (popup != null)
+			{
+				window.onOneDriveCallback = function(authInfo, authWindow)
+				{
+					try
+					{
+						if (acceptAuthResponse)
+						{
+							window.onOneDriveCallback = null;
+							acceptAuthResponse = false;
+							
+							try
+							{
+								if (authInfo == null)
+								{
+									error({message: 'Access Denied', retry: auth});
+								}
+								else
+								{
+									AC.token = authInfo.access_token;
+									authInfo.expiresOn = Date.now() + authInfo.expires_in * 1000;
+									authInfo.remember = true;
+									AC.setPersistentAuth(authInfo);
+									
+									for (var i = 0; i < AC.reqQueue.length; i++)
+									{
+										AC.reqQueue[i].success();
+									}
+									
+									AC.reqQueue = [];
+									AC.authOnProgress = false;
+								}
+							}
+							catch (e)
+							{
+								error(e);
+							}
+							finally
+							{
+								if (authWindow != null)
+								{
+									authWindow.close();
+								}
+							}
+						}
+						else if (authWindow != null)
+						{
+							authWindow.close();
+						}
+					}
+					finally
+					{
+						authDialog.parentNode.removeChild(authDialog);
+					}
+				};
+			
+				popup.focus();
+			}
+		};
+		
+		var authDialog = document.createElement('div');
+		var btn = document.createElement('button');
+		btn.innerHTML = 'Authorize draw.io to access OneDrive';
+		btn.className = 'aui-button aui-button-primary';
+		authDialog.appendChild(btn);
+		
+		function adjustAuthBtn()
+		{
+			var w = window.innerWidth, h = window.innerHeight;
+			authDialog.style.cssText = 'position: absolute; top: 0px; left: 0px; width: '+ w +'px; height: '+ h +'px; background: #fff;opacity: 0.85;z-index: 999;';
+			btn.style.cssText = 'position: absolute; width: 320px; height: 50px; top: '+ (h/2 - 25) +'px; left: '+ (w/2 - 160) +'px;opacity: 1;';
+		}
+
+		btn.addEventListener('click', function(evt) 
+		{
+			auth();
+			//Remove the event handler since the user already used the button
+			window.removeEventListener("resize", adjustAuthBtn);
+		});
+		
+		window.addEventListener('resize', adjustAuthBtn);
+		adjustAuthBtn();
+		document.body.appendChild(authDialog);
+	}
+	else
+	{
+		error({message: 'Busy'});
+	}
+};
+
+//JSON request with auth
+AC.doAuthRequest = function(url, method, params, success, error)
+{
+	if (AC.token == null)
+	{
+		var token = AC.getPersistentToken();
+		
+		if (token == null)
+		{
+			AC.authOneDrive(function()
+			{
+				//Retry request after authentication
+				AC.doAuthRequest(url, method, params, success, error);
+			}, error);
+			
+			return;
+		}
+		else
+		{
+			AC.token = token;
+		}
+	}
+	
+	var req = new XMLHttpRequest();
+	req.open(method, AC.OneDriveBaseUrl + url);
+	req.setRequestHeader('Authorization', 'Bearer ' + AC.token);
+	req.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
+	
+	req.onreadystatechange = function()
+	{
+		if (this.readyState == 4)
+		{
+			if (this.status >= 200 && this.status <= 299)
+			{
+				success(JSON.parse(req.responseText));
+			}
+			else if (this.status == 401) // (Unauthorized) [e.g, invalid token]
+			{
+				//Try refresh token before asking for new authentication
+				var authInfo = AC.getPersistentAuth();
+				
+				if (authInfo != null)
+				{
+					var req2 = new XMLHttpRequest();
+					req2.open('GET', AC.redirectUri + '?refresh_token=' + authInfo.refresh_token +
+							'&state=' + encodeURIComponent('cId=' + AC.clientId + '&domain=' + window.location.hostname)); //To identify which app/domain is used
+					
+					req2.onreadystatechange = function()
+					{
+						if (this.readyState == 4)
+						{
+							if (this.status >= 200 && this.status <= 299)
+							{
+								var newAuthInfo = JSON.parse(req2.responseText);
+								AC.token = newAuthInfo.access_token;
+								//Update existing authInfo and save it
+								authInfo.access_token = newAuthInfo.access_token;
+								authInfo.refresh_token = newAuthInfo.refresh_token;
+								authInfo.expiresOn = Date.now() + newAuthInfo.expires_in * 1000;
+								AC.setPersistentAuth(authInfo);
+								//Retry request with refreshed token
+								AC.doAuthRequest(url, method, params, success, error);
+							}
+							else // (Unauthorized) [e.g, invalid refresh token] (sometimes, the server returns errors other than 401 (e.g. 500))
+							{
+								AC.authOneDrive(function()
+								{
+									//Retry request after authentication
+									AC.doAuthRequest(url, method, params, success, error);
+								}, error);
+							}
+						}
+					}
+					
+					req2.send();
+				}
+				else
+				{
+					AC.authOneDrive(function()
+					{
+						//Retry request after authentication
+						AC.doAuthRequest(url, method, params, success, error);
+					}, error);
+				}
+			}
+			else
+			{
+				error(this);
+			}
+		}
+	};
+	
+	req.send(params != null? JSON.stringify(params) : null);
+};
+
+AC.showError = function(err)
+{
+	alert('Error: ' + e.message);
+};
+
+AC.pickFile = function(fn)
+{
+	OneDrive.open(
+	{
+		clientId: AC.clientId,
+		action: 'query',
+		multiSelect: false,
+		advanced:
+		{
+			'endpointHint': AC.endpointHint,
+			'redirectUri': AC.pickerRedirectUri,
+			'accessToken': AC.getPersistentToken(),
+			'queryParameters': 'select=id,name,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,@microsoft.graph.downloadUrl',
+			isConsumerAccount: false
+		},
+		success: function(files)
+		{
+			if (files != null && files.value != null && files.value.length > 0)
+			{
+				fn(files.value[0]);
+			}
+		},
+		cancel: function()
+		{
+			// do nothing
+		},
+		error: function(e)
+		{
+			showError('Error: ' + e.message);
+		}
+	});
+};
+
+AC.getFilePreviewUrl = function(file, success, error)
+{
+	AC.getPreviewUrl(file.id, file.parentReference.driveId, success, error);
+};
+
+AC.getPreviewUrl = function(id, driveId, success, error)
+{
+	if (AC.isPersonal)
+	{
+//		AC.doAuthRequest('/drives/' + driveId + 
+//				 '/items/' + id + '/createLink',
+//				 'POST', {type: 'embed'}, function(resp)
+//				 {
+//					success(resp.link.webUrl, true);
+//				 }, error);	
+		error('Personal accounts are not supported.');
+	}
+	else
+	{
+		AC.doAuthRequest('/drives/' + driveId + 
+				 '/items/' + id + '/preview',
+				 'POST', null, function(resp)
+				 {
+					success(resp.getUrl);
+				 }, error);
+	}
+};
+
+AC.getFileThumbnailUrl = function(file, success, error)
+{
+	AC.getThumbnailUrl(file.id, file.parentReference.driveId, success, error);
+};
+
+AC.getThumbnailUrl = function(id, driveId, success, error)
+{
+	AC.doAuthRequest('/drives/' + driveId + 
+			 '/items/' + id + '/thumbnails',
+			 'GET', null, function(resp)
+			 {
+				if (resp.value && resp.value[0] && resp.value[0].small)
+				{
+					success(resp.value[0].small.url, resp.value[0]);
+				}
+				else
+				{
+					success(null);
+				}
+			 }, error);
+};
+
+AC.getFileInfo = function(id, driveId, success, error)
+{
+	AC.doAuthRequest('/drives/' + driveId + '/items/' + id,
+			 'GET', null, success, error);
+};
+
+AC.confirmODAuth = function(success, error)
+{
+	AC.doAuthRequest('/me/drive/root',
+			 'GET', null, function(resp)
+			 {
+			 	if (resp.webUrl.indexOf('.sharepoint.com') > 0) 
+			 	{
+					AC.endpointHint = resp.webUrl.replace('/Documents', '/_layouts/15/onedrive.aspx');
+					AC.isPersonal = false;
+				}
+				else
+				{
+					AC.endpointHint = AC.defEndpoint;
+					AC.isPersonal = true;
+				}
+				
+			 	//Update authInfo with endpointHint
+			 	var authInfo = AC.getPersistentAuth();
+			 	authInfo.endpointHint = AC.endpointHint;
+			 	AC.setPersistentAuth(authInfo);
+			 	
+				success(resp);
+			 }, error);
+};
+
+//This function depends on having GraphViewer loaded
+AC.extractGraphModelFromPng = function(pngData)
+{
+	return Editor.extractGraphModelFromPng(pngData);
+};
+
+AC.getBinaryFile = function(file, success, error)
+{
+	if (file['@microsoft.graph.downloadUrl'] == null)
+	{
+		if (file.parentReference == null)
+		{
+			throw new Error(mxResources.get('notADiagramFile'));
+		}
+		else
+		{
+			AC.getFileInfo(file.id, file.parentReference.driveId, function(completeFile)
+			{
+				AC.getBinaryFile(completeFile, success, error);
+			}, error);
+			
+			return;
+		}
+	}
+
+	var req = new XMLHttpRequest();
+	req.open('GET', file['@microsoft.graph.downloadUrl']);
+	req.responseType = 'blob';
+	
+	req.onreadystatechange = function()
+	{
+		if (this.readyState == 4)
+		{
+			if (this.status >= 200 && this.status <= 299)
+			{
+				success(req.response);
+			}
+			else
+			{
+				error();
+			}
+		}
+	};
+	
+	req.send();
+};
+
+//This function depends on having GraphViewer loaded
+AC.getDrawioFileDoc = function(file, success, error, doCheck)
+{
+	if (file['@microsoft.graph.downloadUrl'] == null)
+	{
+		if (file.parentReference == null)
+		{
+			throw new Error(mxResources.get('notADiagramFile'));
+		}
+		else
+		{
+			AC.getFileInfo(file.id, file.parentReference.driveId, function(completeFile)
+			{
+				AC.getDrawioFileDoc(completeFile, success, error, doCheck);
+			}, error);
+			
+			return;
+		}
+	}
+	
+	var req = new XMLHttpRequest();
+	//TODO find another way to disable caching (adding a parameter breaks the url)
+	req.open('GET', file['@microsoft.graph.downloadUrl']);
+	var isPng = file.file.mimeType == 'image/png';
+	
+	//Workaround for office and google drive file that are treated as OneDrive
+	if (file.fromDrive && file.accessToken)
+	{
+		req.setRequestHeader('Authorization', 'Bearer ' + file.accessToken);
+	}
+	
+	req.onreadystatechange = function()
+	{
+		if (this.readyState == 4)
+		{
+			if (this.status >= 200 && this.status <= 299)
+			{
+				try 
+				{
+					var cnt = req.responseText;
+					
+					if (isPng)
+					{
+						cnt = 'data:image/png;base64,' + EditorUi.prototype.base64Encode (cnt);
+						cnt = AC.extractGraphModelFromPng(cnt);
+					}
+					
+					var doc = mxUtils.parseXml(cnt);
+
+					if (!doCheck || new Editor().extractGraphModel(doc.documentElement) != null)
+					{
+						file.isDrawio = true;
+						success(doc, cnt, true);
+						return;
+					}
+				}
+				catch(e) {} //on error and if the doc is null, the following line will call the error
+			}
+			
+			error();
+		}
+	};
+	
+	if (isPng && req.overrideMimeType)
+	{
+		req.overrideMimeType('text/plain; charset=x-user-defined');
+	}
+	
+	req.send();
+};
+
+//This function depends on having GraphViewer loaded
+AC.checkDrawioFile = function(file, success, error)
+{
+	AC.getDrawioFileDoc(file, success, error, true);
+};
+
+AC.removeLink = function(issueId, fileId, callback, error)
+{
+    var updateInfo = function(resp)
+    {
+    	resp = JSON.parse(resp);
+    	var linksInfo = resp.value;
+        
+    	if (linksInfo[fileId] == null)
+		{
+    		error({message: mxResources.get('fileNotFound')});
+    		return;
+		}
+        
+    	delete linksInfo[fileId];
+    	
+        AP.request({
+            url: '/rest/api/2/issue/' + issueId + '/properties/onedrive-conn-data',
+            type: 'PUT',
+            data: JSON.stringify(linksInfo),
+            contentType: 'application/json',
+            success: function()
+            {
+            	callback();
+            },
+            error : error
+        });
+    };
+    
+    AP.request({
+        url: '/rest/api/2/issue/' + issueId + '/properties/onedrive-conn-data',
+        type: 'GET',
+        success: updateInfo,
+        error : error
+    });
+};
+
+AC.saveLink = function(issueId, file, callback, error)
+{
+    var updateInfo = function(resp)
+    {
+    	var linksInfo = {};
+    	
+        if (!resp.status) //no error
+        {
+        	resp = JSON.parse(resp);
+            linksInfo = resp.value;
+        }
+        
+        var order = null, max = -1;
+        
+        for (var key in linksInfo)
+    	{
+        	if (key == file.id)
+    		{
+        		order = linksInfo[key].order;
+        		break;
+    		}
+        	
+        	max = Math.max(linksInfo[key].order, max);
+    	}
+        
+        if (order == null)
+    	{
+        	order = max + 1;
+    	}
+        
+        linksInfo[file.id] = {
+    		service: file.service,
+        	isDrawio: file.isDrawio,
+        	aspect: file.aspect,
+        	order: order
+        };
+
+        var fileObj = linksInfo[file.id];
+        
+        switch (file.service)
+    	{
+        	case 'OneDrive':
+        		fileObj.driveId = file.parentReference.driveId;
+        		fileObj.createdBy = file.createdBy && file.createdBy.user? file.createdBy.user.displayName : null;
+        		fileObj.lastModifiedBy = file.lastModifiedBy && file.lastModifiedBy.user? file.lastModifiedBy.user.displayName : null;
+				fileObj.modifiedDate = file.lastModifiedDateTime;
+				fileObj.embeddedUrl = file.embeddedUrl;
+				fileObj.mime = file.file.mimeType;
+				fileObj.name = file.name;
+				fileObj.size = file.size;
+    		break;
+        	case 'AttFile':
+				fileObj.mime = file.type;
+				fileObj.name = file.name;
+				fileObj.size = file.size;
+				fileObj.modifiedDate = file.lastModified;
+    		break;
+        	case 'GDrive':
+        		fileObj.createdBy = file.owners && file.owners[0]? file.owners[0].displayName : null;
+        		fileObj.lastModifiedBy = file.lastModifyingUser? file.lastModifyingUser.displayName : null;
+				fileObj.modifiedDate = file.modifiedDate;
+				fileObj.mime = file.mimeType;
+				fileObj.name = file.title;
+				fileObj.size = file.fileSize;
+    		break;
+    	}
+
+        AP.request({
+            url: '/rest/api/2/issue/' + issueId + '/properties/onedrive-conn-data',
+            type: 'PUT',
+            data: JSON.stringify(linksInfo),
+            contentType: 'application/json',
+            success: function()
+            {
+            	callback();
+            },
+            error : error
+        });
+    };
+    
+    AP.request({
+        url: '/rest/api/2/issue/' + issueId + '/properties/onedrive-conn-data',
+        type: 'GET',
+        success: updateInfo,
+        error : updateInfo
+    });
+};
+
+AC.setPersistentAuth = function(authInfo)
+{
+	if (AC.isLocalStorage)
+	{
+		if (authInfo != null)
+		{
+			localStorage.setItem('.' + AC.authLSKeyName, JSON.stringify(authInfo));
+		} 
+		else
+		{
+			AC.token = null;
+			localStorage.removeItem('.' + AC.authLSKeyName);
+		}
+	}
+};
+
+AC.getPersistentToken = function()
+{
+	var authInfo = AC.getPersistentAuth();
+	var token = null;
+	
+	if (authInfo != null)
+	{
+		token = authInfo.access_token;
+	}
+	
+	return token;
+};
+
+AC.getPersistentAuth = function()
+{
+	var authInfo = null;
+	
+	if (AC.isLocalStorage)
+	{
+		authInfo = JSON.parse(localStorage.getItem('.' + AC.authLSKeyName));
+	}
+	
+	return authInfo;
+};
+
+//GraphViewer should be loaded before using this function
+AC.extractDataFromPng = function(pngData, dataHeader)
+{
+	var result = null;
+	
+	try
+	{
+		var base64 = pngData.substring(pngData.indexOf(',') + 1);
+
+		// Workaround for invalid character error in Safari & IE11
+		var binary = (window.atob && !mxClient.IS_SF && !mxClient.IS_IE11) ? atob(base64) : Base64.decode(base64, true);
+		
+		EditorUi.parsePng(binary, function(pos, type, length)
+		{
+			var value = binary.substring(pos + 8, pos + 8 + length);
+			
+			if (type == 'zTXt')
+			{
+				var idx = value.indexOf(String.fromCharCode(0));
+				
+				if (value.substring(0, idx) == dataHeader)
+				{
+					// Workaround for Java URL Encoder using + for spaces, which isn't compatible with JS
+					var data = Graph.bytesToString(pako.inflateRaw(
+						value.substring(idx + 2))).replace(/\+/g,' ');
+					
+					if (data != null && data.length > 0)
+					{
+						result = data;
+					}
+				}
+			}
+			// Uncompressed section is normally not used
+			else if (type == 'tEXt')
+			{
+				var vals = value.split(String.fromCharCode(0));
+				
+				if (vals.length > 1 && vals[0] == dataHeader)
+				{
+					result = vals[1];
+				}
+			}
+			
+			if (result != null || type == 'IDAT')
+			{
+				// Stops processing the file as our text chunks
+				// are always placed before the data section
+				return true;
+			}
+		});
+	}
+	catch (e)
+	{
+		// ignores decoding errors
+	}
+	
+	if (result != null && result.charAt(0) == '%')
+	{
+		result = decodeURIComponent(result);
+	}
+	
+	// Workaround for double encoded content
+	if (result != null && result.charAt(0) == '%')
+	{
+		result = decodeURIComponent(result);
+	}
+	
+	return result;
+};
diff --git a/src/main/webapp/connect/onedrive_common/editor.js b/src/main/webapp/connect/onedrive_common/editor.js
new file mode 100644
index 000000000..78b66b912
--- /dev/null
+++ b/src/main/webapp/connect/onedrive_common/editor.js
@@ -0,0 +1,469 @@
+function OneDriveEditor(onSubmit, getFileInfoFn, idSuffix, notStandalone, drawioOnly)
+{
+	idSuffix = idSuffix || '';
+	var noThumbImg = '/images/onedrive-logo.svg';
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	
+	var opts =
+	{
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	var spinner = new Spinner(opts);
+	this.spinner = spinner;
+	spinner.spin(AC.$('#spinner-container' + idSuffix));
+	
+	var head = document.getElementsByTagName('head')[0];
+	
+	// Handles timeouts
+	var acceptResponse = true;
+	
+	var timeoutHandler = function()
+	{
+		acceptResponse = false;
+		spinner.stop();
+		alert('The connection has timed out');
+	};
+	
+	var timeoutThread = window.setTimeout(timeoutHandler, 25000);
+	
+	var selectedFile = null, selFileContent = null;
+	var curViewer = null;
+
+	function showError(elem, errMsg)
+	{
+		elem.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+			errMsg;
+	};
+	
+	function setPreview(file)
+	{
+		AP.dialog.getButton('submit').enable();
+		var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+		
+		if (altSubmitBtn) altSubmitBtn.enable();
+		
+		var thumbImg = AC.$('#thumbImg' + idSuffix);
+
+		thumbImg.onerror = function()
+		{
+			this.onerror = null;
+			this.src = noThumbImg;
+		};
+		
+		AC.getFileThumbnailUrl(file, function(thumbUrl)
+		{
+			thumbImg.src = thumbUrl? thumbUrl : noThumbImg;
+		}, function()
+		{
+			thumbImg.src = noThumbImg;
+		});
+		
+		var prevDiv = AC.$('#preview' + idSuffix);
+
+		AC.getFilePreviewUrl(file, function(prevUrl, isPersonal)
+		{
+			if (prevUrl)
+			{
+				if (isPersonal)
+				{
+					file.embeddedUrl = prevUrl;
+				}
+				
+				prevDiv.innerHTML = '';
+				var iframe = document.createElement('iframe');
+				iframe.src = prevUrl;
+				iframe.setAttribute('frameborder', '0');
+				iframe.width = '100%';
+				iframe.height = '100%';
+				prevDiv.appendChild(iframe);
+			}
+			else
+			{
+				prevDiv.innerHTML = 'No preview is available';							
+			}
+		}, function(errMsg)
+		{
+			prevDiv.innerHTML = 'No preview is available. ' + (errMsg? errMsg : '');
+		});
+		
+		var autoSizeCheck = AC.$('#autoSize' + idSuffix);
+		autoSizeCheck.checked = false;
+		autoSizeCheck.setAttribute('disabled', 'disabled');
+		autoSizeChanged(false);
+		curViewer = null;
+	};
+	
+	function prevDrawioFile(doc, prevDiv, filename, aspect)
+	{
+		spinner.stop();
+		
+		var thumbImg = AC.$('#thumbImg' + idSuffix);
+		thumbImg.src = noThumbImg;
+
+		var container = document.createElement('div');
+		// NOTE: Height must be specified with default value "auto" to force automatic fit in viewer
+		container.style.cssText = 'position:absolute;width:100%;height:auto;bottom:0px;top:0px;border:1px solid transparent;';
+		prevDiv.appendChild(container);
+
+		var pageId, layerIds;
+		
+		if (aspect != null)
+		{
+			var aspectArray = aspect.split(' ');
+			
+			if (aspectArray.length > 1)
+			{
+				pageId = aspectArray[0];
+				layerIds = aspectArray.slice(1);
+			}
+		}
+		
+		var viewer = new GraphViewer(container, doc.documentElement,
+				{highlight: '#3572b0', border: 8, 'auto-fit': true,
+				resize: false, nav: true, lightbox: false, title: filename,
+				'toolbar-nohide': true, 'toolbar-position': 'top', toolbar: 'pages layers',
+				pageId: pageId, layerIds: layerIds});
+
+		curViewer = viewer;
+		
+		AP.dialog.getButton('submit').enable();
+		var altSubmitBtn = AP.dialog.getButton('altSubmitBtn');
+		
+		if (altSubmitBtn) altSubmitBtn.enable();
+	};
+	
+	// Waits for both APIs to load in parallel
+	function main()
+	{
+		if (notStandalone || (typeof window.AP !== 'undefined' && typeof window.OneDrive != 'undefined'))
+		{
+			window.clearTimeout(timeoutThread);
+
+			//OneDrive Auth before proceeding
+			AC.confirmODAuth(mainAuth, function()
+			{
+				alert('Error authenticating to OneDrive!'); //TODO better error handling
+			});
+		}
+	};
+	
+	function genericOnSubmit() 
+	{
+		var hasError = false;
+		//this cannot happen as the submit button is disabled until a file is selected
+		if (selectedFile == null)
+		{
+			AC.$('#filenameError' + idSuffix).innerHTML = "Please select a file";
+			hasError = true;
+		}
+		
+		var width = parseInt(AC.$('#width' + idSuffix).value);
+		var height = parseInt(AC.$('#height' + idSuffix).value);
+		var autoSize = AC.$('#autoSize' + idSuffix).checked;
+		
+		if (!autoSize && (isNaN(width) || width <= 0))
+		{
+			AC.$('#widthError' + idSuffix).innerHTML = "Width must be greater than zero";
+			hasError = true;
+		}
+		
+		if (!autoSize && (isNaN(height) || height <= 0))
+		{
+			AC.$('#heightError' + idSuffix).innerHTML = "Height must be greater than zero";
+			hasError = true;
+		}
+		
+		if (hasError)
+		{
+			return;
+		}
+		
+		if (curViewer != null)
+		{
+			var layerIds = [];
+			
+			var model = curViewer.graph.getModel();
+			var childCount = model.getChildCount(model.root);
+				
+			// Get visible layers
+			for (var i = 0; i < childCount; i++)
+			{
+				var layer = model.getChildAt(model.root, i);
+				
+				if (model.isVisible(layer))
+				{
+					layerIds.push(layer.id);
+				}
+			}
+				
+			selectedFile.aspect = curViewer.diagrams[curViewer.currentPage].getAttribute('id') + ' ' + layerIds.join(' ');
+		}
+		
+		spinner.spin(AC.$('#preview' + idSuffix));
+		
+		onSubmit(selectedFile, width, height, autoSize, selFileContent);
+	}
+	
+	this.doSubmit = genericOnSubmit;
+
+	function mainAuth()
+	{
+		spinner.stop();
+				
+		if (acceptResponse)
+		{ 
+			AC.$('#filePicker' + idSuffix).removeAttribute('disabled');
+			
+			AC.$('#filePicker' + idSuffix).addEventListener('click', function(evt) 
+			{
+				AC.pickFile(function(file)
+				{
+					function handleNonDrawFile() //If the file is not a draw.io diagram
+					{
+						if (drawioOnly)
+						{
+							selectedFile = null;
+							spinner.stop();
+							AC.$('#filenameError' + idSuffix).innerHTML = 'Not a draw.io diagram file';
+						}
+						else 
+						{
+							setPreview(file);
+						}
+
+						drawioCheck.checked = false;
+					};
+					
+					function setAutosize()
+					{
+						var autoSizeCheck = AC.$('#autoSize' + idSuffix);
+						autoSizeCheck.checked = true;
+						autoSizeCheck.removeAttribute('disabled');
+						autoSizeChanged(true);
+					};
+					
+					selectedFile = file;
+					AC.$('#filenameError' + idSuffix).innerHTML = "";
+					AC.$('#filename' + idSuffix).value = file.name;
+					var mimeType = file.file.mimeType;
+					drawioCheck = AC.$('#useDrawio' + idSuffix);
+					var useDrawio = drawioOnly? false : drawioCheck.checked;
+					var prevDiv = AC.$('#preview' + idSuffix);
+					prevDiv.innerHTML = '';
+					spinner.spin(prevDiv);
+					
+					if (useDrawio && typeof convertVSDXtoMX != 'undefined' &&  /\.v(dx|sdx?)$/i.test(file.name))
+					{
+						AC.getBinaryFile(file, function(blobFile)
+						{
+							convertVSDXtoMX(blobFile, file.name, function(xml)
+							{
+								selectedFile.isDrawio = true;
+								selFileContent = xml;
+								prevDrawioFile(mxUtils.parseXml(xml), prevDiv, file.name);
+								setAutosize();
+							}, handleNonDrawFile);
+						}, handleNonDrawFile);
+					}
+					//Handle draw.io potential files (html & xml)
+					else if (useDrawio || mimeType == 'text/html' || mimeType == 'text/xml' || mimeType == 'application/xml' || mimeType == 'image/png' 
+							|| /\.svg$/i.test(file.name) || /\.html$/i.test(file.name) || /\.xml$/i.test(file.name) 
+							|| /\.png$/i.test(file.name) || /\.drawio$/i.test(file.name))
+					{
+						AC.checkDrawioFile(file, function(doc, cnt)
+						{
+							selFileContent = cnt;
+							prevDrawioFile(doc, prevDiv, file.name);
+							drawioCheck.checked = true;
+							setAutosize();
+						}, handleNonDrawFile);
+					}
+					else
+					{
+						handleNonDrawFile();
+					}
+				});
+				
+				evt.preventDefault();
+			});
+			
+			function removeErrMsg() 
+			{
+				AC.$('#' + this.id + 'Error' + idSuffix).innerHTML = "";
+			};
+			
+			AC.$('#width' + idSuffix).addEventListener('change', removeErrMsg);
+			AC.$('#height' + idSuffix).addEventListener('change', removeErrMsg);
+			
+			if (getFileInfoFn)
+			{
+				getFileInfoFn(function(fileInfo)
+				{
+					var altSubmitBtn = AP.dialog.createButton({
+						  text: fileInfo? 'Save' : 'Insert',
+						  identifier: 'altSubmitBtn'
+					});
+					altSubmitBtn.bind(genericOnSubmit);
+					altSubmitBtn.disable();
+
+					if (fileInfo && fileInfo.fileId)
+					{
+						var autoSize = fileInfo.autoSize == '1';
+						AC.$('#width' + idSuffix).value = fileInfo.width;
+						AC.$('#height' + idSuffix).value = fileInfo.height;
+						AC.$('#filename' + idSuffix).value = fileInfo.filename;
+						fileInfo.isDrawio = fileInfo.isDrawio == 'true';
+						AC.$('#useDrawio' + idSuffix).checked = fileInfo.isDrawio;
+						AC.$('#autoSize' + idSuffix).checked = autoSize;
+						autoSizeChanged(autoSize);
+						
+						fileInfo.id = fileInfo.fileId;
+						fileInfo['parentReference'] = {
+							driveId: fileInfo.driveId
+						};
+						fileInfo['file'] = {
+							mimeType: fileInfo.mimeType
+						};
+						fileInfo.name = fileInfo.filename;
+						selectedFile = fileInfo;
+						
+						if (fileInfo.isDrawio)
+						{
+							var prevDiv = AC.$('#preview' + idSuffix);
+							prevDiv.innerHTML = '';
+							spinner.spin(prevDiv);
+							
+							AC.getFileInfo(fileInfo.fileId, fileInfo.driveId, function(file)
+							{
+								function filePrevErr(err)
+								{
+									showError(prevDiv, 'Cannot load file preview.');
+								};
+								
+								if (typeof convertVSDXtoMX != 'undefined' &&  /\.v(dx|sdx?)$/i.test(fileInfo.filename))
+								{
+									AC.getBinaryFile(file, function(blobFile)
+									{
+										convertVSDXtoMX(blobFile, fileInfo.filename, function(xml)
+										{
+											selFileContent = xml;
+											prevDrawioFile(mxUtils.parseXml(xml), prevDiv, file.name, fileInfo.aspect);
+										}, filePrevErr);
+									}, filePrevErr);
+								}
+								else 
+								{
+									AC.getDrawioFileDoc(file, function(doc, cnt)
+									{
+										selFileContent = cnt;
+										prevDrawioFile(doc, prevDiv, file.name, fileInfo.aspect);
+									}, filePrevErr);
+								}
+							},
+							function(err)
+							{
+								if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+								{
+									showError(prevDiv, 'Error: Access Denied. You do not have permission to access this file "'+ fileInfo.filename +'".');
+								}
+								else 
+								{
+									showError(prevDiv, 'Cannot load file preview.');
+								}
+							});
+						}
+						else
+						{
+							setPreview(fileInfo);
+						}
+					}
+				});
+			}
+		}
+	};
+	
+	function autoSizeChanged(isChecked)
+	{
+		if(isChecked) 
+		{
+			AC.$('#width' + idSuffix).setAttribute('disabled', 'disabled');
+			AC.$('#height' + idSuffix).setAttribute('disabled', 'disabled');
+		}
+		else 
+		{
+			AC.$('#width' + idSuffix).removeAttribute('disabled');
+			AC.$('#height' + idSuffix).removeAttribute('disabled');
+		}	
+	};
+	
+	AC.$('#autoSize' + idSuffix).addEventListener('change', function(evt) 
+	{
+		autoSizeChanged(this.checked);
+	});
+	
+	var signOut = GAC.$('#signout' + idSuffix);
+	
+	if (signOut)
+	{
+		signOut.addEventListener('click', function(evt) 
+		{
+			evt.preventDefault();
+			AC.setPersistentAuth(null);
+			window.open('https://login.microsoftonline.com/common/oauth2/v2.0/logout', 'logout', 'width=525,height=525,status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes');
+			main(); //To show auth button again
+		});
+	}
+	
+	function loadAtlassianApi() 
+	{
+		var script = document.createElement("script");
+
+		script.onload = function() 
+		{
+			AP.dialog.disableCloseOnSubmit();
+			
+			//TODO when conf bug of submit is fixed, re-enable this and remove the button above 
+			if (getFileInfoFn)
+			{
+				AP.dialog.getButton('submit').hide();
+			}
+			
+			AP.events.on('dialog.submit', genericOnSubmit);
+			AP.dialog.getButton('submit').disable();
+			main();
+		};
+		
+		script.src = 'https://connect-cdn.atl-paas.net/all.js';
+		script.setAttribute('data-options', 'resize:false;margin:false');
+		head.appendChild(script);
+	};
+	
+	function loadOneDriveApi() 
+	{
+		var script = document.createElement("script");
+		script.onload = main;
+		script.src = "/js/onedrive/OneDrive.js";
+		head.appendChild(script);
+	};
+	
+	// Loads APIs in parallel and waits in main
+	if (!notStandalone)
+	{
+		loadAtlassianApi();
+	}
+	
+	loadOneDriveApi();
+};
+
diff --git a/src/main/webapp/connect/onedrivejira/connect-dev.json b/src/main/webapp/connect/onedrivejira/connect-dev.json
new file mode 100644
index 000000000..e4b8e7be5
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/connect-dev.json
@@ -0,0 +1,103 @@
+{
+    "name": "Diagram Viewer for Jira",
+    "description": "Diagram Viewer for Jira",
+    "key": "com.mxgraph.jira.plugins.onedrive",
+    "baseUrl": "https://test.draw.io",
+    "vendor": 
+    {
+        "name": "draw.io AG",
+        "url": "https://about.draw.io"
+    },
+    "version": "1.0.0",
+    "authentication": 
+    {
+        "type": "none"
+    },
+     "scopes": 
+     [
+     	"READ",
+     	"WRITE",
+     	"DELETE"
+	 ],
+     "modules": 
+     {
+      "generalPages": 
+      [
+      	{
+			"url":"/connect/onedrivejira/editor.html?issueId=${issue.id}",
+			"key":"oneDriveEditor",
+			"name":
+			{
+				"value":"Diagram Viewer"
+			},
+			"location":"hidden"
+		},
+		{
+			"url":"/connect/onedrivejira/fullScreenViewer.html?issueId=${issue.id}",
+			"key":"drawioFullScreenViewer",
+			"name":
+			{
+				"value":"Diagram Full Screen Viewer"
+			},
+			"location":"hidden"
+		},
+		{
+			"url":"/connect/onedrivejira/oneDriveFSViewer.html?issueId=${issue.id}",
+			"key":"oneDriveFullScreenViewer",
+			"name":
+			{
+				"value":"Diagram Full Screen Viewer"
+			},
+			"location":"hidden"
+		}
+      ],
+	  "webItems": [
+	    {
+	      "location": "operations-attachments",
+	      "weight": 50,
+	      "key": "oneDriveEditorBlank",
+	      "url": "/connect/onedrivejira/editor.html?issueId=${issue.id}",
+	      "name": {
+	        "value": "Add Diagram File"
+	      },
+	      "target": 
+	      {
+			"type":"dialog",
+			"options": 
+			{
+				"width":"80%",
+				"height":"60%",
+				"chrome":true
+			}
+		  }
+	    }, 
+	    {
+       	   "key": "oneDriveEditorDialog",
+	        "name": 
+	        {
+	            "value": "Diagram Viewer Editor"
+	        },
+	        "url": "/connect/onedrivejira/editor.html?issueId=${issue.id}",
+	        "location": "none",
+	        "context": "addon"
+	    }
+	  ],
+	  "webPanels": 
+	  [
+      {
+        "url": "/connect/onedrivejira/viewerPanel.html?issueId=${issue.id}",
+        "location": "atl.jira.view.issue.left.context",
+        "layout": 
+        {
+          "width": "300px"
+        },
+        "weight": 200,
+        "key": "oneDriveViewerPanel",
+        "name": 
+        {
+          "value": "Diagram Viewer"
+        }
+      }
+      ]
+    }
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/onedrivejira/connect.json b/src/main/webapp/connect/onedrivejira/connect.json
new file mode 100644
index 000000000..502b75c51
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/connect.json
@@ -0,0 +1,106 @@
+{
+    "name": "Diagram Viewer for Jira",
+    "description": "Diagram Viewer for Jira",
+    "key": "com.mxgraph.jira.plugins.onedrive",
+    "baseUrl": "https://www.draw.io",
+    "apiMigrations": {
+        "gdpr": true
+    },
+    "vendor": 
+    {
+        "name": "draw.io AG",
+        "url": "https://about.draw.io"
+    },
+    "version": "1.0.0",
+    "authentication": 
+    {
+        "type": "none"
+    },
+     "scopes": 
+     [
+     	"READ",
+     	"WRITE",
+	    "DELETE"
+	 ],
+     "modules": 
+     {
+      "generalPages": 
+      [
+      	{
+			"url":"/connect/onedrivejira/editor.html?issueId=${issue.id}",
+			"key":"oneDriveEditor",
+			"name":
+			{
+				"value":"Diagram Viewer"
+			},
+			"location":"hidden"
+		},
+		{
+			"url":"/connect/onedrivejira/fullScreenViewer.html?issueId=${issue.id}",
+			"key":"drawioFullScreenViewer",
+			"name":
+			{
+				"value":"Diagram Full Screen Viewer"
+			},
+			"location":"hidden"
+		},
+		{
+			"url":"/connect/onedrivejira/oneDriveFSViewer.html?issueId=${issue.id}",
+			"key":"oneDriveFullScreenViewer",
+			"name":
+			{
+				"value":"Diagram Full Screen Viewer"
+			},
+			"location":"hidden"
+		}
+      ],
+	  "webItems": [
+	    {
+	      "location": "operations-attachments",
+	      "weight": 50,
+	      "key": "oneDriveEditorBlank",
+	      "url": "/connect/onedrivejira/editor.html?issueId=${issue.id}",
+	      "name": {
+	        "value": "Add Diagram File"
+	      },
+	      "target": 
+	      {
+			"type":"dialog",
+			"options": 
+			{
+				"width":"80%",
+				"height":"60%",
+				"chrome":true
+			}
+		  }
+	    }, 
+	    {
+       	   "key": "oneDriveEditorDialog",
+	        "name": 
+	        {
+	            "value": "Diagram Viewer Editor"
+	        },
+	        "url": "/connect/onedrivejira/editor.html?issueId=${issue.id}",
+	        "location": "none",
+	        "context": "addon"
+	    }
+	  ],
+	  "webPanels": 
+	  [
+      {
+        "url": "/connect/onedrivejira/viewerPanel.html?issueId=${issue.id}",
+        "location": "atl.jira.view.issue.left.context",
+        "layout": 
+        {
+          "width": "300px"
+        },
+        "weight": 200,
+        "key": "oneDriveViewerPanel",
+        "name": 
+        {
+          "value": "Diagram Viewer"
+        }
+      }
+      ]
+    }
+}
\ No newline at end of file
diff --git a/src/main/webapp/connect/onedrivejira/editor.html b/src/main/webapp/connect/onedrivejira/editor.html
new file mode 100644
index 000000000..dde9a5fb1
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/editor.html
@@ -0,0 +1,365 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Diagram Viewer Editor</title>
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+<script src="//aui-cdn.atlassian.com/aui-adg/6.0.4/js/aui.min.js"></script>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<script src="../../js/spin/spin.min.js" type="text/javascript"></script>
+<script type="text/javascript">
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+
+// Overrides browser language with Confluence user language
+var lang = AC.getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.9.12/css/aui.min.css" media="all">
+<link rel="stylesheet" type="text/css" href="//aui-cdn.atlassian.com/aui-adg/6.0.4/css/aui.css">
+<style type="text/css">
+body {
+	font-family:Arial, sans-serif;
+	overflow:hidden;
+	height:100%;
+	width:100%;
+	margin:0;
+}
+.thumbnail {
+	box-sizing: border-box;
+	height: 100px;
+	width: 100px;
+	border: 1px solid #CCCCCC;
+	border-radius: 3px;
+	line-height: 94px;
+	text-align:center;
+}
+.thumbImg {
+	vertical-align:middle;
+	max-width: 96px;
+	max-height: 96px;
+}
+</style>
+</head>
+<body class="aui-layout aui-theme-default" style="height:100%;">
+	<div id="tab-navigation" class="aui-tabs horizontal-tabs">
+	    <ul class="tabs-menu">
+	    	<li class="menu-item active-tab">
+	            <a href="#uploadTab"><strong>Upload Diagram</strong></a>
+	        </li>
+	        <li class="menu-item">
+	            <a href="#oneDriveTab"><strong>OneDrive Diagram</strong></a>
+	        </li>
+	        <li class="menu-item">
+	            <a href="#gDriveTab"><strong>Google Drive Diagram</strong></a>
+	        </li>
+	    </ul>
+	    <div class="tabs-pane active-pane" id="uploadTab">
+			<div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:40px;display:inline-block;">
+				<form class="aui top-label" style="height:100%;top:0px;">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="filenameUD">File name</label> 
+						<input type="file" id="fileuploadUD" style="display: none">
+						<input class="text macro-param-input" type="text" id="filenameUD" name="filename" disabled placeholder="Choose a file...">
+						<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerUD">Choose</button>
+						<div id="spinner-containerUD"></div>
+						<div class="description">Diagram file name</div>
+						<div class="error" id="filenameErrorUD"></div>
+					</div>
+					<div id="notUsedDU">
+						<div class="field-group" style="padding-left:15px;">
+							<label for="widthUD">Width</label> <input class="text medium-field" id="widthUD" value="800">
+							<div class="description">Width of the viewer (px)</div>
+							<div class="error" id="widthErrorUD"></div>
+						</div>
+						<div class="field-group" style="padding-left:15px;">
+							<label for="heightUD">Height</label> <input class="text medium-field" id="heightUD" value="600">
+							<div class="description">Height of the viewer (px)</div>
+							<div class="error" id="heightErrorUD"></div>
+						</div>
+						<div class="field-group" style="padding-left:15px;">
+							<input class="checkbox small-field" id="autoSizeUD" type="checkbox" >
+							<label for="autoSizeUD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+						</div>
+					</div>
+					<div class="error" id="errorMsgUD">
+					</div>
+				</form>
+			</div>
+			<div id="previewUD" style="bottom:0px;left:351px;position:absolute;top:40px;right:0px;display:inline-block;text-align: center;">
+				<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+					onclick="document.getElementById('fileuploadUD').click();">Choose a file...</a>
+			</div>
+	    </div>
+	    <div class="tabs-pane" id="oneDriveTab">
+		    <div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:40px;display:inline-block;">
+				<form class="aui top-label" style="height:100%;top:0px;">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="filenameOD">File name</label> 
+						<input class="text macro-param-input" type="text" id="filenameOD" name="filename" disabled placeholder="Choose a file...">
+						<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerOD" disabled>Choose</button>
+						<div id="spinner-containerOD"></div>
+						<div class="description">OneDrive file name</div>
+						<div class="error" id="filenameErrorOD"></div>
+					</div>
+					<div id="notUsedOD">
+						<div class="field-group" style="padding-left:15px;">
+							<label for="widthOD">Width</label> <input class="text medium-field" id="widthOD" value="800">
+							<div class="description">Width of the viewer (px)</div>
+							<div class="error" id="widthErrorOD"></div>
+						</div>
+						<div class="field-group" style="padding-left:15px;">
+							<label for="heightOD">Height</label> <input class="text medium-field" id="heightOD" value="600">
+							<div class="description">Height of the viewer (px)</div>
+							<div class="error" id="heightErrorOD"></div>
+						</div>
+						<div class="field-group" style="padding-left:15px;">
+							<input class="checkbox small-field" id="autoSizeOD" type="checkbox" >
+							<label for="autoSizeOD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="thumbImgOD">Thumbnail</label>
+						<div class="thumbnail">
+							<img class="thumbImg" id="thumbImgOD">
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input type="checkbox" class="checkbox small-fiel" id="useDrawioOD">
+						<label for="useDrawioOD" style="display:inline-block;">Preview in draw.io</label>
+					</div>
+				</form>
+			</div>
+			<div id="previewOD" style="bottom:0px;left:351px;position:absolute;top:40px;right:0px;display:inline-block;">
+				<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+					onclick="document.getElementById('filePickerOD').click();">Choose a file...</a>
+			</div>
+	    </div>
+	    <div class="tabs-pane" id="gDriveTab">
+			<div style="bottom:0px;width:350px;border-right:1px solid #cccccc;position:absolute;top:40px;display:inline-block;">
+				<form class="aui top-label" style="height:100%;top:0px;">
+					<div class="field-group" style="padding-left:15px;">
+						<label for="filename">File name</label> 
+						<input class="text macro-param-input" type="text" id="filenameGD" name="filename" disabled placeholder="Choose a file...">
+						<button class="aui-button aui-button-primary ap-dialog-submit" id="filePickerGD" disabled>Choose</button>
+						<div id="spinner-containerGD"></div>
+						<div class="description">Google Drive file name</div>
+						<div class="error" id="filenameErrorGD"></div>
+						<div id="notUsedGD">
+							<div class="field-group" style="padding-left:15px;">
+								<label for="widthGD">Width</label> <input class="text medium-field" id="widthGD" value="800">
+								<div class="description">Width of the viewer (px)</div>
+								<div class="error" id="widthErrorGD"></div>
+							</div>
+							<div class="field-group" style="padding-left:15px;">
+								<label for="heightGD">Height</label> <input class="text medium-field" id="heightGD" value="600">
+								<div class="description">Height of the viewer (px)</div>
+								<div class="error" id="heightErrorGD"></div>
+							</div>
+							<div class="field-group" style="padding-left:15px;">
+								<input class="checkbox small-field" id="autoSizeGD" type="checkbox" >
+								<label for="autoSizeGD" style="display:inline-block;font-size:12px">Automatically set the size of the viewer</label>
+							</div>
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<label for="thumbImg">Thumbnail</label>
+						<div class="thumbnail">
+							<img class="thumbImg" id="thumbImgGD">
+						</div>
+					</div>
+					<div class="field-group" style="padding-left:15px;">
+						<input type="checkbox" class="checkbox small-fiel" id="useDrawioGD">
+						<label for="useDrawio" style="display:inline-block;">Preview in draw.io</label>
+					</div>
+				</form>
+			</div>
+			<div id="previewGD" style="bottom:0px;left:351px;position:absolute;top:40px;right:0px;display:inline-block;">
+				<a style="display:block;text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);cursor:pointer"
+					onclick="document.getElementById('filePickerGD').click();">Choose a file...</a>
+			</div>
+	    </div>
+    </div>
+<script src="../onedrive_common/editor.js" type="text/javascript"></script>
+<script src="../gdrive_common/editor.js" type="text/javascript"></script>
+<script src="../att_common/att-editor.js" type="text/javascript"></script>
+<script type="text/javascript">
+	AC.$('#notUsedOD').style.display = 'none';
+	AC.$('#notUsedDU').style.display = 'none';
+	AC.$('#notUsedGD').style.display = 'none';
+	var head = document.getElementsByTagName('head')[0];
+
+	var script = document.createElement("script");
+	var attEditor, odEditor = null, gdEditor = null, currTab = 1;
+	
+	script.onload = function() 
+	{
+		AP.dialog.disableCloseOnSubmit();
+		
+		AP.events.on('dialog.submit', function()
+		{
+			var editor = currTab == 1? attEditor : (currTab == 2? odEditor : gdEditor);
+			editor.doSubmit();
+		});
+		
+		AP.dialog.getButton('submit').disable();
+	};
+	
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	head.appendChild(script);
+
+	var issueId = AC.getUrlParam('issueId');
+
+	attEditor = new AttViewerEditor(function(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, onError)
+	{
+		//We only have add in Jira
+		if (selectedFile != null)
+		{
+			//AP.request doesn't support loading binary data, so we store binary data as Base64 strings (which is loaded using DataURL)
+			AC.uploadToJira(selFileContent, issueId, selectedFile.name, selectedFile.type, function(resp)
+		    {
+            	resp = JSON.parse(resp);
+            	selectedFile.id = resp[0].id;
+            	selectedFile.service = 'AttFile';
+            	selectedFile.isDrawio = isDrawio;
+            	selectedFile.aspect = aspect;
+            	
+        		AC.saveLink(issueId, selectedFile, function()
+           	    {
+           	    	AP.jira.refreshIssuePage();
+        			AP.dialog.close();
+           	    }, function(err)
+           		{
+         	    	//TODO Better error handling
+           	    	alert('Saving failed: ' + ((err? err.message : '') || 'Unknow Error'));
+           	    });
+            }, onError);
+		}
+	}, null, 'UD', true);
+	
+	AJS.tabs.setup();
+	
+	var tabSubmitStatus = {};
+	
+	$('#tab-navigation').on('tabSelect', '.menu-item a', function(e, tabsMenu) 
+	{
+		var prevTab = currTab;
+		
+        switch ($(this).attr('href'))
+        { 
+	        case '#uploadTab':
+	    		currTab = 1;
+	    	break;
+        	case '#oneDriveTab':
+        		if (odEditor == null)
+        		{
+        			odEditor = new OneDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+     				{
+     					var useDrawio = selectedFile.isDrawio || AC.$('#useDrawioOD').checked;
+
+     					function doSaveLink()
+        				{
+         					selectedFile.isDrawio = useDrawio
+         					selectedFile.service = 'OneDrive';
+         					
+         					AC.saveLink(issueId, selectedFile, function()
+         			   	    {
+         			   	    	AP.jira.refreshIssuePage();
+         						AP.dialog.close();
+         			   	    }, function(err)
+         			   		{
+         			 	    	//TODO Better error handling
+         			   	    	alert('Saving failed: ' + ((err? err.message : '') || 'Unknow Error'));
+         			   	    });
+        				};
+        				
+        				if (useDrawio && selFileContent != null)
+       					{
+        					var modifiedTS = new Date(selectedFile.lastModifiedDateTime).getTime();
+        					AC.uploadToJira(selFileContent, issueId, modifiedTS + '_' + selectedFile.name, 
+        							'application/vnd.jgraph.mxfile', doSaveLink, doSaveLink); //On error save also as caching is not blocking
+       					}
+        				else
+       					{
+        					doSaveLink();
+       					}
+     				}, null, 'OD', true);
+        		}
+        		
+        		currTab = 2;
+        	break;
+        	case '#gDriveTab':
+        		if (gdEditor == null)
+        		{
+        			gdEditor = new GDriveEditor(function(selectedFile, width, height, autoSize, selFileContent)
+        			{
+        				var useDrawio = selectedFile.isDrawio || AC.$('#useDrawioOD').checked;
+
+        				function doSaveLink()
+        				{
+	        				selectedFile.isDrawio = useDrawio
+	        				selectedFile.service = 'GDrive';
+	        				
+	        				AC.saveLink(issueId, selectedFile, function()
+	        		   	    {
+	        		   	    	AP.jira.refreshIssuePage();
+	        					AP.dialog.close();
+	        		   	    }, function(err)
+	        		   		{
+	        		 	    	//TODO Better error handling
+	        		   	    	alert('Saving failed: ' + ((err? err.message : '') || 'Unknow Error'));
+	        		   	    });
+        				};
+        				
+        				if (useDrawio && selFileContent != null)
+       					{
+        					var modifiedTS = new Date(selectedFile.modifiedDate).getTime();
+        					AC.uploadToJira(selFileContent, issueId, modifiedTS + '_' + selectedFile.title, 
+        							'application/vnd.jgraph.mxfile', doSaveLink, doSaveLink); //On error save also as caching is not blocking
+       					}
+        				else
+       					{
+        					doSaveLink();
+       					}
+        			}, null, 'GD', true);
+				}
+        		
+        		currTab = 3;
+        	break;
+        }
+        
+        AP.dialog.getButton('submit').isEnabled(function(enabled)
+        {
+        	tabSubmitStatus[prevTab] = enabled;
+        	
+        	if (tabSubmitStatus[currTab])
+       		{
+        		AP.dialog.getButton('submit').enable();
+       		}
+        	else
+       		{
+        		AP.dialog.getButton('submit').disable();
+       		}
+       	});
+    });
+</script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/onedrivejira/fullScreenViewer.html b/src/main/webapp/connect/onedrivejira/fullScreenViewer.html
new file mode 100644
index 000000000..6bf3efb31
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/fullScreenViewer.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>draw.io Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(/images/drawlogo-text-bottom.svg);
+	background-position:center 30%;
+	background-repeat:no-repeat;
+	background-size: 128px;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<script type="text/javascript">
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with Confluence user language
+var lang = AC.getUrlParam('loc');
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script type="text/javascript" src="/js/viewer.min.js"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+</head>
+<body>
+<script src="fullScreenViewer.js" type="text/javascript"></script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/onedrivejira/fullScreenViewer.js b/src/main/webapp/connect/onedrivejira/fullScreenViewer.js
new file mode 100644
index 000000000..d47390500
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/fullScreenViewer.js
@@ -0,0 +1,266 @@
+(function()		
+{
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	function main()
+	{
+		AP.resize('100%', '100%');
+		
+		function doMain(customData)
+		{
+			var fileInfo = customData.fileInfo;
+			var issueId = customData.issueId;
+			var cachedFileId = customData.cachedFileId;
+			var serverName = document.referrer;
+	    	var timeout = 25000;
+	    	var index1 = serverName.indexOf('//');
+	    	
+	    	if (index1 > 0)
+	    	{
+	    		var index2 = serverName.indexOf('/', index1 + 2);
+	    		
+	    		if (index2 > index1)
+	    		{
+	    			serverName = serverName.substring(index1 + 2, index2);
+	    		}
+	    	}
+	    	
+			var acceptResponse = true;
+			
+			var timeoutThread = window.setTimeout(function()
+			{
+				acceptResponse = false;
+				
+				var flag = AP.flag.create({
+					  title: 'The connection has timed out',
+					  body: 'The server at ' +
+								serverName + ' is taking too long to respond.',
+					  type: 'error',
+					  close: 'manual'
+				});
+
+				AP.dialog.close();
+			}, timeout);
+	    	
+			function viewDrawioDoc(doc)
+			{
+				try
+				{
+					window.clearTimeout(timeoutThread);
+					
+			 		if (acceptResponse)
+			 		{
+		    			document.body.style.backgroundImage = 'none';
+						var viewer = new GraphViewer(null, doc.documentElement, {highlight: '#3572b0', nav: true, lightbox: false,
+							pageId: customData.pageId, layerIds: customData.layerIds});
+						viewer.lightboxChrome = false;
+
+						// Enables layers via flag to avoid toolbar
+						viewer.layersEnabled = true;
+						
+						var ui = viewer.showLocalLightbox();
+						
+						// Destroy lightbox with ui instance
+						var destroy = ui.destroy;
+						ui.destroy = function()
+						{
+							AP.dialog.close();
+							destroy.apply(this, arguments);
+						};
+			 		}
+				}
+				catch(e)
+				{
+					var flag = AP.flag.create({
+						  title: 'Unexpected Error',
+						  body: 'The driagram is corrupted.',
+						  type: 'error',
+						  close: 'manual'
+					});
+
+					AP.dialog.close();
+				}
+			};
+			
+			function fetchDocErr(err)
+			{
+				window.clearTimeout(timeoutThread);
+				
+		 		if (acceptResponse)
+		 		{
+		 			var flag = AP.flag.create({
+						  title: 'Unexpected Error',
+						  body: 'Cannot fetch diagram content.',
+						  type: 'error',
+						  close: 'manual'
+					});
+		 			
+		 			AP.dialog.close();
+		 		}
+			};
+			
+			var tryCachedFile = function(cachedFileId, onError)
+			{
+				if (cachedFileId == null)
+				{
+					onError();
+				}
+				else
+				{
+					AP.request({
+						url: '/secure/attachment/' + cachedFileId + '/',
+						success: function(resp)
+						{
+							viewDrawioDoc(mxUtils.parseXml(resp));
+						},
+						error: onError
+					});
+				}
+			};
+			
+			function cacheAndRender(fileContent, fileDoc, cachedFilename)
+			{
+				viewDrawioDoc(fileDoc);
+				
+				AC.uploadToJira(fileContent, issueId, cachedFilename, 
+						'application/vnd.jgraph.mxfile', GAC.noop, GAC.noop);
+			};
+			
+			if (fileInfo.service == 'GDrive')
+			{
+				GAC.getFileInfo(fileInfo.id, function(fileInfo)
+				{
+					var timestamp = String(new Date(fileInfo.modifiedDate).getTime());
+					var cachedFilename = timestamp + '_' + fileInfo.title;
+					
+					tryCachedFile(cachedFileId, function()
+					{
+						if (/\.v(dx|sdx?)$/i.test(fileInfo.title))
+						{
+							GAC.getBinaryFile(fileInfo, function(blobFile)
+							{
+								convertVSDXtoMX(blobFile, fileInfo.title, function(xml)
+								{
+									cacheAndRender(xml, mxUtils.parseXml(xml), cachedFilename);
+								}, fetchDocErr);
+							}, fetchDocErr);
+						}
+						else
+						{
+							GAC.getDrawioFileDoc(fileInfo, function(doc, cnt)
+							{
+								cacheAndRender(cnt, doc, cachedFilename);
+							}, fetchDocErr);
+						}
+					});
+				}, fetchDocErr);
+			}
+			else if (fileInfo.service == 'AttFile')
+			{
+				AP.request({
+					url: '/secure/attachment/' + fileInfo.id + '/',
+					success: function(resp)
+					{
+						var isPng = fileInfo.mime == 'image/png';
+						
+						try 
+						{
+							if (isPng)
+							{
+								resp = AC.extractGraphModelFromPng(resp);
+							}
+							
+							var doc = mxUtils.parseXml(resp);
+							viewDrawioDoc(doc);
+						}
+						catch(e)
+						{
+							fetchDocErr();
+						}
+					},
+					error: fetchDocErr
+				});
+			}
+			else //OneDrive
+			{
+				AC.getFileInfo(fileInfo.id, fileInfo.driveId, function(fileInfo)
+				{
+					var timestamp = String(new Date(fileInfo.lastModifiedDateTime).getTime());
+					var cachedFilename = timestamp + '_' + fileInfo.name;
+					
+					tryCachedFile(cachedFileId, function()
+					{
+						if (/\.v(dx|sdx?)$/i.test(fileInfo.name))
+						{
+							AC.getBinaryFile(fileInfo, function(blobFile)
+							{
+								convertVSDXtoMX(blobFile, fileInfo.name, function(xml)
+								{
+									cacheAndRender(xml, mxUtils.parseXml(xml), cachedFilename);
+								}, fetchDocErr);
+							}, fetchDocErr);
+						}
+						else
+						{
+							AC.getDrawioFileDoc(fileInfo, function(doc, cnt)
+							{
+								cacheAndRender(cnt, doc, cachedFilename);
+							}, fetchDocErr);
+						}
+					});
+				}, fetchDocErr);
+			}
+	    };
+	    AP.dialog.getCustomData(doMain);
+	}
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	
+	function mainBarrier()
+	{
+		if (bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+	
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/onedrivejira/oneDriveFSViewer.html b/src/main/webapp/connect/onedrivejira/oneDriveFSViewer.html
new file mode 100644
index 000000000..b92e934cb
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/oneDriveFSViewer.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>OneDrive Viewer</title>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	background-color:#ffffff;
+	background-image:url(./spinner.gif);
+	background-position:center 49%;
+	background-repeat:no-repeat;
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+}
+</style>
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+</head>
+<body>
+<script src="oneDriveFSViewer.js" type="text/javascript"></script>
+
+</body>
+</html>
diff --git a/src/main/webapp/connect/onedrivejira/oneDriveFSViewer.js b/src/main/webapp/connect/onedrivejira/oneDriveFSViewer.js
new file mode 100644
index 000000000..0602ce950
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/oneDriveFSViewer.js
@@ -0,0 +1,128 @@
+(function()
+{
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+	
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = "text/css";
+	link.rel = "stylesheet";
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	function main()
+	{
+		AP.resize('100%', '100%');
+		
+		//keeping the block of AP.require to minimize the number of changes!
+		function doMain(customData)
+		{
+			var fileInfo = (customData != null) ? customData.fileInfo : null;
+			var id = fileInfo.id;
+	    	var serverName = document.referrer;
+	    	var timeout = 25000;
+	    	var index1 = serverName.indexOf('//');
+	    	
+	    	if (index1 > 0)
+	    	{
+	    		var index2 = serverName.indexOf('/', index1 + 2);
+	    		
+	    		if (index2 > index1)
+	    		{
+	    			serverName = serverName.substring(index1 + 2, index2);
+	    		}
+	    	}
+	    	
+			var acceptResponse = true;
+			
+			var timeoutThread = window.setTimeout(function()
+			{
+				acceptResponse = false;
+				
+				var flag = AP.flag.create({
+					  title: 'The connection has timed out',
+					  body: 'The server at ' +
+								serverName + ' is taking too long to respond.',
+					  type: 'error',
+					  close: 'manual'
+				});
+
+				AP.dialog.close();
+			}, timeout);
+	    	
+			function createPrevIframe(url)
+			{
+				window.clearTimeout(timeoutThread);
+				var iframe = document.createElement('iframe');
+				iframe.src = url;
+				iframe.setAttribute('frameborder', '0');
+				iframe.width = '100%';
+				iframe.height = '100%';
+				document.body.appendChild(iframe);
+			};
+			
+			function noPrevErr()
+			{
+				window.clearTimeout(timeoutThread);
+				document.body.innerHTML = 'No preview is available';
+			};
+			
+			if (fileInfo.service == 'GDrive')
+			{
+				GAC.getFileInfo(id, function(fileInfo)
+				{
+					createPrevIframe(fileInfo.embedLink);
+				}, noPrevErr);
+			}
+			else if (fileInfo.service == 'AttFile')
+			{
+				AP.request({
+					url: '/secure/attachment/' + id + '/',
+					success: function(resp)
+					{
+						createPrevIframe(resp);
+					},
+					error: noPrevErr
+				});
+			}
+			else //OneDrive
+			{
+				var driveId = fileInfo.driveId;
+				var embeddedUrl = fileInfo.embeddedUrl;
+				
+				if (embeddedUrl)
+				{
+					createPrevIframe(embeddedUrl);
+				}
+				else
+				{
+					AC.getPreviewUrl(id, driveId, function(prevUrl)
+					{
+			    		if (acceptResponse)
+				    	{
+							if (prevUrl)
+							{
+								createPrevIframe(prevUrl);
+							}
+							else
+							{
+								noPrevErr();
+							}
+				    	}
+					}, noPrevErr);
+				}
+			}
+	    };
+	    
+	    AP.dialog.getCustomData(doMain);
+	}
+	
+	script.onload = main;
+	
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/onedrivejira/spinner.gif b/src/main/webapp/connect/onedrivejira/spinner.gif
new file mode 100644
index 0000000000000000000000000000000000000000..054973c97b0d1fddec2722cc42cb68e39d27514c
GIT binary patch
literal 1781
zcmaJ>dq7il6ut~dQG_XoqF9#!3dXj(CwG%6unm|p-YQ`x<L<&HZ1=KVWYP;KN&+Db
z@CA~H79k=HpQy<r6T}CGnp$S!n<$26Wmt5Fg8c#Af9~&``<?GQ=XcIMVX{zIpr8U&
zpwSt~&(H7e?d|F5F`Lbuot*;%1J%{lO-)U;wYA;d-R0%wEiEl3lWA~p&}cLc4Gnn?
zO^%et$BBcZrECUdYXblP=}M4CgAxUyAm4$D47dVGLkTb$O;u|}wEp9#XrNjtqAlmi
zAvrEaRqF6;9U7M%8INSAAp#|B(LylLAT(%j4N53LgC<?87aBw~g%V3fh2+`lX41f6
z2$3eD1zSIWR!uRcLqQ$`q9YI=0{JWki^B~F2=E8l5DQ{LY$l6MX9Wm3Y#{`JFCQAI
zrc<T}V<n+4wMa`uQxOC%WHPg|vKUz$2Bu48vIGKwm4nTulL)$gt(H(2=vuwk2!jOG
zBRVxss4*>QWmF_%nS_W&X8NK84L(Y%)iZ|6VIY`>X;9!y76Y=DGy;^%{~xN+jH2~K
zEcz<nF^To@YjKnri|VmV9fFc@FRK(T6zfn0f$8EgEPdn_qg5Dz=~WmGisN{oT!E;y
zR(lvPmkVWDJ)zJds7xZFkqivAS}6<(mhd<*pT`dt@L4P=OTdNTPzjeK;c?;6U}^A3
ztOP?cHK>*tiB-Oe<&PU{9R&?eDoaqEdJU=!)nOWNxMZPv{9HKW^1X~zj-Ly6+*l@=
z4Aa`!|1^5UMNW_PI6AhZF*^9DmYjASIo38q|NQ-Y@ULfo{_*?M-<~`ku=M}>OW)7E
zj~+g_fA8*{p4&g&`tjxu-`}`??Ypa2E_Z)>sq5l}^XEFxcC?@Q=JeNXtu4)`zB+m0
zc+;_?M-Cr4*l7N;;XwWVx_z}@)O`Ng-aXa3t9E@_xwE2t$M$Vox0IEZm_8}qT=a2a
zLH?$X@-}YBU2j~M^Wg{YzxQtTT0_>FOhT{Az%i{RJ#DpGm70Pokz_^Es&`hty(00g
zgyqYY#>d6RL`Ox+BbF?dg@=VoCE}3aphXKsfeVBJIDpUNa@gcA#i0AYIp5EB-drDV
zFPbO##_MxDX3uh;Im2zbtIM>hRA;9tj*}-jOq}qVy`3$ETn?Vk>>MTm&VWC;C&-0E
z1pvDUONVUV$wPi;b_Om%)I06qh+@{gl7>Q<{*ce>3(;%}^>MP_u--GW(EaZEF!!TI
z*Tg=!JqEAI-NV^ymykmb^E}RQ>dA0#(?-$85=gel+=1=zlKZ7y35`Icdrnky*#!$%
zdKGuP4M?k@DTm<`dC3Dk)OnM_Ld?oFkWaLi(C;ZXUS__onp;`23a|1N7MZs13!-(^
zms~@dDV0GsZb>#1988YBv+RH@m#JgPCR#cK1ywU$wwlumdSKwX(uPxi$H<%C?cmiF
zQ_xlswb0^vY5xoZcUpZ%`;&zEb1FB+nZqk69bv6i?cCRjy!{Jhr5;AaF&y1L^YrpZ
zbqNiAD<~Yqx6f-Vxya#bJaFj77G059l^<m9SR*`_x>$bJJJw|EZ)}+T{C0_L4*!`A
zt35C2Sf65<?P3bPt7dn}Hbh~6p3ASCp0R>ODN{X|r<;4rGI1;kvLdomN9p$}63;J%
zRz8ASc#v#caRj_~vp?_d<2^=>tDDib83=^M#op`ssJTAUWHUgxI`1w^@^kbs-b6CY
zS3(ZXuDfFJJ7)qq2udQi-Pxn9KW@yvy^u>_Jh;4iStB*7H6tR(C&!kX)B#7NS6m3<
zJ)up{bqnLM{CquHTJs1lvSUMzI0l|p+UyYIt5S8H0aA-CDhFzveRCwG(S<+YK(BL3
MNx67L0sssC1r+s*?f?J)

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/onedrivejira/viewerPanel.html b/src/main/webapp/connect/onedrivejira/viewerPanel.html
new file mode 100644
index 000000000..8c54e3e75
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/viewerPanel.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Diagram Viewer</title>
+<link rel="stylesheet" href="//aui-cdn.atlassian.com/aui-adg/5.7.1/css/aui.css" media="all">
+<script src="../new_common/cac.js" type="text/javascript"></script>
+<script src="../onedrive_common/ac.js" type="text/javascript"></script>
+<script src="../gdrive_common/gac.js" type="text/javascript"></script>
+<style type="text/css">
+html, body {
+	height:100%;
+	overflow:hidden;
+}
+body {
+	font-family:Arial,sans-serif;
+	width:100%;
+	margin:0;
+	background-color: #fff;
+	background-image:url(/connect/onedrivejira/spinner.gif);
+	background-repeat:no-repeat;
+	background-position:center;
+}
+.connector-add-file {
+	float: right;
+}
+</style>
+</head>
+<body>
+<script type="text/javascript">
+// Sets global environment variables
+RESOURCE_BASE = '/resources/dia';
+STENCIL_PATH = '/stencils';
+SHAPES_PATH = '/shapes';
+IMAGE_PATH = '/images';
+
+// Overrides browser language with JIRA user language
+var lang = AC.getUrlParam('loc', true);
+
+// Language is in the Connect URL
+if (lang != null)
+{
+	var dash = lang.indexOf('-');
+	
+	if (dash >= 0)
+	{
+		mxLanguage = lang.substring(0, dash);
+	}
+}
+</script>
+<script src="/js/viewer.min.js" type="text/javascript"></script>
+<script type="text/javascript" src="../vsdx/importer.js"></script>
+<script src="viewerPanel.js" type="text/javascript"></script>
+</body>
+</html>
diff --git a/src/main/webapp/connect/onedrivejira/viewerPanel.js b/src/main/webapp/connect/onedrivejira/viewerPanel.js
new file mode 100644
index 000000000..eb9aff520
--- /dev/null
+++ b/src/main/webapp/connect/onedrivejira/viewerPanel.js
@@ -0,0 +1,807 @@
+(function()
+{
+	var opts =
+	{
+		lines: 12, // The number of lines to draw
+		length: 8, // The length of each line
+		width: 3, // The line thickness
+		radius: 5, // The radius of the inner circle
+		rotate: 0, // The rotation offset
+		color: '#000', // #rgb or #rrggbb
+		speed: 1, // Rounds per second
+		trail: 60, // Afterglow percentage
+		shadow: false, // Whether to render a shadow
+		hwaccel: false, // Whether to use hardware acceleration
+		className: 'spinner', // The CSS class to assign to the spinner
+		zIndex: 2e9 // The z-index (defaults to 2000000000)
+	};
+
+	var spinner = new Spinner(opts);
+
+	var odNoThumbImg = '/images/onedrive-logo.svg';
+	var gdNoThumbImg = '/images/google-drive-logo.svg';
+	var attNoThumbImg = '/images/drawlogo-text-bottom.svg';
+	
+	// Enables dynamic loading of shapes and stencils (same domain)
+	mxStencilRegistry.dynamicLoading = true;
+
+	// Specifies connection mode for touch devices (at least one should be true)
+	var connectUrl = AC.getBaseUrl() + '/atlassian-connect';
+	var head = document.getElementsByTagName('head')[0];
+	
+	var script = document.createElement('script');
+	script.setAttribute('data-options', 'resize:false;margin:false');
+
+	head.appendChild(script);
+	
+	var link = document.createElement('link');
+	link.type = 'text/css';
+	link.rel = 'stylesheet';
+	link.href = connectUrl + '/all.css';
+	head.appendChild(link);
+	
+	mxResources.loadDefaultBundle = false;
+	var bundle = mxResources.getDefaultBundle(RESOURCE_BASE, mxLanguage) ||
+		mxResources.getSpecialBundle(RESOURCE_BASE, mxLanguage);
+
+	// Prefetches asynchronous requests so that below code runs synchronous
+	// Loading the correct bundle (one file) via the fallback system in mxResources. The stylesheet
+	// is compiled into JS in the build process and is only needed for local development.
+	var bundleLoaded = false;
+	var scriptLoaded = false;
+	
+	function mainBarrier()
+	{
+		if (bundleLoaded && scriptLoaded)
+		{
+			main();
+		}
+	};
+	
+	mxUtils.getAll([bundle], function(xhr)
+	{
+		// Adds bundle text to resources
+		mxResources.parse(xhr[0].getText());
+		bundleLoaded = true;
+		mainBarrier();
+	});
+
+	script.onload = function()
+	{
+		scriptLoaded = true;
+		mainBarrier();
+	};
+	script.src = 'https://connect-cdn.atl-paas.net/all.js';
+	
+	function main()
+	{
+		//Create draw.io panel toolbar (currently, we only have "Add Diagram" button)
+		var toolbar = document.createElement('div');
+		toolbar.style.cssText = "width:99%;height:35px";
+		var addFileBtn = document.createElement('button');
+		addFileBtn.className = "aui-button connector-add-file";
+		mxUtils.write(addFileBtn, mxResources.get('addFile', null, 'Add File'));
+		
+		addFileBtn.addEventListener('click', function()
+		{
+			AP.dialog.create(
+			{
+			   header: 'Add Diagram File', 
+			   key: 'oneDriveEditorBlank',
+			   width: '80%',
+			   height: '60%',
+			   chrome: true
+			});
+		});
+		
+		toolbar.appendChild(addFileBtn);
+		document.body.appendChild(toolbar);
+		
+		var removeImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVAQMAAACT2TfVAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABlJREFUCNdjQAF/GBj4/x8AYxBg/k80RgYApAUPr950a4AAAAAASUVORK5CYII=';
+		var editImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVBAMAAABbObilAAAAD1BMVEUAAAAAAAAQEBBycnIgICBqwj3hAAAAAXRSTlMAQObYZgAAADlJREFUCNdjoBwoChrAmCyGggJwYWVBBSiTSVDICKFa0AEuLCiEJKyAX5gBSZgBSZgBKGwMBKQ7HAAWzQSfKKAyBgAAAABJRU5ErkJggg==';
+		var issueId = AC.getUrlParam('issueId');
+		var serverName = document.referrer;
+		var timeout = 25000;
+		var index1 = serverName.indexOf('//');
+		
+		if (index1 > 0)
+		{
+			var index2 = serverName.indexOf('/', index1 + 2);
+			
+			if (index2 > index1)
+			{
+				serverName = serverName.substring(index1 + 2, index2);
+			}
+		}
+		
+		// Delayed invocation see below
+		function init()
+		{
+			// Workaround to ignore scrollbars when applying fit to available width in all but FF
+			if (!mxClient.IS_FF)
+			{
+				document.body.style.width = document.documentElement.offsetWidth + 'px';
+			}
+			
+			//TODO is 0px really needed?
+			AP.resize('100%', '200px');
+			
+			AP.request({
+				url: '/rest/api/2/issue/' + issueId + '/properties/onedrive-conn-data',
+				type: 'GET',
+				success: function(resp) 
+				{
+					var tbHeight = GraphViewer.prototype.toolbarHeight;
+					var tiles = [];
+					var count = 0;
+					var tilesPerRow, tileWidth, tileWidthCss, tileHeightCss, lastWidth;
+					
+					function showError(container, errMsg)
+					{
+						container.style.cssText = '';
+						container.style.textAlign = 'center';
+						container.style.marginTop = tbHeight + 'px';
+						container.innerHTML = '<img src="/mxgraph/images/error.gif" border="0" align="absmiddle"/> ' + 
+							errMsg;
+					};
+					
+					function updateTileSize()
+					{
+						tilesPerRow = Math.max(Math.round(document.documentElement.offsetWidth / 250), 1);
+						//floor and -1 to avoid IE issues of moving last tile to next row
+						tileWidth = Math.floor(document.documentElement.offsetWidth / tilesPerRow) - 1;
+						tileWidthCss = tileWidth + "px";
+						tileHeightCss = (tileWidth + tbHeight) + "px";
+					};
+					
+					updateTileSize();
+					AP.resize('100%', tileWidth + tbHeight + 35);
+					 
+					function updateHeight()
+					{
+						lastWidth = document.documentElement.offsetWidth;
+						var rows = Math.ceil(tiles.length / tilesPerRow);
+
+						// +5 is needed to include margin, 35 is the panel toolbar height
+						var h = tiles.length > 0? rows * (tiles[0].tile.offsetHeight + 5) + 35 : 50;
+						
+						// Restricts the max sidebar panel height
+						var maxH = screen.height * 1.5;
+						h = Math.min(maxH, h);
+						AP.resize('100%', h);
+						
+						// Workaround for iframe scrollbars
+						document.body.style.height = h + 'px';
+						
+						document.body.style.overflowY = maxH == h? "auto" : "hidden";
+					};
+					
+					window.addEventListener('resize', function() 
+					{
+						if (lastWidth != document.documentElement.offsetWidth)
+						{
+							updateTileSize();
+							
+							for (var i = 0; i < tiles.length; i++)
+							{
+								tiles[i].title.style.width = tileWidthCss;
+
+								tiles[i].container.style.width = tileWidthCss;
+								tiles[i].container.style.height = tileWidthCss;
+								
+								tiles[i].tile.style.width = tileWidthCss;
+								tiles[i].tile.style.height = tileHeightCss;
+							}
+							
+							updateHeight();
+						}
+					});
+
+					function finish() 
+					{
+						count--;
+						
+		 				if (count == 0) 
+		 				{
+		 					document.body.style.backgroundImage = 'none';
+		 					document.body.style.width = '';
+							updateHeight();
+		 				}
+					};
+
+					function addFileTile(file, attFiles)
+					{
+						count++;
+						var tile = document.createElement('div');
+						tile.style.cssText = 'width:' + tileWidthCss + ';height:' + tileHeightCss + ';display:inline-block;overflow: hidden;';							
+						document.body.appendChild(tile);
+						var container = document.createElement('div');
+						container.style.cssText = 'position:relative;box-sizing:border-box;margin-bottom:2px;' +
+							'width:' + tileWidthCss + ';height:' + tileWidthCss + ';border:1px solid transparent;display:inline:block;overflow: hidden;';
+						
+						// Adds filename and tooltip to title
+						var title = document.createElement('div');
+						var modifiedDate = new Date(file.modifiedDate).toLocaleString();
+						mxUtils.write(title, file.name);
+						title.setAttribute('title', file.name + ' (' + modifiedDate + ')' + (file.createdBy? ' - ' + file.createdBy : '') +
+								(file.lastModifiedBy? ' [Last Modified By: ' + file.lastModifiedBy + ']' : ''));
+						title.style.cssText = 'position:relative;box-sizing:border-box;width:' + tileWidthCss + ';padding: 6px 0 0 3px;height:' + tbHeight +
+							'px;margin-bottom:-' + tbHeight + 'px;text-align:left;white-space:nowrap;cursor:pointer;overflow:hidden;';
+						tile.appendChild(title);					
+						tile.appendChild(container);
+						tiles.push({tile: tile, container: container, title: title});
+						var attId = null;
+						
+						var refreshImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAAhFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8qm6wAAAAK3RSTlMABr4XDQoC07pc+/Yq5dzYtaiSjXlkMx4U8u/NwrKZf1gl8eDKb2lOR0Q6/VKNjQAAAKlJREFUGNOtjlcOwjAQBd1jOwnpvdNh738/kuA4iE/EfI1Gu9JD/4RTyr+bNxDHCS8FKp62CXWAlSYj0n6MNZziLOt90EC2OgXQ5osoF/aagr/GgsBeRUpSsUgeSikHbG4xFpssamCU0lIYZVuMDkFw9oxeTaUOgE74e0T1+Ki1wvOl8iHituojVDJJiAuNhwxlG9+Jhhm3sxGJiaFy7MMuvjFksavRD7wAhtIMKUShI2QAAAAASUVORK5CYII=';
+						
+						var btnDefs = {
+							'refresh': {title: mxResources.get('refresh'),
+								image: refreshImg, handler: function()
+								{
+									renderDrawioFile();
+								}
+							},
+							'edit': {title: mxResources.get('edit'), enabled: typeof window.Blob !== 'undefined',
+								image: editImage, handler: function()
+							{
+								//Use the same URL such that no authentication is needed when editing or viewing PNG files
+								window.open('https://' + window.location.hostname + 
+										(file.service == 'GDrive'? '/#G' + encodeURIComponent(file.id) : '/#W' + encodeURIComponent(file.driveId + '/' + file.id)));
+							}},
+							'remove': {title: mxResources.get('delete'), image: removeImage, handler: function()
+							{
+								if (confirm(mxResources.get('removeIt', [file.name]) + '?'))
+								{
+									AC.removeLink(issueId, file.id, function()
+									{
+										AP.jira.refreshIssuePage();
+									}, function(err)
+									{
+										alert('Error: ' + (err? err.message : 'Unknown'));
+									});
+									
+									if (attId != null)
+									{
+										AP.request({
+						    	            url: '/rest/api/2/attachment/' + attId,
+						    	            type: 'DELETE',
+						    	            success: AC.noop,
+						    	            error: AC.noop
+										});
+									}
+								}
+							}}
+						};
+						
+						if (file.isDrawio)
+						{
+							function renderDrawioFile()
+							{
+								spinner.spin(container);
+
+								var acceptResponse = true;
+								
+								var timeoutThread = window.setTimeout(function()
+								{
+									acceptResponse = false;
+									showError(container, 'The connection has timed out: The server at ' +
+											serverName + ' is taking too long to respond.');
+		 							finish();
+								}, timeout);
+								
+								var viewDrawioDoc = function(doc, noEdit)
+								{
+									try
+									{
+										window.clearTimeout(timeoutThread);
+										
+								 		if (acceptResponse)
+								 		{
+								 			var pageId, layerIds;
+											
+											if (file.aspect != null)
+											{
+												var aspectArray = file.aspect.split(' ');
+												
+												if (aspectArray.length > 1)
+												{
+													pageId = aspectArray[0];
+													layerIds = aspectArray.slice(1);
+												}
+											}
+											
+											spinner.stop();
+											container.innerHTML = '';
+											
+											var viewer = new GraphViewer(container, doc.documentElement, {highlight: '#3572b0',
+												'toolbar-position': 'top', toolbar: (noEdit == true? '' : 'edit ') + 'pages refresh layers lightbox remove', 
+												border: 8, 'auto-fit': true, resize: false,
+												nav: true, 'toolbar-buttons': btnDefs,
+												pageId: pageId, layerIds: layerIds});
+											
+											// Handles resize of iframe after zoom
+											var graphDoResizeContainer = viewer.graph.doResizeContainer;
+											
+											viewer.graph.doResizeContainer = function(width, height)
+											{
+												graphDoResizeContainer.apply(this, arguments);
+												updateHeight();
+											};
+											
+											// Updates the size of the iframe in responsive cases
+											viewer.updateContainerHeight = function(container, height)
+											{
+												updateHeight();
+											};
+				
+											viewer.showLightbox = function()
+											{
+												//Create an aspect reflecting current view
+												var layerIds = [], pageId = viewer.diagrams[viewer.currentPage].getAttribute('id');
+				
+												var model = viewer.graph.getModel();
+												var childCount = model.getChildCount(model.root);
+													
+												// Get visible layers
+												for (var i = 0; i < childCount; i++)
+												{
+													var layer = model.getChildAt(model.root, i);
+													
+													if (model.isVisible(layer))
+													{
+														layerIds.push(layer.id);
+													}
+												}
+													
+												AP.dialog.create(
+												{
+								                   header: file.name,
+												   key: 'drawioFullScreenViewer',
+												   size: 'fullscreen',
+												   chrome: true,
+												   customData: {fileInfo: file, pageId: pageId, layerIds: layerIds, issueId: issueId, cachedFileId: attId}
+												});					
+											};
+											
+											finish();
+								 		}
+									}
+									catch(e)
+									{
+										showError(container, 'Error: ' + ((e? e.message : '') || 'Unknown'));
+										finish();
+									}
+								};
+								
+								var getFileErr = function(err)
+								{
+									//TODO handle errors better
+									window.clearTimeout(timeoutThread);
+									
+							 		if (acceptResponse)
+							 		{
+										showError(container, 'Error: ' + ((err? err.message : '') || 'Unknown'));
+										finish();
+							 		}
+								};
+								
+								var getFileInfoErr = function(err)
+								{
+									//TODO handle errors better
+									window.clearTimeout(timeoutThread);
+										
+							 		if (acceptResponse)
+							 		{
+										if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+										{
+											showError(container, 'Error: Access Denied. You do not have permission to access this file "'+ file.name +'".');
+										}
+										else
+										{
+											showError(container, 'Error: ' + ((err? err.message : '') || 'Unknown'));
+										}
+										
+										finish();
+							 		}
+								};
+								
+								var tryCachedFile = function(cachedFilename, filename, timestamp, onError)
+								{
+									var notFound = true;
+									
+									for (var i = 0; i < attFiles.length; i++)
+									{
+										if (attFiles[i].filename == cachedFilename)
+										{
+											notFound = false;
+											attId = attFiles[i].id;
+											
+											AP.request({
+												url: '/secure/attachment/' + attFiles[i].id + '/',
+												success: function(resp)
+												{
+													viewDrawioDoc(mxUtils.parseXml(resp));
+												},
+												error: onError
+											});
+										}
+										else
+										{
+											var attInfo = attFiles[i].filename.match(/(\d+)_(.*)/);
+											
+											if (attInfo != null && attInfo[2] == filename && attInfo[1] != timestamp)
+											{
+												AP.request({
+								    	            url: '/rest/api/2/attachment/' + attFiles[i].id,
+								    	            type: 'DELETE',
+								    	            success: AC.noop,
+								    	            error: AC.noop
+												});
+											}
+										}
+									}
+									
+									if (notFound)
+									{
+										onError();
+									}
+								};
+								
+								function cacheAndRender(fileContent, fileDoc, cachedFilename)
+								{
+									viewDrawioDoc(fileDoc);
+									
+		        					AC.uploadToJira(fileContent, issueId, cachedFilename, 
+		        							'application/vnd.jgraph.mxfile', function(resp)
+		        							{
+				        						resp = JSON.parse(resp);
+				        						attId = resp[0].id;
+		        							}, GAC.noop);
+								};
+								
+								if (file.service == 'GDrive')
+								{
+									GAC.getFileInfo(file.id, function(fileInfo)
+									{
+										var timestamp = String(new Date(fileInfo.modifiedDate).getTime());
+										var cachedFilename = timestamp + '_' + fileInfo.title;
+										
+										tryCachedFile(cachedFilename, fileInfo.title, timestamp, function()
+										{
+											if (/\.v(dx|sdx?)$/i.test(fileInfo.title))
+											{
+												GAC.getBinaryFile(fileInfo, function(blobFile)
+												{
+													convertVSDXtoMX(blobFile, fileInfo.title, function(xml)
+													{
+														cacheAndRender(xml, mxUtils.parseXml(xml), cachedFilename);
+													}, getFileErr);
+												}, getFileErr);
+											}
+											else
+											{
+												GAC.getDrawioFileDoc(fileInfo, function(doc, cnt)
+												{
+													cacheAndRender(cnt, doc, cachedFilename);
+												}, getFileErr);
+											}
+										});
+									}, getFileInfoErr);
+								}
+								else if (file.service == 'AttFile')
+								{
+									attId = file.id;
+									
+									AP.request({
+										url: '/secure/attachment/' + file.id + '/',
+										success: function(resp)
+										{
+											var isPng = file.mime == 'image/png';
+										
+											try 
+											{
+												if (isPng)
+												{
+													resp = AC.extractGraphModelFromPng(resp);
+												}
+												
+												var doc = mxUtils.parseXml(resp);
+												viewDrawioDoc(doc, true);
+											}
+											catch(e)
+											{
+												getFileErr();
+											}
+										},
+										error: getFileErr
+									});
+								}
+								else //OneDrive or old format that doesn't have service
+								{
+									AC.getFileInfo(file.id, file.driveId, function(fileInfo)
+									{
+										var timestamp = String(new Date(fileInfo.lastModifiedDateTime).getTime());
+										var cachedFilename = timestamp + '_' + fileInfo.name;
+										
+										tryCachedFile(cachedFilename, fileInfo.name, timestamp, function()
+										{
+											if (/\.v(dx|sdx?)$/i.test(fileInfo.name))
+											{
+												AC.getBinaryFile(fileInfo, function(blobFile)
+												{
+													convertVSDXtoMX(blobFile, fileInfo.name, function(xml)
+													{
+														cacheAndRender(xml, mxUtils.parseXml(xml), cachedFilename);
+													}, getFileErr);
+												}, getFileErr);
+											}
+											else
+											{
+												AC.getDrawioFileDoc(fileInfo, function(doc, cnt)
+												{
+													cacheAndRender(cnt, doc, cachedFilename);
+												}, getFileErr);
+											}
+										});
+									}, getFileInfoErr);
+								}
+							};
+							
+							renderDrawioFile();
+						}
+						else
+			 			{
+							function viewOtherFiles(getPrevUrl, noThumbImg)
+							{
+								//This is a hacky way to have the same GraphViewer toolbar with OneDrive thumbnails. Simply by displaying an empty diagram and hiding it.
+								var viewer = new GraphViewer(container, 
+										mxUtils.parseXml('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>').documentElement, 
+										{highlight: '#3572b0', 'toolbar-position': 'top', toolbar: 'pages layers lightbox remove', 
+										border: 8, 'auto-fit': true, resize: false,
+										nav: true, title: file.name, 'toolbar-buttons': btnDefs});
+								
+								var svg = AC.$('svg', container);
+								svg.style.display = 'none';
+								
+								viewer.showLightbox = function()
+								{
+									AP.dialog.create(
+									{
+					                   header: file.name,
+									   key: 'oneDriveFullScreenViewer',
+									   size: 'fullscreen',
+									   chrome: true,
+									   customData: {fileInfo: file, issueId: issueId}
+									});					
+								};
+								
+								container.addEventListener('click', viewer.showLightbox);
+								
+								var imgSrc = noThumbImg;
+								var img = document.createElement('img');
+								var maxDim = tileWidth - 4;
+								img.style.cssText = 'vertical-align: middle;max-width: '+ maxDim +'px;max-height: '+ maxDim +'px;';
+								container.style.cssText = container.style.cssText + 'line-height: '+ maxDim +'px;text-align: center; margin-top: 30px;'
+								
+								function defThumbErr() 
+								{
+									this.onerror = null;
+									this.style.width = "46px";
+									this.style.height = "46px";
+									this.src = noThumbImg;
+								};
+								
+								img.onerror = defThumbErr;
+								
+								getPrevUrl(function(thumbUrls)
+								{
+									if (thumbUrls != null)
+									{
+										if (Array.isArray(thumbUrls) && thumbUrls.length > 0)
+										{
+											imgSrc = thumbUrls[0];
+										
+											img.onerror = function() 
+											{
+												
+												var pos = thumbUrls.indexOf(imgSrc) + 1;
+												
+												if (pos < thumbUrls.length)
+												{
+													this.src = thumbUrls[pos];
+												}
+												else
+												{
+													defThumbErr.call(this);
+												}
+											};
+										}
+										else
+										{
+											imgSrc = thumbUrls;
+										}
+									}
+									
+									img.src = imgSrc;
+									container.appendChild(img);
+	
+						 			finish();
+								}, function(err)
+								{
+									if (err && (err.status == 403 || err.status == 400)) //400 is returned when a business account file is accessed via a personal account
+									{
+										showError(container, 'Error: Access Denied. You do not have permission to access this file "'+ file.name +'".');
+									}
+									else
+									{
+										showError(container, 'Error: ' + ((err? err.message : '') || 'Cannot get thumbnail.'));
+									}
+						 			finish();
+								});
+				 			};
+							
+							if (file.service == 'GDrive')
+							{
+								viewOtherFiles(function(success, error)
+								{
+									GAC.getFileInfo(file.id, function(fileInfo)
+									{
+										success(fileInfo.thumbnailLink);
+									}, error);
+								}, gdNoThumbImg);
+							}
+							else if (file.service == 'AttFile')
+							{
+								viewOtherFiles(function(success, error)
+								{
+									AP.request({
+										url: '/secure/attachment/' + file.id + '/',
+										success: function(resp)
+										{
+											success(resp);
+										},
+										error: error
+									});
+								}, attNoThumbImg);
+							}
+							else //OneDrive or old format that doesn't have service
+							{
+								viewOtherFiles(function(success, error)
+								{
+									AC.getThumbnailUrl(file.id, file.driveId, function(small, allThumbs)
+									{
+										if (small != null)
+										{
+											var thumbUrls = [];
+											
+											if (allThumbs.large)
+											{
+												thumbUrls.push(allThumbs.large.url);
+											}
+											
+											if (allThumbs.medium)
+											{
+												thumbUrls.push(allThumbs.medium.url);
+											}
+
+											if (allThumbs.small)
+											{
+												thumbUrls.push(allThumbs.small.url);
+											}
+											
+											success(thumbUrls);
+										}
+										else
+										{
+											success(null);
+										}
+									}, error);
+								}, odNoThumbImg);
+							}
+			 			}
+					};
+					
+					resp = JSON.parse(resp);
+					var linksInfo = resp.value;
+		        	var files = [];
+		        	var authOneDrive = false, authGDrive = false;
+		        	
+			        for (var key in linksInfo)
+			    	{
+			        	var obj = linksInfo[key];
+			        	obj.id = key;
+			        	files[obj.order] = obj;
+			        	
+			        	authGDrive |= obj.service == 'GDrive';
+			        	authOneDrive |= (obj.service == 'OneDrive' || obj.service == null);
+			    	}
+			        
+			        function viewFiles(attFiles)
+			        {
+			        	if (authGDrive || authOneDrive) return;
+			        	
+						for (var i = 0; i < files.length; i++)
+						{
+							if (files[i] != null) addFileTile(files[i], attFiles);
+						}
+			        };
+			        
+					// Shows message if no files are found
+					if (files.length == 0)
+					{
+						mxUtils.write(document.body, mxResources.get('noFiles'));
+						document.body.style.backgroundImage = 'none';
+						AP.resize('100%', '60px');
+					}
+					else
+					{
+						function doViewFiles(attList)
+						{
+							if (authOneDrive)
+							{
+								AC.confirmODAuth(function()
+								{
+									authOneDrive = false;
+									viewFiles(attList);
+								}, function()
+								{
+									alert('Error authenticating to OneDrive!'); //TODO better error handling
+								});
+							}
+							
+							if (authGDrive)
+							{
+								GAC.confirmGDAuth(function()
+								{
+									authGDrive = false;
+									viewFiles(attList); 
+								},
+								function()
+								{
+									alert('Error authenticating to Google Drive!'); //TODO better error handling
+								});
+							}
+							
+							viewFiles(attList);
+						};
+						
+						AC.getJiraAttList(issueId, doViewFiles, function()
+						{
+							doViewFiles([]); //One error continue without cached files
+						});
+					}
+				},
+				error: function() 
+				{
+					mxUtils.write(document.body, mxResources.get('noFiles'));
+					document.body.style.backgroundImage = 'none';
+					AP.resize('100%', '60px');
+				}
+			});
+		}; // end of init
+		
+		// Workaround for collapsed side panel is to delay init until size is not 0
+		// NOTE: Since container.offsetWidth is 2 in this case the delayed rendering
+		// in the viewer does not triggger. We disable is here to make sure this does
+		// not change in case the container width is zero in the future.
+		GraphViewer.prototype.checkVisibleState = false;
+		
+		if (document.documentElement.offsetWidth == 0)
+		{
+			var listener = function()
+			{
+				if (document.documentElement.offsetWidth > 0)
+				{
+					window.removeEventListener('resize', listener);
+					init();
+				}
+			};
+			
+			window.addEventListener('resize', listener);
+		}
+		else
+		{
+			init();
+		}
+	}
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/trello/attSection.html b/src/main/webapp/connect/trello/attSection.html
new file mode 100644
index 000000000..883d0fb8e
--- /dev/null
+++ b/src/main/webapp/connect/trello/attSection.html
@@ -0,0 +1,14 @@
+<html>
+  <head>
+    <link rel="stylesheet" href="https://trello.com/power-ups/power-up.css">
+    <!-- Is this OK? -->
+    <link rel="stylesheet" href="https://a.trellocdn.com/css/d8375bf2ae4b875ccc5216dd4fcc705a/core.css">
+    <script src="https://trello.com/power-ups/power-up.min.js"></script>
+    <script src="/js/viewer.min.js"></script>
+    <script src="js/common.js"></script>
+  </head>
+  <body>
+    <div id="content"></div>
+    <script src="js/attSection.js"></script>
+  </body>
+</html>
diff --git a/src/main/webapp/connect/trello/editor.html b/src/main/webapp/connect/trello/editor.html
new file mode 100644
index 000000000..65cfd1baf
--- /dev/null
+++ b/src/main/webapp/connect/trello/editor.html
@@ -0,0 +1,13 @@
+<html>
+  <head>
+      <link rel="stylesheet" href="https://trello.com/power-ups/power-up.css">
+      <script src="https://trello.com/power-ups/power-up.min.js"></script>
+  </head>
+  <body>
+    <div id="content" style="width:100%;height:100%">
+      <iframe id="editorFrame" frameborder="0" src="about:blank" style="width:100%;height:100%">
+      </iframe>
+    </div>
+    <script src="js/editor.js"></script>
+  </body>
+</html>
\ No newline at end of file
diff --git a/src/main/webapp/connect/trello/images/drawio-trello-ss.png b/src/main/webapp/connect/trello/images/drawio-trello-ss.png
new file mode 100644
index 0000000000000000000000000000000000000000..3a8e18b377f08f74b10c9774dfa9444cc4dc724b
GIT binary patch
literal 105622
zcmdSAWmFy8(l&~_djf<7!Gi>XySuwP1a~L6LvVM3ySo$I-7Uf0UB5-L-?MY}*?;ek
z%jmI2)3c{k&6*`oRR_yR2_wS2g#!TrK@=4ckOKjMKm!2*^Mru{KIvIMbp`=}Yd7KN
zml5UX2gul38JU<Hf`Etw$0a~3$g95XJ8|11{02#sHqJg-eEF7#mu(&f)=!2{gtsFg
zgvIB5NDxfHdo~5gKCpfj6nHEsP{>1YdYFO(9bOrQYf$m|1<q!-YtK>6lZ2C%o7R)&
zlU2KCP%nnTA7|0JCLnSRd>$1M?9}v>$pN?!C_LaC<6vH$7^llVK42hO{s-Dug~&-^
zyKMvJWuEOX+9X{e=pRA7d{Dv-VG}7}GWdnaV*0SbyasvK)eihyRLg`^!Xq$(PJ2|1
z#_Z;(`bIAZ?Ckh_IZ@KVK&16P-kO7m7!ym0f3Aw+Ahz%uX`n*F{wd>^mIRA{^<5AK
zH$Nw5)b_*o`^uNtz^8=N%JozPDD~ls)?wI_0o2pzH%Tu$wvSf1#GzQL-+~e3z}A>?
z8uy9Jl+t4NX^kuoLpmV0E4H`CY<&8e&ApSrB6cB-=s2FRRbnx=>pBpg*Q@aeIqkjg
z3Om;ymp3s%*B@={>H1(>_^?>gHzc)xl=zJYK}zlTm8<CR$_2fw<00Fm(!ycQ;f>v3
z-6RsJl!Ohad`b97IPFv!AY#K=!Xiy;lZs24K8D^DYIh#(i*+D<joJsfN4WmkzaL8d
zhd_Y#xL!Ko?A}Wz5=6iYUIl=3%1b2zIlu#B+<|WG1#%jxjo@XDtg8`VT?ZSXphcR|
zC51A%94U_>oNbqs*UJF^$xa=_Xl(P5?1d+d-3;YwRFA3@6Xbz|xL@llU1W^gPZE$=
z=}@}Tn|{Xy_>Nqfyr2v&f|Qjy5bz)#xPDN<%z#v9cO5V)FGOpIvJUuLZ=ReO@(Qev
zQ66%UQnS8cIv@HW?{sKcK*Ty_t??9m<$oX;gJE|nTB9#RYGz_{fP(Abv_NhAKu-(+
zz(7Y4!sWme^0P&v8h|eFjz(f*fI#xg${=(HG(^HI!dL{Jf8#5_V1t_BY3IStEFQNg
zz;%T{<kKH_+lBw?BU*u10(bCTT$g<w@j8(IC*wz4Dc|ZJc+SWgV9Fh2KZR~7zhEEx
zL;sjNg@DT>mQjd>8iX(mJm-PT%91@J=Q907iLCgwh-W5SP3EZJp#XFmclt8}mL%`g
zIH|F44J{kOh(P`~=4_{I@rjvTp-YEL_e+2)-V;85Z-LI&k4QLdq-b5eC4HNEA#`zx
z7m2uuTEic=(Xm2v^{y)FRJ6@8m{6NRn{nN6mb@%_9Q6Y$&{^=LP(S<GeTQ7fVIic!
zc7kz2bAp`n#qE{+NpiaH4Bx`c^>(bsstbF=>@4Ao^A`1yfj2pm-x>gcrs5~T2l^A@
zo4<9$M~OtzL6oZ?scsoPBAXADek#%}ykEo~0fdC#D0FEn<$T^pQOgq9sIA9$XLf&%
zrW%Oc<W-YIi@J_15-H6Q&OtVyS4}t+3nzsiaO-E>G~3+Sq!10sDJ0g6CTSF`lBklc
z5<V}*;1v@dlr$|>h*zkbRxNasv&w;;Y?^#GiLf^^X*h|U^N>qsKu*6+?@doZ-)v}V
zXgTzCaNWScu+>1dinXfGuzUbXRtAGQ1lnJ8L5h{Pk@rn}*Wlj3#1`7t`Igjx!(iCZ
z(4hK2;Lzv(gaPeng3PRfCIvReBsCsR{-bOU)vTs&3(@6hP4WGNOR6LV86|7QAo+fI
zW0_sW+bj|JOF0R-<^1`aTM5`wgMu14lh#SpTwF1$*sWOnxTHas!OyV-#T}FZl%15g
z3gN}}1rh~Ch4%&L3dn_8^6uF}igt?P3LoT}OPKPcWSx|D3a|^cWjzIB@*5|jO-O1E
zYHScO5w#Jcdg;QX!b~JNM?Q{NBqJt|)dZ<Is-39`s#&OQEbcE3)iRsTnQ+e%?#}NK
z@8V6H%q30FOoffF6fWhk7v*OP&kao$Pq`II&pJ&=PnC~*>Uc3$d=jB&F&{UC!BxX0
z#fg8j`pGBE{40x4U|3TaUGH_T#s=Jm2YPgHifEH)+CV173`2)~ib>4gQtqO7cEYjx
zV%ueNQmty$0&F$ecGb4W_R_HW@R~Y~+DGa^s&^{U)UDL@DopBa)$~;%)oglK<H>rh
z%dYtjDOb$6>bPx^ts{x0brxSO8ZFw>QZ*x2ESuG@aon69sIRe)xY_4fVDLv-9`}sb
z6E{^3SehiPRF|vJhXPU=(r~2uQlU~!M(IYmS&<uz8$N1KYG^f>HdbkT&=g)qSVmis
zYHD?0w%cjWaLTx}KAqp3*bhFxJR80^yo|nryP&*sJuclFxh}hScT;)2@MCH}^z7<p
zWoJoRIrq~Z<E0I^db^~@+>_`t;dAaYEf@m$EhzQS&n=Ik8(PmMzR!?Og7N^E9Oz@@
zFIYL)u~?S}Vuyp7afTnXp;Dl&5G;|u`IW#IBHm%_zf(iGCzjxrz?j9N!E9q|A^k%C
z{ZrOQJ%FvrW?p}@te9+S!M3r6y|caHWjAHHBD4}>d7V~TbCXrrYVudc`Z>x{Ni8>%
zv}v~9rfRyx#Gu5*#PY8^LXi4I@$b~%v5#KryfbJsYOD%T(YKMZ@wa(@CUxe2mTgXU
z?QyN*BhF{@9XA|0KlXxVg89sN-9S!9PH|GgR=}1Yj*EnJ3rsmarMoq~C_XuAapcqb
z);ZK9-Xu~^*u~Rb9GFOj&^T2r|FCqRh;|J>L*j9&Ry<cN*O#XSgd_w@A>lmT?Xux0
zs*{oo=1k^~%rzF%^9>FgKS=8(`<VDs^qK1|CKjWs4Oy1Rnq5EGm`%>E)g@VcSiZJ#
z>%NZ1n@K%P{f5uQzHdunch~sDj_>sD3G@kkCva3Vz8UH0KD}?SImRkpJM{&)kvC}s
zBc4=uHb&Bq>7!sNKJVQs-5T8<t{V@FX<{jcDe)HDzj*4SmXeq6Zg@LDTVktY5^#!e
zkh8JKpvg>r5qTJ2<<}NR7jqk09(p^dIOr57{muygn04JX=eb~i;xSv>WBu{+G;yr5
z7j7kFePe!OuTMK2hI`_<dS#3;PAu*&Zmp<65qzd|X3osq%+yrT6n_5)o9xQ`zzkWl
zluNp48FL}`ERRJ$H=<OiRQo;2c0${y=g*6yi)p3Y`F3TG99v(s-cKhku&l<8GmPWS
zEW3A}@TrID58Y`?dX_d7*i;@yKj!)jbq}#7d@eK4Ofuf8ZEGBCW1FrkI~u6%H$yHf
zZ&`Kedg(1qS!FJ-ZLZaB+_FDdw+LLqKAvAOX)?2`uk32tc(j^rPdlmEGjI9qR^B+&
zR-Egmdb9N|A-(v9^JMJ{kEeCLlc1H8w#r)9^UM=CvMRDL0SUM34a?KnWz1oIV!q2*
zP6j5ovWwPPbLR;nI1_jR6el#hmS2lAeK(%#Q{az?@-9}|0oqXEX<<_#Y9ZQimk5Ve
zwJXzG#*?edl;!q;$I{2r=OsJOrsoB^cdT5G;V+ikPshk11VvnG?&c{l$<EIdTT_<?
ztFh|}SD%~5j<ku|zDkt8ggmI7kNi*{a(X$D{w!x?<cz?jKMI!_3EI~Oe%b~HVvDhk
zkD@IZn|d>B=d<npjOYE*ebMGB#RQ_z2!;}m$OE!28xG(nb6Zs(Q_GW422ocF>Ek92
zs;@~L6XZ)JGcq;W_N4@AzyfJI`)rhlJU0A=-5cWp#%s35rJU;n)j4vWOa!IiMU#5t
zd)&v+XQag;_(SFLz$g$9&~y_86?+v)2{wHz3mRPmD?LLRXA5hfs|y0c;miiSwJ@~T
z1vp!nTiUTXa}xb}gAI89`k0mo@aq+OGfpBENf`jYm8~Iwk%ochBM}!I007{yH85h6
z6A=2VJMceFB4c}dYc^V1CnqNwr%yCiwx4O~SXo(VKho3E(^CWAptf_dwAXc}wzPZy
zdyxMdN5Ifd-`2$1-o(lh@H(!po|S_=ClS%>MF08wy-q`ClfP%OwEK%JAc3^6Ewpqr
zA8G$HHn1zl>r*xv6K6wn6#)|qLrXj099(oC8R$8Fb@-pAzo-18tLoofnLe@p+4GN<
zzj|`ezEbc9MZekg>nV_5TyPw;|KU9s96eMaFzDa`5f$K7a0We0gZ`qRc-<%Miflqm
z%p+p_?Pis|AhQ5Na8}E)wE0C7(@h<-b2Unks-U1?9%PU6QVUHChL8tMM1;&D`i0fW
zxogOPv{mxFIb&?N#c8c{4LYf@-D$MZaavywm2iRBd($D*+;$m<0mcjD&nxPsKdA!*
zj7hX(l~g#4*Z02~|9Wv678C~7!3RIh=YLzhEYQ3nby98+v!OsyK>l%gvk`(2ev_)m
zmj9n7P?QQuFcdWNi#FY900`JWFBvij0P!@eqdnaJG=YHCiGuL?SgbOCeG9<@^3QAE
z55&)ptutJT_kWsrI+$R2L@Gue0%ZS%PM$OruSglP`3Z_Y`SaKPJSmU`buMckP5*_G
z0(2lH`w;AGkpH0n_1`685W-HT6I>z0f1$*I4}^~|O-DHYpY#JcqLTt-!Th#+SHZtf
zk|_nlBT|5VxQp>m`hgrVj{)(6SZcAtVf+_L{{O$3lwvw}RfY_f!^T%?w|6^RMd>jy
z{Pj{9dHav2Pd7>j-RW$GrVrztzDh$s!G3cf>OH`V$DItt>7K#R$SB?{F+DvUW3foF
zaWI|LEu4lpKQbnpKlpr7%Gr1b?JgSC;SmDz{vjqKqnz#f>g-!)9w^pOe0)-Jx>Ua2
zMuA=6_2%KBhT4Rfb_^>P4uaB-++M&?0r^+TA(Hk?uW$kUY^0;b=uq(yYYP3_283T5
zFM|w=frT}B6WabM?66+jGgsZRHEwx%S;A!&3E@$boPwKsOf5?9PEbMN5RdG)JoEs?
zm3$QZ^Hn5|!nCZIwD^a){+1L5iuy=v;(MGl4u?g(<`EyTQkphq;bQ~T&Opl+OE8PY
zx|lC5t;YL^=q5wg_!v&t9FiOQ(1FqG0#Z^m?iU+l49+~-wIWgyO*~QTPBCd|_*c7&
z3+pUJ$u7Gh3~AvJ`45&Ex;7Gu7He`(Sy@?n8dPx;J3Z;F{Kd1DITUl+!fkC_v39J1
zs>eBxK412yvYXq;!+#6uTRQK=L>xA!<J4dtB_&dPF8iSS%OkVFYJ0%iKzv)m$PgPF
zYtrYRc)!H90}gnqlsW*-&nP&|9(-X4y%U|cW1f?@m76<DesJ*RT<)i**7b||)uHID
zi%TCsb;v`(XlQ7P4!2S{28a6<?&2wzmX>6-Jh*5h;inCu-LmI1!@A_sindu<*`vTC
zYMEkS-n-Il?WrfSu)aA7EKd1=c)XUN766fuPdWHo6EdKIna!2Z&`n`}h?hU%au0F8
zNoTR~;krKsC!vRcf|}UGwaWSW^(&eKv(=(N#>hh~8X8)Gdj0V<{<;IKQ2#HbX9hg0
zD(`(CUHLQfG;nKRU0vLw0|Nsc)ebMd_ZX<v>Z0f7y`?51TCDxX$N#Nxcw!eF18+K3
zsyj7ngG{>caSYpCnjh+IDN>Ek07b&?oS|nFN9kIf87)5BTgldD2gQW!aDx1mhZ}jN
zYeQQHhi^Z9q2yAmv)y_N8$Q+8i03qsO3Sm=S&4T+A&w_gUnh+b^;9XE?H=9<#I0#y
ztqb}a^nnG$J034cyDgklXLe-Xzn#x#cKB+XPh+**B-v=%&q(H2yF1;6NW1$`XqG^e
zI~h`Yus4Z`q{sSEcN)e~+nBHYr8Z=FW%<q|qSaOuXSy6Yjm=%i2K6Q~<3&ZP@i0TJ
z8_d_b=Cf|Lg9>@r8?IO+VZo_c{ANXhwWo7-|9W#?eyGdrr@-)N<~3{^0?`cu&ku7Y
z%9iAE<4Z#^z2P`Qyxx+cB^+%JCKPri!esjT6x5vjoDTb|jp&HGOX9Vm%)gcI5?N$i
zoM5qXsT_I|iwRojnAGLa8240NzlfNqD50k#Yb*x3UG%%h2k?EB)#zxnI2E1223tTS
z)~d?`wfwa=_=BjH$nO)j^&V)TzNE?&A;C_^n)x!3*wFQFK^9V-*KQsiNnW>{#tBy3
zDh__vDibE)E)41CQ<HNwf^w6^ib^T|(0IDe&P*G@!Lh=6%x81aKV)7;OT;T>NyBR0
ztd*|pA4-h%0gSbmFLayG{!jp+bg9MvJD>WvAQnM<xmqz+@8ru}H@uivB!M*e!?n`W
z!J5ajJ|xLS1ciw>)-92F5O?8M$;q<T2a}yucdFzDy9aNKuCq6@7OP_ER9PB7T!}1i
z@9y9FN6A;3(w&^_^o2evU2a%;lArPVfx2NKbdzl6uf623Tc+i8dw)6;l9xvX<Zy<C
zUVh+yrl+rtWg$ER5L<QyC#r0#iGV)09WLz;(tWJz58EJYXl|Axv>P29U3dIMPRo+v
zaeK#X*n^6Pk#o=GcHGiLTQAuh+?~vyc*1HO$+5grV3r?lpDL-n)xs~J?#O-?PYCe-
z<txmyfWmqtCMOpe(dli9JWDyq^YOj&gg#tsjOmq5%xufYrfGQVWiu-;EgzB2xmPXC
zom*=*mk1-Woa>)KE3<=^y<6(Es<;*>&2`2?LPnM{`17|}?_dL}j@gADVw{9B@@0sN
zm$T;cCHTo)4>x;->5id6<L%P4`ztHPoYtrPvWpmvT?$f2-6KDf>E6#|Jwni~=1ZsN
zq&FSF*BZZ*n6hd~-}bzszB-tRX|fNI2{oaZDiVZmvV1gFTwWMR!oHLp1k=^uWHKyr
z+4*WBmJ<nfeyN$heseIBo!Gw9=qErz6omO5aqg?U#nt|zf1CC_`x`h!JPpc>>vt>y
zt9Syo+m|UbS3~9`r!(s$sh*J<WkHDUuJ*ZgrCo6{XB(5;3Kd<P4`Emcu1HIcM}z}&
z&9(@-%n_F6umF>x@U)OnywGCb_s}&hz7I1#VjfRVXd#AXp}M~J@>3w5YIU}yA*_V)
zgbP$nI0sSt{LAlL9S*)@K?$90id@>Lje+&orMbmk`NU${7;I0cV4$P2d#G1Nud`}F
z`a$@kS-l<wohb-`{+ErLwHZ7P4vs?p!0`QM!4edMpDzz5?GuTW`gd;Zfmzwv3XP&M
zW%;t%VQZzxoaZnWYi()%7WzN7ySpJ`$j`cCs>z9n_-0&=@340>A~;Q_N<KQj9@+wG
zpo?T0%5Y!E;GOJf5eZpA_VRH;o!GD5RMd>wQkGkRt%BV*o@lY|Cy!Tiztrc}OwCUf
z;$Fn=?2C+d!y`k=b8rZ~IIxSg<Kx?lg#HZhM5rGOe$w(n=a%+xzZ5M~94^%IrXP!o
zNs5zsGCj=6^~PyZvsDJS$9J1%!9x2C4~{BHA0e8jMUHN@8JuNCLZVetp?o6__Vf$W
zRrZcC_ph*B5yBE6TA(D16hgu+>9wQZwueOmSJ8+{h)-q3;@?5)CD2n#zovL%GFzM`
zCK73bNWkC~(m;nh4_iJ@jA#rDR-p_+nK%fEeDBcHs*ej@INbO}RZ0;JOASEnS!auK
z6YTS$lDvlg7UGwm2y}q4qoY+|=JTLv^*XYVxraS3jwENn`?9k44i~C1aBz(8X-+S0
zK1nJG?4w{UMpS?JMocXfh4)aol@{-l%qYL6sJG<>@!P$4JrB7ToinaHnR%MHd<(Q|
zlQCwh9b&e&(@)GlIbf4j(nQe#Ig*loDD`mEE^e+AH?XRY57jIH>6=znz&P2FaMVFu
zN5mqdg-vN%=z;fY>GurHH!UpNJUE{kp5hB@%+@^6nEe}WtM_M0tIrA}rm+*?+|f{Z
zJo<xW05quE?t4QaFj>;chCUwY_Xqd-jmVBoUQxEk9SE0&ry)V_U9!%M@vaQ5fBQo~
z_qIEkCxaNt$7QiWmvhB=YD5f>V0L$>Ea-*`MWfN6Q$!T+s)qIfiaIwp7fk>n42tX3
z$H=q?Yr>S<gS5ef*bm{6Y-VCfqPDGd8T_t_l|z@mG3^)@oe^s<+XENb;XNBo%A?Y(
zwW|3xHBD26p+EPa{EeAfPN*9npPpQB8cvP>)x-u_fng}hOzk61^pBvbc_-aa&^HOR
z@F>iZEximim}avS^{_UIB0q2tV#;yL%YwJM>c!)$n!8CbFL+pjioGC2V{2|YbXS{f
zu?NDjqq|$X)X*w<e3U}2d`X$`3~wMVh?NkxMFr4<FHnX$ahGagl@mzv1eBB<=|T}M
zTv?!h$$~Ks#3uWXd=l=WfgtrRd1-Eodm7ZC>iX5x;$;jEwR7|p`wI+HEWDD@gvVQO
z#5ZiQi***_2eW02jr1b?prAq@SntxmytF#)wIXvF$gYIOKk6Lj>qd4_y+%lxMnFfh
zK()=d^(~Bwoke8r7Znwj#zytEqDqdH^0g{S&fGaZ>Omjoac-|BhrNPz)RLtd#m2WR
z);jHyQ9T(UyGzQIFt@@ZP^*UD?D~)}`rBUa6`Xr=fBuMizfaLtTwMKZTd5DrGVlAK
z-F1w)cIM-O(yZOD_vNMyd~?YUoHv<zxhJb5jkW(6wG6N3V~wHRB3h$7^=g_bip}~w
zye=L)&oZ`$dRw$Ul6~&`zVJe?P)+BObupXp`gWjxLv+}mPai!SMMg{E*^Ev<3_x*T
zCoWZMmp#HEEPJ!$bfO#86~*V{8xpoO84QDi7V#4sNn@eiiMF=cr`tZ#CFsGwK}jUK
z(J{n$%!26?<5aU7^Q!3gc_+9NJVL#$>lL>dhlMLXeN&pl-5$JPZ^Dg)72@t(zR4^C
z4>{>#%XY(%dtS;;0_C!$%mzt3W}&!F++UFe&k8z<lb_wrS5SAWM2@8Us}pT=nK{W+
zfi<dowH|Jk-Ze9)RTu0L*K=4y)y%b4UhP8B7*YnqeTMt%6hYI2zCHQ;UD^$tU+!=w
z9?*-71xE{+rUo@DL#$G{G^l=w|JIwoiHV<UROERt@g=y(g!c_4V7(!#%NewF07FOC
z2XioMUT%N5GudFNE4xpMd=A`>urua>X-CkO<Ae<We`b>%pl&Lpiqt<3bUzi<-@Rk`
z6020Al|Lx<g5LX;QdU}JnZ*W-`pM3J(Vf>(XM7pQKp9+=K4H!IaI(FHxK<})qVwsY
zApf~)M31UEGJ$x($cEgCk%FD)D-K5_)9H2O0h5L7T+R_}ws2xPT;VYNsvOH=ojE3j
z=wkYp9(q0>Nmp0b0y@l!p!a+}q!2+%J<i9U8T%~fTVK42KFkGNIQy`s3%r8|%xXw#
zlr^{n2?h`&f9e#qTHOD>9!fkSD3JC8@i&J?VevS09+zmbEV=>{9#`?$%nQ)a3^E_C
zk8{~innK@suEQp?e-1Y}<PSv5o}X7?L&yHSczk!wew;a!P(3q>tj4==$6JEkE!X+w
zhNKkXmr4PF_zH1Y&?j)jOO-f}^9w04@2+FlfVJH1hnGVIH)Rj@_cPB>S$*!ICXCRB
z>PPn!r(kA|a1v@LscVX+rnnNl9~^BPCh|j9XToSF-SYFL8g8ZR_&L<WP00-5GMNz-
zB^oXjo(Fu>J;8zMf|80#jt+m2GW6iL7aEr06$E<TN(km>zGqHtD9)p|nyjjKBO)V2
zj8b3$_Wb_ytYgA1GDML-2o+ip<omakkYEI~x06@_3xGcIX4-kQ7wD75Y~EF93Ak52
zy@dxwg{tXj%N<c&2HW!g%R<lrO)zCIe6B?z2v(qj-G#@UK4k5BBH}$Y-hmPEF6J)|
z{|7Y5WP3#zkV1^XA$U3{L4#NRGBp3eYR0W$RMx6Xe-5L50{s`<1EqizIA0Mgaq_>k
zdiU}Gfe-zLp~Uz90#PWS18vz11lq`dLsh>IoIU{PvC}OZ4x|3}dVejvC>RL-n1Tfx
z{Vy)WlSv1}cgAs!>9=A21&Nsv04|8pTj1009r>@{aU2*HrT|gB@IRl{i34b9BhD`n
zIlPIM(jbIZy<p~}s;kjiS#>F9yeuj6<aohu=d^is$dUe-PR0$w*4DOPhrFZ}X#yQ4
zRx~q6V40GV(tx+Kad?s(1Pn0>L<9Hjx@J%6-y~#uqj&|4^H>^yrv^-j<$+2e$b)&?
zzM@q~BIICyjQ(qHdSE+d@>q~l8DIJTc50<p<9BHO_js=sAq1#u6i@+0{|1EV6TPx{
z#bWp$BJrEWB0xrAf@ZP(%f>PMe>G)CWyqB*{(o)wKBxEcvWA$Lgu(^_0vr)G&>0E4
zTW++|;P%GDPwVfQ@n5VpvntY7P!JFf$IHw5PDDxGpRc6*bMxT9tVv4~nm(Z0?*e1I
zhN9N|jhg027XB|k^&?R9Fogo({%flR0Pi`|9L*zgT3R?5&3BAH@6UMxTwL4|+}^S~
zndfUKJZBBEv$0MzpSbfJA0O{?a6KcmGCGA9mIe~IeEs5f!<42x=gk!Gtt((c(`ilp
zkJ%cS6mZ^9{we75Xx`bv$Us<z6A_<_uXR)9oH9B!Elsiq{`_L^_DnzTqSfs>F?_3|
zbK={)i$j{R{^{vyNg3$`((8^WgaB0pr9WcapWAKj&!c8aS*xQAA}vkJxcMUzC4?JY
zIrpd4YC}|$(+RJ?zkiLx5LT##;pfj&PHP_gKz&MR;|YUkAy~iWLdIx@B@ui`dNv?T
zASXV0adVT;Sgb6IT2JqI$YQ!whfl5YG2?t5|2=uZo0Xdm@S^b9U=^O>j2nuhwe|=g
z#I<{mOFA{K+cjgj_jybEgMwQj$4Q>IH-p7JwQ0%v>e(v0Rkc~bhcG-=v9OVmm9X^G
zD~6}@3+bBAH#E_7&F5EK?hg~wCQ}2Q-;4xMEoff-=YL0!w}=5}DBZ2R;<g$SIIwD(
zM|LmXPo@)TNm0C_qQT~8I{8{eR3d|)i~T>RyGBn=PS#LjU^>L6dtSduzSv%h?YvrF
zU!NXQ@Iq#|fu%l~F2uP%^}X5KQr4QO+65wtdHSliw2xoB(L`M@4@F;6Ufu{=wo;m>
z?liy=0r7@2vI5DJI^v_?%nHvnt(gGkW~ayN1340|`K2X!oIa<ZVAjG>!~n1+i|wPl
zHtS!<^(|-vlQHor>>tN?8~_Uu$dJFe8Cvr=wl*Uko&p)DU|NQj!9xYp-AcH<DavMh
z8DyHT{qj6r>gFV$vQ#ffiAo3ncyZnCqTjFWXp@Kf0c(dAYiz(-=e6A@Uv4}(L<l?{
zDO_CMP?LWD-nAFwa<K<AiV8=fk^LnlRPswzKRnO2l#N#(A&Vp%Pp720CmX9j#{~iA
zGCY5h+&_kv?=BvY7P)fMs%Djt37kf5?(T{pb3T%DK5xoX%H(X`owXQoJ|S>k4OdSW
z+I_Ctp$qW`M|+jXM077fA6C@VKQ#>l4%p|h-l+lfKJj6)?M>M8)61Og5%t&xCAENv
z2wKE<^wYN(o?CE+s(>wM1U!L**%CTMNf8m5zNDn2%f;gI0{u#)NDLsH>u@|Nh#%@a
zUaf3ZTai#1G{YB&gdf)<kWy!%_@>ep1(Z*mzroWcCX)CV+NzaR7&02eTOgY1d1owx
z4Em5yce!vKp_zYkbF<*!{5k@fVB5p3@M1Krd3<kPrOEjx*ox=L%AwH2*8m%i;L45O
z4<F#=N$_5eYX>G!y`D;g{-KmIdC?;M&v?V%1L#oM?00kY!21R4TzK&@9RxJ(Y#e2m
zDB`ib8mNr<e75xf%`EnZ^TE$*ZOhZcx#9`al~k)M8Y|>v%z@Nct_A*$5c<>Umu^*&
zI`0B`O7Mv>H?=X58N|T`=6q<1^s)6(M9ALx8r1?U#NY6HdoR{U$XtvL4l1b2i{V$Q
zz*w!QAt@%)JG`wmTT7oU(~^Wneg{D1^|<w*vsi5rZB!6(A%0bN<LF+Infc!Ozj3u+
zzur*%KUC~v7uPG*Z_<0xOT;U92hhzxDbUAjOd5Bn`1q`?D{T2AS)ikvoDQU_BIoie
zDn4!*jdKz4L4Lv@<S9X{6Ba7s3Ak>t^CLDX&oX)6EVRsESOgc+;IYD{sJRG>04LW+
zWX|#2O;yWjC?-Z<s!}J>Na^enw|p!o5NOqYmrRW&HI?SH#{Y7E;~9J4->oUa;+a0l
zn(h}7AuSjfbPiO`h^atJ59Q%Y$NBf#jlV(=XX>b_QTBa;sn}fvNTlMWDI7vjsIUGA
zMbqU;9}nGo$?$wE8%O%t02__q4|PRh)#`fl?F8Gik57<+lk-3n2-xkOe&gSF&G2}V
z*t&$izrX)-u>n;3_haoZf}Jf7U80T?kqoBO#&F11lHT6Dl(!qe$X%p$-cWBWeT9<g
zyPsJZHEG`N5(lnlyi~<QV1v$AeW!rdmLWgl;3PmNPSmSn?nnhWj2#aC@f!yJWmkDR
zwqg5Y9AU}HZNS3`LhEj$&E$miU}KpFraVN^G-RVwg$3+o`qV%KE14p_zM?hAK)@~R
z%L+hLiZwX&S`gF0*5uS17_YAg7@D~o8xCv2=isBFGob4J$n0dWe1sse=D1kC5R-{)
zfNOR<QXu-C*~!0aRHri@-NtEhK!D6yvTtC=)0f-+Sh7xXdv`aH9q}w*TR782_Iiko
zUmfJ`^Ovn@)1TE^C?Z<*1zKOheScx!zr`k*2nfn*%1h3vHLt&uG5#3o6hk^w_mSD!
zZL+MJ4``yu>97~D<n(wOE^5!!)Hf>)g^=2bjeK*N#O-|$wl}p%;DCOvQXv<mFOMdw
zml?lilyLi>RyfRuN3sFBUvF)0ZjO>0m}<s+-)Ra8kDa>U%J&=2mB9iUZ$ng5p1Fid
zf{ZVFL4_HKl}Tg+pT-iZ&grGq(i2BC*=?fl4F5|Py&h%|7zUYFZ)rEImVp`-)&N=0
zjL$~{{S#|zB7n<&&}qDcw-ix)Za8H9fAejbpr}B<(#z7wC65Tq%SbYlmNp(z(&gYi
zU2BZKC=pT6$qMAE?*g#kqZIK-ehurdOv#`2`7I4_;fOb@YN<&^7Jv*Qu>Sl*b}BB%
zISo5W*iIfQ43GOgvcYxoHa+*unW)~{Ix0s$iNEFkuU+tl5(Qb}X6j!ub&=bK_msql
zl!onpuLMnm7bNJ@(mlf)S{Rv>R7i!9Q_@mnu$mViA^pE&1c-uQ!6II?#hWP+ff;9c
z!NAy39V47m%+=_#VuwO7Gc(t^M{eJPpnlUxl!f`F{4(QVH>*)RZjBj2e;SR6-!@a1
z7{Z^QUzTj4eq;Y@24fYVzsXSYp!#jW_`A0P+7LJ@6hjoxdCftxBA<{@KogCRk4B8L
zLq6W>$!!_CCD8a8G~EC*0gIP=Gb@7ri|FshIG!+$R%?p~Hx{Z4;ae}iUy$720DTc&
z-@tLi7&3Wd<AS|=r!{wRcx<Xn%ax`nT)UkjH-n}i@ZW1FhOnjCk=Yzw!D`QEns9tO
zo{xRCzdB>;u2G;30fzv&x$Bita&=Iq!@viEJac-INr(P1W*_%cNH4R~-3FPS7Yrm3
zTEBP+N)7RyiHXU6?$Ic~kVd<$<k{Nvs`h;5ieeTu`uyUesCYoE{=FTi^AE2g+GBi0
z(KmPvlX7Sin>TA7xo#(Ip-dLb1tI<J3$1nuY*M14bqa_szvWyBhQ(Tf;4T~v2`<ac
zDudTE#qraM!;*b6i{;n*^rhMpFWaqZIsApIuN{qk#AqMTfzhEfL^tI8!a^e#BCI~B
zw;BnEOTCiKT=^&iA&&r<>To)zTYNIJl~nuVdFVZ;<CG-xL@+wp?&ICX=GInj32IJw
z5NtGY8J`0gD($ACc64Ycy!+!ozL@pdPp{aSxL1&AgG?e*JV9=6E?0cPp_^Q;h3>&2
zBq%78=lSfx^W_eCYiBF!Q^Yqex<VQ#W9V0jFirO21mbe+tc3}en2S}c{y>nIuF@v9
z&pTk{_Q7Z;{i){W2X8pM0YF(9`>!;VaOLOG@kK=S0`;A6;_tpH1ukwblbIgwCb;VC
zIaMrFo+-`tUo(L?L{VYR+0Div<G~)EZ3tV!xxO$$c4kN3<q*M#ei`G;6jCjHv?Jy6
zHGyDJ?A`bjD?nwxdYx%$p`}PQAeljz>iPN8fD(1G{No)&5cj?|=ITB;s8ii2qUCHX
zc+_0RTFI3+eD8PzF!(jrxLIOQAE5?jQx<Apy(^$i=V^bs#!cgLSA&H$n=8vbC~FRP
ztW<4RA!Rv>pexJ|hCQbM<5!G^!6b0M1%1taf`R)QpNBCg`@xwgdo+wZT%wCfNaQRT
zJ%@!03Qv&{cnZ|7+2q^0&9{3JxVJmg_4M{m3a;i=IUF!C80?}n?QK(-4qtGm<S#aC
zCz}<%c!9>Iq!ix|4UJ^4x<8E1S8hzFwmq)Hi|KR{XYoV4!l-!^0}<VlDNJ&5a%fkF
z3!y?^@e0e*ei9_E(LRUIma7Z9w9I4c{-|qz3WGv?TXLKDw!-$b-18+67%=6Rjc&RE
zO)zPxR;yTTt;drqW4$~bU5)z#Q!Vw**CnGOf|%S9Wpu|)ttYGJ&zEx{m_?)1^`k!s
z3KI6@21)k2xV`$mz7ZdKevGNJS`yOl3wtl!7I@P3gmr<OGq;wQy?sBDRle8p{1h7*
znRzU3^{mVJ6t7M}OzhW9ztQTnMhNW&y}z0beY8-W!gQM0Be>z+{^Gk>jY4$63WOtz
z*d6W}k{R|~uewxw>tg+j7&(+nk3hkp&s)<99g!-1;1^yGlMDseHXYjNx!&dU-ls?R
z?SgK9O}Cq=(bk9luCBE2eBf~%6_yuD=a;9MK3~AMPMvzgIUiyTeQPj1k2y+Js-<9&
z(p1b@JkBwWxb6MeYORFdrN6uE8fz~k+tGt1B<fYAdAT4M+N(2Rjw%lQlorCypCC8Y
zzc!`}`-bk(9k;`iee2<JDZ@i?txuO)UG93zoGl@;f4$2#*|w`&Y^0S?(bmZ+``Y3=
z?quvo>{ks{;R3Wk=FeD4=3vQQnUHd^1hjg|jK<>t!zk+@?8{^p>&T4p%f0uZN0l{+
z*au~0W&0*x)2KJ#sxl!BG7JBg^32-@Mmm=ZEz*)ZwtzCo1C?<RNy*$&JbfPV_3H`?
zbz;t!!)mqo`&gzelF%R6TCPdq?^v@+sJr*GfboQBREyr7ts>L2IY-!A#^kE%YDp!~
z5g*^s+I-EJXTxvQ6v;hbh2ObWsIa06Xu1A`Yy$co_H!#v*v&?J0$A5-(UqcUVYtlX
zgt~p#M^t{x67*82Xa>48e0-`Gn5aAg-vXb{kkdbBnQ9%!1c9lsIZ`DHeZ>)tQm-$n
zd;h-PG$A$<FiYmN<`PIDjg(WmH55-VvAJ}DRb3F1=?C6e=Xmt?PDZpuP0Q`7eX;O9
zwu!*~6!eba>{};)z_@+{hs4fk+NZdvgZ8JU*d;CT(6%S3C)`h(-JrjM<0zixr0UBv
zA6oGmddp4nIwbO(R%oOsW@xQc))jJqwo$QHITr2DN8jmSe?w6V^}q=r&^mLL5b9~b
z%NFs><POJrwsx#j_g1A^x4NnB^9wHt(dGWEKh)(>>3O&SLH-q$g!xiqV3X5PiJzZ7
znZ9wRwiTKze+i(;@i4O+?(Tv5NyIZcCw&@wh*4XcATIE)lr~BMEkqex_gn(1E*_&8
zj{pcNdbgikdQN_|iIKB&gX=!^EKG6-z;F`?DS759m8unz9VgIe%1K`u+LV(NY9|pN
z(Q2GF7Vekir|0!>KNetJ=Sgs(go3!3h?Za-x9w=bZP0l><(~C@3k)QCs=8FZH=8ki
z%VwTPnLMJ8@l$`ZKz9GjP1%ZR6t(nSEr#2EEE?))cTbWAyg_BL^!8Jze|IXgQ8Cdv
zHuKI%{qBKP+qdT@=z<pD$qra=XbmBywX%xwiit_dE^2OSOio7CG8|Ec3x)X>3?rW>
zl}q4xuL>DF{T65+l>_hV48!$~=!}MO40AK%o^GdHYHY9Gy53F*E5-+*t!Gol!>C1f
zq@1+faB<$xbJtRB(ca!4GOP5v48&r0Ez?%?1d$SP+>Y}XSrmQ{ea25?@mN-P2mR~Z
z<3ni7!({?9I;QWIC0aGgZa-;@N#=9ZF`>{ArU{<Ws&c5@j@(>!O|Hesq<4QWcx+7|
z*7N4NyJwIk^4Z*bd1qu~L@@;Bj?x!?v{Xgn0}s><a@I0{#<QErfkc%V4UABT^EABP
zGAude$=-eoQ#>LSJWfZxt+a6NVy-i&zry&dU?2>$KebZuv$9`LA^OpJZ>heVUJzUU
z#b_j%qSz1UpG=IVu}g9VRiT`$wl+68jxf&2%#~@*Tu10_x5s4|E0YYwJn!z3&-f*_
zM!e-z!{@&2fB%^CrP)Nc{DdFE_pT+>n@Wphz!Iv8IyZ4>i0EoM9DlHfS6g^^8<-=?
zHkH=E-VAPu7Z3^ljO|}QzQNMsLPvmwm8V&EOL2@&#3AB(`Yo^!I^|m2^|G>Wx9-i-
z^jZ2!bI4I!CjF3ej9^ns2}$GU>YZU~hc;VJr{m>s$&roA4mX^GdIAvsBPq<X(-Ya|
zd1e?CmrpG(KZQw|;TvhY0+I7Eu)^?Ebx>}gfwI^8O?r&u0ncH7Icc%hs+@|Tn^Jdh
z+GIL~TGfEV{oyJ*?TfbKr<h>$^5h+l#|hyU^j=Fx{x@PLEf4Q%b>~omg}r~F*E6C#
zdgvlvg4Dr1oe67CBC>tq@+lR->Yv~qNLp#+QkXkC4m{d$i%duYrivLauEtosU^375
zNA|p-TgyK~kZbYkt(KCJ@VLY%4o$Jf%HY>~0r7~7Yf5{{=w!fZDV8-YSd{x`o8P%f
z5U?w6V0d|NjcsazaLz9%LDnOn4FPt+;C!kR5)r{n-K$<>%nR;9NCVHOy6JE@FRN&>
z(o_rgoxJl6WBZqjx<R%%?!6me>K5}xr+qpyQisj*=iX&(p}Yi<k3wYrQh7B+>vinX
zbkK1o5HQ-@*vQs+PdwWRWd98M1tEU`W%Z*)iwKwNW<?R5<>M{ACgbK_TzoQ<MG=0q
z3Wms65LJ=T2H6Q>>9+F=c(GEY^t%ugfar0Q(E#C%W{H@9$VcgQCPKqn;uo$}mmQ1R
z+qrYGhw0;XEeO;#eQJ|AO-+q~h&ztw%@~H8Fy?7Po2AHv92(80NwezDUA4Ru9l-1s
zj{_<>13G9oQAf-Mp@FrRI&3s4&_{9Uqya^#C8k4R7=olO=g62$f25As!a+DHyS*UO
zj6Lx)$3*8{+#NnfLzCAX*`}sUEQ2tO%@On<V9IQV8zy(bZa7|)R3Av`3;dmz05UtQ
zV@CV&%EACgx)yyr-MK$M2t0WqkHaBKe_)Q5YfI(B`z?}z#@M-p;$faE=^t0{#+7I&
z2R>EN4MrR{!&72_NCKURrvvTjMmy{+vzMOl{^nw)_VAJZB@n8y9lmHXve7E25=l&w
zu(0bPnIy2WDoWALXll{!rM1NHr>UtLM>WIJWWr?fZ*+@QB}MYOKaSs;`VX>e6A)~S
zqM`NiI?fqS<^<acFEoEHpH--o4vR4uWZ`=J;Z8y%@&a_=pb>FCM$%}thya5Wg-X{&
zQPejtn#Mb`T#VvDx?KVCPIbhM-E?Hc;r`}s6uj8T_-y@jgz+{NBPk_}-d|p=KRL7a
z_Ya;Kp|@@$9Cv4H1I~3acDA<LAfeQIn}sU(7I$L6tosLiR!0d)jl;=G-$mWd7E6<z
z)@G;df(<g0nfoyFnYh7qFLaAFi^rv<l%@F1sqU0+#`W+123y-e$HG2kcOn-ZKRhHa
zcj!5b_vxWRF!8;`YFi9A*LJnP52r~bt^st&l2uYx+k2^s(C$G8T;qPPww7uEvYBUK
z8Z-;RF{WXw_W)Iy7xn*=pOUB*<%IzgmQSRBP$5(#1{+@7(#;|9=<7nwsf4*QlMJ<_
zbB_==AFO%nfe3DLc<91nNF}Ob{3mqlU|&EpZBS@{3XaGmRvEofCD%CFf(g$$Ul62s
ze76PP@BxYC_XfJ`8F4ViWU@W}bq0}pzmbccdTpG3AC;x=mCCgGk<=GW_ja%)4W?V#
zgZMvy^(JD;nS@#W6(4NgU2eg<41J_lO(`F)RX))wO6;zT{1M@HefUjT%VPk8nb(Z}
zVVcEcC)t`fo^UE}jqj&<skK1gx2hZU#RyiHXi`ll>X8<U0M|w4xSmue79pQ&;xhVp
zyv2sIUr?<pSUA<};F`dKNhe2RV<UM2XE5hS%gv9N?7WWpw-!BO(LFBkbs@OJp)L!n
zr9`63XuT2dzG+}Oo^bO-wFu@sj^J@Q>r}G9Cu8y*oGOt{sO*R1(<#KQ)i|)1F4g$M
zEv!iT&<?JN+^NOaU0R|n&WD7Qg^&=1i`eQo!Ttj8fKpQ+3U-@UDB5&YVsVF>MGe8Y
zCT$UPPxj+{LtH#JZfa0rTYj<iVzk+KHb%N2Gva;)cW^4*qeagma!}fnc-!Z&3?K>t
zx}eCH-tVN7fPe~D<L^OMrxE$wY&{%^craIdUS*im?Ke)=+T$Hh+pMtc^zwAM@2M>-
zJ(<63pY15>F18G1gH8S+7}6(~n3oLPW$EJ)mx<w_11OSsN;!mktOZFAqd@xknCrSt
zX|S!k>5V!>^vmPJ%XGx7`@?l%lbQsqbhx!v5-|<wxv$D%<4c>HqSs)n+f9L;N%>lw
zS6rM4uEQ%<!Xw==GvoiR!7h($$ezP?S0_3l-m<~5Wigo7=Q8BLcRFsm$_0kgc?@5T
z?#iW)T0S&w2nl|X2Huu1l^XB3d4p+dT}eeHM~@n#xPwfS-9dr&;*sg6E^+zSuM!TT
z-H_CccBd=tYgf!i3hv1_)JaoTsR|_${A^Jt;a^sxV@Tox7^sJPj9}*}ir=@g=Z{E1
zf<t?Y0ju9-M6K)8B(c6%J@_QH4SknVuNVZQCn51Sc;H?Lmx)eH6$kKfb8~M^0t^j7
zY4eWPJpdLaS0B2vl}}bLZ_%a4ms#y3W(?>2f%$68ahddxgP7|a!E=L&mtniHiBHm;
zxma22W&|B{@B$3udZ5OZFlf#)>C;w=4YJe*J#Trt(O|m^U}3ugBgl2rI<Mc}AG1pN
z$r|Hu>G`1%ttLJ-nV?cZl4*K^ue@}C=aEVDP$t+CN%V!|3d`q7<jRB_>ZAizjLXi4
zn_~+kt%mdR_IWr$(J=Y#=ecvt8rLgIICyw@7c~OcIVfG*HTN6&<vkWQ2g(4X3#CkY
zCRDN-6(~p}P{N+aS&qGv7)Qy_sMDXq1XCZ%TS|`0XY+#KBe>6UD1KxsL1+AO(Nw|W
z>%NqjtJkTGX+TuYxb!#lw2tXCyv^>9-|?wr#sCxCXV#IG{dRA$AY<h3;>9BfGcOwv
z9O?LhujE~vBoKP!%T|5fArM1Bxo}u0<^8f-n+Qz=)Bjx^D{E2Sq%m)6k3E_L6*VWd
z<=L?>?S2T8D?T4VZ<Z!hN%c~hc%Z>>4oVb=q}AsYh_J^|6kkzipoM;8a>O6MuVGqa
zG*g<wEpIQQ`ncV86~9;~fBX3K{Gb5ncT*)#WO8>+nu_zpUFRa2g-)(eFv^9)h|G*U
zw~~2uUs3&7H1eS2t(!&u8f$p*Z~_3JAEJ0NJ<uvP)-*8feCaa+Uqpsx<+r!2k$^^z
zXP__m%EAw5^iU&vlBoo?<gwa_p!$jAvA$LXB_t42ycZps+80U38}d=*y1KJ1trATa
z87ih1-6o31bcou|I;pxp9Bd{KL1RX;!3H`Yh&|n@3NE(XJ#g6^14G3|*?vRq+%AN_
zD=}Y}<aLDBaiOx*>V)H>2pjvAPhkd2wtW?Coc6J2ktdyDh)9ELD>>evl9HA>&atFC
zKd$fd3Tosn+{?ok!r;&#Vo8C>G)k_tn>YRe0kbPV#y|Zc^cQ~mi(+2@NT?r_4ek&#
ztm>tiCA=K}Xb)P)+?;ZcWTaiIu}-O?JL^bDr<&^K92Y1me7f5+q@f9sN3I^P9QrYA
zE%&F(f28JR2wsa2ke$B8_gWuy2jGr0#-l7MFcY08LYLGO!s=A~2G0KTdle1Lp6_p2
zbY}huul{up+z8-d<vxKIg8U=d_J8#Zz^;CNt}f~y$^U{Z|3X!Nl{OS)0O8B&u?HX7
zznS?r*{#H0I-ytRbviQtSqSikkrzP1nzX#U(myiN$~Th1?i7xOJ{r^93|$)$L_Q~_
ze2-Lf4=R}=Hx!S#7T%bd>6Mk8Mcxj`U~||naa^6OkNB0ADUbxK5Gjyc+=c%$(=-Z`
z8q6-aRBw^nU#d?2=~Fh}#(bkbyZh<0+vPwXft;?cuK&K6Zt3&B;)f3!%9NYi+mmi5
zt^5QnH#CNZhKfaq3SdCWy!T&I{Y@gjliz<)?CmPfBjCpmjU4I81A<wJQlbA)2Nw)G
zIy!1<`7S*jvrZ^7B=7!RdYm5d5*z#Z(CBEH+>>&V{I3x~KS2Cg)PY2(`m^ZZEtEG4
z7AjJ85DE^40H@oPtn{UmWrTtrU;8t7|I}3RGWy8aSiPE3cd()7vnV#LmW*LCBYa-r
zRGz#*AW|ON+1Y2~=N4&`muL4wt)D`3Yaf#WkZ{Y&urV<w2HTa!lV^&_85!e}p`a#f
z_UdJBjyWZ+uAp(5%>k9xBBG+CO4tRO&DTJf;wG}bzP=6T7X+WV2-`vQZ80i~_m2(t
zzUS-E5U8lHC!?jM1*#zwRN7_3vy6lU<*lEVp<i>Px$hEl+DW;%V*7mfC5A<T#YRkq
z1{x08EcT}WK_ScB!$WhiZD&MyZfzd7o5P>qFeYBMJ%wJ8H~*keVmj1OJB@&wRhJYb
z0xku;FO#F#@Ys<s=)Alm(|Fe>OX4r?TO{;22qc5=fn_%!5JkW*dHnWsg6sYi=Y2%)
z>a(*RDpUc1@#ySq@P+DPFK_HaD1PsF&AqX&U+rygPBU>y*F?(Om{PPdI0I{*1u({=
zH(PJdKQLH5gTWzM<W_m!?+LRxU6+Kc{3FGC08H`95z+VtVMOOV`XY1lS+zdVI2_ET
zfwR^r5cxF){X#4X2*Io^3J5EVvHq0GW0)Ww>&<?`^NX7uO)R$P!&v}3sYufoR&`Y(
zjEWf^ZAXiOT_mJ<BSyz%XP{NdcQ?m81!i-{gE#sV=~Q>cHNdG6-_TDJ1A>;i)U8Hk
zXCVd#uoY1&B@($k)2re|BqS7EKF{w1$jF4v_}uF(SA^Wfe)RRdJkhR7eownc#u14j
z)szN)A<{Fr4)KeDDX$D94Y~d=2Bz|`slx=xpuAg6)`WJHRWc$4R#XC$g?KJI0U{2i
z(reGakWBqsB^xWNDpmVt9{~&3cY^(7?oe!C$g0fFn20^=LnGE!9ZKhwT~m0}4dC;M
zrNh7}aDRZYwQ<-oOENc<;b7uVDAU}_Rel~i!%&)1TJ`7CAek-I<WFI;%&cE?FXyu%
z814(Q`{n$H0#{iD^YhP|8m|#lYa1Iy{rFpmbv|nf692=)qmWRTHcWKXoX#)d`G87z
z;(;vf=#*w$d`?>d{56}o6^1XjFqkhoH)Uy*(l2#U*!RqmNn&MGC?(qUQku~q;b<^&
z(eFdyBDm?qRdGa6dN7CLW%EbVSj+g&KtfWOEflVVBi@KR*=C@n{M^FUma#-6lTNRB
zn<?wy^Ly8cfO#rKh@kyH_1sm2SK@sjgH<ODR3D2aPXU})gZ>gzIHL~0Fjxi_mDh;E
z8zsZ-dQT7i9ld?Qo`$1l!|*I95T8@%VMLjOa*yr^f6-O;(^;MPxjBHoKUpA~9k(T*
zqk}?1LNfU)x9WP8$LZ!+%tWeTS85wE?gw8;3>Mri%EHJk1gX(tPth}-v3;F+g5CGJ
zESWTjkQc+^(fA3h|FTZggx<gaSMCCfdS>c=w;+3Se|xZ*5rH^EECgmYk7!AFm0mvp
z?hE-W9QT)Y6;%uomtb9MQkqc(#dVUP#LQqAaA?Fl8(_6?(-_B13mQhwC{3MF<k)NW
zX~et}aD|75FA0h#sDZ=i`W5(jd)uLOwB~z(nueE?7nx?cM7G}u<TMB<`##--af~8(
zSoT0NNo0$q?1-b+?BCilGaS~y&`{Y0q6$B&<?;-+Xt}^2s#}kT3X*tU*8~*VkZNyl
z&y?d`%apH6v@>)go`$TWH+d<3A(@5f7f7JjL+!33eBo%L^#sAev0OY|0Q|sHu_$5?
zAfpV_%reTG6SRNug{Kt7`iI54EyXEOth3eC9{o2e`|`c(>LH4L4Tk;29HNVq(ivMO
z@P@DFC$r^s1T8so=zp=F03KjDM8xk@_CJ0zmtX5zaWUck<@-?(7=RGiGa`d4SQVsw
zdgmx93ky4j4GKvL4kgr|H8H@Q9p?d7F&k$xV@*+Vd-GwT$yHfwwDZZ2eX;e6lzC1G
zjs8<Af%h{~9ZX8nGh7x7Fkn5f^Mmpp#xOl6xTAln0^q%A28bT<G?(3_3NmazSSv^Q
z;V^=j7>n>-W8)U3wo(eFMgF_2uE@W7WeUM!;J}&IxHBMu#gPD(+=;w-^htnjPp|6^
z-N`z{;GLlLo*dlKQgzyBI;*5_Kv-UEsOU8CTdcvxRLM7Q_ApRTL;{fxzfob~HC-Qy
zC#5E&*d;+By~*8YWn+tusfGuBI6dLt4RL;Xp7$wVe>Z@l9+Lq1??q#H+rf%r;9-bJ
zJ>rKzfL;0X@bZGXI6F@#{M5k%$Q(eNVmHo4Wp~|+WVX0gm6sFLTFiO>KeoOCD2%1)
z7T4hJ?v~*0?!g^`OMu`I+#x{F;2PWs?i$?P-Q9xQTkgHN^1rWYE4398c6PR>=XCe!
zGaeouG-Ow(1g7Kdlgoh~o*w2M>KS8gW-XF*FB-!B65;s{W`;DO-F}!^AGS6&gwN@*
ztHbtWy&oS5BCs70aBkrX3M!(UtruluNyw*qy)m)T{xBi{<Bk=HIeZbw5QOs2A`FKT
z0Rbg-;oyJ+s%iKH1U}#pxD2lbA1yLWGEe#kv(|3z%4R4?7`Ap#XWb5HDv2r2C*zva
zjwh*fK!}Ss$^7+k6N%^!G%npabYen@hQ660G=>2a4nxZ8#BE7m%rcYy-{$K{u_j<|
z>Pdjx0|}OkS};eOH<kAZ1>$3(j|oHjL4Xz%XKa(qK5ey5g1V0jiOCjv3{MkleeJ~-
zyLOSYn0a46)Ay+%umKLi(JHv6FIYfIRst4wx6ooTZ>rM797CI~sS!pr7>R%s8XEdw
zs)1#GQRI#$1y}kN?*6{!Pyw%4>sa@82A51R{_EO?v4qXY^}v05cfTGig!`ttlF$dQ
z+@7t&neYYn<KbiEyC14u6qsl+lb2Gp-#=2*yn7e@+L>lK{vDF<cC1TPPw^Gl#1MI9
z9xv97KOsG)El7yQ!B3A6Ebb>{c;|iS3Z7iPS<)`!R;7tcNRT*fc|gRdTpZvzZIx*C
z@=~=xbo$4iysq07fT5sxY6A<ULIqJm4VzweJvFr$3eJn+UG%tmdYW0XL{IxkI`<JD
z9K)`nXX(hJG4;LRGs#I@*U6g^!mrJ)l#QwBz1qS6!L^tSV+&`n@eX5RnD0fzzmuwP
z|4Udv4m>?2YaB2Z8Q9&?Vh!YJw)|Ksg|Y51ESijr`vi`Lrl#WWBOg(e@cQTHlk((K
z<N+(EWf!;p70Umg<(T=}q5X<>i&s!9a>!gOLXbDq?ay%>?3gI>DaOFN1lC-k_Z`;_
znR9dVW3%(oD9|YtqpV;g)_-hb!vq3OUC53mzrbksq`6{f`@*8RNdyYv=v|E0l0X+Z
zISe)m17qH-wkQVfT$Vrdw6a@aTxzOpdGjOcaH1XFD_QFLXkJccUU;oDFl=k*L>!G$
zHWQ$IRm~Vm6c!d%?;Vy?AMCwHEK==Lxb)m#uqw|6N{<tdqdV_aRN`=Z)%EFBtV08R
z8xGrjpC0y8#PpScBCON?!Z(-UKDG$Hgt}vogi>-H9UY6Qz44+{7=+Q5Gt%QwFZ1c&
zS^!Hw{GT5;UDy~4k?~PwC-W5YGc!$p0o2PMHIgKJw`(F>yQibu&zZ|jF7HoQJog$y
z(WX70_WY4vtKV%en?gWnF5cZvZA=Fz)lcu`@ieWDPC!sP($%Ro{!80TQ9~n<yZ6uL
zh5u#11{OpHR_~CHj*j}*5+t*-vYI2Z;h6}-B!%(O2dLWSzNd|rdtBW4bY?Xk_SoYz
z^gB{s3I4d-!bC6ZcKjiW$H(P)&$_*fS4#Ku=ZlK$8-P)&yfstGdOE2fTh%zUXzKMa
z%n_HAB*wAgh}Lp`Z{?U?iVbi?`!leP0GPk$eJMcZHqhq1%CF34m-49sxqvz7!R?`x
zLv9<9ka|QTVtb0lgrUNARZn#UNOO{s)lEFQT~4`4UhX*hiiIS`Qdx`~&9eeED(Vwi
zeA{!kq_5%xxxV1g<3*};G*=T8ucSV?`W;+uuOn;%9?a4n8Xm`xL=r~CPQjninhN|M
zHb~O&O|rIfvC{Lg^t}SLYAkc_yZ_IG!TD}nFVr$yhND4P`uZHz5_kIWFF%>k>kcp{
zPY?RNkAb-4@p{A#MS8)}`;;!=5^s1H>d384l#@d~$t1w=>ey8^FY7$bD)+YqMt&4}
zp-|+q<JUpCNxvL9j27=pM|DBMw`Gp#HddHdNNx`|KRMrT6qoO308GvUkGo0%nm`7u
zpVmSXYa}9jZRIWE-c3)4D>hXG7}#)ov2GdfAFg}qVP5XryeF;7M;T2ch#wQ4?t+Vm
zkdXz6ytyL*o~Y4;4&D@`o6#V&RHac*S0t}=Rk~MDB{Pd^LqEq#!9v<o55DpuD(icC
zBys|NS4mh>B|RldZ&MSK@%66Ysk?R|e+?ab<|`7gZ$okrkO~S4pHKafELI+0Xi%hk
z9*)0@(Z>4~h5xQ^{ux_Vpa8*aMKoUEhZ%fOO|=7EJkv^zieRkUnTgihN!FkB>8fI)
zZ#lb#ePgp(x-+;$`1!ri-S6W*51jOrA<Q?AE!7y&1y)B9fR|m9<BGk^iz`2=Cs1h|
zon%`uSQxuAh0Pwg=kYPM19^Q*yZxwo&=|FHEit-y1~NOgD02AYxHxoFP(gZBwM#T_
zH>bTZ-=41o5>L=?6on&NzLm18l0C+clu^dy$+dNp6Nj74!ot>?rxSYIemIyet{Xsv
zh0Us{__P3UHCpah)#Czvb&%^|aUKMnOXn)xVk@~h?Qbjk8wKg{fttE-3{|0i+w+04
zJKB#ml_46Z&&xlhrgEgvoOl7kgT+ZIN8A{>$zQlan#!R1BIY>moTJK7sa}f*g7f+t
zOYfL{r&5u#Yj(oDB*@GC;ihg!qGf_lQq0<sfy4_3ZB!$h3z=r!{iiX}`5!_P#e*Z0
zENI#jF~w@vQ&~n5ma|#e_SWVji|}8pL>5C3#j&8(;Nu3tUrwSGo=%A@-1h|*#yA$0
z_nxyri=KFEWhF=6o~*oeQ6*(E=6Wc)R(#Z$E_kt(KZ+-o5(W1c@`8v#Md#(??GIaq
zTd1~>(VW+$_1UnhTFnG9#ghwc#WakJ^4+3Q^)P0m>8fQ&Ma*se8?DtjnqiVjeqcr!
z_ZOtd)i%pLaaTZ_>12j_3C`macmY5<s5W|Vp1hi|UWh6#F0M?}07M<64HEC_7FBtJ
z1K|bKZIBE@iMNMhDZN}d&e?VCn@~X};(Y(6b%_SV*K<h{D|*AA(_r<Ge$601NsuHS
z!+u4J;VuLYj6#BK^xwMOMKj^AkS;SRPY}08o7l|@k#^G*Ru%NhytLGE`HzqA`z9%T
zdR(r*uYa^#^AanF>M_RaV|6Z$YQ^*UDwy;!lvv?p+oGAJ$zQU>S7I(VQ*N=AR=)%i
z4(?)_J=(#vt!#sg_hmzdoDuSp|1O}`IxI)G$$0{xrln|@8JiXu*)eF;*ymQNVGDTi
zHq_%T%f&z4Q8^vY$iX5?L=wK61~d{dK_$xK8ZOJ4EPnPy({gT<0VU$@<)x)5=UCJS
z!3}On9mpRs8W)>L1Jgoq&W9^$y(c}hOeqKbzWE8`-;LQKl{e@@U@C(cn8`!?l;Wws
z!)^T0IEDKTGz2E%c4zjoaCi5TQFjdG;7+&m%<>BmcP5jDIa`16c?PW`%iyeN@YzZV
zlvIR&W(Vb?DPLoL!nnc_AfZ`f{^&&917+ycZrh{q)bQN6g*D#ri)@PN7gVil#V&hT
zHtkwZj_niYmxPK4macCMxRY)YVGkz_Dd`&;5F){dn}IL-zgE@t@>V?W6<M|MLIy<?
z6_Mo{pP^Qc+p%HJRa;kzU2K()d~N9ALNI)Ha7lbofRb$w52ft)*ZzvK2!Iy>MB1R3
z+1c59N%^Kfu-6N~*y9uCqzO}CK--=hRYLJ6^2s%iknq@bAm7J1%zJirb%}J_BHIZm
zy*z_Y<$sR#hDgmxhao1F?prdJCB&y&|9QT7a6inU@ZLzB$`$-~7gNPMu%1(QJUrGQ
zc(7^V_FK9Jtz=;`;<2|d=A?c@lq|glj%>)ef(d$!*G$q)se)#ckrQ{})Y3!Y-*ZZ+
z8xslS`V+GE8*<mH&71IYcL}n?A2;JvKc!Y8^wQ*?ac*O#WipZw?57J=IWbi3dwY>k
z<n6q7E*tky7WiriX}v`r=R&qO)lh|78bVbmm|?eQ-8@H>{S#eNCoBY+kWjuV{j*j#
ztE=IR@>aLPnaTLmWDLbYBkz7&x)_vZoc?H-y|tZpy1x!LC-zH#RJzXTd==I*uT#;1
zvLQq2W_tqP=U*zjp9REA5gLfEjIE^md3qVqffUsUy1o!S&4w#9oYXNHX`H)1zRT%~
z2!Da?s@H)s7{`E<)I@r9?$vnAvM%AnY?}(QI8JN`jJ;fK8Tva&*ncI001281AA+ky
z4Ua%$D;D#go3BZGl+o7vJVsn0)7Ij`j^H){5tjS=iOiYwJYEUC^2W*s-zqZb+4Wd_
zy<b>o>5*RPUz@3?c*L=b!(CaD#YJ7m!(xSHtrLlicX1`1gQDVM^)K48a_wBXw+reK
zcC6<Y8X$&a(vSd}Yx+?N6|7>?C?*2xA;20)%=e?4L9Fzti>tn-fby?l-nkMzLOz7G
z@=Q)BA8M#(dJ3@$fI<9A5W)nlZ=jM8q~U0R8WfC8roF4HMVjC?GF3D8zTgd*lUVyj
z`B@__!abz#XF(q$2Fx&9Y7trkGT$M5hOx=%HP875H)+{3$EHRRAx&juP||O8QOyhK
z+qm&P9~yFwx1|k8%>)kZD3=&Q;O{l#DG=kPTU!~9H88Ii%HXv0oV>sI{GUF%T6sY1
zsB~2*yiE&cF9RX$%9oFc_R4LB8%6zgD;%sbPE*i^@p|jPSmA34h-3+bRHd^2(NAKj
z5^VbmxcR^iS3R`{44mKtkU!e|fiU{-OA-DxsSRfA`2GcUuXKol-Pe_F?{Xm7R}vg`
zQ83JwctZ$Ro8Twa?zaN16=yn@uc&Dxe`F>9jo6ElK>QfgSQJ^!9w6}NzGpUvdCF8p
zC=BPnarTcI{WX}(6ObE|yQ}JipIi5}_@9UWISNIt*W@-n$CRZ3#IH_YvJ|pDQ;_@S
zFS6>Q0W9>SA>aI}-_JW2aew_1j$`syOp{51Dk&qA?dRuFtc)fhuK#u3AEaIl<xi;}
zjaRiLQcPoZQ!sIqtY0utkb!R1cT->kG?H~82Rkbag}Jue))6vQuFJEfkXJ}8!y9Z2
zRlJ*H0~=_+4LFn2*VEl4_9KRl77+5m-`zbVsO9{u0W!M_O=cY3y}fjxr1bRRpU<wl
zQ1{d)xK3E!t@A>%T1!_#esZFkZ=mL;{o=wgkT0LcopL{Y|E|sJd_#;a9q4aSG*FCE
zd-G=%i~?Z$6$K!D!-E2~GpVP=525gZt1TF0$=H3VRmd$H4n_@@-#UKeEFf(&))wH3
zpY@sPoiYQpJ<A-$l7QwCaIm0g641%~f%3v^yWnW!hR-a20`m7F%v1pbBC%MYm!>8x
zg!-DVT-DyuQK{)F^(&tkPBWivg3WS`jG6!v0k5QO8(ZB^CwF)E&(GZn)IiJo@zRep
zFWq~11OoQ(lg5V?RFmT5=#&(h)0P`V91TU+%VQTA7}%ZJIx(AE0k4+`AnhuM^!U`F
z)RfTZu$m~x)xZUmHLEN=II@+X{lkE7ew7UDGoL-(-_|dXeo_@DW<H5;XM|Pb7D%fM
zPQ}MB@b4n$CLod^;CBA*AwuF-@2)hnjsI-Op-2*j%$4BKADSU=Y-}8p5=^zdi=`+p
zPZ$_flU4HQs8wM^8e#E*9flb%@-2=Hk*-UG{qMLO4SBuQ!hjeOg0*IV4CpcPYV@ww
zi3c~d0CIVx_~E#GLCh>H=Gw;OrxPlY<xe*lpKqR!<lx<ro=?g{x7yo;@b6U3-vVr#
zq4FDJD_A#!iAK2;=3uf*Zg=){@2aiX*jVMH?f0+o^*K;j8go76GqnlyIf_^O@(!$5
z;Zx35N!4qYlt|E<+_|~Q>JOVxSL9vY-4P>~Xvn9O{9Ail!iH+|RW1TR9-cmzTz`#_
zpdd7oh^rp!y|i<QDvD5$+6-sO8=^l5t$(bSZDL^T9V8@E4OVqZRw2~qT{mH>I1+jW
zqn?-6lau$++2WIj<<AKh7Z=pr+yhhcN=l@jciqAZm2PMa_4Q*{9I|;pG+TVQL3qAg
zw|aIOz$bl%EEBYN+8hfMT-0VwNM5tu=7;ga1Bm0JvynE59%NT1lf6@|_#x)RCIWZ2
zB7h22zG+7X>t=0I_kd2ltFJu1K$)RXU*KkM<anfjN4Zx@U&AlA!El_dK~InNctpc*
z#QQbs`dRB;5{W$}%zskk)PcHQyFj40f*?H-u<*xoGhOxGNvg|Ya62FMDG-NnyX*@S
z%=K1AJ>k81w8UIWeZ1Wd);XLg&3~8Cf)YL(kpYCBMN*z^-S=x~GMg2q6d&}kcK>!S
z>aajZ*DIQ&5n&>AJRJ{HQi|zc6=-){eiRh-Gg24zLuszJ0Vq9%l0Y-e{uRg0*^Nh5
zrB_ribj<b9iZv~n9lR)~`7FQRD|vpD_ljJKSdu~Phw9JEQGOAJG8pvA5CH<bV%@x>
z68ihSuABX=U?SBvo-IGVFqnyx6o=K!&EBu);BTnzdqt3<H8A#+nR_KUKmURWWJSuF
zno>#T*+rl=IM33oGA;6Yts^}x6#wcoddaD;=Tufr>J0<}MJ~iwM=Pk1d8?26gn{ob
zNJc>%4}waTRSD#$+6UAa)XIxCsb{d|f2Ss+QKK|q4`<8rs_^mO$25fek%(Mr$X4O*
zah2%77E5b#W_ZsIbZJ6D2ctVcM+H9NIjnwfux&9yeFx;)EFNklDM%q8AjY7HJcVB#
z9^o;xg+zVjKCZjoj*$QoH$0u*>8>%D^p7#0Z`id+OEg;srs_gKNBJ%RvM8V$V~%*E
znv6}#qoPwEl_LsaVSG@nJ$3t23=pJwbiIMYiPTUC!9JhiIUNsA@@BaT{sX}SEofqX
z=}=$s7(iQW48F)2h{=p4l%l@1X{)Xsz?JxRFK+Tzea@U5BKhJ3*30YJ@vNPnyIWzE
zg?U113FjxO5auCGf4}jXD|jx&(-pkbMv(?@cXyf^BdA<+xfboO<Hg7vTNIMc&Q7Tk
zL~;sp@`BN!A=zzyVycA`RJ(kI;)@t8pcce!k57rS*>WQwI5}ZU0kpa_7)x)Ek`w|w
z4SbD>-Z<N1!40vHb`sK`(5G$13nyKhsa}JnwDJKOHUO!&TEWVigb45kcEB46Z??W9
zK4E}ed@F2`WrS?xJx=z(#KcexacQDsqq|u*IF%JjCy?_zSe*UJ5Rq-)lJ&b<!Kw#_
zh(B52lF>?A8yy03F{OuwG9V*{c_zpC9Q_(mP;)?)+F&*jGy|-ET6w>pL}M{4PeOyS
zqcRDMh02=MO%08OknVLSe6F&5{T<QZG#9QEclY<nn3q8Bm{UjR;*MO(9K(8bAYFG=
z&M?s5tKO}R90r5JWt<SIuJ5L4O{3Y&I`V2$fX0#rxrUiPT|}IqrVwJ6hr8VxnZ&)v
zqBk`U({TM&cEtvh(L9ur(qnGk)?vIn;|P~!op|d{r!pI)r04`u5$)9v^dGldO6)WW
zgFgOUWn}>)rF=ugmHeGcO)#HPR}S8>%1}+Ad&>J);yc=rjvssGH7%P?XjFxP0NL3y
zD*)2X58$oJLn9ukANMH((hI=mOIl}>b=}Oc9b1*IW`trDc-;KpuK^uW9GLU;a8sBF
zWoSXXDD`~TdpgzVgtvV{JZmBg@KAYQ`!9fc6Oq>$e+$3+SDnga(T}%}-j_7rMI<mH
zh3IkhJf1Zh`|Qx2PZy+0T|a6KG@&}a=jr{U2W}4tD90w-?Ka8VDM2<k3Mim!C!?`p
zbCZ58PrlGC5Y{DLyb+HTE-kxm_@wNfJafZagU~lt`Ni|TK1gwP4YvDYNMV2l@sj&5
z%@-ggQZFs&%sLkH(QGbP+vRxbS0R(pK=r4$hFjEHH5W`Zd(TgG`ciuLtOjeumMh-_
zr6kAnS<v;I()PN~5nJ^i37~Dm^YYF3q(J4sRdgU|R`c}*4i?J=JRgQhSD3kj(>*`O
ze`)!2u?0K5G-tQ@YgoxZ5&5-6d*J)pMj(8($9x8>=@DnFyXcQj52e0ERT)7sHxpCi
zGkGO`eDeuvoe;5r`cLR*GGG!TpD*lQ8%lNEmqjm40sac$YacZ*0Kg$gMYiWGL+wB4
zGp1b<Z@%$4rjg@N%D<DZB%bEbZw1(>E9?K3Ku}EeIhsIr;f@E#%foax$Yi3J@v~@-
z_4Sf~esX&H0fSQBe9z5re@|DFoBf<jUu)aw_Jv=jn{<r%XP{6FZ~Yn2@TI9BAYwb5
zCK4J7dq9E2WYgdT<+P)lN#1g{G5Cw$wwqd8It*xBHhGXl!7+x0m8!H70oX*9O4yv{
z6_xh4$FsRb;Ti_!b_C><e&ly=;F0nH>5$;odwUX~fUkOYLAiN4*N+{!4rF)9EF@w~
z39{tR{@`_Ug8^!)8yH3(br}(@{RA%>#n|7C-1GO5J}Ys|=_2S=8w`r!PRzuT`jy$B
zsg85WK5vopy(_~(uvB&<>6qZe|H61_ey(5p{RVvdPcZv2K~OE;<gl&MG%nR6+Mli`
z%GX7NnxX$YPqWjZk_+$Ka;C65dc=6@{>j1OIU9r>6B!;L(`H5o3hs949J8~?F3o4h
zhl~Y|q%bOd^P$u`^qAPt|ED){G(@5OYyFQ-{al*iC7PvJh3K15W*H2?cqr@3Ui~b#
zR%8TDckMy?Uh>KfgP>$;S`VYN_*?l`J9F#x-$)o24-~dYW5GE@b$$KlNOq)I*HAUK
zuFj=U4$y~-ZMG!skB|N%Y*N$&z$~o{;uS6?Xqx5PnnAAur0eI#W@)+FFVcS9cJ0_%
zN_AlWkt6{8OHm|9t#=83ym@~RthtrfoujdUsJj}<FE<RXuWfM(`&>}m9{j-*On9`*
zUvur|-WtC7uL6YNt1d<qpo>AC_nr;xb5{F%dQ?u44E1Ou6r>Fe+1pD&+Piu#l|}-Y
z&4LB`_jteYJ>c2?xQgUK$`Dk|LNIZ`Kx>7^V!(@GoTa7elk;^a`B@y4&Bdm8;+*eN
z<5iCw?917wxQWv-KaMiQm#0B|uE{;*=Ii$hbOIRAn_~-q_Q?KS5CU$dFhLKC6Blqn
z??HXJDGh9_*ZN-Q1}Y^Jo1E!ukd9>Kv4s2DG8rJzYp7<ccebL?CA|Wz%{5@6^}Rsu
z&;yGT+~plCPnM&FpLmqv+vMZoocvl>t|SX*;AVQ>_tuZ`{S9;fxDh0y0!onL&qyGX
zZNh?P9&3HHelW0>-)uq0_TyT%4mO0k7FMJieiZl3cPH69IP_&VP@Nv9%ABMVR$E(<
zUmfwNSR;H(kCwL~w25;e$+&-WBp2Ac>kyo|{_FYPqB)w(mcOtnXv{@@h7;&G`OT95
z8*kN!0iqz*(c%JE$v*ND#L%^pQQa;43IeWn5`DuQCl)})!JHW#r=Vi2JtL4F^~~%8
zNzLili0jB5DZXUVuj*gL!{`|AZG<r4F=sxLgl)FxA*iEl{MBA+hfMtzJt`aAtCIa|
zleKnL_4V7nT2tR~Kf!I7wQ~FI`YbhYvP>ZDK>^aMZTzm|f}CP?B6m*t$JX|-6i!kS
zzL76=hWBl1Xjpc;sW18ja{zA(@3+iM+i5K#rJe~+V)DKH^}iID-XU`)M2U6?`EG56
zWRym%do2#&!^6P=O=DeZL1A`&f;DLE`dgL~U!bhheBkWOrD&*448=YILR%*YDKAT+
z>(*M6{jpSiZ5AMqkkFO&YpT+6hY7SSh=--?aDRQXIZEHZ8V~`dPc0W{cw-03Cl`n8
zHB-6%@$syVVFWZV--}nS8c=GV&4k@^0@rMp35W31(~QNMtVJZ?R(ybQwlJ6t;(u~a
z_+(u%C2rxVVu~MsFG%?N5zL@2E*zGtluPmXK0jWS7X<xZl`cD$m1GN)ARPIjz8=kH
zdaO9Q?N|q~hQ1vw8f!>P0}s4+t~n9tDE(%Jk8yw=_@5#ouw*iEU)gw2A?BUeuzL*P
z<ov=Gn6Mwb_zDUo@IKo<Eytx|j6N_TQ{)9JqSc|>+YPDh=3E=C!5>{1gj*?!hFUPx
z4~f}3H_Ac==_D^~ZYz}%4&VkKEBC(n3&H+gnIEG80b}iED{Kd#9{`Uiq$!1u4)&h+
z5;6bEBk(Kv$4p^b#RS6po|F@U&q<$yc2cm|(hdi2>!Fn4GvxEE;t_#uR^}?||D!3e
z0m9M3auZ^UfZVk&21HAsUyYQbCHs<Nf7cyn;Db{R<1nwB+Ya<LO?J8RirwDf+Mj0e
zdtAUUEnh>~WXkYsYd@crdmz2Ud3GIf-+Uqeo!4nVS^U0ufOCLnrI9`%I$B6i@7v<|
zcgEg`*8j|8<_|!1VQlUN(%_i_hLg4~=wgmMu0X34=gI_sn!AuLA~z>zY+<_C{MVcv
zAXcND#W<42C)3~GpU02@2lr-ce_yJ!vvZCj5F=Ad9w37_vOm8ObKKJ)dm8kBe*=k*
zyHKQM7M~t3Zf9rrS_d%IyjS<-a(EKtO>C+80W?dcK0ZD5&yGfJ)rUqRu~{#u=o9q*
zy_A6)cFD|N`jPCMByVsaXhj5>@Hj8DRN}Mmc`Y0|A9^h=`{|2^W!x^gcLK|w&H~)x
z_dV{qtS!u&ipx-DdOj2xbV1+U^=P0jn2F_~5)g>}$d}hFnaH;lI9Mo6>9%6~mXw$%
zxJXJ?s99xDV^DVD^;#@Br&k$jenPbWRM7fV)J;mxeL!tuoHGejnPdo@Er!7T{Yv0q
zJG*B`6Utg_NUaw!rR17hEP(9#{!kL9R+}@!YbyDoFf&T!K+q15hRW<f?He4-e)Iqz
z9mVdf?~q4Ft3m;D26USN6=V(R`96fMw^lwN&sVb`Dy$Yp5Uy9{weHQ#9|70(7D}6*
z27aia0n!QHu8On6hGFSTjgg-DNt~keAUl*9YuokhsF}(#b1#XA<yKo3K0&y5ZBIl-
zW(f|!X?v~aJAYgiZ*o3aV{)Rpid#;#lS{MO9A9lZI2!DqZ_r{O0D`S~Khkt=rxW3)
zd!)>%DH#()^_1-N2DSd>E)gF3^ZlcZAsgZAgH`7jQ1HI)?rxR5%uK;$I%O!t*QL@9
z=bM^}&x{RMsw2h@GX?2OifUI}P!I(Px!Z^hau4ClO$99W5nE6w#Z{OP3PCB@4o+zl
zlwWG#7&z{AJ7sEN9Ci$MIStiz8rB6Ux@T*UCAA?}TN>~r!zq(UVQtwh?#{|h*T>Tv
z?#Ic~mg67aV)so?fBXFFK#YLLd4t(~uWwz%v1<!Y>fp=%Gp=(DvQ-cvpF7PL@8@%#
zP|5KYccg`83o@YYtvVgcYax@q5gZttK<stzNPj$6n+D`vrfL9`fXnqc+yaHcP{L6q
z?jDr13>(nXV72LlFtH}a#I;f@&AHqi#XAfNC}0pR9yAdV4Tw0LRkpEV>=$mu8!a_4
zHxK2~7(6o!1B+;IOA5ncn&?3|q+wuF)wO(hIZA`oQ8&4Mi98AegQJD}^5x4$Yr?i#
zl2-gTi^<kem8zF#mT6Xos;O$*$yTjc&E(@ewUeFJQ#ikkFE9mtv|%roZfjl*YgnM`
zVft$hJ6GH8rw$np^ru$fqr2%2>5RHLk`3CJZFKTlH8vEQNlBHaSC-0;SF`$356;IX
zw|&uSY+kV-uu<(e5Y(ipz5$Rn!XSFgQz%PYA3k9_$%7Csv7(w!K@j5-gMPoFxt65n
zs~Z@cb%<L$;oGgWHxlHL?|na-F*QPPkk{tzouqj*%lSm0rKb$YFS)o<XO?QNdQ&~b
z#E=sc3vxRj7-OE$B`|UPxJM>AqwLVCAaewPKLm85l0O*yNcsG$00KIAPrE|6>P)ZB
zxwLxB)tf%*2eSV4ppwJzlH$dtq&;vRPNJD8#1?}2N^{`;W|M6z`}dzf3#9Sj&ak-3
z9^s-$#ajh=etH;vpW$@2!6~FkUa&pr;}79AB;@Uv2IrlDrbm15m!)O7Ir!1pG&C{a
z34uOdfTwv@`>7U=2^odBj94Gio^&nw4oQZGyRZ|ESE7AHAp>Jbfe-x=Jk|X+5$;h4
zj9l>bvXRS-ZVGL@s#;&uk@F#hEu$Q|K7<4ffruyR&k8QvIyRBnU@=+!;gQtHEElwR
zfvs^fwbk^!HZ3BX@~OV7g^IOfb%sHENEmHXYN1I&z`giN?eXI!3<5mbFJCdn0Fa-j
z`drVn4)8IgUQgSynsqj%p~Jl!9_80ar-5C;U-&?xm_YPEgPrV<M*RUj^Zt<$_8STD
z+SqZUo<t*CTOwa-L*1&L*WL&RP9T8VB=L<6gx^U?MGS?7<<3*t1amw7c^Cl=hPf~)
zkYak`n;Dg!PH8;_|KX^fPFAyAuVs4?6{QnBbrUHB=1kPb73>h5fB`5&mpEI=U@`G;
zrUR@JToO>fK_6fLsllwsLhx}2F4Uu-x6rO0Yh1$*`&6+!S)@qN51zb~ps2*ZuTM;1
z=%`DFZl73p!+hk}-ll_a)_uDge}v9gbv#+-&y;nuepC0yG_l|FWLOj9kYZLLBN^P<
z5D+p_mm>^vMt@jY**xZW^8q#<a)0q9Bt+7)%e&7NqP+>k4}4{)Ynw<9-W?Tf`}T)X
zj};gXPCE;T9zsRm^>Ila>kq^F&nO>b{bF*WXCPtVJ32ZLQ9!pfD#*CVR~C@)-gUa-
z&}%oUC@Dwcj(0V3D7O$B=r;9eh*6@DG-KLJ|9sOMXo)`+AL7Fpy-WPIqVTy+@g6GA
zQzh=P(m1r=AA|{R@H>yocrylV$=rd~EZjv{3(1+Sudtt3;Od`d^ZF-H1y+<S5E%VJ
z=0pN&4mF6HKd8X78sD;?66RhR5D>$re2TbUc`aDE^lti2(6CFQU!U<#M+9}`ag>(E
zGfY<ZA?hcQt}46whUNmlwI!yzxFZ|^y*KtdF^^nFb?DvfPi+&d5ox{b{!gp|pw0x?
zpU1l^J?5EAg%D6ccV}!MwApQyK4eAgAegHjhqn8JggLn4x_(CAO%-GWZ<<FVbvjwn
zR4dh?Ik#()4G|tqZwdDSVS=n*tFy*i$HrQqp0cK7sKT5WL8ZUv-k&TA9)qI`2X8>r
zvh)gAKDW!$v>Lh&2mo-Ue;O{brNND;kA^*CI?PNn8CwP@MAC)n@aSS~1o?m^8F{vc
zJ}=d8(*SIQ^95o==REc0ogD<Z;w}U`kruHGYW~3Hrm2jcujx7iH$&h(rD|J_qW2zd
z&8_xm*eAJBxg^Hx^N7lA_x!#Gx@YpXhP^B1&C$Wp_!q_ovGiv9=y-SYlxyd4h4Uvh
zo;>ScVV^0U2>BW$(o;C32%A32C)FNy!PZL1&JoxKK!netq9GD-8!z25pnwARs7@nd
zs;H<(-$71vt3UakGq!8n*)GSx*2<yLe#Pb*z|Ynt7Y@h=ElFeia^8a<`Z9*ei!LnE
zCA$Y%=F++*?4deXVFY0h)6N3gfMYOch|=jFoF7bnJei7+obh2|3vY-NFAKq7bAQ`{
zzksN`Q&`lP95Ldi#|{JhD10c8_Bmv+W)Nir1O+q;n(fCIQ3R$mj-AAu6})(LFwR8Y
zH<GvSeZP4JVW=3rgN*`Q`Jb0h3QA_wnkiC17ncBp{1&-P2dw^lqeU=8aP?Tp<8v}T
z<0QVBsY$VwTiNYBv}8OZG9O<Hg&39;gLYl?M_rh7{$<h5#oE|wk|&e%m4=?~MgFjG
z<-(X)Z>5d8Q??a2lw=A4nZ;k%=dr)49na4$FqtA61d@_W%8cyx_m7LUH}A|J8uE_W
zJ6g!!wQxSKtT=n}^>lJp>RJ@EHw+m8XJbrMTPVjipRRR)@8AtF)_*EMfv+%-&;#Ri
zu8s(glEY(9479$P)2MpeYl8rT*RJjED!6v+21usKUWkMs%t3;wX{a28Dte{HoB64(
zXuEi76xlql9@s$iL4u%wG@y?W3S&l@qkMo{thHfV$LK5cVZSc$VK!ajl;g!V=%jn}
zcq0F<n^Q7@58lTI;`_Z3YJF=g%YSF}eXl&hFe1XVb+*To$$`{Fi3N*Tk>d1Q_7En%
z&)2Meu+DXTqXM}eEvy2a7Z-IrBMf;m@$@si=*zMip_`;gl0FcBUrXsAfe>}xqWA{7
z$n89n?ZiZA59u*6mMcmU=JqYF!@Nj8G8LDhwCXI$^t@V8^R;h;L^*4`GeS#8Io*`B
z0<oC5$K~&C%4fJRb)TPoD_zHhbwQvDeby-U3oRx@m(R5K4C(3cz6VH7W*T@Fx2Owi
z1y~^Zib^axb##35H0bpiD9I#ltE8oEL}x0xq4OSWp3Vkof_#I=-??u0X<Ai%@QBD%
z%Fxj7E|U?JZsGEs<3!!BIXG0thqoTKDjiw5aPTu5e1eeVW>B-9R`fGh0NtzTt(`Et
zRY*`xl(=j6cCrVGp)h~|A?{ErAj#h}ac{XATTzQu-qi*CjKXH=Bs%M8CXUyTLM`<w
zx`=QmE;3+bLwHxQqv_R)5Kflu6eO66!*zgqX}c(05n@Ni6u=^~F(BB2SdRYa0%{A3
z``e@e!xnrZ856z#%H&m};@vY89gi%j&H0Vq(ia3X;4ro=76E!^AVb1a3ANVeEN}xk
zAa#kie_)6m-h=K<2g*q%oj2X1fy)7^X622*#n!EuiTJmeB=X3Yw@NEd(}c^2ObX48
zb|LOx7KdZ<8oLcF>P0QuzVbWb-`%S{o;rva4{SMJLN&=k+j#lm!)n*r*d;rbKaQQ#
zH+EkaD4C1gxzllvjtnrbqxR_<go0yCmkwXZVkEvLqE8&e(|JDk?ehs_MP(qB$~M7v
zXw|Dr(41X*!fP@mhUlDcUiLh~CxVUgaYyyR(zn)BQ?oPFCjXinEohAl^TzSHGpoot
z_-kWsk*a1S#L^cKKGdZHyH9UVBth(!^ho%{H3|l9>5(9c%bxH<e?>ijs4bP%^+y{_
zTZgR99gGerD^A|Y-K{+(v%fDtZM!^i9~r#W9e(l{K5T9`&Ifj+SE#4OQ)}yVH02N4
zF7rkk!X@(9!iz}VL@{_Oj8=@VubGv6oO!EW$X-t!t_?Xo`m$Gg!0L(sAN8X%SyAC^
z(llY46kzw6+z`~{D#4hCF(9z1>R>vb(up3oyu9kG)KQ6jlhHVx>2+tyb&Z<akXtcP
zCze>hl-ePghv*!PXHV#(jgwB5Fl%SKS+_pzSmjSMPAOJ4oiyB}#%^+3SLeKCVp3Rf
zeX3!p#qTi*f$?@bBiWxReV9-Fq|;T~Ti$vRgF<}bzE;PE=;^>Z1P(k;T%tXDd^iz}
z5|j!;_)*(J_~)B`rlHs+Kl;o5N!v@BsZ%)q{OYB9{E<1@XcE4uG~G+`IsV~CElK4J
z<bJMi`{sC_Dl_c&)eG`m4a(m|m_9MvV@Ch>v7BT+9Cs-kHg7*zV<F%%{^0uz7Xaz;
zDV#Z=IScVX&2&bdh4PI8)=3(Viyi$>b#uS@x>b)ZiuGVg#gE6yXl09(E~kXWBtE6X
zpQ1Hx?#wcx{h^W6*gYKhPF2$J`8_nQ4;aN+UvX0bEa+$QsQ|)L>$ed1VqfEpG@-Xc
z=d&r^S$E-F(#A^W3`to`&&`l+pBlCDlFb`ty0F|GSKMqRWt4x@l~9jgQM6adYhb3z
zRpkjph!18=F?A-UX4ppgy|M(wAg;|Tb&moZ*T=%T2SR-w+2XTGfCi&V!#k!%BY8i{
zt%x6tX;)1EnXCsMWCdi-ZFkvaB}SD_eW20FO3r>Yj*N!cYQ}|Gsg8)y^A20tY$0D+
z4t06armgE}!{6FZAmzG{@>bWjtj?B*qHftPn9|e6VW!o#;n+EJT1U8oFEsRGD)xoh
z&4>SPRpMez#G8f7#Z>lX=_n^QJ-sX)bJ*$Y(^gN4&5Uk<bD#Ii!<PmQJ_fn;`<u3{
zAUxYR#$@W-e4^cfM>m0#<)Ek>mkWfp7=F+D<i<bY`UrrxK8XjKL`3>DBI`^X%i~};
z^x`aX%s_>YltT5l^^6wVDN`{sTP{K2{RLEC)t|$*cNnzx)J8}!<gsQIp`D5?`x*?a
zU*Jyz4yl$6oZbCgKw@@DKY}$)<mBMnu{PN1$KWfKgTmn5-Q8W>wDIKtT!v3Ns|^mp
zyw7{9+YMNH6K7#xdc)iqy1sIBO%)pgoC~mVkj>9Wr{1x#wDE#ldt+JINAt1N@K{3}
z+K6PZHbVVR*mPw=W3GT~zN)OIDVtT#^T8lf|I5Rn|AYu1hxsd>Tnh&g!ApJrK{K1o
zCm`h3b&m*Q=0}qkM`Lgo>}z-jT<u)QoNmk_Kmpx;$xRk(aev=pXOnsgd`f8f02=~g
zuwuCs<J#ccdebe_mkm_+?>~W$i;Y4e8;jC*-J^Z+983hui;ArG!?EAc9qk(-*@qkx
zWN2PKw$Pj)zUH$Dx{Eoqmnal6@#H~d<g#Y_X5NcEqaEH76B)Ntf0{f-Q3x0$pu<|>
z?kxMIA43c2dU`0SXR#yo4El9+ab$v#0rrBf3zD#L&wOK&pr0200?T6+Ft@k22io_%
zEQLP<mV1_osC11Qza>#0WZLLz+S^y|!>z!-xE-wSU=zNn@RX7Qekr3$BE0IYZ(3IR
z<LG3iR;=(y;&al+#l~q@syW*lc-+0Ni=RHh-9V?QQLQEacUYVc4@gG|fKD?kOu_th
z(Dk#MEEqW;9Ihy7&N&*x!X*KAyPXsp>;Bbc_SjmCLR(_Sy8I~OuRZ>N$TxG1*cS_I
zWs1XkM%Iv3$WTQE`h2RCh@p#ZO2}126#*9a7?TLg40DP4(p>4_=uovR-D&iPQST55
z=KizSb4*GCT?-o#DCYH?JgRqs3OTvKqV%955`Y%5m4kw$d4G-R%iV&VoC4(Dqs6+>
z04<Fhjnx@^V$=39%x0kP9Zn7rT3<k*e_(+11NIEx;~&8mkMG0_M`glAA_Ojuug<bo
zsQ6!D>+73UPksVz-j9r2G!ccc$_IaVV}}6$d8)K%+lmov(BI&6g^zi=3u&lSBc#{y
zkn+J%TWT&(4v)>d(>N9j^osrvfJyyQV{DY-gr9Fw$Z&}zI*Tyqi~$YLuW7_3_t&S!
z%XXlboOT=aL-)__7;rH|+wZd(zfD!Ekdd+~k3(c3Aj3z!0OzCWAIT+d(qkY48L8Zw
z6EIN!z4KXUBK8$%n3qHz_u7+><05{3(jp?VV$ZLu(iato9B&nT|AAMMnH?xF2ney)
z2fjWPQ1s91(QBn)p4cNU`x~BZjQ8(fmn_f{aWR)2nfm^T<A%>*<p4T?zLkWX_r9;I
zv0cG|oa?6?5Yxu(XLwWEH97Z_AqkLwVCa&?1}j6r=f&2?06duhipNoqF1h$uT$328
z@A!I9a}A(wC<9?Ikb&KcI;Q3qI}cu-k@NeYoe-!Z&+9Hok^q&{`03uMC(H<lrD=bK
zSKN#m0pstH@(~u^^f*an`|Wx`U|C(kmYs@4w-6<P@Iw^b3Qw~Bn5=`i*5e3$`7V`<
zIDlB(fl)S<RqDIU0*-x0V5RxGa1{pm1xY{v>ulW%B&9wm>f4~8pn<N)M_r&Y%*AC-
zKJPI$Qf|{+sMSOcoDG(IOi_;S{f$!dR~(=j+!qDU_;wv}ZUDvlyS$oO{KwTF%OT*B
z2XlPvYCuZRrV|HQ?fj;fFhO1K^EeC&ARzdTK1dJfnrQZ#;Br`x02U@fh9KHLPpe<r
zA>Q-W;lrCrO!?AN<+a;a0PyFvRsvC3SvmT-g%;}vh2g<CIvT3aeMbk$0qmHx%SUsy
zZ;PXah_z}z<=^aqhkZ7K8ucMXcn1TA$ZsX-U*%3mTP)o+a?<VTCRtXn0sa$9YZ?Xu
zYK9)iWUoNGXa>b9`Zc_f@Jr!CMhyP_$XD>;3~TW2RC>I9-n_VS(U;C1StWP%OOJcm
z4YyUK$?L#V1T8G*gZLCizW(dK{XObT%-66SGUTJ*|M)3zTmc+x#I}?}`d_Z;k0j7v
z_W(<g8el1kvj0vF{rlfU1cC$x^jzd{Dg2WJ`D>E__I60XrY%89Q~v&&e{OtxgaLao
za+^q{`o~_TM8F^eA+J77;oBP#kL5_k_PmuFiH1l;1>!w)c=&(5fe*xzZ+q4jdOuTU
z;u_+ppAj{MV&)5_r-z3$ysIc!M7WPSSqf9W%x}N&nwN-#5fu~f^X=+a($LU|6d%rF
zHwFWJex9Ig&UJNjW8bo{w;}(e28?**OEA{IA2mYd>jUDwkGp*Cf#~b`=bjTs);<;l
zcy;N2J>l<3Q+x+ZCq~se#{ZZTVqbe;I^)1QmH+1tzrX@tDG{OkpJ?|tB>QtKA<4o=
zP6zPk|NnCpSztc9Ke`6~kMAp)i4SV?qJapb@bC9p3TrP^&L<aW19ty~7O0+aRwXdG
zpS``>%`FXamN_pVoYoZW-cOHaf4>-TvsMcMlrM8DD*CK@dwto&!SW$DX7(q=XsK^m
z#X(Y8U|~e?ZX^FTJK(0>8dg#C)1t)W9<<sK#pK>QWPnE{NRk!J?<$}2-@#^5LSS1e
zqkV3!^FqsvQf$j0l2G^`6YL}nylUEpsoB3R@wc_Mz0Tn3Xk_-kGcSMHoiF$6gXQh2
zSpLW47p%V8IdF>G_+PN%-?J>32H2ote*HYo|CstITfk}#ZZ0?X{yn{axr<DBSl4L_
z+oSORyy^&=uX4V8KhOh5!NVg1=!(%=FNlW#rTrRlhx=a^^R1pKTf4h5fTV7<)oiQQ
z&8+w~z~S$Y-s(b~soZwkZ)4wSX9u2e!0`&7|L>qxeA~z4&@~%fvvTmI;wj~l`#Sug
ze|bcwa@u`|b4gI+^0=*NzI}AK0Qv#q^PiuX$fz~cNtlNo4TE@Z6JBC(0S??z$xxAZ
z*{YRVdCctdL($N~UA}{LC&i7mMw>k0<Kaszkyqk&%=J7q5ZOH-0}GUY)Q^nhU)iot
zpr9epcr)eSY?j^oe1!Zdc$*{MG#C_AM}CQs!<&%-6f(ZK>$V<YN$9$A{_Mqqhf@1s
zDD0P$mnZEd)T&B8GJuaYy58Q~+q;B;J@*U$#Ce$kI7lLTDqDhrj%Cs*t-=KOigm>8
zV^DRjZ}1`h^<jMIU<5_y3JisS^DE^zyEXzZBP9I11$|J^0Eq`Gs;@)|n7Db0NhGNs
z#=i%e6fvX<=o=cjV~++Pt$3?DpDcYS^S(ImouFxqMMp;mNHj~iVM}ha%azW<mPt=t
zNVMGeY*!>UvdJF)KOGNEM<ypGwqhd%VwRgWyGKVAw1R^NBRE#*qmLK3?iHlCNQt~z
z#p0hTRXjXBw+~=v`}PKVCH3^uo9{1VCVpmz0_-@2ouMR#1}?6NVi%%@jRCrv<wy!m
z5i&3^@a?=5oA}nJ`xJH*=66@#M1!rKQs1MDqrNb<HJ(#WvID0RUZ+g_P_BlcZlX9C
z2DJ_IdV=mFa9N>n*d2*xn#KbUvXYW=-}Z&}qVmNR7A6BlHFpIJoweC)0O#*`4{#^c
zz89pO2jA$(i$o+W@K7u|@qv=f5GfxAN1b%D^YIeRyrw2<0sI*d9b|^xBAHC)MZ_ez
zDa|euR$6R|OYlgjv`0~r_C^xWDetWBlN3AR16{FSX>2EJOYx`cZUL^)#iPS$-(Y#G
zDdwKH`>ha-;yPG-S{egTK)r~hB8)XlckhT>@4a_A#P5ZKguIxqR>+l^#lEVCN#Juw
zjmQL4P@E+Q0z}u0a27l-BWAaAfkPqOOa`+fc|YnhuZF3z`Vyb*87WAnGcV+Shv#?p
z4;fe6t<dDs2y*VA)$bL3ef2~L?1izn8FXf1|M-=N<o5H;UTHoQR)}^~l!cne7$+-r
z8Bt@ND@^LBSSpqrO-04rlC$gO0jam2)`)S~J?c?N#(MJPQo`%cb{0<$gj<U(4kNvv
z1>EkFc5^)Dm0#S%1A}EZ5#FvRTS4v??5@9mG~-%$*zau+7d@L0jbdv4RoQ$s;-1GJ
z5Q%W0`vIp+;Ndas;xUXV<wxe@&(O^s<_p1gK$ex})cZF24fflyRChNwKt`RP>E(8|
zO)g{47SOD`=nmiC;XcTEzGP}O=0&+anJ0s7a!Ike^>u!E^!AQ+S$Ply4uUlth%D?o
zuah8TBgCMtKdKzhi-?Lsc1RNd+y^cp;6DD3DF|j$t?lkIfkPv`=Xey<tabcxF6t9f
z@p&2!!Oom=nGOHLQzP3%k&~6hOo?W0^H;0eu4{sB+Zz<j=+xAYm<wm78gFgWbzIjK
ztNN~go$+RuUYNiL>}95-;BnYQz3^Vy&Jz&Xp8WU;F&Jjx7erfa{vO}{e5h(vN?yLq
zz|IC17lzNgkcUHXOVC|SBajWGn&adPU4+4ystDywskYTl*fJq<p05r(w!lvaSF!fB
z{<AX?Zwy-ud}LBk8Ob?@ckjAMuneXF%ttKw2ABC~fL@~XYp6U{@EZ20M5e@2{OzWE
zdxSvTAkXHrwAng0iM3YKU%vZ+i3Y4BGkwTDdF#{dxatL71OefOS)%CQkn8|LG`RL0
zN$$^}T~qnxr-%r_K#FQm8i8rT(MKN!a_GXf4@g{R7mUwnd^v6o5@>|9imq;-;hItD
z;SmvQ5$PVU$CqH=S{+Fu!}{ME;KayjrN2RzC6?aW*~XQJOlF<X!{S1s@946ewCueP
z%7*{~vCI#^PB>PP!DJ@!Z;J(4DGCl?<yZmx)NMP>y%YkYL5)OcpXI9lVLYt+A<|(N
z_p3Qwkq9*OBtr^EQuouv_8>$ST)c^SpQxJ%4(4`zZ^v<R4ssT>WJ$fvF|Nc_rfGK;
z=H>3w(V3&`h5pN1J>*#1+i%%=V(@MffwY9KMS|mba@tiGJ2kU%adf@<CMP;?z0;3m
zq+@&!?xNf-a%lW-m6B9lWQGS8Hk|;+d_yKk((#lID<S&NxXBe|AOH?9IipQNzyXId
zji46<eNZtisR1@{JO=Vn6iCzQGjxuXY&cg><jtzPdIiN+C*-A*M8J7WY>H8tXXbXX
zdRd&n<Nm10fLf_W)@)b{XcRn&1R9#x%`t~~czcT17IC{U;Rl#L1s{kIF|mBPm--of
z7peA|3m~KJ3@_7!C3M%gJvx4}4HOc`LYU0FNK#bs`};?t!J)75PW`P^bPB#`t{~E>
zs0dw%Z5gfs1T~UgZgRyJnACj-)t8-il>eXuA7wDW&C7_2=FHpJ1v1{Yw0IU#kY<hp
z>Z~cX(L|X>`SK?BIP4$mxdaMrk8Vy^snqrPI@a&KHR?11<_BY(ID-4z8po%&O0;Q#
zP`+Va9_4E7&gYn#$MJ~T`*t$}f&{Fu8w3TMwCkzuDXrhmr}3>jjBndcfDc>8iwgGH
z6h4$14A=n54yeP9udjOr<QCxjtxrND!&pec0utJIZ=?DL4Qv=)+NRsCJUbw<a8Hq@
zhR2U76;wOiJ1i4kD|c66KF@7Ew-X?R_iWeV0t?lF%6NR>V1I*k^Err0NA1pqxAYU|
z@q{*yP9G!<U__LJ2aim!;eSHw4}b7c5Q~p~kB^9w<3>n~T)z;-1nTLBcAt}$CTL*L
zK2N7&&*nJA@NH_%1oe{wSnkW{PWt9%!CwgJPq3KT194=#Yqg|-fm;C&qvqs}BkEg3
zKUJ*MYuU!$N<z$9N8wfy!9EWKq{_Qq(Ra{|EEn1Tz;T~&0QAi$G8pu~z}PxaIvP7m
zr!o7tRsP1ejISnZvPUgY_gf3VeE#jfV8w4h$jS@gJ=_(R?ePD+!JqHZZUXGC^=}yP
z{#_UTjX#4V0OZ=`o|pP}ei8_hv0sB81XIRT$u3eK23`yDF%1C2nwKb~U;gtufNr-n
zMf)#XSc<X*(2+&&5q=21$lc%GvKDbURFWG|t(gd{|GP*A0$Y#fThIr?^@&pxNI@)H
zXyD6`Q6jIMGFf+Oe@RF%Bg<<q<Zym{k%u;rk&J)P=~AMgpii4)#K~R{+1A+W8)lxP
z7?_J}y6>d^_X&RnA*n3D9+Jw^*yCjM{(ZEunb{x^Rpb;DC;|-$(`kb;VBp~0ld(3s
z5r_KVX8(@JfN38~e0|d)g|?UmA^|ViYYGYg;*!Ng+X>5O@E`yB3hc4c8iVl@t)6k!
zmdgtkY4>Wb7h6&o@|7y&=P|%GMwUEP$MvcC{{{kUaKMY{2-T$5C1s~WAI_G>0=mem
z7L>r@MSi0zeC|1JVVKOoUJg6c?c($i&?~sOkYP&JwrSoseQo}wZ2@49`bqN>yOfMf
ztozARjcn^WRQ`>DPFw2@p~G=*f_`**%V)0A;LcL*+P*=iHu8s?V>;#Ck*3r5{#aXc
z#}zDtl)~?Dyb8pa<Nu$L2!p*K#F2mq0i+GcnAq4&Y9vI&=ri{9jdC1IPtT_zH4Y%h
z`kFd(YjCq?r4R!u_R06X6O$%cD*^yB-D0J=Av>aqfcT@~{cZ+Vk;lz(-9<5;E$b5(
z935u`Gw1GZMp35t{Kn+QQZZN!CW8(&kVWjT<cLcJ3MJs0b*81f5094-;<7%_1Ct7T
z6e%3G6T5b?OSy({zf*sIkC~eMY*i2k3^?oCF$4za4~r{%w@gk=T_8(fM&;(_hDwA*
z1)RW^0EU4xHj?;bGgXx@oBrLq_lN|vS6+Ps198^cbprs0Y^1=7Nzf*!Xv^&E;<|Qq
z=NIR8Uo<mmXHI{t$yR}kF_4zKc&r*tcCX0PYc`M8vER>?Uo<xlluKrPj}&Y84rZP1
zk8;7^J_)!10oM7W%NlVMK(EOursJW{)8^QpZi?L0GJ$SwZKX5@fyJ(~nWv{>VcrU1
z9MM)MG3)fZyBsn1I$7dkHdqtvFr29bR6GU&wMkRaAVAZ7kZo3vuFphq#Y?kMWyN#X
z8h|A6E8M~So^%<#z{w_u<~y@(4GLu$to^Aj`x9coam?GT`Y#KqOga^UkU{U0KTe2T
zpRU^S(yaCSkjDYl5#aob7S$lcmcDSj6#}4+Q|W4HH~^fcHgJD+7><mBi%Z+qaO#C&
zVF<`w=)JXle3v1`Asb&@*0@j|!JfdRPk9ElU*I>AV%uzUkNwU*r@>`<;M>Jaiftla
z4X|gD-n?Abp%N0FBz6saqcdK}&nT*>>Iz{%D{s@YX}rUPg@G9}P7=Eq0c3@D{h!%C
zYA~_nDRA6;#o<vqX?g)24vqeB@NuEOKhFDdcs3?6inwmcIYm@locn$q^uL}@aFgt{
zK3P6D+jM?jpw1$%%~_+?n^M7}$6lguyU=Xe$%fmrrhR<<BlB4vE3E>ES)_Iubw?M(
zfka%t!>7kvI~?z6)s4~>aDDHqZ?GA+x3PtOV*ih>uZ*f{Yr}=jrldha=|;M{yFux0
z>2B#pK)M73L<Ob0yE~-2ySw2oJm+{k-@SJXe(W&>_gZt!HRn5@dO3jE(o&M_I<d6x
zI!Da0=#V$%NXMCXxzfiV1ITpxwEYntzxeowPUP!ax4z2ux~KuqEHtm)0LFZ_c+#PW
z9KeuMYB@=NeQ!%hH5%z`xb7wi)PR?d8yu?k35|~rTSm;D?Qrfuw7E&bJ7?wbCAO34
zvlqdO<qA2yK>li)z2$7B_4>Z+BFhStgN$ztOMtq4Ss1daF1*Jl;7Fo-b9rdXu=3}^
z*UW_uhwt3Swa_ywxpaqq#Mv}o=ITnKznB2Yg}T!kJvXd5ydwAbE$IXMyl}L7-P;db
zoz>Z%N1u&2Q6Bfvu01=k9eT)3L=cxC838C-mXDB-(0%^{$GTU;5IQLyQan#{Wg=Xk
zuk-8WHU&qaDI{IA`C8Yc#vK(vC}DdBM7h0Cg1+ayYz;qo-*`{RyarOb01itg85EX*
zl>R2&49C5Bj|l>I#|o-3Xfo;E8yfB_8IMl!#Qjhkn}?fJ0hBE~)DS@Pv!2)NHz!Od
zE%8xb^?I@h-cv4%K@=g$i24?voO3Mp`lNezo&_DnT%T^dK!K(q11|zB2MQ+60$ZI@
zW&qfl^vx!h(MD1y4cO#pIQgMN_Wg$s9k2dp1<6Evs$WA1y{~_SOvRFR?&4lLGF3Ne
zP0&(JaXZ~0`RPwwE~Z-g`N@6LsygWWu&8<E^LX#NvCoBd12_X&&zHiY@Sy3OTtgQh
z9xiJEkaO=LhO`Iy^-4<!K_U(kz8N7Vc@*D6;ON6p1u8MoL?JTD-G!^TzS%stwwS*F
zcZznCO~EP->=A3|{)ot_c!V<??xaGB71j=15Du$b@sB3?!!mTqEC>T|m07iDm;5L2
zGCX4_wxlQA>(v8~12z*>T|n_o1u)1Qn^%5{Aq6RxS((Mnfnu3fgK5(yGffw@yK5^3
zZC{mg%&bodlw+RDrNh4lV${_0=irEm2jos<1)ARYwJC3){I^;GI9y*Y^q2FbMQ*JI
z26O|4$5SOnpsKs9QL)-#K95$BJT{L~v3NEmwcFkkQvE8}J}*LetjD9e#qC)Kl(J8x
zGoeaMt4l2bKY?T&i8mcspXuy+a4N~H0R0gF<E1**!9oPW^l9$;zYMpft^D-j1V+@-
zJHXj;a;F|cmd_1U9j0X!dcMFQDp;-kV(XQ<r`E*JN^+77L^QA#1&MK+%@)*KZ20;H
zna9(z!rSda92ZM~#*U!`rK2ViV?+1nXp=|<2CHAJAPi}RL>}%rtojQs_3zcZvTMk#
zGvu@kf5N5z{6PvA+?LKZ7zi%|h$j(xJnC?)e(dVr!`B?Q-Q6z!LDeSe5gDBJb5^%o
zR<{ykZS?Q~GIMtYw`pEQniaXSOeaL~RpjB=+pS(%Mv&<ldQ0E^OYl?<A^M($KPwPn
z@!kcm7D$Q~@045P67L!pJcIaHs{i0w<8bG;8!I()b*dncaymTB_==VaA8O%3>uqIw
z|3I01pJ#^ktdxfsV};hW<1L$M*Tqr158w4yaGshZh8&{1rWl-?3pgZ@Q}o50o{C@d
z>};2YD=mN~{J9yK1wJ7QaD+G0*@$WvF_m*rlnQT?ciiF{o<O5-b-1(>_|U3_>h!p5
zOsjyblZ>sxiD^-r4^n))^8J9d0s7!g+w3`T9x<RN=3VZ|c_8h^_8n@<@a#n^di>V8
zy}Iw_mdc)e(9iHTnHPey1^Jn(H*{Lt7f?EE@nhpnSaVsHAoe{ATSn_N;=WcLYbJq<
z=9SY9<y*DjacUP{yG5_aSqVMwn(~paK~pA>7ZbR)$#Y=!W}hM}BGKlXOG5p|-J6hk
z3@9(x$ut-s_AF_8R3NE|?=HIk6N|*2p@>RXmC5N_%xL+v(FT?Mfb-uK!e1YDV4r}<
zs7>XZFXe|5zGCdch?Um!D@V_$1aLx840cu)pK7?=R+p%1!euzg2iR1*0k)kM#&$d{
zfkJ@6(daiaAjo--dRV<G?|$_e_Je5))Fsy<JS5Y7H;=ClLh<=3Qe2qhGj;3q{kjj&
zFae2#ko$7Yrffx&z>VZl32y8wU8m!YjSmkEwfJjF3J<eqj`z-!GkG8BC`&57BuISj
z7sJjVngpSX7|u%U-6<{<rZcvnQNMmjDLb7@Gem(8%#=-W`&56kI2pmYoKN5PKR5XD
z=>}ONH?<2iX6ENh5SlmSaPdimXG7t1WKl)~Ly~&djk<a&Fp82&)U;m#S(SyQp}s9k
zNF0cDFcHK1$bGZL%WZgKKqhYV0~AcRp7UqhDj-KrhR16bS)>s>WnHzXOA!Lu8@)7q
zqI`5gJwWVh=~AcdD(nVyKgF}2DVn$6{B#oKbKi%C<x7Vi(>`J`nd>n=j<NP5C&Oi|
ztha%8XlySn2qAtb235arT))C(zgqv3)}q|k_iko5Z2)*g2{eN$3mf1FB#3Y0X|cIr
zQg<iLzxa^Txh7?Tt~n#ZwYPti{O>{FX#g^hQO!uax-x8dN3GRa<g_@)$uXoA6q2A%
zz3E3?LOUlem0a(Ki;J1poxS|EVI_@2J8YsUIP$xrQ6S)nN`|XMgTr>XX#@a(VB@)<
zfG$OUtF(=JBYi8FHpz!fw%o%pzDR3w6AKCsbTrX?S@Tj@G@9z?rw!La$7Qd7myRWR
zu&~7Z3cbiOr(~ukc+gW$vtU-Eh8W!}`}4Ezhp06_x3&+To*C9U=Zy%LS8@vBP#r=q
z<y+J46nsKW(<#c&2YlZC3MRoFT%uU6<tfa?L-4}VVuoQ21X2HUOnk`?l$A)2FVsAO
z7i!g;oX*x`9o9nO)dZ2jf6BG~IScv%8n_1@J86g&NN8}5nY!dZ3!Y*KIFU|^;?Z;E
znB|>lGU*BVd?EZtQq~Y9FBUiN1&>P|ifbnzKW=S$GsAUFU3hB^;a%i@PM=<$?dh5u
za8WNQAStx0l7|w?NPaIhelS8y#^T4SW9yUwb9~`WGCMrBO>)4oDWPfaVzc`;&{Mp4
zu6{))b}xY6nYyUe^5WeueX`%Fkgss-b><-dpLd%px72&Qx_*tV7vGg}6>_#W-Dm&!
z_;6XWMCa|r?53>FLq48k@0kDe93Vi5)=N!*^61}dc_*abpIq`2Xn@Ny@fll(>~g`e
zYHzVh0XWip`~JO~wjY2y7)Avi``u`k3VeXJQ0p67wh5m_7|_$2fZRC;>ce=at*O^G
zSK~#pS}aXh!Yiw*UxA=whptbqA6>8*G|BoB?+u0dd>j|=-)?3l(5Q8nD+nZf;&Dml
z{-?l=TY7Qdbb6uXAnGVP@7Y&?US*k7f4+fR%XW^>d>xEy(eFAtQNV0;<77@auFLHl
zmiUU$TYuxj^^*yg0u1`3pYyH8aicqJT3{<}g`AaDxz^=FjFwHET&>ggn^pVbU$^_$
zN#oDGOz{wosQj}c_JGUmxA4ow#|uc0n7xGtEk{~jVjx(rEDY=_EiWG_NCt;!MLntQ
zQGf;pgkQK)Qe1{E!6|O{WM$ST9E+ZG>h-Q4-ZSxF%iTKVda{~?eX%}^3c6>IN$Q<F
zY&5Nu(yi9_!xQk<PPEj8?E^Y8YlN`f$ji#cW6~t1Ml}%kA2I-ebSHBN4AQ{*s?zVK
z)i_?Fm6({gQGIxik|TM0v0otbOElr<NC99bj^bUof6joN*yb=yn*LU=3lxFw!!x?O
z&mtkRm#<&r_g^{=@f$UksIX#9WPHDDjwZ%VE*;ADqCQf6f{-_OX=s#?ckk8BL_~dC
zjFx>Tdiwk0pJ*c(hEP6_3r<n68?NX5K-Eb`P6kseR41d)0xzlLln5q}=11o`?-k{=
zH`Y_GG)g#?GRqw3tZ#!8U~<@WS%@a3N~>oR7952`?C5<b)d(bJcd3rcB+*vpp8g^W
zEkpr30$XcW>VIw{45Hol1ZHFj3rR;(Mvlz@x%#2m*2i>VaP<ns=kCj#=cqJZ?~Svi
z$ryRkOGt<;p|mh)Vq)Trlyf6sh*rLZyJ&|n4ofVa06iT>YH633mrGUnFy(h26=B&;
z2d!RkS;T)quE$@vU4lA3J!Jv4bLe@IKRiHgywiM_0u<Uli7o)yv!k{NVRX|MfMS6o
zUVRNPMmjGyjy~_Hlt3+DHF`H@*8sIkA3*t;oUJGIiJ&~naa*d3=<Dk{*Ba_Py;$F)
z0W$sB$Pws|lb3HDTC+>&^t8rLAh>Q@K;Ji*Qrq+d0?^P+F^vHW3^&l58v5hz5ifAq
zjwRwdoGfa}*Q|I0K=X71sa1^5T@m;+0)wAuQrWG?jslIc^MSsEKP#=ZrW>tOzcgU$
zxh>dR;Tv1lxzu_8Jg3IHN(D#5MNQSa$K976yA@+!UEfSA3@|y+bFu^~yZuPk*8tS8
zAEJF7LlIH<&x(2Tg`s%qQ7?Q^5dHhK4(mMzLBZyMPt1a3X5iDxsPyl80o)%pSohsE
z=Js@+Qx(i@W{mN0sekLw)w?^-o&mZAX|zdVL2dST<!I<f69mCxk88Nz<hT>I(Lk^B
zRFvMX$hy`wiQ+@J<08t8_@zvJ^Oa@d9OsfKI=q1KycU89Uk`(=UDf$?he<%j8_j?$
z$LUP12TV5;2Wr9RzWeiaT`{!io5_8N1F80I!9u7<XVmu?4?s+4BsY$!gd7Ri`f3!p
z4j<w0p@P7@nFC+5$4bRxBQ=m(kmj~EW&X4XDq?`{d}30DR~!D_ngD^RIK(m-^Mx>S
zbP~i<T_p*$Q$2>edZ@D<n01f8JQRS?``KW;3G0|8Fk=o9b|Y|#qFX>~r6y!Gi{`Q#
z$(pikp*|$QwT#7*&v>Z0+g}dpr-yebX~_*ae3JR;;4X3bp}5$EhK4fo@SW|<&nkDQ
z$1EB|Q7FsG%0^>n_$-iFw~M)nO<_Nvg5P>GwZWksmAXC7yUO7%Ebxm*R2%#x`{;Qu
zI&h52uv%Cxtn0aL!XltdO--BYI%}NLa}4Ozd}q<95?JPK%<xeEn0yfM${!$N(H3rZ
z_4=MlDywiepr%T!K_f<+@`Ids!v_Mou$wQ8t$Hps3w3_cKZ+)PD*+o%3??Zhi)zVi
z2^gr1o4PnYmLTj{XLdOcgzvn~lr<oyJW}<=ZvROxBP+K@<`*@;v~IU+U6nC%k;G#9
zjNhg1K5|yBF~ntm_T&C5G=C=713a$8^aDw0_v7O5Pw(WXX8%Gum4g7SaIWxs=RYg8
zK^{l}fyc5)10cWeWNK9**%RU-OihPRDE-}yc^ApcaJRiq{b^snj`U~qwF&RYBARwA
zN?fFUB_M=Bosqbv^M;LWtk_V!eYQW~4t;agBc9>fHk?Mj6K+p`jbA6HT&}YU)Ny@d
zP4|&JYXF&xGX%Z227%1DW?Jl0S-n0n3&#5;TU5jar${ayW8Q|2i=$YznSg&{$vbPz
zTK!R9?a)95z5pos*6L$eFgUcx_E;XKf{AcV6!1;5=z>~WQfP$4-p?>bVAs(%Grn~b
zow7bi<2v~n&XDYhoFSKCa5FG4z_vLB#FP_*K}JDv{ulLD?wGxk>(|$$sN6e=r;}VB
z6n-yJ0q_=S=~(rTy&GU>d^^0Zt??}_<JIF=m1bdHgED#%;a?J?>w8P0Ys3)0BIW-D
zxY<Di<xpW}FZ-YCtz;$^ydWzePGegUvUV35TREC~4#4uH0Dk^ChVSTxS%>Dd<XlIu
zbHM&@t%{%#nLeFW!C_~2^SGn<0u;@qU*4_Z?XQ>W39nB;TRG<@hggOntlnR)le{#|
z{>@ESb3nE)i-<PULtSNOE-eg&e|b83`K3GwGL-!5n<n7YLBc{peqc6BYRH{d(?yP&
z32sA?-*0GzG(@Y9i+rJR8n1cmjfTH)flF)WUsGl-_{qWG{``O^+EZt0(@b^A{|>ZD
ztf;<1zVySEuz2|L<O1Di0BcXD&8is{ofhr0xqjv?Xu13MjO#^hUWAf^it#-v4}<@>
zaR~K}JYJ|B<7ueP6rX7J?_C;oaei*mKW1StF}YC~d^3Hc&|aR=1%}kJu#eMrK6sBW
z8upxscMlD5q{CJ4U{wAVGb&<(m*kQYy(5T`ogq`bp3wGYcQQfZW!_fT$-**cl-2%x
zyn)wC+JfKB=EPDaA?QC)vXq?_1o~7!LspBCaDdugP?PjK{QcbRY(ZD}k&Em7_G=46
z@BcH1NP7?c`LsQ~gFi;{i39~@hb5um5x=|n7<o`0Nfy_m@2&sqaszrb=Lhy&H4GjF
z-<<DpYW~`|s3D_rRgD{h6^KYzjX#KidB{W2&C0lg1-O5`48JO;^CSqLq{&6ou9znV
zO;F`Yr$hY%Mi+$u%;oN0!7o$(zVg>9`)8d6=-L7R{qM_8$NUl6Xbea~wHGs;?23>N
z-i15<`@e-ytok4z?Jf51PWTfsA2#lhQK5vAB?&+O!b$;8(uibc33{f4u#wkEr8{X!
zRvw*9+g~r~U*Dvt1FESFS8lWsl0*AkyQaSA43<Y|r}H%XO~f=BFHF~38#%k0a$*~c
zrQAYz{Q>F&wt#0eQ^B>|*2VPj)&7DdNf9)fZ&S&Z9-fGxM;3=|xU$kRotegl<J!Hx
z1&03~I5IEb8OO3OK9+Xe2>bf+ov%yP=%-ynL(5;f>(;%k=udm7xdO6-bW5C-)caH&
zrnmaOX<6mJqS1p55^8B-cI$?A7%5)%_xjq0dl4_5v7mcrs+Nv4^q;r&X*X^}<#Yr>
zz{CgbCz1ti3Qu)j0!hPcbIavx+mQ&~4-Xq2kBwv>Pg*=m?~?Rnn^f`lCZ>SQ{9_cj
z=y*~I;|bSA>AAsAn2`lp{518;wAeqR@RPpY!}hl47|ex4eeG^(>v@YjvHwI|I4xza
zal#h~PCo>M^o>;=taAKkOL>~df*K%CHtj@-FWh|$-2%IwAs=vFsp&db{3tVDh52~V
z^BAExT%{+_<psD8D2zIF3<fs`AB3<5Gbn?Cx^wsDsCP%Nbp~Y|mEoovD5anwVvzSq
z<-YOCy(=TNsp3LLeiobU2f4vX&Zgr+d5}QyZi1h=HC{vDXB1&lb)cv@0Xmr<b!h&4
zwT5f*Q4+y?t)|MAjvNTpsk<a)SpCy~j=($c!18pyCRAgXEEZ%MwM#wB2=04#en9%!
zz#uj~k>ZE>57m-<y*lv|=i~G*FB0q{qJt}AI>O&ckk1O4c+KRhzMEnO+Q~r>fQG;_
zl9Dn48%MOhg8K0AKeo61Q9r11hn!4gxraI(;E;Qhf5yv^Uk}d-F}=3nEuw&Q$fsab
z{g05%@7<GblFwbS5a;d4b`~{9xR_h<h9FS&Cd5%P<6YuUcHI0V569p99>NWf(5~^*
zD7m9K_xz?^Q+1P*lM?bf6S3V*5NM?2Y;yIye9(2GUvsgAZ$m4^)w?-AzT#h4SXp0x
z)u&pZQWRL3eegaa?&mip38WxSlF!t#R&%9tBIGCQ@xj8h8YR*&XWJ(A7?t}GEa%7B
z^NT|Y?=H8pNyIYC41OfF>vF|=wp*zLF+p=!Qh0fEa1Y@6U9j8E5}Q*8FX5bS12OA?
zRTkzm{3(g__H`KKYHhO3>|~sh?>byq+$mNtF1Eb7z{1^rA|0Rcsv|vC$8SOD#QGx*
zmZs+8%(A&!giw-mbwh!Hz6@?gR@QA=dCBqgv*V{wc$Z}R9C!8&TAOC@@bHP_yBz5)
zXbS}Y!yftFC;-EF?-T6I3`Ogpkj80%)dqC^8xgyCJ$g7C9?~;Dscnf>kji#vaAP{U
z*7ss`y~xL-eY>@W9o7<S;$>rWn!}hC-3y#022>c$pdjhb^q!+*2#^T+p`h*<UuYL0
zq0dBj#PZn7i~<6BWxid)e2>b0S2tJ5(2N@hpPRd8B_?basJm2n;VmYVu}2qX4wy86
zmd1!pcExTx!t*w;$oLcWNU$A?iwc@mR_68Ok*_$`^g}Jw*uR3jn(qloU}tP5%735{
zRUU@9x=9EcH}fugK^8?Bbtxo^-3$vs_1Bk{I)VxNk@oe|Ce(@D1l6a}GKdU%!Fah!
z0_Ka5(`B|zXdJ@vW#%#+P;NH949OH`X7HWJF%UzLUOJ4$O-hk2^1qjTHFWiQyT<E#
z^K-w&Z&wXLiw%rv9$Zonyq;_16Lh~$n1H|aNk(kyH#*GV&Uzf(I*Pf;QoIqRR|}xL
z9O*Du-)5Du>l2sfZcOHs7wfg&-e*+~7TBI?q{56q^k7Eq8tSZ-qp=omb*7KLl2B67
z?~dv3w>k|G=_|$(pKEqA2)H?C55FYUL<#2D0X{PkAgJTCg*R&^SDDXC8yeLnzjMQF
zlES`{+*0RX1O*~8*60fgjAGa0dTUg4&Z#}X?id~~YA-Hb9?p+y2NM<BjAHdDGa&RM
z812vI0p3yWVmcm|kM0H|HX5><^61l*AJ7DcvB9YQP{B7iMf16D2p14NE(sZh5kwIp
zpoGEoT#5uE6mzUEvh#1xwrnDo_aTQuNgAqnB|IMg892XMB41RwU041Gdh;Kkri`$?
zV!ZoXA{9QW{mJ9f%-Y1{WTI(}>7V@6(*DX$MKXP3Yg0hms+i_%zn>*WIkkH!UQdOP
zFTj$wKf>|yrf#LKhe6Uln*7MuDie3L?sisw$#Njw#bEH9UZ-9Xu=F~irJA}}3u;u;
zTYR#947J=UW2d9~{&5=t!8?#;3B?~3sfCJ`nzaiKsaYP4%C>MFP|1Aw?u!cH1`*G3
z_u21JgBa&X*>~BR*MVt?`^N8EuBos)F(mv;rbPVXI&xCdQMeb`rE!F+vlCf(DvX6P
zA$rC)E&lkr&;u3yrCZ4R>)#`xLC}b&&*-ql{S{&RczJtI3N7yM?m#TT_4P{Pyv_Bg
zW?Dx_oF6str2YAYt-V?-A%#Kpn7xkWoo%*%S1aEUKv!O-UPO_%mgwsvUnFpcgwLWr
z{osGRb36su(^TlDx?H30kIS%!eU$}T>lu&UZ{At*|EMjGk0*VyL?jQ7qGWq|1}7Qo
zL<T*LAuIor)?tywwSQ{1Z?^rI=UEz_I*D*7y(-Xhi3Y%H>4BUlQIx$!(_T-nd*k6~
zV&;o5ngNDGW=t9RVN>grs>b_}JidiJ(_QvRb+^@l>LfRy6>*h2Zj_k4eNB=Pq>Y|c
zhBfaMDHz5Un&t)R!=T`SU-2-@so>t5$p@&NAHKIl&%k-ZkV7ETw-q1kp4DM8tb}6{
z^aBSyZrya#2g>lEx_M8heABX>vCA<$6u8mid~+b%^i6RmcnGC0_i{7I8T*$L@o7W9
zfS(eB#3Ox<)>KCn+GdBy1gVQ~L{{9J#{=jhR+^yG?!60bw8je->)jD*HW&0{%H9f@
zJg9!R;mQA{sooS`+M|hdG>^F)!v%GtKukWKup5q%`wva$Q#+^4NAX*Z9)$?nm$tNJ
zPrIO5<2A`@1qO0r9lzf1Js|sh_-c?Fkp>JU42?((JA$9p&-5@QXagmq&KPt9<?|hH
zydF_9*==OW?=9XDo*<5Yj%f!mzGOe#2xM?{u*xpG#dqQAX)e$*N)BsIfWrGJU%Rjs
zflz826k!SHehn`MOwwj7Tf1nxpQUuOt}kChPv#n8b>)tk;Quo{=s**PukHrhnZQtR
zuzoKeV9P`UY401tqebr;^ZJJ;vVstd0d>SjyQY|0IhUUce37#NF1cR7p_>FmJ4o+N
zET7Ey=*39I*+%D4YLg1wbE<6&+-m4G?o9?YQ5YP|D%jMnt4aZZ8+u+`N^vAru|RW|
zt_VzB<lA%dfdP(1Y8@j(V^`1m{^aADa*J`zgZf>YkWI+WGTTLdIV^mO2li&cmDLsF
znerc{dX9K4G{=SmCeA=Ag<M9Y-wE&peSyvu0N$hNtFD*YO!DHub2GP9&2?d`PcvEV
za-nQI#DgyuZv_SV_99aC0URGv!8z)&WM!S+-90>y9ot_BMuoXJ;L$%}C|4XpB*SU<
z*W+=T0k;Qu!6K&!$hzzvz+Z_)@gl+*6h9QVe83^(#V2AFq!Rqu3RFN!uso#TZNit5
z_0<mZFxy{A#1lL94bxG{?eIwg@(>BIyV?BgZHGV661C&KL4zVD=<f36Qt6<Llw^HB
z99@u7){>3^sx!!pYPr8nDd0v6E;ZbLw|Z<p0v*u)1=Ojso%;8o{3QeA?&WjuLt!dG
ze#kx63gaI1GStJlnldR8{7kMGJEUOfhiR+EXOOn_4=G=IC-r>RIXhckVN$c(E*SGq
z1OZKKdb<eaVr-kPXPzVBaY|0?xJ(N?-o@>`Mq9b`xrzfaP-h~xxpj^_%+rH2yl+OV
z3h*&T2jJlI)QXs$J0t6|WVg)3JK;$coeqAAQRoUtx$I5RNAcc8k5^oG;t=cCUp|Da
zXvGp{$wH_9I%095f4{2O;9~Ed-NE*&or@h(@iM3r3Vm*;)owUf8rEB|JJ@&(D<SGu
z{oIU~yd5GG<VK3Z1j)l-HB&nu3OA)%TF>d{L01GFips;*4=MGD2#d&8Sk=YlBmHYa
zDJ<ebvV8#}x7nx%?n+zJ6Aq#lBUqhgqa1h)=FcRc%3{3XoT`sS>)#Z!M@}ef7pe>e
z^0WxA38K|NpyuEKtpR_+1wx%Ho)r7|!(MI)PEq&B?h0QAb$12iU4G9t3{bEq;y<+x
zryA&r4=myhhJzj%8A++55}7E{W3ZHc$l-lIQguHS^US$;X^8&PV`hQF#WR`d-cgBF
z$TjcgWY_jdT#b3?u>5|4Z{EmgeR@+jI<K%%(~)gmIs_SiU0{fp#>Z#R{<LJLV&qdX
z2`T9S&c(sJ<%!&S9wmuYTkv^joMFd_$;MslXOX`8=wgri<!{4}{14q@b!$KSj5pL4
zy8*b+l$VjQN{{sr^OtDAA`ZZFEaKksS<witE-p`)lA}6}KTp}RLE7rW46fSzLf?24
zk^L!wbhDYfEjaPVY^_PM%{a~m)h^Ds{87nlhX~9^Yf`yZ3QX910mVIMyNC_}{;MEl
zCJ=%T9%+f8FGiKrUNNI=Rg9=En9NPo%VTx~|H~Ne=Z0-9N5Pakuxf@5w==3Its^@}
zC}g5a75~BRVouIl9uE~5IRYsQ4$&VJD?C%c94Q9{HCPS1S{5}j%~E#R0@&Yv(FEV0
zLH3ani?-n%dsF}&I7;<fK=*vAX?f;(6q5B@S>X}YzO~ygQ$nF##bAgbKL?{Cqvk@y
z5UdCmr8g+2sjF?UkGXFxuaJdSAEn+NBmw!vR@3zw{I_RH)1@Y5U-)Ngtj^X?M&eOS
zZh`c(H04BmekVzQG+6_50~;NpPEMw~KVK}O(kK$L3w4Dg(JbE>f_0HI?hcIr85_?k
z0oJdhm)w&P488%z!FKem-`fyKHTfKkG6*$xJxc2&g)p~D`Qs2jg&tftJRS_Ry-O_w
zCy$TL5dyx07g&qAo4K}bvehJH9V)9Pb$=r)5X((9^u1kCgoj7{byq9l>&<>pFoTL-
zb&CMZT(cU<6R{-VyrV27WuJ~$!z)Moldf-6C$Cp)vQP(K%VgE0Rq62|NyJLftSvO=
zi}7(*P~_~**}i3DQ`&XV^}*K#j3i6{UBF&00vG_@Pg_m5#IO-s8L62gdPD?JneL#Z
zPx;2q6XP*IM6Cl?gcS7z7c8(8TtwVCR|WNA)sEYYxj@Z`6aMp7JOS+pAoXU_uPBDR
z=yWT1@3DvvRs)RUmtXE&?I0_17ImYhhXirABC8f^8{~fC{b&$Nnb-vT9*-^{M^L!c
zW|jC!^`BB445WQ)Bn`L%;@@(s>7TDBlp64&BhUc$#iB7J_Y%x2>63ik@MIJ1d6h(q
z>v(d0%(kl4n9unfr2AZNFwOj+ikGP$-sjg-p+f}_3OYe6I5}3!+$P2G3Y4ZJi_v0d
zqM3h@uxLRYv|=#WlXRK{Q5ce+s;!EgdMSmRYH8{t@#|$XBq70cu-h{tS%bV_Dx$8|
z>HZU4-w-f5eWm53JpaQLsUt!=0uI*olunEE0?uebYG6>%3;X4*kuRNnnI4zwT<=)L
z7JLqM9Qm!T>>P{Ep{(zAI#bsYlJr;&(2tLg{qf0*X~6Z*m!O4yA#i|?nfNoi`NV0Z
zKig|!!?A%#a0O$MpmTu;GQ=NL=@>aA?NW(M+un4U9EnIMd^d)#C)`zLy;wNbTgh%O
zeXKq5YYgg_l$8#mjs6+VYC$F`^^DZH0qva^(E!bbYu{QsgbrsHxeA1&%RJon_MNQG
zab-&bcn=vMG(>kfRAmT|g@5)eQAi{hhZr*aArhbGMU2t#QVa8K2;tY%g9X(5o+uU>
z2hQh|Y?be54xmiiBqD~>q}|^lNJpT+D1=B5c=a=>DRmS6f+G=r0k<l%T?JU&Mi><`
zMApk=GuFjl*~nn}yZd8DP3@0)w7TTR8t5e(P;)URqd1_h#3K89b$BE)3fy&n>q6{|
zK)|_HHWDHb3!p#ckY)+hCb1aOY{B3=YrpxIs5THxEe^*avjX*C{Ub#|uJ(}kaW>z}
zX#z1bb=C-*8&sIahLnmFd<Go#-6fUR8y$ZHxGx{RDlW2;>2oyCxQr)9{oeD{((v;a
zn;$*<^-17C+$SL}$JxOw6BxqN!QqrlsY;ld`dUnDIuwm(O1S~`u13M$<h$E%fTOts
zOoT{;4dOqNZ#G<Dc6&A@20`1nzp2V+y7<t2zh+EHVd`AK97?S+6Fgn}8D=q=gBRy7
zSHAR<z*ed%y=wn(GcU`R;$TEnlq)w2TR&X*9FL0jSefyCi1Pl$PdZ3q0>&~QKA$B#
z{=Z=$R#XtFxXz5=+g9_ZsSo6W0PeB$p^gG^lgdZSnX!V-_LirA`0q~|A&3n{n@3>v
zZP9ON_s<WTPsP+J#3!K5>i_;}w4m3M@2`=cEAoE~hri0OK`7wZx(Uf$NA{cB{{6x4
z=E-a5<>i3)e}h;+3J5GP3WHEiE>i!n{!b(k+moJKC9hkPOtA}`!fO7ei?5Ui-Hs6W
z-MLK-JF-8odL0f=T0Z6u6b8Rue00W(K{f0X$Is8d>Hd5#9Xv<~S#&zd=JBrz{0aCj
z!w3zFh=vM@15B7ldzkJC;GIxFu-#M+Z~F>xl{t@*))D`I+!w+`M9q4&PCJ4GWJ@mK
zCyBL-(TcAm5K9bf2{b?V{$n`S1n(iR-Ik1pmND<XY?8{<Ma{%{%|H-0D#R@pvs^yB
zy?@>i4UCPCKc2w9BhJbQa`A)cnsC29gkiUq2mZ%Qel)wC=&T@d8M7;YP*C8_SyY12
z9}XNC`DS`7brSz`>ulW<7`62v7<vCu%je*&7{w;S(--gju#z7wE&lq`dxfMwe4TzU
z63ytyM>@*NUwx8A*qiN3-1K#9?Jzb2f#|mTOS!xzu>5QSn9s%#K8@VppQ~!}N0Snr
zfWtHR_4h|<f1rFz^{B;Q&@L_sC=vl7oQ#7ZYF02kDW_FlM@s*;e^O_fceYRjL_k1L
z`ifu5#%=2wUFfqxI6PqbJR-!d`&XU;>?~;z?NA}1nTEm!uRn`cgrnLrJZx)n@l61`
z4ksb_1mRix(4<78=d!`at0YtDj=)o<WbUoFM_X;!=xOMGhOzmY*lwjAe$?L1?&$i3
zZ-JWY%W!LT8%MZfh_~*fL}`$QKs_1h6lNiT)?%Ih999_c<wigR4puG~kTWpoF|0lg
zNejQU3K=}eD>4DDayM?Z`fo(ISq>g(Mc#Wb|8$fW5f&Ey3it$p8bZnRi`Zjd5<?Qu
zA+Kksi_nQ=VPOFs6O$aUoni_IG>Nk%0{vG`d1<jQ<p?5<@<AXFb?(Z^3A3Sp&wEAV
zcJMorYCJxkr_B`_boEH>ruc#w@)`pV5ICl%052cbLrXFI-*pm^pCRb>@-Qg~0b4p8
zi;fIXT>w{La({Eq?6Rj0kAUFFl}#!U*&QYDKn1;HI8&g-VLqOlu+2hFE(W+WU%?{d
zMKc+7O72b+;0~xauL3)mN{X$pu)ns)euYZzZmx7<vTu9XL`mL_;jb!Xi5rBZz*}6F
z6|JB1yILaxBoPoOzSpOleZ{}joAPguxsAI~r>pJ1ylQ&5+3gq|Jx!Y}+7qw0*DKZs
zz`L8?KzI!BGNLLc<U;x7)`-Z);3vx+eOfoDLuwiUtTUq^HJ}hEmG1(f5p#2E($}n^
zoBwQgzp$g7YC#tE*Gi`AZ=vgK6Z*B`JHxSBA+<yweMd%_`1fsqGzHV58LV~3bYd6)
zE#Aa=li4g2&vqw=+~AsNniDF`M=1cM1uMeaQ1GJX=?B>i{&~*@uS*@kFkDv?%>8{=
zx-1Gh3)C5tl48NnDgFZM!kG!HAA^_z^F3U3q~-TjWSG}&cPNX%>%bEcZuC^Q`dMK3
zW)2H}5Eh2=Do(@tdk&6aLe_=)c2KoL)!#SW?BqeO2pJfB1`-#f0Xer!h||@P0Xzx{
zcKxwLB$##%7U`ui|CU={BHhNzoy<a-0e-Ad7)H<8D5k+$oN$`W?cT}{nSi+_A#|D@
zSn>Pd1cl6+sr?5dh5h>;j*AWco)~6VV4~;1^iGFM3>_{rRoGr=sDmdBegB>*eDmzg
zY4yjFG>N&nc_e={!e^td$WB}k0h)`*6m%=0w)sT~tL?%Z8B=@JJ<dI86nLk0rubIK
zL^Xjsq2l%E?wR2CS3(N_^0AZ%ewmrwj0bOX&F~@M?|0YlMko_#IqT4YsV1qY7~P-7
zr9_JcsSB^ps^_*GbTX<S@DU%w?m!yI{!9XbUq_)MO9Ul;isA5*pdLU(`LbKjNS3`F
zkgdt{p6YTqS`vD}>sD-36$*5{?0r(y5Wq)ZJL^~jalqLKC@7nU(L^Nb&f0ufm4CV0
z6(66tu*acjmZ#_O^hi#{A+(@Z$_zW6ox0%LJ`z(2vic^q*1MlNDeUvs?3MOu^Na62
zd-7XWBJ3?THBIvw?u`A&)?=8DMF0++$xLmbNJq(Li;WF^oyLTHxhi?GZW4f;KBBn9
zc~_N`+G%UJB?5aHsgOM|!D_0wWqiKa>#uJXf1(#i-G|dC{+<Zcv4SoxmD3hzQn$sS
zQDI@sB%r5ap8?pV3ilSuk?bMrkn?rwCYB-f8%z#oD)KbyS3mGpX1CWo%>p+oTHShe
z)goQ%+K7k<Rvs<=H1(w~g?UKJcuBhN%s&Q(!;uQAOB)(y$)<6Rz#(z|Q|$^q*{GDo
zLnnVTS=8jd9mgqbmSiL(tyYd#t5E_k6#{F~(HNU6t!JgJtn#OAm;u*L@wqXe8}Fa8
zk3<as#=h1GK^j5%x+DUhXF}V5*dLm={yDIQn0JQP7P1C9;c+>%!_i(0!vwNq;sLlF
zUY&!CtlD6V^%F<wtA%dYxLT-%Tu~d46|Jaa_!n~aw13;dK$5BO+OGume`M(j#3CAb
zDx-JXF<SU>;Gny?e1n*<c7Om*aZXO}yXqH{&XYQna6I1;9NDqX5aiW|QE(WW$pW0t
z)uZDe7f?(QtbHj#qTsP_f0N$-_s!>uLcl|ppmyN8Dkuz5&nwL)<U@07Uq31AfYya<
z*YMFOkjscu8d-(?)9S+<!Y`IyE$^(wP4LE~LK12Ml(yZ9Z@y-OSnSU-v3d|$zDPMD
z{;*04I|TSgU6rJ;s_)r02A%iC^>gFyY&j|PnSvxym>Gt#4SPQ_>v`gyps<Rs8f%V7
z=9t7x`<heS)Y0Gqwc*OV_Hw&@WTr}acS(@5bn}gEraX_yzo`sJalZ4;51xal;b*m)
z-__U^TwltV7_Fb*C@eMa*sgu~cH1jUW^Y@cuUjr%SbM0tt+X4yNBi-9St54KC4WwU
zy;ioV!Y7toz^hI%y2r@t#@XTVd-qTJli0OeF$D5n8flw-3}sE-JPG&Gy{?sqA+re%
z*-jmf*D&QlcF}Zw6}oS5V<c>|LS12Kuz()q0RG!<v_|%uyaztK<nf#1LkJTCFT&Ma
zWFP-*t4Erw+S>I_RKV)!yHwhcJUi?hFE#Z~T6_CkTC=z@y9nwOVOV}_gv9!uR%7y!
z{{;}a_2Zq80sNtbDV2cJn_=C9YTL9xOsp+=TKCv;%LLCVR^1KHi}zRe7X;g%1Mv9Y
z#^a$xP`|)yntKm%a;=X|Xv%Z>lzp@o{sIsL@gPmpbqN!<&=DfQ{^3yv=G-{3B9Y97
z^*AnQE!Tr$$8e%{QYH%~A};TOvhUJEp%?AEW07^0bb7%d^o)LvSin{$QQqhvI+dFs
z;l(Jn^c<7Uw>)Txiv%rO9QuwH!R?dLBuA6^1?5+X2%coQk7hOJt-|hy_ZjPO&n_Qm
z6`D$=3mY$0x6zV`1-w{fR4KovRC)%?^kK#o#SlznEyimKJTsnc)i@c=_KH=>5{uuT
z%~d<uAEuG-NqZq66XhYnBaFw|+x!+Yf|yY%yPi+xYnNM%<8!PV_mk1b?C#on$(r+p
zV-R7;+&seCy6viQv$JdOI{v313OA`x>Sx~KwQ%tS0bNq%+(Pw7BK7_0xRiW_@1u2g
z)p}xV2EHkD5xwF>qhx8+CV5Y8#pjjU<6DBUelpmRj`2eayW8|;PhQ_9eSo}D!V!~_
zdF{l*CN`U<G5*DEY9FT8Gn0#Yd=h;6xF&f-*9Ts4vDA_#b{dTvM1&;k@JeZ{6!2qT
zZEt1Gj$F(KdC#v(kM<66ADhzInPueU*reP`=$KBf)hkVh2+C$rV_`?BDVJWmV?Nb*
zfBpc13yF2f;7G>radM(m`1To=2k{b*tQuJjCu^A-@|>mapV83T%RUA|XK$_Cz><=P
zin_+g(|N76`+YdMDX;MFxX#_q=&`^=OA&X8X=$jFEZ%%2r3u8SRu+L_p{4A_pDVyy
zV$ioVLf0}rc89|GS<lE=g)sK?O;PFr?H!Thk-O~UYY()p-`(@~AVmxp7<ou5N9SyN
zT&T)sgAlgp)y`3{d!~pp3i$WF{?zDP8khA%c(%S&$=TEK2^!XTazyD(atzfh3Z@KN
zU1jGF{S}&#{j~RR^0lKRO@k%qVH;yIkS^LUDEC|Ney*2YZsvwYQ=&2Pee;Qk<T?DB
z|KQ?hyrbe4Q-4n?8u%7{R%?^cO}5fjK0d!5v1gp^@fbsb{BTS4T2m~LmmGhAq<CfX
zbFPq(P~{qCwgpw6>haG_Ox$VN%}RyFM~ieatjhR>1|F%*wAl7@M`H}-U~w}^Fk)1o
z`{@RJJ5(}YyT+R|Prv|hl=TSpfIrH6AT20WaDqu{0_~<U!ifx&Z`M2kB68`cbI=*W
ziY-6F&?rc_)w}f79x1unDb!F}3)itU(NcBgaw}KlB@O90wB0gI!CRnE(7ig&bh{Ss
zS(~+qFVb~aa&fK}J!r_zd%mYfLWr*t6}*74cKIb-=eB5yPeS*KT{qEcAU5?~qTEkA
z<3}bhlLg&_rppw=!w>|m-ceiHe6y{Nb-+W(V&P9_<snhYa4*DuUM+DmbyA15r$?Vh
zgBMVQxP?XZem0g&C?SwQB5qAo%2ulGEW1*u)bj9EOd^zu6W1+culD(~qzUd|R;|yJ
z2Sd_WS0<t#>Q!v;75Ds5V=jZ=g)ABR<!e1-Kqq|Ry7-B?Ir9Yxi|(V~%1Iao_q&fd
z?$Z87^l^((QDOln<GYx=C=C`Gc2OlKw<S8~tTNAZM=qX`t~D;o#WT|NSe<^T&l)N!
zNl8jd(zfrwWcIkQBBc<OkdOh&Z!~Ph$ldZ@_~<wPj|bpesCgXXWz&Oud=fy{J)kI*
zDM*rEwU_>B%>fe)=vVW+DP`fT?Y2~A2%)^de{Tgf#M<N8diEk8krYo=x0;^!D_Eu2
zb<y`8^)(ucajC9H<o6rtR2O8NCDxJk^|-cM&dN85c!}jSQeP>t+P+P!rg)H9_@vQh
zoPQw0mscqYTdDoVmPUyAy{p-o11Vu&DY5TzG)XdJmIMzZZDN$ntByT2%idcF<&Ivj
z*Y%Z)+%N#S_kxeQL)%RjeGDU0iIBE6&uE*1wI$p1`63<;jn9M8SF73b*V%GBL=tb_
zgo|)SltI;tlxr&H)4{*ZL<}{juuoNyVuYzpXLgG3pi?a5**&Fd%ySM2U4hy)O_diH
zWz5m0!YzTwY6&6qrmAz@6;NgigM$%C@Bzv}W@^>{;t?F=OW4F{wVWSj>qHiPyAtVN
z$^_S09#EcC6h?Q=yH?dUSsJ8L0adA`&~UjJg2cyixY2L5NoQtSM2iiV*;c{)nI-qH
z@oQz2Rnx5a6(K`nJ9(i3$jF8*YHF@_rdpRK^ad*pv}ea?gcf_NA|qlS_T_uu4a_Q%
zTQVt9oKKPHeWzlyHs4N+NX$|k!Kt4Kk_og@wl}T|{F<R`8y;?KSI0ZuNcEcC`gE)q
zW?q*$d&(nIdR6e7$g#icohev^Dz9oG-I5p6GoY2MRzjg?ra~q52$7b?2jeFWCn6;p
z`o7&-_weTN>u*C}1lu_FHr~Su(uhE4foG96FVf&IEP46ke9!eRKdPw%2i`wbVu}iI
zW<Q&{A>PYyQY|v@X1)iLTCd8-uDcD;?|2s>`~>rzoKbtZ9+*~=aFX8_rO{$*z@woQ
zBwTJ#$b@bReJmgm*6&xpKD}D0I;%-((m#dN*-K*ggOLlb)>Hl`3&2O09AV<<A*H{#
zJwcC^r?ng<Nm9Sqh)tWh5^=gxNen#Tew1`86HBpSGt%K%+Q?MNq5EdON3DMf9=*ab
zxAV@H_CU`^l^;fLd$C2Laj{}7(8+0skUYlPnLnI;2P<|)P*LywG0Ong<7Xq9vQTPH
z+R;YpgQl(}vxXdH^6t4ZfL$uV@Ftyfrq}Jam0tY3fQ`yu-<~OuLIe-pM&8MqLY{h&
zHpcF0<%R8$n(UuXHm#blX;7CMVv1huKoS@dl9~qhn9;xj8Ije!aK*9aPbS!k4<}JA
z<d37Q2rsRO%*D&es~CytBm}Kv>xBIp5_1~U1^O{8k7$efJ6@J=ELEnzG%9)!5gFcc
zBZ$l|?bN4;g74!TBzpI8!l09@v$OMf5oQ0F+F`@ZMyhQ@s>lIEgnN;3q!>}xqHjVE
z-9PxoFN99p1_apglj`8tcOKNvwj+<KR1JOBHj^E*plU<Ped`c;C%tcRk!2KK1_h_6
zz&p6+ifxS_-SC0X92X_t93GevJMQMG-BUp6AAcWuIZU}9-kSZ%@C(uGIy&C#QB@|H
z>Jv?$vWyZB(#9~!mWt0h!!y>nE}oZ={M=qFHf9tpFG<OUGq#|ePx1$n$+5@|g{~5H
z%!sqZs^`=IN2yljvi5A=CmQDD)arT@lyS@D^jYqu@gcSeUn4j@w(nc)<u#>2?XRL$
zP>q`x#MRy&nVaN4AIr@gNx*k_2CZqY%6us|9bmGUkGcE7DNTkuI9Vq|Hgz6UB*C!C
z9XrpxTg#W~Ef}Gtw4Ky$8#+nQX*9~8d3!Ebd_LQtes+L9hdv|hum9jH@a+7+j*(`|
zz5J;1K)v7khM=Cu@fETMTbEJPnS{!F`{SLQrk1>*d}MnM4~)~+^XlY^#BIaG&`du}
zI#-x^O(qN~isy&N_T#}T_J*(iC{g@mWQo|>FVGiD(iRIXEP1(WQBvO3EnnHZKYP4>
zLmTUNy^P3Fj@*Fsr4XsRDS*EPXS66FdA-j9l&896L`tIERpHue)udoKN8N`;;x5pr
zTdOP@s6J*p(Tqd7r%{ClUkW3*Nz*|nuu4WkI%%jNjf99l-c_y9F76$UVp8FYPeQ_q
zvK^v}<Tzw-L$tTy@<xrBq)EqMCPlpp&7x18i~OO>Uk&r<c#xQ}8aBv4Z~|_|J|t^a
zvBHFBOzowvpN0(-q#1r@fRln#eU|D&8Z81y<6OUMViC25?WIp>XeK@3{x=_md1q$=
z$kr+mSEn;qkvE>KSYD07s%4TwN*Yp-ZzS4l@sH|GT;>R8@N9ZKjt6q#toW$<oMFDd
zjE*sxB(ioegN<azJm!rJlskT-`t6m}2_hR;WWg2sL|m_zc71K1%a0GZ92@ZYX3+Y|
z_CiA}m~zd*^7s2<*hcS5C70aV{Y$6v5iH^cIe~055+)`zATy#mliTfg21xTdWwFsF
zJpeGZj*eoe<UaQq?6s*9@j>C#We!Crv_(3Y%sVVFn+$708ocburu@V%^nB<&uVRit
z0Up$$|E{!zVJvBPMv($N2N*s-bBJty9zn$<{-ZZN{QDQW^!BJH6YuC>!EYKnH0D;b
zKHqqi=>pcgta0MFO6gUKj*dre;w?mVKYXn$e>|(GEQjsNKYt|S=b=JK%AOXt8F!!p
z)m7ygK!`li()^&twW^e#E+C`&DOv?9-7dd0`tTFOlKYyL0(n2L$3=eo-cj%6BIW%h
zrI;%857mMh=(y>NP5N@eGe-Tg9vL9`qJV<0P_PF*73d%}h56@f3=`B}vaVXzw$K#Y
z>Lou6r~~ullNO!I92_~rNcKB_6TO+#(6T(rgfeW>7IPp}#bnB|gKVj7eO*;l=72_J
zktl1|yi(O-A+v3T#FI3Rp8J+BHE=Wp6}Jq@mLQ^|LXBN)<wEbc>ot>u*$BNtGte=-
z&UZ6r^+wuLF<CNm#nfPvhN+TQr|LobG)*4{UK<(2{(46lo;Tw~MBj+~Lfk(kB@qMU
zJ@VwC0|kK8tf0Z|*`ow6;pRW^VF?tC!Xeq1&6L0f&l%EPs@K0$4+GP)0rWyr3g=-G
z@Mj~R893lu9XDi2EGBsMp!pUpKK|wo?BL<k_(^59dt7VI8@%Cd2ee`YxyY9y+4*jI
z^U~Ne1`5l;VTaYK=4d6WNnyU4#9L8OP$9_6#=`z3ven9$8(zOpw)APfnk0Av_UN!E
z`0R`8<+Sy7iS@Bh*WU{TsYw<elA{biW2Qms=H`}ZF`mombOm>DFl!1rG&>^qV)`w;
zkEa7AuKU%|qHS%z61rOB(QfLa%L^<W*Q^ZwH5Qp)0pft_Rc!ud7W`He8j|Q2DN|<F
z6bo^27_q=`ioR!mUr^>5oO&E2HNp4L%*FMTuD`N(6z!i-uj--7x%2)TV#69v^*+Ib
zy2#>|zqfY99=I*ns&l?VEx;bI2i1H45If4;z#*P`o|Iu0ztY=NT|jW_r($IWw$?w{
zSO5mGP+9r)ukt{#<mn5hhN|W+27xcI?z5JdvioDg{W`6E*9TWyh(LQ}?jiqYclwKc
zil+dc-8ZQu=l_I0{Y5YdLX!$k20yzHoc>3Y1RVap=YuQnYw}86KHUSX4V4LKU$cU0
zohQC%=M`Ce(PqcQpX}6gL0^G01c)}Pr;DO806AGx8D!@Fzv5e|nStxTyxuOg{ZHNV
zR}G}t3P5G?jEbuNjKZJ4gZUA{h)j7cM=SDnV|f|bmBUr}hapW@1C{qE3(J0YcekL0
zrsgq&q168lOf@3#ziPv5)tfAXl|_%vj;QJtp?UKBr4pzQiu-)b&9^c0UH^B`1jR^z
zF$p_krIFMdL;qZw-8*;Ld(%JtkE-vl<1v-((*;*is>07`Y0SMi@rX~TIlMmBC;0CZ
z5S)JUlkD+fREGZZ=KbR9{+d+1w7`&<T#OVO{CT_o%$*B3WnI&=(o5PYl0R<DFPtPg
z^t&9BZ;olCChz?&F;y{tsU!aS8@~GyifS%T$9Q@@*!Rb;L%GtZy$YiSTl}U!C`3po
z_Z!45il3C-rt1WHJbi=R=clou;?n(d#1*sQriR)LZ`OJwyNgsR1tYxfozJXS5$G<n
z;$_OF8O@j9IMG*0`{S4BDRix^|1{d}^Hsw#lr8?kVrtmbc^a1_Qz@XU!HJ?VeH~-)
zYb??@AZyvvIGA<+Q|wZ}cbC`ssJ8LGga!akWVn+)%{MayQCtd9?V2CIR;k!Vz_-B~
z41e+wyLaGMIeevxNin^DbrSR<w2B~Nl)9~}cRBHCK&2xf=+LDR$!Y#1u&6M=#xCAV
zMx#twA4JGG%e-EQ^YdYwUnut{U$fOV;zT5Gaqd-p6HWukN=Imf*PQZ;8~3A;Nkv8}
z5D7~}v?Zro_g{})$tCl9QIM>z<?G=h;!VNW$HYh;Z3n2OqjYp~<QUqgp}<5P1WZMl
zuJkS9hLblx2k$dfFT`I}B=fGbxK+Xnh5GPfF@(o^+!C#&!&m2=d-tdD4#7e3`w_cY
ztenCX9-3JS9lCgsWjEpmO&j^2(!Eh9WGJV5e~ioMdc&I^E<kd5CX||fsoz@NNR{>D
zx-#k`@Zi=%0FL<NG=J*nDN%H6Y#86|N=&>bmP<{c<~XqHPeF`({pihr703FUknwYn
zA!1V@2Zcl{Hta*lZZV_STFF9P5DJCegGt1|occWeLT~!L-H;BvEV928d4Cv&yDbqQ
zM(#7^LmFxh!dajtV2DhOFbfwKX5~*k<Sf1JgV4-}Tp|6k{!)MA6j$!m2($j8o?C-!
zc02JqpS1E<$T6z(E6FAH55}Ap_Qn+L*6j#!*hV9JEn@B5(Jr3Xphkk~=U%0VO!*f3
zx6+Mt1e%*|8gu<0&`}#4kO}5u0)uRk=_gAlX>I0!m1a%Bw-D*t(ZGg_!ftKK{;v2~
zt(}lFFb+N^ny4rs1bH>7n{EojCll{7LhiTApjr`h4$=XkNs|{6AibBO1kA90%}dKy
zW)FD%A1|?Ljgi__qBvh*9-yL;Ei?yC6B<nabY-NX+LWB{GASgn+9RufDEa|cj;(9!
zLTa_evaLg_bHy!O%57%J4|hnf73T9{uy?wNfGP1>lpmEFF(b5O#te;Z!P}l`Wt5f@
zMPfPY#%;k`N~)!o3mL7YsSjL|tseaCQ1&^RcnazzajOx6xfTDuDZo?-UXuuh2cDeQ
zPt6#jUO6UF-NsrmV=Cq(3IHAM?C-vk?!B2iXfPYgB$%7O9$|oy#`-&;)=yd}^WAJq
zGDjKGg!Po~M+SLR%OK9segC`UVUCaMi+JC7j_NNU&k)D-gBz<){rIo;g4QVnZU=&!
zA&Ztu8WSyr49;t{*QcQZxF<sf4nmNb(WB;UMZV<KhI#lRd8;`^`&$$dK{?{5)=?7;
zQd>z%=7#XEX0&y+=?b?#T)TN^XPo9AJYVSA%c?Z2B8Rs>j{HA_eFaclThnbIxVyWC
z;O-V20>Pc&?(XhRfZ&0_0t9z=cS3M?clW%*weNoa`(M2(Dm7IwnKS3~-n)CP)vFKD
z46$TJ!reFK<0$F~;(G|3avQ=BtTL5a2HW6oUyp8Hu$b>dkLX5^muT|3P*T%BRK(6O
ztw&#cD&;C5LVEIyrb-kDwQ}m$r}kNaot-HsFgY1}q1GZMp+Ii4qqE!2(Y3plRIO`t
z6p`1^b#r1pmrST(J#Fk;9NBxXD`Mt8=MT1P`}_VthitabGS7~W*FR#Gh8Bp7N~l^~
z16-80KIWe!Hc#%8;ku@VTQanS_e4H0`;(BBKn|?&OiHhjORYXAi8$kLNZTcnTqZo$
zvN03s@uD&6klM>xhMPl}*SPXa!+GV~6a_5VJT7`D^!on2JsA}jl|o4X<s#N|<yVTN
zteAygXz^>fTd`BhzD_Xbp{55?cbN6ds&5;CwfRo%^#CdE@9o2i^h@P`6Hh7dp{FTp
z?Qk=ir`D46DultVc;jqm{_b$c3RUPMuF|hbJHYeH3ez5BeEEF`C*JjH4wkJ@7hA%p
z*jPDZ0Aqc9S5_-3KX95TdhqPAj_@pAm)?inQhok)75$kC0NEhR7(Xs?Xt&Rcq%@a5
z`z4iOKJL{53QJ+Z9D0VG`Pax^;biK{yZaL|K7y{qMGli*nhMgr_mxcQZNxW)^~|<P
zOi=7R{<sO%L801RqIDSZ%B>8t@4l<9If#KZbJP%C5p)UopsaH{#l+i0zRX>S;8$kO
zy_-Sr%q=h&5(>Q*o~m-Kq^d*p2;m7(#+r~f0kV=rM<62_x_@hQd5LDWOa}9lrLaCS
z7SuLIL6xeul<5tFq5#rKR~<-vdQbMA%^bsTM_9J<d0eLtPS~=TS{0Jl@D@iV80Z=S
zsnQD?`h#}C4`x|sU=J9wli<{bkt2cZa6J^UJ?tbdX4!M|Crv{umhnI5MS~T@5lq%S
zUzg+ZDwZ2{-)$n8ZNx{EEuMnVqA$do%e}CYnw*Rh6(Xx^D`?Gn`CK@2=kr_kcO%ye
z24Qa?rw=uwYjvXzN^<UPtr5>U@`Pc0NhN5%8OxN=*B$I}kRe<agpgaDa3QRs1au@Q
zpz*QD((%9j=~#1_v;?f=LO%!`t4eTzsiBqpCTELWi9Kf+iv{%(R0lb90*qS-XRU^l
zG!zKQk|1=nF#F?JL0&Nk;{x!&tOfxy9_O7X?t*}zo!Me7eADs#6vy{eRuA-ehrSMB
zFlp{LN8FAv|4FutL;XS}$b+Pqx`L}EI#2^9el<=D!F0ODiiP#beO!#)zT73_TY;uZ
z%u(mCN^*ncD93U;&)vr%nt>$baT1cu`kBJTG4iuhyPdsC1P4Q>JR$CKH=@9eJB4=_
z9iFt=WY@Wjm!Y88l^}+?S)Cc}N_4*_UwF3vtjTTyi&|6y4;3tP^n7+!SE3>$UJtnc
zg%uE1dsDjKGE#;}{WnqJhxCghZK`5jYjfZ+<v)l8=-7Kk)poFx63RlD(Em6`y*U;%
zD^sKm3Y3TmhxG5>8CTNASEk^iwnv^C0xdev3elrZsR$=PnSA{8iIV}IRLw=mrXHr&
zrXqk-^~;;sS*N51IK|aqDxIqM@V}C=_xNC#$0~WQEi7BjYP$Pe$!S!~QJUIl1mWS~
z4#c1C9-5+tD0fF@T$w+D(|Wi;8E$APO*Hzz&9ret*#=Q}%y`jZwa#<?#tG9XWhh*c
znJm)gr1@5tM|N(6Ho3+5wVe?&NPECteGtY9U1s+tkZ5M$^kR}(IBB((NDU+kq~2Fd
z^OzmO!|3K0xgxsh^)LQo8y=uQ4`N$e>P(;zpCG16TZl{#>=T-+WSybIHpf&f2AXi$
zP;ymf;PUq9%Mf_xX5C;oomv;P(Wn^^0U}jmdEo_{l1%+}_m2$eHPc+1L_ed~L(%4M
zK<?s8BIjd=OXx=!u}K+4_a!9O1S*<f_#d3jIWqNXJl3e^y@CaI4*MQGyg&^F>=+nm
z4A9Oi)l)E2N!vuls@L%y;WUyTrMqqqIa4rkosznxuf@2yyslEXqZXTyp^=Hd6m}Pk
zR5IWeNzucznQfe-Qxo=+iBFa9s(;B=5b`F#j10yI|K4&F8f|xL$9elJ;5`M?KjoUX
z0C?Hzy((>$FQhv6ZZl%fT`xRpoeAcQSpQns6CVr$lCZiu@qhs&)y?Gn%)kYZ5g8{4
z`MA8D!O6C&ySu1~_|UbzKGvK>=5J{<*tc5uVgpWhU|m9tao{r{p5$6`d>YC_##M*|
zVn)2mSB1wlkSm&jHXWnDL(K-dv*bv#LwY_|EMZ#=*3xUS0q$J`DP>sj7n6CkB0zJt
z!Oi_Yt<84(uzRj;*R7{1A_GY%RksW^IxA+Yn@H}BpUcZ|%KDdpY~<ZIP<ITx)OVS*
zpqISJf2@$?s>48YxL8wwBv~U3@Q;8!NCGjyn9Pe;D%v^Q!nEa-R=$%ThO`YI1kG;A
zIUi1aP`^ENG)>>6ipCp?Kt{CJ6ouA7stQqOEW~_^{&%g>u}vPAO7kJ$rQm(Q{c7cO
z;8ADiwk7c?FegX84wlPjbh!Cm(2}<O-1-7JEIobGYW}1%-%@Ag=db)`&QnqFd}$#=
zf~msKb{)jg_Mq}eso-f}=Ie_;`l4UU9sf&ekU!qBOC=gp60C=JQX$Aw8EuUCT{(%r
zw0K7vwv#$B7af{Y)dZC=`tlM3Uy6rVk0fa}nSjd8-zyCW!}p~AQ6mWU?DFSAI!FX$
z0rsv;bXAEEaByGG5;_?Ygis+e`k=`0Bo#2xu2k|P5L3y>fI2VPSdQDtC0`P+jIH6{
zgB0X#V2z9l{o?dDh#KMG7D#DbJ~SQ^;L8DD`2eDX3+6pZA!dLLds5o+iR!^EgDoe}
zYQK_+v-ofKR>0ynI<|(D1F5o#&hbY{S<fF;J+?@P(h?}0(>fqYSeEg78k{>lU}<u%
zKL0P=vCs?RCF~wOd~k4YvQa69WcX_=gy-w+MuUjoT1`0Sb&2?@1XZ>_RY~!qgvpu7
zKs4Ar@d)Pc2L_-3HsI&bNI4>lGZ?7vZ~OgPsr}K&LB(ygw!iQ^Z;u%(d1$4@0Gwbb
z!RQYwl0U0PP(1nsW!5xC>L0gNIzp({LS?k-oKi(stSI!u2Ql|}%tB&3f};O_(VCw5
z<uj~DsxLOJ<LV`Km-fFZ%-08ACGOXWHN1eX?-`er#Bf+Yq)2OHV>0-4$WN3Wl|@wO
zXB+E3OZG33tB?j2Q0meNev@9}xVBGJaHgc{DEpt7gU~z$P+V8tYtOy^?@#;#$at6V
zniCE7cZvVc{~X9*Uf)WZZ6$zR7xBN9(iC8QlJ62?gQNdB*<S$(ckrUQW^3Mfe(;Gp
z<K>KLYC@r@GNYQkIkXk-aqXMjz{NVUQaLTQqQlez`a$SA{aNOYZt}y#kdz-9==5oT
zv?$-SW@&|O-&Lu-Bw*?Ft9AqfZjg5CM{bn=d75!T++=#6mV$AAecwzRMb9m04Yfh6
z#?Pv8#WWcS>!_~Y%`N@p;^X64)I7UZq{gBDG*a+0C#>pT$M>`Qji{((diy>z>S?S+
z@}VN{O-Oq%Zt<t>q1o;?OOH!Rd((1|=rp(6$}Kk{?^e=o^-|HLFU<L>U(;!>R{-G&
ztkV52(BO|En^IKh`<|t=O2JW)o9zrZM7u{8H%D!AF=0R^J&*euj$Hn+h^BcYjE3xa
zoXNBkJENU>PIG9@;!gCr?Z*!lM?ZwSiUJoa&34l7%oflkANvWeEcXMco~bu%v)O6L
z8Y(s!{-3vjQcth~&rvmaV}3>U@>F<|h%W6JNmcat>m`xdq9H|J>_JRkY1Z1;RNVs#
z!5zK_7|knR1f83fKuXic&3xG9Xx>hL=Tp7O0tx1q?OoK8ObD80=EK3{b^a^kC?xB!
zR(yfZrQqU<+eC!N-qD=?3I!b0oeB=FhIQ|eg$amU&jS6EnqZ;wc2Wun_=Jj=XHI6@
zXY-}U3mG%3vH7**<G0AD9Llz5HuJc#ZOo_%eII)_8rS#E58h-f)FMT?xQH*h99+ct
zUBj>R=Y&b3icZm!y;&9)h(gWQphK(EUpcx(t$YSeVflUT?y{rfBe3q5?V?}NV&0E_
zx5QgUJ2RdcLu~bYK2z+vzSabpa%=9UniZtR3C(z#$Uk{okHU1skmr4mrFtqGC^1@x
z!@MpaRF;Zgse@1A)xQ@0SjKuh{!@nt2(&~gaD+N_Dq?v2e`{#u@gSV~+6E`WaTar-
z>U^)zIEY4f8E&3acyAz4QIT@A+OzjC6`>c&S9*h7IY{|6LT12_h9OV=s9*~B>1V(P
zxo{fsJe6w8FnUU~LTi+m?`)cLFY@N1!}z|1VA11kbTs*{6IZwQe6A5{&wfVL-X$Ru
zNC{C>JN{yM%vEceK6MTD84GnCltNZxt;t{P{~k4uWMfpq_>3?xrn@g&qPv9|y$Y^-
zXBw+@VMw8hP5nTYrvmfQXO0RB-bJ+aH~3CjjHpn3HV(hTJ54tk{GB%cV<}B1PLrst
z_hennPWU`%A|6vc2f^^D?q?`5QYwS}HwLGj&TiMIzbaoq(14<pY-8xr?S5H>3lk**
z)lfV~0^W9=9b2Z3a&S3lv?x%W`B7HXEp%fgJKKPzlF(5%o<o!(cXdF259^JUE<bc+
z9v^UW3f+^u*4^hBbJG9XiTu$>^+Y`4Im-yS!Dz`ocP+9eMMie}5wNa9&oK6Qq$84l
ze^!G!^!NqVus%$aQnRO&fp>$KY5pcEt%fL<S~?1XJADDfiBbvkC5NKM%pTzj%V1gH
zZDF**=tM2jjkP8;eiJE|p5P8YK5V)!&i8S=U>?m9T}C<&7d}<5nm3-FpMpG9Wfmgl
z&aHea72|MV9ki6Y6+~OelVHB=?=hdKMD6`RM6V9}ptu>s@*&olp2Q%CAJ(%zD?m54
z;OwX{W@oDwtl(^|7=QHTXS6PfwC3VzqpzVPFSET+3JfCS+BD`P0j6;@k(F%d#%MBh
z7;6|Iui(An!xa86sufdh>Z4f>(XABom<x^5y1H&AM+0JRTZx3AZ*JG=)o6wWa36XM
zx_zvbM5Bi_1p0gVUN>3C*Im0&q6_NZyLKWGSStA^nUK*Lq*ytaUL{s+{jrd;J1xWL
zFQCDgU(iOl5Y2=#6e$KlTY2I8-WQ*p?JL67<AVA$+CjgZz;*f-GG#?jqQvG}_DP^-
zSIFO<zd^v&gpS0vj(0<_M!~d)BdQO|ahWs^FVhnVC2b`n3(!VN7qlV74Z$oIC(}4^
zoP7t)A-J?c&RdaFk0V5&&5wUs(?E~Y8Wje@#?Fj6#h8UC)>2hSXMAYAA^qTD(+g*B
z8@A8}yLc;IA)YRh!qw)Oyp;R42^UqEu_{}(o=GowWm%eI$-!1#RTLIqbA=t!Huywz
zD;XZ8(K#K421!-bd>N`{;4@;k&J{vBilqTP32A?0`o0JKEua7$BJzK4TrOqx4`ud8
zRh}r|-$Y7oXNz7*fKvTPd}Cbhr8io$zg8dKqRD0+u}0MTvsgkf2x5=UyNn|6?DO)H
zJ&6OYK@Ml<4sHa#%^r<r50up^Zr}hLz74$fMoVE#gUFU7)kN-Ba<WhfY&QEw*{TP_
zFfO3|ykZJBcy?vg0+YebQt%C|f7~bOo`a&>&Bo;Kh6+<)5KgUcZ*NeBgG-D8ILQiz
zMblu{&A!H!mQsDt#%pk#KE$~_G8%bSUcj8dBo7IH{7{ydVZ!s}E3E+9M%}u!Fd<XQ
z>xqO6cDOot@ynnt@xM-K=>We`_<Fu`4AqY*F^$#6Sj*o#p(yRLvr^v7#mK~ULZccW
z?#0@4l_0z1d>_jpc3#pB#OH}e92GI1@p&#tIWH@zm?%bmda{s->tP#7z5ZTF24ns{
zSZT_>Gv>5yDF~I&(?rKo;wnO=N_Q5O=I53LA4D=muGRQww7B!OIy3ttuyFb_DAk}*
zvG(ut+f|D>v*BD-c6Ig&Fm3#7{eH`t4al@T*Exd|Qf@`QGL8vT*3joaT@`j-hy)h8
zBt;1&#r(oMNn|9-bay9Hw3|0PD(_|NL(F&(PFt4xxlHDi>huS@uJJ^^0J#|`01YJe
z0n)qT=x;6hYvv&I6T<3+@O)%ott22u<I)fRMAVNCmD}<O!)mDx8oK^D2zR_KeDvqW
zdk~Gz&^&sDQKz)kYJy&sSDI^JAIC>@(v5{N18+T`OeSTC#}a`?u9TbL_DxrlSz4rh
zb8}3**66ym@NE%=)E{|Q^n2%Jh`w3+FO-fc%T{iaQ|ku(BPBC3k>_4U-!~GLTSNxl
z6&nfc>cnkO#qCcJ<pMketg5G&$l*j)ctNlidMcYsC(9Lb3qEfajUmHB3&P{{1;e7z
zw5tYXt0=xVID1_kIf)jgcl~fZAA&>Gh>*PDKdktyevGO5n}AcLiQb{7>9_&`Rl5{9
zqA;T1bpe0@$;$Q`X=V6-B`abbA$^F1#SH4~97oJZ&sF@$dY9Ir*e?QTVCIX=rVH?H
zHfdug^}V_U(aZsUpDu~^P}lqmr{T}X&*<zsi)lOx?eyRWSRRufgIvC9&DkjxN+YCM
znR%{KM4kM^f~Ev*7BkBBwuH5sk;zcX`A(qTO^Cw3Gny*3_H@#IcT{v}d_UBBcIJo?
zqkRsx<8uZk@Ngw_6tC)n&x2&E2}U^DnxFAhJ{wC&)it<cr{TVi+wz`P65<w)T^PMR
zy%x@N`)NdtSj2AhIOVoac|@}TjFjJjK`50x$G=Cr!FY+O(T8ydw%8Y@*sxRIp|!{P
z&W6K4o}8B`$UL--dtrmmX{&+A0T^BZibAi*R{Gu5-I{ccq`b337^^Oy+C1L&PY$h2
z0`8IuIX*Hn;$cj}uk#095#mznWF3_AOCpP2EGv@}Q|F9Nnu3};iQ?+U{((88e>xaL
zR`zQ!>NI#4^h&Tg8HQqaZ&o}<p1TLnOt_?MJV~O!8CNZ4WEV21pU_(`IFPGpUDwS*
zuBN2wEK|ccdktSEOOe0&f&5X*{GGiG<Z6bgBxnkzMEjEPgwRQ=@?iB(X1t=%g~NTn
zrPYdk-yTvr>WjQT5mocQB~J2H5YpBpbZ^~GwS^I7>b83eN6}Dg3JXLgDyS*-YSlGM
zV&;N8`v)AN`)8z4#5Ag^^nGh;RW;sKSjdPnVMc`6HDbhr;}4(%!9ytu2>fCFjoAMk
zNEGrbuyY5_{YT0CXFt0bD<lDR1iEK%9lyB2RYfLu07ufTPt`N<4s2k6NmuXr=JbER
zI~&H0vlS_qdZ_rrb;LISntS(00v6Avf&H&U|Bp=@Sj@_HuPpA}Ta#B*`+xp`C;-;>
zom5&$<p1?6pbUP^*)gBMs{f$j{>_R3ujS)k&r%B6nSbYefBy|;20;D5z4*=Z|0iQ9
zq=Vq&=eK8|%&&4veg@Qb4G<7xnKJ&#Pm5iN3BccH@Bzal|MN}d<zQbCRKdDaAw>rV
z?qjfYS>RKXU^3)B#``K6Oq59JX;`SHnnil1nnB|K_qa@KDUfw>(j0C*G`{b0)KpDP
zWJz=~5S_{{;1=N%EQK@yX&gmI?=G&gK71ge82OVZ{qx^<z*zL9rHLQzN^G_>IH{>F
zbH}MB#om>R$J>=MR;)ldK}n%kJwLMiL%Fikq!@g;N#$qhBBhnseFG*ycm2;SjSQxt
zQRNHqZ;tz)rzj}Od`ygvI!SRt{Mj%Oe6rwQ<NQPf<6<KHK&Ka{VVkS*R>Ik6iZnID
z7-(?4-3kA>833CW?3X@*r&<{vrl-a%taXfnHbMj$ba8<*FNX#o!&L}qQDJ(bkP4VT
za1{KrAsq!V;9wiWl{XAkj(lTd`hZh)B1cSy&3s{MVy=}JiFvV(l$^YJ&Z(uf)m}E4
z;q3gJ=7yc_A46pz_(VVvh0reF6qGrkF53+)A%Y`|Qf6Oe0dU|*-4O1azfG-GB$-^`
zzJd!^@=B3r&lSG+=>)cVgU33-j}qu|nWE27h-=&1!3}fj8QhLLEpI5Osn-YAyJ0L=
zo?6Nb_5X^EcVR-B9y~s)Sb@MaIuelZGeIw!T$cFKiT9qHm{wud(~Y2O*XsCq;-~`C
zq2B7tTgmYOA^C*9`)>?P;}(Hw6IxQicW>^;O0=4jzN&0!&Ayl|Dj9`$CyfS5KM8EN
zez-POMHK#yPN=1VUZr@G`L+8GY1|eC$)vxGVm(xUHYRW9wo(3Sew_TiAh_7uJtvj0
zFxcj?MKV&Rio4-FujgsCyIDcgl)fd$Q>LhgVciHDbpgs4V!;?uRQ@Tn9J%EtG(8&h
z@lRez=|0bxx&3@$*{;i9$5pti>#Xh(Kk=VK08K$5_wZObCZlNsI<{l9e}%do4NL~F
zCz9aH6D{6Uc_{DW?Wp~*NNDU@fv%5OLPtp9_GzdyzK_3d^Z|~8)^CFClE6Jdg9>T^
zBEyhX%OGgl_QKM-^#WavZTyCEmr~7!Qd>sl(gPJ`_PJJD;x<^_$j-Nqow^HJ>WbN2
zwSuaP>=6wSR3GOdw0)0wq29zO`2EDHinNb?UHxzraY`TUFdU!j^E=>a=V4!kApY1h
z%TQooW{YL5ziNd`QQ7VvAG_Nxr-OAo6n32|eh>Z@aG9yJ+E-li9_Ke9IUS+vi+Pzy
z<1mJ+vsosaU5#w#J9{&h$sbu*sx>+dVAZ|ARNUp-;Y2{%?+jr!RIp;8((~cZIH#2E
z7+uzRS}ES*b#rlbe9E)Gt6D%=xW+S7QImhm$H)JX;v`@UJF(n)f;bWJU|OVoh5w5K
zgIE&o$KIVn!B<h2SCtX&3BH4AoAroJfhMP$8^*KJ$J5;f;#Tq8FxKr)B<;jc_lO7=
z?P-mFer7MJ{8hc0y@h@%oUl;48!rU(?!JtoBHGRIvZcxGWd<9r%T)R5o7%&v!QW1(
zjg=cb_G=wrrbT&qqUgoz2bN{_JD8>ti>JE7s~FeU*X&xDA|~VRi!k6mWMLT8&h6(^
z+LWp|4~Dhk(Re%1h9@48O31^n85U4ABY~;agC8O_LdPx|xR8N-bT*p+2rHz#O(XCb
z8aaI<8V@RL*o(@_0LnIBm#jVv2POFG3c*mpZh89K&oWusL#Iq@OnYlUEW*Ud?|vD*
z90hG16$a~jbcfz~yg+7iDp2ygPEA3X#oqOyd4~Sy^FvwKgJHV5suhc~&r`1h1UpjC
zC}*%ipgPY}n>Vzg=)lY=2<rO4KqyOVq_*tY-g@MxVgLE@?V%mZdg9>CZE?5&zh{`1
zgzT)rD`fn-U;3lH_IiujtBwr$JiF(r(-6?tIPw}8O!%%@+a;%_UCORowv9Rt4t>?l
zy_{A{7jAJ@q=%bwSdSbR4Aq2ZL-Cy=6*=uHeSTOU_(FcyUcak1Y^(M0oKmKZDG9Rs
zq@5UOJ7wSHb#8(K2JmzMjkM9V-MO38DL3DTqb7V`_~8NDxxHWY<tZZ^9R*oFaGz33
z@tE{T1fJ}CVmw@rm%=@+4>!-&MJ@ta3DJo>ml_23qSeYj2kZKxI%*2~^4(2{VE1$%
zFxLMW5BKO?o+kuy10CEd8xUrbr<t47ay#$5c+R8x4msVkd>a+VvV{1<OF?gs1YLV^
z?OOmT!_HHAdi`4RXnVL;24@;OFnML!6SeY1;w~ax+tB{&0As42PorGn8R)}@kTBHH
zSfcLP)gXLSkeIv@0iPGfPqfueksfGQSI&E)9}zu06v~$uLG`XG<P4%V(c;kuZDz|=
zkQ-upf_8fqTecDfYqV<%#D{ejKkK)ORphhtoFjK6v1nWF-a=PeZCfk}I>n)qmsI^t
zr3y)*as5`%m0J1c{1qM?5gacK2kap*AEaFV`57LMt+=)uF#9n4aSV7}-}~o(=mcDS
zx?t~rsx`Y<JIaX#F(W_q)^uBR1JakXQw`Sh%f4tFN*e^hm$N`;xPH+)7-ZeR6VBzJ
ze3>MiFQCkn?3pqhXyTUNZ8WZr$F3=QanO_lTWYkbDJ?7B4<ynid2P=owJ@-md+wL?
z?g!CfF#T_H`@;%R^~)Ob)fly1m#@W@@60;E4RwA3bIl0I!m9OOxkn(>8qB}}%BcUh
zfR>^W{|QTRd7wQe>J*&tCbk(I><I}2%<z{lsrpds>CSH$ldNu+*#|PzvJGB-V;Nq~
z6oLmsC^5~ZM_^b;fy|FT;g8&Q40wii$+Uf9^QN<Y@%BUzU-ra4m??@bR}I~a@$vqs
zoyERd&Ix|QA85n5AyU<2kaBxou)}jG`?#4lH7N{vtZ876J@X9ZXd6vxFM9VkEhJ?A
zYLuJiL@T*$y-*k2CQU9j4AP+oV_Tle4NXZ<b<`x-8)-v2VyD-wo1!7(dm12@zkORP
zcL$8)s<7XLTH>|B5zu+U{p{(S23x}AHh^MS3Tmq=^DiuGywM~_DHQ8wRBSJMf4;ag
zx<iDgU1?}1QK_eH8gpGLl|XerQ%qGO({{I1V?J8HnqxV8h{EV!O@|%bDH5{NP+tAv
z<j<`~o6UcL#qPvmRE6d86s2K#shGs)H>uV0a^*$bA>x=(Z@>8}&!VhwApT6EP?Xf*
zU|%$eNYKSEMVrhp=+vtCz$SX5ftxUhv+2^q+c3-J#@q3*V1LRcOL_6=<;(W*Wa)3I
ziUs(}e6xvm2W*qSSVnv-EYe_Lg+AFwbG^#}G{D66TXW1xeHibyN}I}KQBjrOxj#N5
z%Vs%IhWdNk+QZ=mYmX`YmHyau0-2^Z6VGS2N{B1yndIT*bPF#pub*|+ysVzNsxVE`
zUBJLiyG#1|long#in1b^<T4x*1`M7}V3a|3w2c3YSuyPlR8vy`Ccdx^Je%YecdCkm
zY%N93%~u2Zv*B?;!{dch`(2Q5pM&tQQ~SBN+hKX5Hch)ntz=ePy}^0_vaC)M!tBoI
zmmTS28N2?NMvHaQKQe70Db%xbOzfb(Xh-FOoDV)g+c{?c4=9yta2PG@Z7gWM9t$Dp
z9aY83oTdicEe6wX<F@$Cp0R^2(X;a1^-cDb^8Pt>FgOP@@*<)LwBP+z#utb=ab}_U
zZ7}4CueUwv#gi)N-Y+}%zp0+uz9Ho8_1=Ktc&@|L%JJ=gc0~-?Zc<Pt<ola!+Ld`7
zJAqcbwmm*D8Ge8@A(>>O{L4pH3|eahzISmEUp9?{-bs9`u!mjV61<-ujrlVjBAZ`Q
z1WX#+N!QEsW3*>Ct_HDo0@4J1wE`xhQ;{TX5tDvCTR7;O?j*5mtLH6q;O}L7d$h+j
z&ZC$`>xhu+mPSceh*=L?jCJ8)2p!xHVnJDA852{tGi|%A8$pe6f3f<#WN|diFb>qS
zr*CE*ZCLDPYh<CeRa@THO8@e2@!55g;v;yrIZN(rJ&cd1ofYNMLDN30z9}}Ewj{Lt
z7_^$>!|7aWfl3khs6&RAhjaKwCQ2R~PUriib1!6cf3EdxM-*OeXM{DV46z9=Xxisc
zpls2x%AiLv{0j(-z!n=DR#wpJNh2u8S`w=s8nD=|`HP|ZtBM(Q_?#R8Q{474bY-we
z><cP~V4fmY>xHdL(Vg8^WV6OfT%}2<S1`bD_&ztMQx<CCdwjdvIW4<Z(IZw7uL)+x
z2U*Jlb2yJ4tz%Na#|P|NDl^W-Sg`No_mBs7GrjvV6lnuyN~=ac>kK!aG|v=&kosjZ
zS|Jg@DfjTW`mNU^=-TPT@lQh#&=!o5NnZNU(F3H?$kazwQF(h$Q!9cW(t6!g(fI43
zSw74R@J$B+FU>0@Qiexp3hwi>#i*0a>Z&?(`rr&MabK|=sEZNt`0SsdiX=AZGPu5w
z%)E)gB>lkS;#c1=<a{uJWI6NV7mLl<d0mB(UseX10e@k)#1Ymm|CMLFP;YL1<9yam
z`G8z)wT+B+2#nhM*6gwwQF8e`Za5t(K{+`Jvx=<uTBj_ez5)7V*>@rz!u7AdagY<t
zR@8zL&#hkRb`T(nR;S_S9^4-;>cpa_eRJrguxN3SE4vI2Cw&leHoqaZQ-idjo63Uu
z>$CT0%V!_s2<=1DF>fk+<g3ucT8u3<-O`R5>%|f7XxX#X+ntTvV0chYfMvu&6DHtC
z#4_8obJ)hPKbLPgOE9mmuYZOLADR<y**au20qW#tFrTX+4G4h4`s9GI^XGKE4tG>L
zS66l9t@<ZJVay^D9|>PXvps8VXtoahDlgMQ{6O}U)9Kvi26Q&NGPep=7fx_Wu1!Q1
zuJLar9C_h5rDYiH!_o-v$@VPZ@peIn?B7Nytu<>!`)L<a{a=P`$pO3;jPP-Zz+{XQ
zb68N<Jg}^)LM18iX!8Dj!tVq+u={T%I0`!2$3IlBS)8*5A}Eb&#UAry)PD2|?>Xy?
zxGpyla~i1JxpKL)fT_8d#V%+JlWNV{{Y?Z@O8H^IQc6{4%;ujUScHSfKKO+}tG4)0
z!qnaEX8H2GMPG4wJZ`9yNhY{@xF*(Hf{KqvLnUWG;?dKsb;wT@#{0cT&OHPr-JC8n
zAu5ZvB%RRo5dqhU`g=QbH$ijTJ~ETDp?bYbDJ!q?62^s0Qjyh(hw0b@=R&P5^6Xl)
z$1^ZB&|bJ$ZOhem=T8KEivslaFjRacnU(dh5SUmsk^EJBiN9w-Z1i9{yZ_)v@_QRp
z3(Pp)Wfx0Z)O@8;v<M!dS<mfcI7^X}i{+-zk%yw{6C_b58{+!j<rdtfrVTyJcCyxD
zUXlqaI8KyM)`3tSeDt#xo;r`Y0l{C(%ogz;CfoL1lMeYySpJja06eGsr0B4{x5Y{M
z3BrRR#Vs;w^jkf#oUvuGTBhrpF(mn~k6u3gJk{k=&*JPeLMIpt{8KQnY30T5qX^jH
zs#jkGKc@2l?vE$VSf|s?oZ_+W6SxSLXA`7hF)>L36lpB`8YUGUYuhT*?m80TwV)&v
zO}TpOg&O<JYL^;olNkvfb@^7j7KKuL<wSWOz*#ZSnftGtlJcY8jpwCwLtli}as#xu
z^3qu4UtRmj-~152J(x-qHXn`Zza0zhI1hu|ReA~-J`nQR&Ekb?{j7s(b28mL!9wY*
zXvn>16^*pyeW772e44xKOw~`TmUt3r9cbBlU|@eV$2{V;iAXN#6h8<5>$B%FjfM76
zs~i7cfRHj3xP?M?0#=M#h*$C<E#a<F_y|xgVxWtW<#6;0`A}@pWThR1b9}=ml^ZMY
zc*vEtbG-XbB(AL7l2{(Qw${Nni;?yPC$<nLJo?Lc>l?%eFED2;50Oj&$9abgQ72Wg
z3}}WzMkI%dBiJ<R(yki7DK#mSL7^I&I^2$Zm4HLfbuni5eMzm3x{lblVg{-oVwA3~
zw~F@66$jJAypF5h*jn{A_8i+b8p2%>BgZ3K|8xj+P?GBjqDSs0P?M8p@h(^qx!wP!
z(yz++lt6ryfW;toIA`qUbKx+@*PHKfj)Or+Pt&}?y0h?g9=Gwvio>_1%8n>tykJt>
z`7G|W%pH3F%0yoeCT6=hAA1lY4O+my$Jk0%)-G16|D2C6T5t0UFC2|tYgq^ifgr57
z%mHF(C>HhdALNVy42)THLVo-`g&P~(2Ylb*YZh4QgupeGVrD7?;-H2+kHT_s_#}4W
z))p)TvD%qmoG`);$i$5jlY=-t$Dde}+29V|_!9R&mmEa?h}?bMIYBMJpkzSvF=uR6
z9_j_pVKceKvebCAqG(7B6ezmGHgD%y{sK!1M<BL5J=T<1nY&OUxzj~0_-4fW_1o#E
zxrn(wQE=a)wCgjQjBACYkjL*UA@iT&hT3}vR>K<|yR)B0raC^Pkw2F8HXNVd8#FEv
z#ExdbWwBQ?8*3o!jDC*9CO$;^N;4)(-v{qFEA@@g&Uc)mrJfGSnkVRuJ$?nl1I(Hl
zvbVTkEb}rwcBH74CLgwAa%nfJg18r6Z72UG70A}^na^4u7#a=eu`FKoSnT#Ie_#uL
z-93;KY#6+O*A-RI_xr9n*a3%cL@x%y^0yFxr=@*|3q&AAl<=~4>0G@D98qQ?GcTvU
zpz4@A7;pUN{`A00D3dxks_z=oK`<C-r;RqUdcN8ONJlTk2I8&~6|sasHAfr|2{>$a
zaQb9stlAE#I}4rEK1GLq*|`Mk3wARc-9k;l-LG(%V1a$iW!?>jw%@uA#`ziYf+lD4
zT4glQL9jjiN2~Nlm9G2_9Di4?&+rp}aKY8}6TF)y-5WN{y&k>Q&|3g-6G?`xuC$tG
zX<@C5)z+6-3cW<NEMr(n_uXCD1F0?C8p>Wt6_H{M=TM5!QJxTa1s@sJc438uS7RH#
z>bOB)W~}>vG+NqG2`rJ4NoEAYdicyMKIO(@p!jcHa<6lj(p<3sjZeU}^+1??u?zRV
zbonbQ{sU@F4)7!9aXL%>`gQBG!54W(`Atf$q|mX`lbeLl>K<@j1FTP-XYLzvaW$(L
zwd8m|&x_26)IkVea;2T^8>(Z8bJVCv42&^C9tr)2a5w<h9(DALB~Y*R*(pDkj_fx?
zyW2T1^_MP(HAy}sg0ZGpe$>c<kA7^BQjdhz!b>JSh9nN2)@IQkU$4oo2xw1gP|kBF
z{wq}fzz1YRgiKzbTLsj#-#8#W9n)yRxA{)es3XA@#9PClo%&B{5~6JEhED~t&BZ%O
z^=DjTYNsN0dPBXX-R&Z}XI|kdVqcsvlh@V2K;uev&aRhmLCh5J+3Co1fslyN5+?f<
zM<=5(i$<E4)T0#lorJU#+5AW7L^CNq(JS1|zzwYRWCCv6f8m-G@(U1(#%DTD{_Pm0
z*f5BWIMif4Z<SWM-tbot_su#A_S<ND%U*QvqdbE<2oWH1tYonkq-e|CgUQ61(%Ph(
z+s+@1d0U)B>f;1ms3tNsWS3xhX&ZPmsw_G8E)#_`<*Hl?W|B2Dm+AJ>j_m*~<kBjl
zDEW^(_<zOB<-fxgw#4aHx!3mb>u09mWkxh^LK%uA>t!T%L_Pkps<=n)KV!bvQIX8-
z;oNilgrYj;+GA3|ju*zzh^1XoVAIpkxj6y2e)K?TqzQ{gf&6t8nw@2X+<n5%rX=}X
z7P*3)&LyV$%<=~BJB0b+8)-hhp4}b!q#b&Z$sw$#|HXYAKv<bDF`O2DEyoVPellh{
zsZnO?-5!;=wAy=^YsSIHqS(B5dV0AuA&{)^tac}Ed6@xq@xzvQI5Y}CT({vPokHS&
zfC}C&?f#@1UqRS$+WcvdUyNdp1*;qZtr$}4E#J)xEsW(B%{_F*{qE`)hTZf~*^a~R
zO9nBG19kU5M&1noM4Q|*{o@bq0yp&;SOS1unn@qH`449=R0%U@EEWLJOC@ShlfSON
z#yA$4o6Y_Zt2}sD`JpOgb1;w1&F!vZmQz<OCrqo?aCB0Z3l%>GnS4VO0j7r*-jsZ<
zhrPn^v8Dg)%Cwo%r0Xz+H3t#xlk^k>vTvi>iiHw7`j<p1>+>&{*prDZDlD(gdKj=)
zkB-<2$R2ZHX%zs01oyRRaDgXg=$Tgsf9RRq2>PER0(c>v=vTn_#Aq;KBj|`$z3Pc<
zzVHt4sS4tcqa@?fOig;<<sU^8L&Zx#@Ado)Z`D>%2#@_U5&Uo)_K($$^SXJ45S9PS
zs|*0!v>~jf-!j{GsS}`n>!7YcY=UZLn0d#5pd(@E^sICS|0DTOn&?$S|0)?F&GzD>
zuKS}6@$cPt3FS-zs7BzeN`38I5sV50!SBx?UiE6!Kqwgh#;pwg_vZ4~Yk8B`wnNs~
z0K`9mnAc_f&yRoA>tu&{UvaBH3*tZa%s)YfSBMiA9N^bXh=7pz7qRmvNhCiBafGd|
z->X@14o-?;hZ`IO-of-A!^lI7O}f9m0Dyb%g(@i}C2U|o79SrEdUSaVMj{?kYo7;n
zpZ;C2d@o9@8sXEbSM9Jr2#lVq6~>`q%#|TIp;UzXq1d*@Wm7(Uup#?<NWdT0{w^5;
z7&9C+HKjaNu1m~rG4(FlTQ3(li={J#ejS_pF*DlD;o!6iLB5sYs;FbAmm7!hiK#d2
z|A`RQ2(^bJ#M}vq49uIET>IN*^YuFmHBtgOd9iBgkoDs{(EI2=NgAh*oll~a_!bj^
zqNp++=N(rmGD(hqrsK|GHi4%nc>g%~dh-z(g(Ou1z<@ze!~F%&{CNixO~HWyjr8NA
zri-sv7Vf8sjgv3b17R2jA`3u8c9MXEXtwue8VcC5#HDp_0K>nv(4W_Lcs2MG?fh4p
zB#HmU$Byywaz4&1>sP5SCAc}R1{RD46|76GT*U~wD2F_^FeQ`(0i<=1i1dUZzx!EY
zaSdoUb#Je8{NGPhD4!ICxE3}&#~?1Hxc`RrvBJEYs%JR7=k9o}#vDE8ilp7iKyB<Y
z{M^AB1F2v~E#+11mz?gWNs$+k0tyIdn`E`t&;rTmVLsi;Av>9C_of!?ma=FHh<yIY
z4KR@dgMkwN4nfQ$Kf=&i+3u~~tiCDZ%CXN2$JA#h-N>8y=8U9NgE4dE1qK&egKq2V
zja)}`Uu(&!CRWEiw8z?m28TC3?xfC@GrKRq-_d=4vrg(t_!<EXc@UE<1YQ0S;P2n<
z$@B&n<IgjdMdBk-EHIyFaylNN5Y)768V`Nfo!m)^OjnS6haDRp4J5h$gnWY=IENF_
zBk|RF4f#WBLFG&#gi8-yW)$P6`3d7LtvwCmv#Tr4`YLkpLj%V&+&T2zGxxk)$|k-H
zsZ6vlvhktryZAt;XprlLzl|x?q@1%e_CrK3bL{>hc<kon9%98hdahE%BVrM<+@d(5
zN{>cRi7}+v&S2^ZfM9YDE&p~#?Z~Ipv-GR9mGh&XWHLN3I9j}B&wR1tv?A==7_8{v
zv({*%lVN8vJqlZGAVA`U7#t{K-fB$31#Yo%pq~g%MG2}^AK7~9iOro)Jz=%akf?Oi
zs8xGp^=6SgCR$CDIz<>|Km^jhLnaM1aFBAlpZ&Wx6cm770U5G>4P6$%ZzDkD^JEQM
zF#}f4H!INtNn7**B}n+WT<Akje^@2NTTil?kyV&+hCn6~7|E&#N1&ty&ONRmFif<n
zWlWoI$^JB};bCh|u7v?btEM?wTgBS}?y2f<WE2C;N^-zv2q@A2Ek_axrq&ag@PnS{
zy!r*z{@718$7x!?uI?$hDty*$Ll@&DDqYcU+q1g?ZhyPRG*#adoRNGETs#N?O%ih$
z{1Q!ADEMtH3s-^rdmN*0GE()t7uy-RCEf2k6F<=gerp<$&55&1C4OW3H@5Z~m3Bq2
zk`uj%!zkaJ7lVG&i+g2K<#kpoKqJ^fJ@MIoD}geVn3}ybrffh7sw)dsP9xtU?L$C&
zR}7)pTScP9R)NnftY#pInG6|v?QfMI6#<3Y)D>vyJ}852@Bjb0!CB#5HRi>7m#2Z@
z=pNmfcrm-CwnM)TmD91y2v_jA&IF%4xQNzuGXqxrcuCK3_GjWku~;QRM`(5tkQUZ)
z#`Y-8eTd^u;||U!=R%vLe1sMvJ!auw^fYLVH0bh%|M#0KMy2<uGYyxKM9vFa{1aYu
znLe^!%^g>U_B9&T?&mfIRmUsD{Xkkkw7cIKipr1>e|rUs#dH72?)G3Lp;0&hGtY?z
zv>iLZynT-pmU7mk=7L~m+Re(jV59;yPzMJ!RJp@jid{9NC^_)hvwUg7917upCYjKl
zQN24xs$<kNGV+o67IjcAUhC`oLNZ2IWLM>4O-!N_%13)1&l@^2a!yho-4+Pps%*g4
zde3QE#m>=jc)kM-@N9Ra1~8AGB^oFez);SvTI_P3=9Eu1t96LL<fuZGVh%h`o1+#c
zN=nGZdRvj{AJY>}&X(PM?ktwOz-V_auRA7-*)ezP6Nl|>F2Fki@HP~Eyix1u&NafC
zRTSU9n0EoJs@%+)>ulx&OoW9mo-Ds=Rs+_)(E!H{;d*5Dk|c91-dl1vF8Dif+<6*2
zD?C$;=%JB8Mk;Hz&e|6wmGC|Jcr~i3C(xSIze=_v20eYpKs681|E+GP-%gDGZ@*nC
z{qu^!yR-e&y(%Mv7=}43G$-Z}<e%%X759ij^+Md%;|e|YB&*BAJHAmJ05(|R6jH-B
z1rIB-+o27HbJ3Wg0mN#)gpeWG)>C!uutO{vQ3=HN+uHR5aSpZw72T}Q`vbE{b6bLk
zc=ta{hr|F(snPF@DcvsuTH;eiM|c7(m*-7J%3~hTzeS%P5P*uim662lv5^OZL^F@6
z-LrD~^Jjy#knhJ#HrUfqZ)~7+haTsDL^x@A<{;p4+9R`Icv2+nXy^Cj$n@BN?HPJ=
z=s<bA8FU_-=E5hS--3IlX&oNBYI>oY&M^(ctJ-#WldS90_v@2@zpZMy%P2#w_x8=$
z?^b|{DY0827Z4yqelo_8`^K|9(me64I}|xppx94Q(Y*VUAf7nxd*NMa&zqw@5kqlu
zV8-lh>ZM>5406BaukV<5B^SjCy*c~k?NFGt(yaTY<_C#tadsD5?yKU9TrWQ*K!K0&
zQjLPF9#6iGJ9?9=x^Wu*E#so&<0%4!kpj<KA8gcq%)X1<&2-<XdP!IKL1?s1A@2_}
zcWm#rxjkLs9-_ZtR!e6`p>>V&kr1B@TF|i1ly^<*lbE(I7XpIS9+O)I>WPT>l|Loy
z-JV?1VogCoJ9k#wz2ivQHOGn%@8R`|XG$&Km_7Qda!Q*6oCX((HjvFwe+}kGp(=FN
zZzMziiJtMw=a1k8TtkJ^A8rH;DYm?wD0zc3>V0++MZgCQVB=DpR1M&`>5wB9gFoJ%
z`#y}|W=MSuDF4LnrdF)FB;%O)D|MrvI9=}oP~R{gwLQMJV#i`Jpa^f$WqLo*j69z{
z+A-?G!xW>w)QZL=Zk>E?N<yA_zF2&z@M&e$GL3c}(kr!YcA*+CjmXupD3X`II6r4D
zXlY^i7QPL5t^!K+Z@E&TVkk7>yGGaZ-K|C?s5M`JS*T}Y8;Q9;HK2!DDN2Z^(#SYm
z)O_mSF?|xeeQ;njK1}b6PG8$M%?h@?K7g#t2ccU;*Vvv4R4O-}G4%mY<)OYnmCM3E
zk=J}B;gcXDBV+ke0mEaZ0PXXU?wBtt11|&z0Or7grI&JlXV6LeWZC;6`!rI0VU~xz
z*O>SWjvy>w23nI^OsFuXvpU(pPBljDQhT>r#sL5%KnN)Eq#acZ@-lCqS8bB{=NZt>
z*M7Zgo=<j<EGga0;Ly38G!}y{a8QSOP{Mk3RHow#W|;!IeklMxy|oal=uNgkz{}5j
zx2&ubP<0HkZ_UKgszlxk^3J$x8eFIga_?LyQ2>&_#>U3P4;9*@`BwZ$EN_dEj$dK}
z^3}VfA|W}C(VP()`tMCzn3t`xJPyq7?jAmfMfg5DLQPq(XScshr#SjPj#_xVyOl}+
zQy5RT9b+v{0X%3IuAW_2rFv!%09#ow<S3%(him+lhZlZJDnM`!PuRk!)zp)?KVMBP
z9`gV{7FLn7>xk^<TyfQd{wa-PJEZhj{h}9}yK1_s0}ZVNeOGZzqd6=lqKo(RiTGuy
z@~u9<ZC|4!cUHE;w2wur1r2cdmQgtDXq}yeVtG=`89&0$9Ea&!&&t$&fj+FajBQtn
zNStV;hJ)Byn*gcLsY;57$JU`sgt9t$Sk|4GtlJ0hW?}Pfguon`>M+6E%~IcShYH^f
zTO6h{j;q#d)uW_c4&N8P65aZ-DZ+(T-o6-5oR=4*b8*N-*L>oKD6Kjx^Ml50ElyLx
z_TMkOj?d-oPh{hyH~^cEAe+w4x_f)P7|LC}8juM9cnm~dXQWF2*UDY+efOd9VaxY7
zt2G|8LtZ7ygut$xmd_(%wMm=#nBenPLIc1!FZuKn&XKFaRsX&uK1v$Th(Nhr@?-=C
z4q7wBV!@}mpSH&WtQY9V6fPE4$YW@19Pu}qv!W%X`DouQeZGsmJHBxR+KIze^pl0t
z1?L03y@}?G>WlsuBKC39DP5utfD30Fzaansb`g^uLCnYmfU)mV6Igs5%58oKJsAUx
z+*zya|7{|$3J4u~e+xX|_+lRtd7F4VU!rHRTA$j9LDOkfVW<tLCfppipN_JRD+C9m
z+qOa8A`)kso|PrxCFo`tY5SS9-2>0xI`ABwi1k*hX$#)#W!`j$b+Sl_+N^o8*4Fl*
z9<UDvmK9^`Qv`RZ?=N_4FS8e_>1gww0R<cur@|sFL1GU^XNh@+tlHb(k3<|2;&^JI
z{`IRi4cog9c~4(wpWKO4c31Od)S^7r7|m8%f*W^35Cy~K8z&mjixx!zs&u36@sx91
zmYxF&5ibf6pChIH6wo}SwLkv$^hBC+kUnhi?SZ+!4djTOx!g{IV4(I#H;~duW6)2o
zwtY=(frcf?>3aoov@j4!JG@gs*Mes4L8XYHUB)jj`eYii4?>8=81+~{DvAYbWB+i4
zoAFiHSc(#plEvtaTCVuHDX+8qV<dtoJ0cOw91Yo?J>Yj<X*BO(xKm#3D?tI(k@6FH
zkA^j+grV&c5UDV2e@#{>|I81;ZX2`8VH*Mmb`X$FBL>B!nn_fy*@*T#<2>Xf?P{Mo
zOTF2o`0a#*@tX$Q)6b?auBfPU?*icn<;}c#?52|~C&4WB^bBj_I?tMFEp<MndVlMz
zSx9`$y8%Qk-6j*9;!xd;?QFQKK9A7|3&aCzZWEpNt3<vd8qr7$Iteeig@Kp7kyzZ-
z^)|}^)I`1ntftS4gHq6;y1v(6Y0z<S_UJ5+z3SX5?R6Vm=e*4pYG{%M{LZ8I%QxGJ
zN6=qnNA=W$6SN+$19g@@r^$STcm8Qc;XGZa(cQqs$ME*|10aD(-OUWtqy;d^L&bGr
zXh$Bd)`v99D4|M=X=z73=Y`@z@<2=3g%Cg}01AbHs9sHr-godl4y^M&5<%`7A198D
zBDT$pMS9cv!y_Be6^QDkL~jF=g(S-m;o#7SPE#y-Tv{d%G98Om8Nm?o@f5!MJbNe>
z5IZsbE*S|aJ_7|V$hN;&Xxr4h&{EjEZVN2qmRp4ib7Yl>Q@tY4xBL6JJJp5f@27lM
zL^3^3^1yqC6Li@=BqF7;oA|?#sZJ929++I-VrO#dnsBZ<M8c2}8}7$bir*=cZd*2H
zA^rIJtq*77hH`K<t8RTa8Xq7;6j=9ENcB%M`O#dBvU+CC3=Oi5=1>h^#1q$9Kk=JG
z9l0)X!#v*h8`gRyDTD6&BN@}Yie*C-`~nr&QQ`5~9lSo5jL$~{>J~uEXAO07kaIbc
zQ6GI~s#C5z1gxY58(GbIAJuEtoVU)H9AzyR(&Qb5#xYI&g(x>$t3(pTGo`ZJ&*?t8
zBca}6UIa`N#(nY!j?Yhrm$vg&m@ApAT0!3=&f2_OVhOkdd|S@IYeoa1k^P$>i{elx
zxqHGO-cJ^t<?lb>+c0HmVFn*e7snR#d=t)^-IDsvwENoLYj+P@s4hpkejx~52b_g?
zV4G<qGtfxY5S1J#qe5E{LJ&~*8f5L*HNBc0JTB@K15fW*6094FO5dY?ECWOp4U>gE
zj~2r6@niwPiib6ns>05?p+&7<b?0U-Vo%-$Ld)``_=-VUgd!2ecSgxVaXp?d9R3>h
zlQPZZ9V%&h0nK&}<|4<k3M}s9BCU6%eVcM@Oc;A&ygL&~D196C(~t;5CRF{S+m!;V
zWf3*U5Xna|h*}>v9TR_NlA`KH9(k?D=UbNC)3fra$341AO++&--=}qGR<~cms~h9(
zOeW(NDxevZG$*Wf4}qO6o;{7m3ri(&dU&U`9M(L*7rlR`u(aW%>2Q?$P<EJ6w{3|)
z(|W3<UEmIcN`4iDWZ<m#eWTac=xq5T)TBoVGolmLP2+Bst0s}zZz@?ISTHcKF}_lf
z!>I6ihU&BKo=Jm5lT?2YQs2~+_WXWqz02{!@W|crju&VIuejslZZ(tXS*?>?mX7(m
zWXqf5gc;mMn#sgzl1!ck+vV?wuMBphYyE^gImSN80vZ~T*Iv0e!bD_C%a63w2S=8(
zC#!QZdyz8?h0V9W#=+h~;rW}b2SA$5&;fSB7Qvu^;O~~k;vP{WlFgdVDd-p9$EiU2
zeyB*97&2JSzIWp#8sBAY+b_$CeB%(fbUmH%u!iYeTP29tXW&~OZ^W_$yn8Qlvh)v6
zb!AFKJcb-^*aLmohi5f>X7doHx<oE@vtB|f^Cm7I$kl`KWL37R^Q8i#+Y)=lgP}{c
z+|4YArU-t=&4E8~x4(oOMsJ5{V!xWsnk4BAKiw>vkn<IW<&A&r&EY3|Z#H>Y!?+N$
z&-!9MX8vMOdGj;X3$tFE-r(x;JV@R0>3!fyXda@6TrmH$_OkbQtN7LA;WXJ6Be{fL
z8(;FEL9M~HVEcGf)kI#FFy=nng!%0W=SBgsFI%Tr>0@!T+=niyOU@tT8r)Zj?O%DE
z4|wRcK8k7BN{GFiaA_3qeQqXnIpx3L^caDmd}#E%X$;@N)m_Ywgn>RBoqljFWvq=!
zdtCjUw#)KZT0df{x6}Un7~!GNM*QLSwQ*XW14c9=KR#m0n4ZaU9@MQGC$vpLLW*XT
zQ=H;Gs~`A6_XP(w)nLn0td?zQ`fK;j(v>6y=ND<W5@ysZ6-}wb8RE^AX#&=m;N^ax
zGhpN=xrD4jt>WCpB9@`JwN83cW=Ngz@!3u~Yb7v2VpHJkm~)j2@=dX}z82xs_wV1i
zphI{D%vV|<%P<_RhTm_1Qqn9ZHP)qke>cz1`lnD4;<&=Nqy!yyNJI1BAq$OOt4L1d
zJ(nruhR|4s!|?c3L(#uVF&?(H0&xtTNdrj;2Y$qzO()ZWsOB3JkbbZg!8T&z>+dbQ
zrgoO^5GQxWQyD)J<38<ybWF3^i=<lr4_j{;7T1=v4dd<vcXto&ZXrN$hu{vuwQ<+r
z?iSqLHF$vF?%KH9*EutD=FIcGKYL%@yVqW;cGX>SSFzX3n6R;EINhwu!lqAkU$}8R
z{|Kx*JfxkK#-jOnM9L~|wlTZcs`>LOOQTmR0RcCM`E9&K<S+uNT%(d}>gGpW`8eYZ
z-qCXwJ7(4R$D?a^#ji#dU*^-D4Q;4i<4b+ylAhEUe<gA0XA3ON6%qPA9f1-EE`H@l
zPbc;@%$!q&@(WeuguKTt*(1xf<8vwlg2m~Y-JpI8P-nxD?AH}$k9>>2mmF;iv>6XM
z=J6a|><_V*^<bKfq*Q+$SG0ZG=;!-$HM(rC4x{&W&CUS<UcI$<yUutp<6$^5A$l-q
z2>B5-vtYc7Q)ZzBb~&4gobaR7+(?TMQs)UXg_#8jXh}3XPdoVUqB$G>fw1Gp$ez(j
zc1OQgH2q7}6oG{<mK!(r$}0I63v<#?SPWXsI1F97c0v^DU3S;c;}*U<)Cy5l!9Z)k
zN`tNSQ|_?(7wepmubfvupa|6>$z23nFN=wJD~K!V)Z2A)0D85W+OKE$DiUkVpdm23
z*DVOjUwv|!MXF?ljjf1G!wo_Q1my;)$B3lIj?Kfx0vI@f37}R9Xp|eA$3rdRy014I
z%&(Kie+c9LPL9pEaLH1JD5{LpQK!-UhGY!g@dkXJ4WIjK?0_w`w(6qNj$MC-1Ha&=
z_Cyp#i%wKTQcxa(Rr({1{vLlCCIPT=r1Q~cvT%$&1-`{Q?qqVDS>4${o6eCu@?lnd
z4M3sQOF;Ql*;}Rq4vt@W?Ws4~dg^~0jybHL#uvw3ylI{=AtDPq-*#$hR{SPkz%kM|
zQBegfDdK}sZ>yGtt+Se`mNn;k=X6ST60u;{Tc49yvFff;&0}G(M1tU~Wuet7-tyGf
zldC8cx=ByWN#8yJQ(_`YY-}ShG;7q51b+ojHkc938S;GiQbFRpSyW58Ji=Ht`GCV+
zcHX`h!G6)SGWcc7p4?`fJw@l`^@Yl$N`8h1r%D)tNgk6a-*%>ON-UwNyGS#p6k5Iw
z$&S-kT<xfOXlQyj$&|19*)y6s$3sXK_IM(llY`KOPW7yNURk5!>w4OAHhRu{)vG?E
zS{FyP-I`c*hNL5Ki?04uUAUp6q(mcT>}FlT#II8Jxw2MR_4Et4JQMevE<i1rDl++Z
z$HbM^47i&DI-gy~CAG0ut|RmfhjZt^!wAdKCXYG4Ko)@iG0APB{A>Bw(I1We)?Y-&
zscqY)3n7xIzH7Q13a;mHZ`?S(wlylHQ2HQ$FFm#@+FFJ!*GnET`<(|-MBV7F#Etv<
zQpy>vomV;*V{Mg#CEhoxVvW1t<!%ZZZ0%tO$`UY>fH&T$psRFG-8}a{Rke6CZD)Zl
zk3#s*<}K9@M$8hwW-n}z0D-*S*O5-PrgY+Dd36Fu5Kn20^4!_y$4JnsY8I}=NWM4v
zlHu@Au;oINE6uhXRgn0LH3skCX4B;yA^7|~a#mMWvJ)93S**P;hG9{wyM$pUJz56G
zPG>d5a9pDBl_%vR$FO{Uzk7ecIG!wYcMpW~*h1`UnSPuMphjLV<+yr^m5WOCIN2<S
zOciN2MUK1Th+jByMtkQDm(1PvLs2yw`=(@7_owbqAjhX^F%tnp<+kZ;nJ=>P@lI#<
zGnNLQOWSB#HUGSyroz_BSX5_|^6O1yVW5Hn{nw6*djM{-mC@y`21728;;~gzb3t1t
z>vuR@Y)?xlN%GPLzd}=$M6Or>6@*1`dwZx$xRdpSw>`Q%ifw;DFyh3fK46ter)|z7
zdcNS2#(7`!Iro5sn0p?MM||M6u%@sU{UdV-%t-xmz3G_!Vxtp|0F`S9HS%al{bKs~
zc!xm$YF{w#(Ulo88s|{pH&4SGT=Ulqu2*{Mcm7;;1`=N$5=Ft+sFqL8Y-hgmjKXu@
z2GyV(%eaQCv{6e*-n5KtD#`Q6wSXq!hEI&D4s9wBVA^(+_$DgBQ03=(?fT~1A1y>g
z8tIj+VP98Yr3Xk~Gp46BfQ4t%-GS&7QhY0U$rPibo*}K(zl<5;N}Ci<<{!xLX~Yxm
z0JSYy4`bJKw0rkybfpzZ)%DTG$%S7NwJ`<wd;`KE>qIM<<|c-=4U-mJj}An&EM}-=
zLy_8MUldL@lC_^St8lCw^Vv98*9Z+_tz5R+@B@9#=By4gTSUrmOJt$(|1@c>6Bp?g
zM|gHCKW#{4`ja#CzXBDeiaq+cQq5dZ;w64azJYB)X>e)M=}u*#KI)9Xz-V|Q7VN8$
zco}l>@w}Cu*DyMwfuAWcyXJFnLXIe{Pv#@|F^@bYbp5fajb7p_v5kXzk<ZNGDaeNn
zOS69)dx*0h@MW?uii?|+0-JUR@r$ZN_ZVl*u`nX!(6_ceUyAd72Apvc@_ED2n3BFv
z0Xowt(mRKImB1wvo@TAbAsLQH)y;KXeg~sqVD`y9eF6mlO!M!p34VVQ0|*?6%*x@H
zi>xs>*bxa>=4kl7CV5ox9rEQIJVg!&v|NpT4jGgOIV&!u8G(D>@?LFc8sPcdy72MR
zVy0rMZVc0s%5(F}`7GiD&La1y^S6KXtk@;^`M+}l5%o++JER~!{lMx6iKVC+`e)lV
z@*o(MOfDCMkTDU>iK#|VMO&5G`GT%jWv%bDmSv;1CM%%JgBjnOwYw0Th!5^fBDK6+
zuG{xjVOq>33zv+I9A%{bi*>|i43T5yTxAYH)*vx?Ia6slXtoLpnaI))#ApOnhVHlJ
z#NSE6#5t_%a2oe(!mBqrk}(>TGKZzg05)bA{Dzv+n+(m;LsD%$iUy`-{pdiDHv0%x
zaHq!PKc^-M&4)Ztip_6DXN2rm>1Dxh-~Eb0(IoKxB4Ip{hxD6V3Oa1HocYk@$v%)e
z`d6MhDgD=@gUt!R>+G)es=uP}W6om+p&+%69~+I{dc{=KTV)nzEn9b@PMj>3H3TyK
zk9SH-KM5DnrJIxD7v`iXW0mX2h2K<GbETFQJRgZe5xm}~);)TpK{J88F)(Ck^X~P<
z4@uQLF_j`BK43}q#5gm47!1I|x?qVQkAR~mms5^Mnen2zS@%+ee!I>XBW6iy9}Ctc
zH4T~C1Fo+$@3lY2aM#z@?=308Q{#q$3enIDRxPT8hv>EoQi()A4Q<Y)Bd5U4JoR2|
zVIXb~{KUk-87%zeMwJVd=!c;MAtwS~2o2!|v`@!AECdbqUH}`0b)GdD-&TBbgh2MS
zCG8Y+W<~aN0h`#aJSCi^Ae!uEtLc`|<X+(S8g8s|rLQR-ZabWkj&7Q2N_V1?OH53Y
z_P*Z&L}z@AXM))Jf!yphek{i87X*ac(~=PO@}#|FB~LXB20u+l@~D%?c|JY*J{ak-
z=7i#iILw>qPlai4kqpp;B^kB;WhBvKL-WC>{F~`jzsuW^EypI@TMC<s6k#1=qTSpA
zt<fFk3;1oQ;XEO8ntIvPC>hiWq*!lYDtq3dak(&@S)H5BhMhr444+8&z$C2FRS&q1
z>Ne5I{uYAWfFt$-;V^&VjD80J#OjfO`x`I*=qPoQa8PLPL5?r|4g>;!$A_9q60?ad
z^;oJ8i)lt=1h}9Xjr6b3rX=7GcV{bOa#{q++pGnMR4?(;Bv}2*3ngt11MehdG_Xz*
z18+S&i-ZbmO6CBdxeeCid`<IU<lYi+t<YC<*ske;@S{7NTD88o?xOOYD3?-?$mVDQ
zh{YB~#M+WOWfbPIHJC#C(HR!j$Xl%`R6;i}o6rKC-^s8U8rMDq$up4R0Tpw<+UY{5
zrg{RLosAi=TS;*5^eJRafFQ;T{D5?CG%2Oy{%nomb_hG+!luW=e4YFd(dH*yEa44g
z(+}@lNqIKXXcF$vL)cL!7Q$D4@yK72qEX_O?-%0ThJ`ICTswLm@F)3$d&2yPxP@L0
zjayR)XZvLq@{D1X57A4&h$-PfQ;8y3sXJb_5$lZMfmlu(TGwbh!TqUpx`j2I;ji@+
zus5hz!6`G>Q-Tbl>hT+_F+^KDF}+~m0%Moo2~WK*ZDN5KC6Fr$<Y6>O;uoJiU3$QN
z!V=P}meTSY_kiu5ldP=AP%+_JKM3}AUfk)}|GX<cG(N@8%l}()Y5f~SdP09RG%<br
zj995)YAeue@g-k7C<{LmT5Di=3w5I&x-w8K0PpPe`7ZoQCD{Cy|N0K#ZV_s;TLjhp
zt%n<~>DlY8DErRo+w_*Alq>Y-5fl_9cee6~D^?Dx(MGdKm$xqO^@`x;?0$3FGnv4q
z&Am^#5BZE5rknV?{vDeTc8Mb99&6>sAy|pbn2A%h%oa3HIC8l=+OES5lU)U`?s>1Y
zkfwdNM5C1@0ZZ1pp?o4WFOUlvU4y*!#hiIA5^K{^b5mMb4k(s{SSpGqG1kfk4QpC&
zxaCSFdeIzid#N42%oMAnJ!>R%wt@qE2i?qXziCwM@YcZ6jAZQxpTwgsZ(A|)C3}@@
zVD=G4^&oo_og3BkBOb)T*g9~3j)O5Rh=wOBaa&gJ{0v{{3h}V!m-qXw&pz|ajXBf!
zF({EaZ8@X*Oa(%YGzkrEtv+_N@%(4~_X-wAB)U(E5d(*cWrb<@Hf)W~yIBqW5;|@j
zcOW(uRh5Y29hm!DQOce_K{hPORa1ygvrS$TszH6Vqru?Gcr+;rcrvtRL0X2>{+e3a
ze#Z{K*<)0S{|@i<+FHNRj7V*uv_HT97wZo?8b{j<!@phJPFiRx1T0J1p8|?ph87ao
ziLL{`TB<Rle;A{`ylv*J+%cb<&=Ve97#^v{ls?o5mp2?$)p?0&G2bS>402j62cF7^
zMG*l%_@1;x*%Rg!%Rm<7NBm30(Sn2Y-3+<^qELoqya>MCwSrCQF=;9?kLyh-q3u8|
z0;{#TnGkH(8;pH;Uwsr?{nNo@)*fldGdv7z%j0{$PKWKDpBb{dUK@j>dU1J!r!M>|
zA_Tm0>bc}=!>51fQqUhcRKu5&ZRy|l2r_P{fwkYTS-%*G_%Z6$rJB9JrgRo73eRSZ
zYE;N%@Q4r=Qdf7fsBope?dgH3GaG<<(Q$`yTHAKV3AfPCrb`Jk{8{&Z^z>g3ktlLS
zmD`J*V85|ipDuZ&EfJ;_5=UdN|6>q*XFUCD%gxu<?FdtOs<l4o>q8n8%24Bjshk28
z!a-e0_<!Bt-&+5#4_|1&IVlS#eQ!(Ex-ecST)#kdaI~ZM^n>++XphxBj_AaB70Eo1
znlpYP#&H}SuY}taxLW<sBkdUGrfqWN!%6?V*}v9F`iMSVg#5Ew5vU#QJ^MHvo#7bS
zKNIxs&M<&@Ff}$GQ#1xOo4wXPu+vkh-)`3E?Om$C9}_+;lb@Bt=kmSl;e}(J+<~*v
zyR>n3<eFCH|G8{t@LL&~R-cr^^ylYC{t1e>W{cDJ<&(Nlfn<i$Wjy+$A8Q(V>$QR#
zca<w9W#UOc)b?=6vvFvZ;;ya{bxMhNy+J{Ys!`{3O;q~-#}?O7Y>KOC4<oPToc<`o
z`X;rxnlC$v;^oa4f%SHc!`!A2YfDnF=n%)IQmm<S*V;KU@sn_=K3<rBsDla)4&FGl
zyW6QCta<d8_upsdUr6PbRd4}lJ97!7p}vSHc8FQ~@TJXU2D_^DuT$=jAa$M+qF?Bu
zL1)3E(UK$HiH|-nlj$h=RYXo}SwyFFh%SQuZq$z9PP4g(EULBsk^FSAH3OT)fX>z(
zctoQM{IC_>ws9gr{mK<Rn!+Tn#*oy#pcdZza$>ag@p7TeaY!wDwY5~OekhU7c*y<Q
zA=&U(9hURuwy9^Ki@bTsZR$VXmA}^Q7Vd|S0mL}m)kaEeW6-ExPdZ*JgE;!}O*$qg
z7xcg?E9w&}jp*QKplOe;!DL#*!xdl7@b8tIa!LCR5L1|EmXR}#y7$V<)UJozRLvR7
zS_j`%|K5>*?|Vx#)Lfi{{o}^<3<nI%2oRB5Ye`=2(x{m@aW6bm7~ubw)*Z)eP>aVC
zflW_2TC(Je;qfA94o<}9sap5!G;edf+C{`<(3#v64E%2V=rJaTi>qF}(Q_1|QWCmS
z;}(zl%4f^BH<}ii&RxZF_GY^L$!eyCIf+(VqN+cK!+c8i5j0>P2U0RPj$O4`U4i#~
zBSOt_w8u47$1P}PwDDvRnWGcnX*J(MjK!dviVUXw(R$LG&*Qj3*MQVO-)eTo?BT&@
ze<P8T7V%8jJ+(%Hf}iEtz2Z!KyRp`2j7z)OF=00)A({%kLW01)lu9@BjO}bZoeEL#
zK}2OVo2h)){;kEh#q=3PyU{LiH;doxvqv@Vmt^`Ns07aQT*kCADlfF%(fEFojNE&S
z!H6)jURP!1<@$HhV9B7d1;ma*v;9nuRamYe<m0*gxXqcHjfmgQ0a}uhl5+3QC5nnJ
zOQgzGHh5l3{H|wtN!IhfFo}rsdi=oHR9~)!k?2!}NjN*Yn*_6b{{n;m&=I7Ta27R#
zg<I+Q-zGAtRK728%VSTiEt!vJ%g0yvaof-N(I+FK2ln<-a25EMS>y#kOI%Kl5MyES
zOh~DB7)g|>3I$oMYXm3#Qu*lBORjEGkCCW8;MwB*h%gmpP+Tw^8@cjo#KkHhDXmPV
zE>Z~^_N{8tK>JG)0lRQwMeOJ%t-fN>-c@@jJfXzmXq2;J+#E9y7Kyt4fGPh(cmHO|
zX&_9gRSZt8Ofx3NX*sR_K-RHzHrof*ea)Qihe`oo`<Veb?W1%IQHh#OqMs3X{XKdI
z*M~7hZyz5E7KR;G@<j8ZZcx<1Ik<T<v)iPs@#$&_OFXgL=C}6f#84tEK6jx!P8$4m
zFTN@+PMn(~*N?esm4vFg@9(e#mWI16n4&Myk>k%0&DOK?XER;ngw~L@{^-z6<<!W>
zUnU8c;K#6)P;vDqFYU;D3E@86j%CsnFdFbq3=vU0x`#s{F?gX8CW^DZ`01r#3@Tvw
zX#7Fr|2zPA_)=*xj6MZAEm$+S+`}G%{0C~uEDrKXh?K1|)y<_#@?Zp|b%9n>Y~uRY
z6lT3}7v2xoD&~`6{$M$PUCu|%eWl88RIM=UNbUE)5-FDx8KmF>n$Ho^5bW@=VQAum
zz5UXXkBU?E>oMPUiWNNU=1Ymsmg{p~7EcVHtJXe`jr0)1T_n3VxG-EAj^xl()82y!
z=p{}E%r)S70&51dO*_zu2TUvCN9-&#{y1<^xX8!LX1|(4LS~e?$aPyBekN~-H@zV2
zk4bMRX7?dH*jC4ngwfJ#x1co|RU=AsSwu2~JWr8)&rLJql|l28coEuRv3#rQd@l3}
zGY0!P6cVpxGq+U#4whtU92&1;quT0zgu!vSb0%)DR7)OA*C}2j?+$q32gJ8ZtUFdX
zzCI5^Li!73aQ#s9aN08|koufH>cZo`n<}_gV5=>gePM;meQC}IqN58|6WX}@#hV@g
zJE0U2ZscKr;!!wQ|JT}n&jxA0@7azKv}E#T*>q-uTmk~C<+sSYOCGyfXg~XiF*vmR
zgX=5@+A4Yp+g(nm8S0uu;*T`rg#lX-3J)F;yi6gG4e<Pur@{`YAZz&L=l0-$i|@O?
zxbxMGrTP`a;%o-0f_pJwef#}1f;9jt1S*AG!&IV%!1t}A^~@0;0)k!X1bbqU6_eTS
zzPHFuI-R*EByeKIwPqO73vabWHrQh+1bqPGVhf-&S^3yI4KA6cs8WV8Xd%q-+w1N;
z1t(c;uG&_|)#$3Xogrj|pQRagL6#3l(2spfr<PwzIGm$fQM03~sTuT&D|Bi&D43Xn
zgL`x%qjO2mx^WrP)L=0aS7$mg+H2*rl(6mR?tHphzhI~O?c>KxUfAkDosJvI&^1=@
zoj{g_TU>$wcGC``n|gMyJVQK~ZR*n%Kv;@UVpDU!HtK7|{{b?7_aL0q`}|48CPvFc
zLBMRix~{#08!CcCcL|eRsSAfmPt;T{$?*P3ds@bnix{DpUzD|vy`qNOT2oN~h54Et
z1{WcK-Mo0_^a>Q%R{x181wlLR&=_hi_H(-#%RE6C30G0*uGD)CyDeefW>Et1O@|sB
zH7m)V^VNKE)wL59H8xl4eX_{&-sx2<<{O9raxPvq1l4rI368pJu_|o7l+fFh+1peO
zlT0katk){mJHGEfgbb&TtqB1h+-4CkcDIJMZR~!x>fyDnQKg?SRSYv6n?w2Ii&mGE
zgv2PXFd*YsZ=t2`xo;nX(9hmltU7b#?<Sn(YVoF+p^J!x&Of)m?jF5Z@W*7JkHCPD
zaD6__>w~_+{3>op2bHXXYYaOCw*4_EICLqJQK$F=lU`%U+YS|#W;O&W(%+Iw>Q@w{
znSEfVK~J@p4n~b$(}3of`7a||1!oZjrC~C2=t%qi5DQs9;zr+s?Lj#g=67XR(-*a5
zGj1ZjWl&?%DgcKoxvZ8I@qvCs9`Ej#P(_A$M!y)Blwk^(fJ7p_epJ54ncx+zDywk&
zHcozI3QJ@O6a<1cv?+^bUDVry7nfu`J7TlXOX%@QMofwh4@-g4+e^i6h|?*!x>YM7
zF45$-9vNIVc6P-9V!s(ckTE->L1&B-weGbZ{HO$y-{6?~C`MFkWHM;}t_^BvEMZai
z0W)ZXaW-_Thb0&k$Gy}lTf=^ID%AU=femv(AE6t>twbga?e)6@??|&rZOah$v!tES
zs)=t*fH5@hCgqjn^CEcQ9gzT~KYOhS#PBag5E@Bo>Mw;V4qhBF#JYiB4iK8^m1iY<
z{*|u&Z<H;vOy;*JkmBw^A%M*WomU;i0mjb?CI7FTW`H=3-;DT#FGL(i2Dybb#Brig
zT`##2E_R57syoe5za1s><VLTh`BQ4u?{|gw4s?HraCNuA6ftxdr(sUfK19VR$NYLu
zw|o3Pqb|851(7R<UthRD{pC0h1kcm+qw?Demn8NWAtAH}`84T=MH0ZH!smWcrD}C#
zxt#S4OT1KB;mKYi^k*;@na*X-0rA|mKqk0$x$zhC7{cMY&?fKkEJL~hwmYOAcCe0V
z7`Wq*wEHZtyIPDcF?}BW0&UZ@rD5|h{t&@7=VV+Yf+m}!j)`yJbLDhiPCYx|y}04?
zavpH*@YUe<GD0y%4yU`a2)i#e@{j^_L+>|{Cec~EHP(;;qGls;*(k((<o>jd7?*fx
z3`XbvkhMRQlZGLYr1#u4kpC-}V2V)gb!C*<V4B;HvVVd2%_u)qHOtEGrpb{)KjQ;z
zg*Jx9pmJfe)dG)4FtdkBNBG>`r^n~;OE9^%W{K5fUKofd3<sxB^d3w|=&JsC|1_;f
z#R}aWD&nIS1=b&$gKBuC2e&6i`6D{BI~-R5d4maDsn+o%uC5OA*lq{ox0ASivtVra
zH6I~{k|9H5FHkTMj~w;Q3_B=w8>e<pChi#ocF5RB7u~_q>K)jIkHScC4SSFd3}wDi
z!}Y-zNXM2CHxH{iB!7;j`wOg!jFN&?iwKx6>T{cTeRVGjcGAs@n`z!bZnZ{sHTiN$
z3=Y+;t_*UdjiAIlW~z0cvs0mWaj2n;1wt<cvBK{^cB?{3W?*E1Awj+AD~%f;9KR8m
z6-A3|A@8Qp1e{bXcz%m6|Cpvb;O3wPa|~|}X1-0&Vs1IXwtFxh=64O8OgpJ0MCu<q
zsv1Rs+o+`xxwFxNzXa8n+u>+2aiCN!n_oqrzm{JL52XxDJnEc=9E)G>`!7+yu?>kI
zxM2d4U-W^$ek*i&%KZyv%s_x=5y>NVR@kb77R`&MBrf*t5EL-MXpx6P)5ts7A)<A@
zCl25idE8`I6{1`$FQSpklRk}LNU6TE!v>m*aM{;0k@e2!(EkUwoI*Kk1ri1S3rbQ_
zft*W9D!mCEcuH}IG<LJXV>W&c%I0HJL<I7VZA?zm0cn}3|8;Tw3n_9#f(nhxdH?77
zsw6~P!xnSjd_Ks1keP)7ddGHuj8-71{=YWmj|)R;i=h-7)Ub5EZ1oR&UMK{CPeFEj
zTh=54PwQ_YD}oIFvrebs%YT;smtO);l`BtxA@^zauYU(d`7ztJaM*b!{a?@M&yV~+
z%8CeL%$PJ=7yQEwjzfT_{52DzvoQJPaGt5*deI|fU)n=HrGOqwUWJ+@r!X{(Yc2ZQ
z_bw{!0MK2_!axAyi?X?u%0K*~xMX;DfMq`uU$YNiC%3DwO-1CvFZ;xlY+}B!AA7g4
zK9i9fpKTwrhThv^uDAffo*$Wa2QxVt{yeS7Hr(M%$iU@n`9Btw3-yK0e<T6%ObUu5
zhxEr{Deu};HXN65kjlr)*Yl%9%l1Kn?c}}s%>8qoefNjEqWzA+4}IYUcjvjY8dcL}
zW6IP=XZP+`9a&1kf4vGFil9gDm{N5D3C@2ZtIQFUo#ae9JV1uQ+j~?gC-zCHHmXUg
zah)Rz2EZ1JjG%MWEx2&BmCN+;c%?P5;0uFQ+ySY=iw7GtCxJ|L(}XzxzCyuK<ihMD
zgM`0Fgv!{YqVn1dFI9og!riPvg858(AZ*wf^ll0jP127WFv0aQ?5u3wkRisJG`i0$
zZ{bpej0%b!FFaT`?fYDcI>@)xf60R-2xyR5K3W0)u~sDrw{Q_cMZbYW0*^#>!g|xV
z5>W<veD{?C(i&BMPjeY21PTDcD1l5otl~`VY{}u`3%rfC;Z`clmXT4z@k#HEwZ%si
znbbgrlKbg7mXKeMZzL)w`6-7P+(HFe-vz=DK6FS9$7bbcjREr6{7+wNpv}KhK7AzG
zI1pc;ps@JO!|j1DAKLnP<F9j)l>o`3ER=eErxOIo9R(#gZ{_|LUQ#XekwiK(d||EM
zqY0xDn4iE{A)qwqaSsA=J059i_e*bo4$|2BcvcxJjBWuEg`Nm`P4b3AJLEa99+VI5
z`z=?mR2m#ctvquL$Re)H#U%_aJ*_UrRKFu*5p<nMCp2AgD*MiP9=@0MjiXxLycj2z
z7}?{`b$wjpYfT&qGwSomX41DGFaDQy7n#8XDT*16c~JU-bWg~EvL-KG_iwjFrVHxS
z2;T13(RE5|b}cgbK@4#o!>?bvIaDmB+?5wUrCIJzB#L;BiipaMV?urfIFkG_cwvg_
z#FmIT&*eBGP?>TwD5xZ8ni=|OY++?Vo7JSn{Ix3b+4a#oDiZ2hjA!inBWH07b!^My
zA^Kke|Mk!5)<WHS{=Hv+UQQFyo^p8th<X)e-!CEGx~*@CBP!AsgjN72%dSs{3ALxS
zo8nkrNClron@GcjS{ao5Q>oC5QdkCA!;4t~!lQjsp^Qahw1@{Ddsb+Y*^5&BLWJ^!
z`2Hz^4=Qh)5vt$L)t708pfJ7Js1b!%-0nThibkw6nVUK(v~D8R#Xu{VlLj4WS+!!L
z<o}3WIMrrC!f^w=jI}vYfsR+nbn~^7Qgboc2V9p3>`$3CI(M5p(tC*CHYGG6Nw=D~
zUna7fdEWQJ;DyL;UdmaNMc0qF=9dIN8u#Ll>Xc#cwbl)~rU97nuPkv!C)-(V2v>6M
z&Z16|(OjuMx%xQdm@9a(j;u6JEB>Xk3d#Pc*R3C|{}c8qbbuI4cP&7u51r+jKf9lJ
zN)MT=;~EJKuo9BzT#9j6!^L1MnZ>D;;(RfiSw2*HsyKH*sKS+aZUSPlgmfra|AO@R
ziXmNDQU=(~gD@hnP-dj)V~U6w`i{_~Qh_H8$rUv1hsxhNS+7-@igc^+M_S@;pu7{h
z;Fv`J7M;K150rx7jI0;OV>B!-&la?Tnzf`X!iFgj=%+oK;-(pb@_{+DG<#b$nW#6d
zdO}_woqemh)uwi)4ko9oDxVKw3^Z!yG3Ux{EfE;kGMAGk`VQ=-f$wkmgVu^F*Z`e%
zb64X0lMb7FnYBq(_WjhU=xb-eWrb{89$bor{tOn&syC4R7J=s>`x5}%xtF4X#^3?v
z6c8#vO;Z1{P)B&uuHK0ZZex9JcP`>;3xwFH{J0sa9sSMSk?dF4EW+EFywVfrv}Whs
zi-<%j+7V)w-h|bHzA6>X4+cM1_+a>K%Ke-)$I)<8Yc^qkS2u;9vkU3;@>6MkevAg`
zENqB8uRG<|J3%A8U7Y<h<ES`S<3cJ&gtt<8f-epSmcRc;xdSo4-=jVZRP&<)xG)}I
z`MSSM@(S<Wm9`74>6g;{^;Lb++z==hkvYbHn3-HCpdh$QedoPTF6Uon^A7-6J~X#2
z`iHsuA`Gri{GXJItfELD6Sbi6|2?#S#VkaAkmVA?mlZQKlKn&CWmcf(NXTsOyPNbu
zFGagF$Z!COt(j#1v73K?TO@)8bO*XF#B*E7{2C?|O(;nz>0h9kxrOXUGer~t0004L
zMC8qvZvbeEYI*dZ-_4+a+mMz0J1qoSV`E35c_zKQ->=P?Jq9T8fC9rQ^Nv3EYEuB{
z#Rf&*dRub;kwf}B{!5nwGWRl%KJE)TXcJOFPB<*Qoa8*})b#Y)Gu!Dw2uSE-DJ%ta
z-EVT;3Ta{|3zhX=f|MVtg9<m=-B@hbJHnau+7jc&I?}N@==1npWdvggc`+Ey!@}Tr
zyQ~+Ozj0oF+a7=iF&!{@^$8d#SiD<3Z|PghLmT1dj(Xl+=f!28Jf^Y*iSNl~s5#3i
zZ7an0;Vs+yi--ZiwGJ!ul^^i%jxITWQW?pe*soqcFzGfqTh?t7kqBoBy8(5-9ocya
zvYLVFu(vPI175{m<MQDio{kGDoB2Lzc}5oQ7eIlc{jZG*S+D6Pm2E#^{1I`OXDTze
z1(_i&S#&#Oxa~cGb}c?DTviLkoShstxY6%+gg)Fr9sHZ2lbgf-v%}q=3B)N`(?Lq(
z!@jpzoqUF1XWfx<)y9IqhJ-r3WCfpYkC=#wsV6`UTX!FZNql=gW!?8LH(DPy`a@c*
zueR>jQF=%VK7Rv|dD<$pTLbg~XTRN}MGph*yYb}TUtaHt7Vtcxo?bYfe2!I1JQxj{
zqJ-X0Rmu=&e6Md8KAukGUCvKfnxVkv-P{6i5k%AEDpqCnFB=7GUDy{2>|UR5i)_8C
zJ#}J;1?2?W-0EW)Koc%ir0wsUf8KxIAX+(2MLm8#3RB!|zM$wjs5a;Zrc%mw^Vh}3
zl1u`)zCtOy+RA;OKl#i)oJw@_baH>w{QCL0a)B~RM8drVcZm)AHi-wu?59<qr-%v&
zAjYY~fh<quO+(7E$I+--+s}929pRKQ0pnO$4n-)bAo&y)ukVShPHWZnB(fPoKAy+(
zo&18ACOD5MEWzBGc!T3#zR2DYE>T$vcY8GxLPk`@kB!?_OVTMESeI*ngh$~!&v_cV
z>33s1_QF`F$qZNs2nds<h}c-gjwKi<s4vO6x$d)My_Y+~M=y^96BhfE384@?pF=tP
zX$C<F>YsB2KG|t0o2loMRhKuoW)3lgLSny^m9zD?+1Il6_o~jA5#=|-k?`234=ALS
ze}1RJbT2ahsaP97I)!08NMPKTcslXM<w3o_R$DpWaiP<k))@(d<el{PWX@$emOSD4
zRORhzavnnh%=54AltOK^bJ93YjuX3hmmP}2^Uz&u-?$5!)0kby^Dio&SK=YSoGCN!
z%L3mmzW_|R_^vOv@?XMS@>d1vmx6$69ZfD9#&;hasvHEVy01YC>1ySNQ<f@c^;=Y$
z@$TDYRf)k^Y!uJ;XGQj1_~J?yu${c00$9>dW}Qf-Gy;|a4Scg1OE^qNKVedTF09b1
zAH9D<KAx3l=^&Nc2XVbhosVXm4>v{A`EI$F>pVD&9wk6qTq+(KGnZ>5?g;*NI*Wew
zc3fVqTs)pOD8u&M{6{1f!)KO`hx`|FUckEUQ}|f;b`z)VJmaJdmKm6G2~{MHJRTOk
zYA*4Vki5tBe!|P!{h$Q`3NwRk7O!zzp(Tjy0Iv4i|3AF|1ZOMx^;*9LJFIW8xMolk
zkX!cn`G292#x5Pc5q^(y!Oey?6&L$Tgcu9g3<!;UY~Jt{_i{ZirdG(f6jx1sB^2^w
zSPu7QgVb(w#yeg<!~3BL;^hbS(6O?{rE>%PhHCGnm6Az4pV!=W2AVWGEYN*~-}o;P
zEEh}Bf0sD{D!%nt^`Qzo@B&5}vq%5|Z34HdncfcQ$v^y%6B7}z=w~8Xx<5%qe8{`s
z@QUTKTNP<{1r~Bz&rf^xZ=|qoGWvjovGC>kU`oDoe=<#63H#~h>||yHS~0YG$eV7c
zMqkjNSm^aho)}j?f##Lc7@SS8O=vcn&-s+r1-84}Y$D%&$d_rS48$b8>62$szB}bA
zNHFOEFxMSS@Y|ynST9t~94Z&kw%D-V0%tXb(#lWrXg@#R;t(4P%de~bP({aP{lGgm
z#<m{T-b8VZx=!->Y(-eA{Gn^`A(O|FUC&S-lje=K>T0CgHxTA#W=xPSB83hK{|2V>
zabHKZ!rhT=v6rEgec`AUg{Ux%_1o*?Fv&-E5T1FxFY{&*pm~Md86O}4m?(bl4r03U
zehbE-)2PygQLMNR^hV_`@4qx2KHP~FYFKNAd{P-xN1f3ohK(_XKy4HLoGS7@`6fN1
z{zFx(C5c{5ZdCNGg=W4|Paf1gy08gV_!AMo>-R1Z2#r@{GkX*wG24|UOd*g4Cf!|X
zw-;7E+#(Bp0g<5OaW}4d&c3ehtnyTe6LVShrt;mLRGSE-)i!c`{HU(8;*eHJ>^(gR
zpDiTlk!hqm@px~rTx-n#yHX=(zCvFCWGj;|f5ogogO~wFfEkk6;-8)2Y;%=fs0ef#
zpMilvO~a~Sqp3Tu4?wT}y#@wf3yvYUA>XaO;3ZP`Y~KgpjyV$JO0Dbto7HO;r8vw2
za$tQ~_v_G(MZk?^rFLVPPApJ0KWIX;5yZZE^0+dA;JyJLg7GzQ$f|clDfkG~a&IAv
zEopPz+juPG5F@aA^0kNmK&Kj~UZn@HXNZ@Rt5(_RQk}uD4FQ1+S<ydUk0@u-J{~r)
zC;@jxiKR-(NWYVh`n+Ne9~HtzsiH7?Ah;RYrBXAwnba%DmNdkg&yHO|GC_H?a8UO2
zgUdng)}q8NMZ-Pl*O}0z3ppjza;K_^ElmloK$etR)P7A2M*h&wYuEGKzmWiYzfC1K
zT^vm?h_wh695hzI8**~tfP&*j5jJRuMT^y`fAo`MJoGFy?^Cr|5fTF4RbYNViW=HN
z9*Fv;`W-8-=>64PkSZtdG@Xw(TY><@o|b&P+Dm{1-mm+F?oZ`NuX)`#Sh@T4LE$)2
zT<=e^k?aw@f}0K<?{}Mync+`YlSIF5159{CwbEXvguf}|i3NY%^Jif#+%zIWy`K`g
z7nn%9X6gNnZ|iTE2Ayn7xR;6o(m)tlf?iS|oNzgFm9$O!pKj|^p*;kLLP%&)eB60^
z7B;-ce6&<o_l$x(F7iSb%Sruoi%8!4p_FMoyRQ(ce+tP9dfk3E<)#pNl!yrYHB4`a
zj)y18>f3wx<%hH7vwKi8B5tRUMI0?LYpQCMu2v!&ZH2I6Hsz=@Xu4$(s1hRYX6;^h
zAe~d1`0*Mit^<+-=1Xq?R}8Q!N5JyCL%@N;e8m#axqYks)9iswm_u?(qhO1{Y9rBs
zkxAdO=g6ze$&5=E&2w!YmHm3hjQV&;|AR_{g|gKO(1;HJ6c}Duqzwt;FrS<T5rzJg
zJqdz(%jQG9^Jkb3)|+GY&+aQ^c$Ce0RGIr8d9BhYS)rR?*@9{Zm=wMaqDl#ri-@|a
zh1Qvh7XoT*ib-Spb1Ot0hoCyhYUbd59ta6=j7lM!Q6JVxxZk|^-0m0!-&gCu3~MYU
z5!Leg;tFTGrNWy-8gQ3Il)nwV`gt9%xvgVE%9C)BdQV9GT7TgOGbXqSBu6!4)lXzF
zSl??2?emTRl(1GgRPHPW<j2%n*p??@B02rGRyC*C6bQfp8=BPuV&Vo}1h7YM;5h;M
zTNY|n%vW9q?zdB`ha=c?;_g&SHGk<tyW{Y*lf?I63F8WEi9%O5rgK{V{8o%<!+5#?
z@QcE7XdfBdSvLwKi$amA=vHCX2I&=TBo^Ea;ZG0o08GVM9h(j@0urwZNTWw=B*1TA
zIkgnTuw#s4w9r@rP4x}lP!E6qI{V;}7d`cKg^^%-`=KzO=Zgfro#_l0^1W|xoZ%1c
zTJIU`!ao%VaruAzXi2w?wMuUu;kn5N<Mb9lcOUA4lx%u${S-eht05%=6Dy@57gwVB
zWK@M_S7N~97REc9$2QP*epl@)6$*r@?}OL*%uh_3$KKh{7^9)91oV8v{n4xp`pXJF
zVqm<mS!ykp;8Te0JUoXXTBg&7@fSr9nSnP7R)cmJ7Uk4DxG7~kWNW}m9XFS-_jwCM
zp2jpa9N83Q&v@JTP9;!a?{z4}OYtB;oUgoqHI@=d9=+7O@&2H)YPqEbW)CNG#^>_Y
z!(l}9Eim*5@SeqFu%!hyh&l=Zkz%_=Y7|2ZCL<haK1x;`!*jQNJr&6YF&s?}8T>xR
zW`J&%p0^09Su(qaLB=CTAfFLi!n>Pn&&S1g<%tpMsrZ_<Y1m!@VU`JdeR@03q!TBB
zB$8V6;=1bg1tvyRndEWFoZTt%9Br2~L=a+=lilPnV}^V4hLK@rEQKk_*Ka{WMuzuz
zuC;#UCeppBMe`D4M*RlW>?_$t3+tHiuE;n^RA4BHhiWog4<wizd5q|^D{kl}_-wAI
zxOVGT=w3~*H&*hV#tzA`<nP$83k542>>O5V9l4+cGfy0{y!9b8SGJ)*&*t8-C)8Zf
z40Hi{qPzQrYWum6GE&waRj|%mg>f|sZkBE%kxv*-hgaA0o0lbG;wbH1n8$lR>K^~l
zSja5_<-&Ny#X`A(;t<PmJ>Xr47bTGN1F!oFDRrNSzP?Gz7STF+i{d(wP^Q&F6~%&T
zwXzCuc+kerv(&{}zEW0zT=(}@*YR&UmTNyplu??fkZ62PY(;zyYNeb6ft44o*x$#T
zRx;}?2j-u0m~%?5PX&ga?<@TB-=hr8mS4JBj_q+VNO5xlVOD_1xIbCz1%d6CiJ{1>
z_ZtQ&C(SYLx3w#d8)er!`Hb!KC-KrN!<OY`4C`z#prU7rS8zp!C>q>vq%8NRbjEl)
zh(jvw(mjiCmILbuYdJ@9m`kaF&jj0+UX+gGB)B#g?G~LRZ2F{C%Rzi%H5CX$A@$~y
zGmuQ$Bb|`_;89)AcgsUblu?gPA;UPnDQ!a6NP<gybi5H83p6?InE?4IIabw|w+=Ro
zny91nMypzXo3uhF!UNnAgJ?VoW5b*GH**rmi>u!AY`J4<w4R+N+p+z!_V{JKzk*im
zAb&i_WE!5X2x05=&O4B#l#L=X?F(&?mxmM@uwDuGlBg~kOWxb}DGey#)cxHY+3gpW
z{sGAV0)CYn%|024<z%K1g)FF0F-;MdHtJ6a#nLtzh$m#BJypNr5I<a@Cq_OZ9^ZTV
z@k7j=K!0%PDh8EY1VQs<M9(LDC}3;<y0?muF&7C$aD|xUN)$Ko!zCE9IKl@T&;hvj
z1S7J{;8Q@DJx}!4P}aSO3P4>uFzVyHIAp~q$>U<YJ)YQK!qiZvfEw}Y$GNqzXDq@I
z@w?@-bU%p27`tLaG#Olpb0+4mt<s>;1{)ggX5ELZBsn@EogYGu$9!$Vv<(pPw^^!7
zT8jgdier(Ar54VPpNta{|MV8`{BS|W8!AkTx?}WvH0cIZ_vzTJk68qTa49DQvv(qO
zgG?;mgbPW#qW1*4Lu5YTxLgQ2EulK}3?cWqa(q)q-Uqzk7FL#WKXPPIVHi*$l*2+d
zJ_m4fDApGlv7OmPitiL?#7Vh{i=^t1GlU!5(oSq#M%7+tTznJnYFh+2`CY9D=|P7g
zz{YB9J0Z{B@FJRtfeQ~ZXRj#d#Ql&Vg&V#()bh|Zlor6u)^GM|mFjAmbH)oE?!CD-
zt8PU6E?*T3k)1C{2}mEf!R{3vubLd~e*|<5^K_qg9q*$VEy;S^!LjYk`UVKMlta$o
z1yX2=O)Ji``8&SN?&b`tKya)QEUF*?ffr~Z+5@E`dKL1DQ5sRoL3+2%A4UM9iSSLa
zE`U2%F~DvZo7^U`-vabNg5!A=<8YH)ak6mC4t&W)#_v)`Oj*+*jWPAgQw<}+9igY^
zYOOv<8Ufo_!Gu)Qn9~UlH(Peg3xfGVOO<p^rw~TuzVD#vh~J>fxglmUTzh1Up=yQp
zCqXq%m+zlIXwSW4aw`j`Y4i(I0?PTkV+>#aG*n=Y3)0*VJso6tb&IF}#K%O)|G35I
z7c<92N*HABJ+GIcmv@@*tb{=|8Rr0b>@o4L*sijZ2DxA?K5%<`Pz0smQ}jbLse7Zt
za=fdj8Woz%9M($s)OF9?#2*Z{TyB(j$X2xAx#}mCzH19U#NlFAz`z#vi+3yg&ejGT
zej4}4jNIJAk^0mlOnc>y7K#xL>q?umY3Q2Y^C?AHCi=V8RZkSzY73dtlT^$bc`|>8
zY^WP!JL~Q6XDoNTr4gj9`BS;vL)=z$<GEfp+J3Z)v7TPoU-lQyVAhNzVNuFI@-jb|
zQ_W`KO0E=M)(^C^p0N;oN%mObNr7jkI5l$T^V}_M{j|RIT`y?uC|ZPUYJ!+L1|fv^
zoL&$K`Do^G=xaoqAr~hb#2}W-<?UsX&E`|At4JImFeF;jv66CQ?KS+|lU61{lTN?&
z8#I$<jUQSyL`bc@#~lGjIS}ghqVQ~wG2)%<4xddvVAEx~8UWy8U5fflJ2p;xzKe@>
zvQS;%e;OX29W9o@W%u0_b+4t16`u$HtY<U|T;*U~U_DFL+r_~(`W81z8}y0>3@rGS
z^KV0$m<P`A%KJ@%gm?&F9`_xWVg7j_z2wN=2?++1Lg`cew>WX@XTweZRO70l&Y%5H
zK+WV^UGE%aoB>@{HcQs7i|0L_^}K;+haB9?20>~cv5l-ocpH!|X6jC3?IV*y{QCLB
z<~z=iFF&)oL8>dRaVZ^%4~%~(TC)0<8$z}mYm*T-V!7rpZ;bf}n&COg<K)7R|CT?k
zlWppjUwvLrm#3#d>p?XN3qUfRZwe6>_PO|3a<ft`JPYG$JJinzQIv*v!B!x>1YfZm
zI`ZsMjL94dgc^klNHuarmxrwxBKp;xck`8c6c;@%bSb-5A){%oT#<y$!q9Anc3X+?
zBEYM1!Yenw0*8C=`DqymNhu7C5DB<&0ar7bt+SRHP4LDXW8@dQtbMADNQ`E^DV`t<
zdg}WFO{h{#V!v*DelGP@SZi%}gijfF?S%A`z$c|oQH-g=1|PU_HGZg;S)q*ayNdhu
zWD%S+US4#inWsnh=s-YF3@M@H!zQOnX1z{r1np5sk+B_Rbr#s?efsJFV>TXL7rO{8
zmD@tPRzSEo1+^&78wPI3De~}KlG4En8IzkNg~o^?7o<G?;=aZYwW`!qenX4->Kcb-
z!g%gyXe%7RGelF&=yt?DfNP=MU?IzCHJ?~`SYF#<TG*~fTVqGE4fH(y;BSf=_WldF
zCB5qsWc<l+X<(_|{4@kAA;rYvF|aGD`b^2aQu&y>9tUbDAY2b@(0M-!FLOxU02ls;
zdZiSF(3=dBLaGOf@p%wgM-+6$mX-a}hANd{du{(i=pOQZw&+IxgW9j~TB<I-RPQZ#
zLoAhHOqv+^cXAlNBPVzB9<)FqWH_W;Nl*vLNS02<9as-TJWR78z?(}1=a>ZG&UtlM
zBhFZ7t*99v&X92MoN&8|v=|O*2b1_CYn8h^(sR%*EJe>@JO$MVSu*2h@WwK#u)BeP
zK4CPU1#E|Ry707EgeYS)${9%#mC^&U#3w9F9dKd}gKPCpUp6Uu5L)ITz5pT|6j`+>
zlCs8>{Zsrv5%Y70PnfMxHTjEIdGj|k!nrZ~V8IF*!la{<QjzSf>E>!=S;T<vn_W?y
z11i4RpHlq=d{1esYr886+XLoP^;}DwRNV*odiXRtR)5Or3;EY=Qlm%?!I>Ri#GyhT
zL@yX%?!o!*L~W8`D|e&USl^V!V;G{WRFHMXTm1%NN<v8?)0RLZV%N3L^~Is(Flx6<
z+r9YpejOMlnf<9kV;arVG}&*{fIi^s2M!%@HX9WXbgp!V4u`?viN!-5gifn~+TiYo
z^}_qr-TwgU1BN>nF5N)<EZbOA$E8vXSBA{J=6jUDHfGK7bQwkTRuOvl+Z6}Ph6Sy4
ze_pESuTVo<{^O+-bJ9=;rH}3mQM---jkhe{c0DLcNz6X5oy6QkFRkI7Yz=!q7SSS6
z6D?xVX-nwNtrbbPDn%LWEJB?FF2F@=J<qe;K5>2Cs67SiUBqTgW!ZrceaM9Wz&^m@
z2XQ^0AztLGlvryG9<W9RmRBHx7eML?o&3<#vUBV?UU<IVxq@9Du&`rHm|@C!h%?+#
zvzl*jPb-CYw1Z9&<RP{a)7D!POvEO4eFYgsSFZ~zC9uj7rseMiEiaK9)Jp&<1vOV<
z^?NadaW}LDZZR3nUv>lkuF1X2d%y?Wa;`MKga6G@Bb0#KK5PrA9nkZe=;WBp?31Af
z7L**_5cLp$qFmG<=IKm~E2CCNYRXd7_s!TaasTI4Y`7VN0A@KD6u|UGNNYb`iosg6
z*D2DDoei1FaMM>LN(qF^FLY7W$`qiW@U(fi!lRlmVvY~6HOOR-tI{ZTW8h)gggqeM
zYOSrYW5BX}Aj2<j`ia111_ZKYAF}%FXhcP|sDz*(Eb<j=C1B(iSU-b;`+YvdBQOzD
zri2tR(Rd`(!mIq1OFdDBZ6pq>C<8G(j#ohg)ohkGdVi-^WC+1moUOL6rpssH{6$<N
zt0z`o1;@erNUwRUK>fzBJoMPjXzkbA=vE50jA}7pJNrGiK_kzUjZyI7M3sbg(Q^!a
zo(>A6BI_&_bn+!+(~t+*NZuA&WHFbLk%=*s<j@;eXdCnR#Rh*9)t8{rUb_2n_98$o
z?qOY-q%hxU3D6QNDY5RLh~jCoUqUmqD1Ar6Mb)7d%L~Z2=Y&WFK}vw<3M0MQI)~Y4
zn7C^%B<JzTCoR!eGKXg-eSs!+@Ij&gE!T?I;8b=7jVdvp=i3xxO<=9@v#TT35cnLp
z&vkDoNq8MNijv=DOyl_(iPxv9ev*c<EJJ<)DChok=kZiy4ao6)0?}>&`?ks?zgYg_
zz4wu1HdD7)j*rlnC<6BuZjQjpm4>_$4+gH?-?wGVGk~yS)H@kiXd?f&np?uv#kHc)
z=6)G<p&GMJ`<!)*P1JS5R9QDFP98MU4`#ToDD{_R4)J}T6Z)q8pGcQ|Z;v@CzXO`9
z6vvjYjqJNAeD>VQuFj@w199DIDBu$5G!}3eHI<q|2ks&kkI_AhBSmUxHL5!1ex>8M
z_V|g8Ei6b!+!mghF?E;G%$KEr!ii?V=yCQNU7dY6a_MQcgY1~A@-FVtyhG6QX~u5g
z15zWFOOwBLqr2Xtkd5KK^Ei(f{-IMHH7mBBqi0SlZ<j+R*BU+|4-JcP(elQ?pYmK<
zJl}0k_}7L}iRfi}Y7cQX<w#UOtrlE-_1r%yk?@!35svZ*Yk%W{k+IIIG+rQVZdzMw
zanr!Q`esx9bK}Www2y7LZId5@p1g-V3SRTdKkMtX@5?$>gW&u(1&^3}V{cn_kDifh
zphLzzxT~{AleC-mh(1MN2vX99DhNV?BwW2(lP~a$J|3HxY0(aY__N+)wjU1O5O%<E
z-=R{TnB)>4mOih#)Cfx|GCix+mfL&qK~91@<Dx$1&hqc?1iB^v&EmOB{lx<dHoRl(
zES8gknq*3MUa)rB+NO%w<-Ai0%G=z^8+Wv=Dwi`_89rUAYvVh+;rXBswbS3vo`1Bn
zrd%_*krK;q$7Vj0S0xh|s@;(Zsu8TyP4c&ngS`qkX)dsCt`|7JW9vs4Wr<>&ggOgq
zXG_#me4bz<NemRo6=>V`6AC1a<`>m>P?pjYC{y%4GG(k0!!T$C9`6DPAB>P%te>;=
zW1Gl)p?O-4h21=88qO|~MbdB)(HQ$h+cVdUfuk-0uu`nqq#F-cayCQ`f=`g$;<SjS
zJM~+kPSnwsCB{CTk887z=M(Ie9(Z?dd?6Jc9?$h<88kZ(-7JUvFZ%p%L%G72eY}OD
zT@MpZR5F3Smp9x)YC@hbK(rovSb;zrmeuYiFCGE*2r;>o4*sO+FMs8O!zt0)%t?~0
zH!$Y`zDDapQUJ&NVamEvFV9vG0fg>t0LzyJ2_BBwJ?1`|TNFmn7W~6&CLzz{c%i3f
zRxyY=_U{^?8JItGqG;cFb$b7~&!m;O7|xdBRwO_5?MRTom(V*i&3y#13MVH0tLMTt
z>DUxX{(t3Lpz;xc1(*bTf(A3UG(VE+w8@`CP{W*MlRx}F@_O(>Rw@6LpZ~9!{`1%V
ziHbdsV#kRa%(kK!m_6&ayo;%5gVt*OeH13P-2Y#9XB`|>_w@O=J8^d>3UN2$M%+Eb
zh`YN@jJOBl#NCa!6Cv(KeBv%U@EAP5ckA8S+O4hH`D1Eos^;FFd;0e2bI<47J@ZKf
zE#oD>Efo%0ivNRd={JRqeT%EVO#Wp*JXQ>(M2QtMn3Aq%!Mrh_F-%aq(_Sq84;w-9
zCLWkye)p?FE9M8&Y^;)|_;>vMNj3a!uV_HDKc*a*J>I8JpOl>lYR~?|4*!H7C=gw7
zLv48#+z*9Mdn!wKpTb?DY)-!hyz)e{REJz{ly-gLCv1yfp|PJ<NESoAlGc+x;x6MP
z;`Rw}Fd3J((SDtrNv_QPp{QtgdWp{_{g=)CpMQexCxWJEo}c(R>u<SD6TKXhRuNjA
z<w}Z|w=M72zZ5rP&)ilV&hJ;FlPdIN7DZeKs~+6XBm507?~pT&xtu*3k#BEqzE(^X
zye-dYDstbvb2?ghefN*%rYHJ(WZqHvsm^M)S4fF059wQ(>f5pB1|!uBw#w!08KRH1
z4o4ml(e1)}k5g}J`Yww!*1uFA8qH+fI-N~hG_?!0w@w%2kDi>~k95#kDPk}9o>aQ2
zn2cvd5nJ8ITBkPsCb@}=)A7~DO12}a@2_RIN@BcNgOsE5tS`N~+YICl(XI#Ps2*@g
zt~5D*Pq>aCGc6X8WYIiF8Tyc_#bG7e<ggW%*x>VTha<Il(O8z6Z-cUMXCh|Mci4nE
zXpfr4X(@y?930lQwuYWQ(Wz3S*aZRA%WK>RQ1PF#Ht8jh2$J3wE!y!`-R&v<DTf)t
zPDo_ZX_N$Y|8d$o!)mtMV<Y1C$#}m4TAt2#qG1t<2cLaspC94{;3~yUd=kT<(}?A;
zMa-WvAFDR%n76>Ak<a>+&oEobmMw=wj0Xw%?y6PXDRVeOz%v>bon9U8BR$seguOhk
z;}strtn)$*5G*)>N!-~|r7#kQ89m{FqCa|yo<lmvn<Ym~OhU>V^m+$;3N#X<9hdgq
zymQ_|AQ0VQ*2FJ)y4i>z8`7`0e7S9AJOmj<Fqt1Y5_Bu}=1rtMI84NbwMwymA+@fl
z=n#o@p48E>#75^7<iGv8kqSh1yg%I?^c2p47>~xGQ}H|78GKoDl5*7Hv?pEqS%_88
zc?W<CcXHdWUpT}TYMIC|`1-_buFX~O^=Iuje0b4WTy(_n1C)H^B1l-Us3ch1g5Gx*
zRcC$4pxkYs$}DPsqMZMJFs2Qq9=LE+3qU&b2eS=-quqdk8uH+N7UAG~x$n&5dJI8;
zHZ=A4x<tkYq?IQ?6xlobR^k-j(HS<8^WKKL;q|M8=xTJ(hL}wK19A1XI*Y!*ozEF2
z2lYuWD+V6AIB2QziKDf&I}Z6nqfz7Y1KHX6c?~lxyirWps`&#|)A2%!!oqAs8ye~S
z91B}y6sYPiNlvx(q2j;&NC@5!#C|#vQu0D*R-0^S-Zve-wBu#+bJh$jJ}J}Y)LieN
z)1Rs$_kH>Topy4L>8OPSt2pC$GV=5U89K<B$(+cj2WZ2RKfnGj#3Z|`w~<?lAiW=`
zQW|CxJq0=ahqLdaHZfCZXtDlU4e$Dh;n$rahf$eSCr#v_=j<xo7g4U<444B6IEz`B
z7g+*o1s+f(kgR-IoJ`hmvI~@{A|{?hLp7ULnVA_&iu4!j55H^$x~e0^x$3<~Esu9f
zWuH$5<Ot+TV<v9i#525c;l{znHWVx%`OiRUDfyK(wiHh2R<G6xI+0E_VEMobz1DoB
z?;N(_QtZFhcu+-5HIHgjG2_DLu-Gm%>rN&z`e@s8KzI6`ZW+f6&DwnAwHOVNt6l3b
zB?NZ5<FUwsa@a8)`So@5R|l(2DnOrd!C@s7gw*&%hXK_qF~6HMKiIRE$JsT9gMQmM
zEIDgLGN`1<<vNDlV(@xNU;Wlh{i)ExtQ2b{$%cA{`AAP$`8<zX`GFuA<e+&|>@%UD
z&xayu(_4IWbh_^k4>l68@e+TaoWFQJh<$n`A+m7%Y%+UCP|9L#CZIi2`soBDo8U_#
zKl=Pd906-9AL;%bsEm`5qsBmASRDb!a9w@`PVR0Itx_K%)`&u{#$LPIEt~23yc-l|
zEy9pqr3v2S>9uu4yM5pkHn!=?EGH3jgPoql$A?=wM!pPV)KZX8frTey+b@pA$YcbU
zwhA`qf@D1fX;{4?o(=uEGciXNN?oVbI-jvCrR7~XXc2y8cQc@L=XngVP-PY4hP^eG
z__kV@REpvlSL<BDI>`4sGe@$LVKlG52f2JVboA^AYI2~L40fcIb(MbJe+;mleCMN1
z(YclKfD%ZgOGcEa_Bk~e%d-brW3&ZfEioL+9>j5J{h^G|IqT~F%*R>oE13DGG@>XL
zr3KGGg2dfy7@tzQsUw?Ydpvu#fE0(B+M>)imIea(3&TdgzEAvH7P#pW)xgQZYga9a
zb%@(NE?8HwL&#RrOUqd_RDT!LdeTFB*7Iy`2f|_Eg)>&yfPA$6Id+5ZS#4)*!#s+d
zJpyx0<|G7oY6FP3(?x2jY%nkjHBSANZ<5C_0u8&9%06)3h$vPR9FBs=z(N^QYB2!N
zPA1bDC}#wJ8RDPQd!7Y^fJ(kIeSLi1aXUYV7yN9K)A-F1DF`I9oPQ10!nNk;6>#v0
z%S_lz?db)>95EXa0Wk!dNmycH30q}L7f8fl)EMRr?klX<ZoPDphrFY;6`DzuQP;c7
z?bya1a`H+D0K*vNSGC=_PSM)kBjWKe;ZiLFRqp&vAikpgFH~L<0pbLq$3bB6AjDb$
zkng=ts7{-AapWc{rBuK3GmkmJ_E*fhU;v4X&G@-x^uS1g4->7PB{`lMF&>mln<!s5
zGG7eDu3yO`D7r!3Zilb&9Mom$Y|_gW$fjmwIs7-Ogh_CenVV&Wj+1DtpSlFIae2*o
z<L<DMtJL$m@_*$~LJQQOEs)yf=Y_jh5@5U>PTsAM!N)72>TZ!EXI-X6UXphBxjCb%
zKa)%UE$Pl?Yu2V2rGxw*$B|_5UtAx-@Un1d10_p?b>_8t(xl;V2Ckt$B?e09X=Q(=
zIsRfV{FH=|5ySh6@IYCZodR5^Lo7lWEOt_}RUmYT&u;)bNQ>O#*NM7jDcRWYn3E5>
zu4~W`#dAqN*hv8DD2VF)8y1xAjD#`@_|TQ&w;YM)r}R_c61xO1X72~;OK#&u?<x`d
z{)e7|BuY#07ce=G48n{%u%cp=f$XgT7!j9)ii^FpC~j>r$ffdFAm&t$IzQ&tI<Ky$
zq!k*uLcRakCn;$NsZvt%&(-svmIjl6vWBGV3)1GWh2qOtZFZ03c)u)+9v4?!x3^IK
zN*Ziam&zIKWYcETl~_P{dF3g9php6#iUQX-z+HjJMw|hZ=X%^JYyY!;qV>m=>9iD!
z9j`70M_t{6OBeY*6epL&HNXa|)-Lwwp!lT+EY1l2UGEgR|0HTh0(N@l-2&rq)y=i^
zA@mIeiS<#fm#iGJx~PcdzMM_uFFB?%I5;kpbrpKpDmn>SrW@TF2t*rYz<Q;c9y<dc
z29Y*HmbY~U%4`q&AiUO+y&6bl2a%mLU0+i+isjP$HhCOVgTIM^FqW14?iq=UAaEFG
z;0UQM`epeL>m`HKkIieTQ)=%WHDiBP(wym(%`-E(_>0%g+Ek!w4DaJ+9DX|%AGyJ6
zT3lu*7ttIiLL?$!Y)UWk+5A;#AiGxk-W#e|a=4p!hxeEh3PpJ}cG&hlPK>Zyx!ax*
z7DeV*s-gkr8LxiRgmmhXf>A*5p`5%I*yQcGJ3c&Jvh-_2RQ*Pt;D-apMKGv0pjLAt
z0Itv?J?Wk{cmJ(boBQ*BZ59$lGz_%kl8F%#;!evSxArkUcws$6AuLcU@z_il<ecfX
zb&S6_6)kuSJZ`r?D=nAayD?tkS)ep&FWOgJcsfv}iceKPt_%n2V-gaaPKyga-n2-`
zKMNMOK%oLzycd~K_(&L0itImwnOh<#EoqH-%YF_6Zp&xqmP?!#`pbC!bs2l8atuW_
z*(NCd9Sr}xM-U+_CGEf^Q2z=}zpsNJ?0=ZW^n(8v7yRem5`u61!7Jk!TvYxSX9k@B
zEg59v#{Z`$U;Dn%NUR1yj2;#dU2swf7XgU=M8Nre;Pt;4Xg-MI@V`dmpTI;H<Y(zl
zmzVoN`?cY#A6oma*frV-FQkgfN)`^<8>JaWO}M_`AcXSON<)4keuo55KjI>j!4E3=
zmfv`X7|2Y4%Pq;}x-HVZ5m<#FjFNgwxgx*K`2hO}2|0hDNOCBSf(DC8XD-WCObqI1
z2~Qdv++PLcM25zKc<1Xq;V+!_r|E`L*{|xN_b~1sK}3%esKI0MW#vu`Pq1S)HnY+f
z53WH0;CxLesQt~R5(&ADkdP4Ln3P&oORT-ff=}VMF8*j%Eo!cm$wCF+!uh5617$7W
z%`E+f_b-=0q0VyVv-7xne?RJX$E^Xf4#DfZKwZoTRs#Iyzz9sb{Rv<|r1dX;(+TBd
z5r`59^&-rS;!9Ixat1y+A$w#*L{e=dHCgq4gFC|y(hFOB?2LKbXZZ0vZK1>0H=z8|
z%&4|X0jQ@O<KyiSY1p^rd$Eho{d5{i@)aZr7+u!@f<VTPvoI(*?vCI4c#e;li_G=Q
zzvs&&Z;X0;8^XG{v#MC&SJ%<?6S%obueumt^=*;H0NQV{?w^nEUKhX3EYNMY#`Auf
zFI2|Kd)zswu$W61-7HI=8X-gx**jQ1zzSeX)M$!t-LUdBIxs1JvwU}bAhUR*cUe!!
z?~&l)1T-U2U%`D*5WRA28xPEE=dJ(7N-}*tg`PcNyZ**&T))F-nN{k8kE;m@h#r5o
z?tx3YTTGxVo6R(dX64<zoCWUL-e*p0SNyeRi6#7TyK-Mivz1TDalnC;{c+}f84Q(U
zpQCGWnDk8Yuajz~?4u2Ln)O!&90=Jnmz!M+X|fK<SJ(4TU>I^!G^ObWvnX0jj=m?`
zF(cT1gZ}|LCo@m!MJlI_&8jiG(KmjOO=TM_M#B5xQh-}?bHd@@FX;t=8o?+md`cC6
z4yu@32qI726J}IDEgeRobq-r)!1K}7+pfN^;Jo8w_Z)MZL@~eBjJdtLn~dvzL(4-y
z<Z%-%uxg=qyx{W&%icjL1PO2VJTABA?ZDuk7zt0W1ij$!B<&AGoX+;DVUV2_7;RIx
z6TI3yn$9ud=U*|Y|2$FvVhl7DRujjg50_87`CpyX&F+4ju{oAr#!!ZP5*$onrHCo<
zyk5+Ty|dK%D<lu5{tyz3wZ$VHxcmge+2u7B?4lB@kV+**K87h6h&A>g*k4&6CnFee
z93*Gc$hd&W+5-3&Gz+?l2b@I;%xxzS>mRQ={UKGFoh(3I5=rGU?+9$>TT|CA!CV(W
z?Z1=*Ly+m%*ggo{I|a3N-0fQ>&^ej~#2HbJs~FFJL1b>1RGi)!PnQw2=T<7c`CoyS
zWfWJ;$5NOq(l~6S$DI!3LEtM{#`X1iOfZ}bHVhIjt#gEPKt~So)bj)TjG-HL0y2EK
zGb11Q(vvqxn{aW|u=*8L)u$NL92%3D*i0}KbuGe$Tz|wbiAgu4*~K%2UaeFtB_Fb|
zvs1`&<pCVOe}zO?Ghp|~bv3F6U~>9N{NnKj*u#)#m@A=DIQCdI1YQC!_|UoiKsM{*
z^8mkpHvQKAtV<juyLiE|JN_rFJi^p3zWaE+k_+Nqzm{i$)_`fRFIG;jO_8`{V)BV%
z|6-LX-miM!T_w5<N`(rZINex|B(sHhUV5e8T^umeu_RF|+)4F804Q{`_aumTToRfC
zSM_VmCOC~dl1``dq~3b0=O@#8x};AGV%o<cn*m$-Ws~{<#IGX)hGE_U1-wl&nwp6t
zHWKuG*IBP>wsiBQu?)dQ<7!$7li{1Jc+Z~J9@nSaAB}4*ztQ7mzo3yTKpe5!=pnI~
zpUj_ZzeC3VD#Lu8N84@=gX|Hw;&uL#Uahqe_iznMCH3G!BNSy)7Psl?VG|Xf&x!W&
z>0YHBCoBHR-`;E^MzES@Q2z_IyTJ38$OHy;ra+pRd*Sxb%x~*l%!#)*xu`bRM}AM!
z)!zbZlluKPQ##x3H-q3WfQP=6Hu=(t!P>>j`FVs}F`h=t3w0Ytt5@rx#m4>elQ@!V
zpF6rhiVM*qn?;u|=IdXegZMnJk7yA1`SL1FisTmSgHEG78u72WIHM2zs5owr3GXk}
zzbpb?G9p*i*C8j*?{~o-WvuN@#rNa&earBD&L`rnf4l5)X#wi5Jl$w-j7M_RsLN72
zmhwdN$ZC_el#VO9+<cuA>#)5gAo<Qy7Wzwf_vTUzu$@y!zGWkn!x&(2Xe@=@_Z@XL
zCi%|zki%*vBg^v%8o|LxrN^7&vSHPYP%c)W4Ad#f`CuYbI)RqXv|Ow1gHINpX3}&H
zDhtQSeZWCRl;gw7W>#=0!I|4<EA=ODIUb7I^#b5uSqw-M4SIwftaqhMK%v>yYlX}}
z=_{XZ=~}|vRfU-4_L;$S9Z&Z!6#~W3We#Vk)QPyGw+Bkku5`|{h=m{D%sOieI{2zg
z5~DciVI9UcOpSCQH%zDF_*Ewzy;do%>AIIIa6uf1>Z?G!RE6z3)faUZYiq<Ub`n_i
zH;~*R7k(6tnEz>(f!{skwo*z&u|S<2lGbDZH3C6TE%of6LZwL2kbV$hVDkB?ChNm^
z3Ld+&17A2thJbg(+4e9E>JqT+9%VFJFsAu>cYXQ<EEt|?M`C9*(^z1Lm$>@lh{p0m
zgY~>D<lSX1NP?+ggzX2PkU0PRKrxF+uR^Ovd;=khKs<A5_k8F$K9#}!jG<FDdgsPi
z)9C=neG^?7w?hSbv<0BuVX+kYSUVJQd0<+MaOMF(7E~m>J8|%<=(tU~uP$mF?uI*G
z6GfFegizn>e`XO*XkMvk6#+rT`B`lq;SD2U3IcH(1{YNb8e$R>Xnl+TrhMsSYIfrF
zBM6BKRD8+^P{p4_26b#xB!q+Uc$#oF5DSg69?pfe>isNQs_D1|s<i?>$jf3(ipBVD
zbNBdeFrFHo#%;x9G%f1<De1mI(0eQd&fHydG4Q@uchR0$f*Kcz^m?{TX0}4tI3~N@
z8g7`urq`MaAPDNnm0y2ETyXw<Y^p$xpf}cTX9Q2H%_Fgt!S^QajTrosE5~?*`8ah*
zA!v%I37!0fNG5>(?}=nUvc`UpfLC->B+In_BCHoMhTxe$lh-pT%lBBbc(dei$j2|4
z?vcfZuYVWrZzLHAb6o7Y>Yi?ZwAT$2RB_u-%K41aIT!MfGZ2Uez}X&3cI7_)$U>n8
z--lK1OsK6m&5B)SQ|A!i|H&h2-x@08%?U)O8_%#eL?D%(V!<h|@v$xLHIK`_bxZb*
z9^v_=hSJW9$t(mchJ_L^AcXlf1xDirY#<F^k%4u&W=#^KIZs#L7oSJi0S)km$ir_}
zC<I7`PAo=`nE?|Zx@FSHt?TB=@Jq}?x?9?c(I(cy&73h2+;D@zO^J*CYgP=dXh(q6
zg=Q9?d;T~J%nIIB65XGo=O6c+zZeE+nM@8|kUtFCu6aiRD+sC}8^H%Q^Ig-I_B@4~
z_;Qa1DiB;J?o_CeyzlihKEuoVn~&9u;{f5<P^BfED)tsZmEYLoCLI#^<Lgrz3bC${
zL|#tS4NYghrOl5x>?0cK#NOQ;2PS5=_G3yc=Yo5M*;_2cIv)v1xGJ-;7WCK%LSB?;
z8u~dv0Yeo89%U2!$pT>qt?ztgl1>2aM;{5c0c+=OVG_FPjQUIwugq3`o;MZj3xn0c
zTggc44yMCR-QoftU=N=jUF*Gq&A~ARLHgmb%-omS4Lzq|LU)>cZ&6sCd#Z4<ef0q7
zT<<aQXdm>WZ>2HCXgR_}{pQ<*MMJ^@!fF*=LfX#DX+uJYqH|GMO2Rrl`rd*|&lqI2
ztu&h=eh34Ht4UamzLy{BWToAw5WJT)dw)t4(Arn|2CP*g1j+j?Xfr0uRNUjXI)4)N
zBn=Lp?oB3-t4q2M`ZzWYgPzDj#8a0nBNQ=?nLB_m>^9K;<b)z-hz-UKOh~GS6>b4#
z6Ai+e<K0(~XhVZc_+=M~1XN>E!@GIq$xqK7PM#8G5@iuMnET+6u+@eZ$Zef{F95Jh
z6y@cp%T=NYOt?`wJ>4bw3*Oh^M!Ss6bW3OEM4rx_yIY@+c12s)md}^3SBEtMl<|6r
zS%JPcAHDkB<|};yx6)Fvo;)rO25-c@uYjvG{q`iHae@7)M&w9a+u|VvE9)-<?zfiL
zyNg|pcpT&|@n3KI=#0P=g=#g_Pp9=zd{HGjF44<8V?)LLp5yi9-CU89@o65bF~lYJ
zV9luQxki~@Zpc=Yr%&I--kCek_?U64?>GYO-8h_C!6-1Y<cXt8h*ba<xqg{|<%6M_
z=aTCt9V&sraYqN!tS!;<hA)d(GyZiZk04V=V)>BA*2I<lg5`dME5Ki`?OxKia|&S-
zK7?>!nBQ|qqwgl*6mtcgg+m0tszK!1ym?ZLV`uFt#BG6Citrp3hTwro3-|_r6IR0U
zF&d4rB%o^jFtz4FC=%NN*l7or3v6$zx2J+Pe#%%s4PMPJALkQQaB-K8-nhOTq#^#k
zI$7fsgq(2m=x+Sg0B;J8r^$McP3k+>7^^&pbd~7q+<kr=7l2vY4qWB`yC91+>FJN{
zO}7vW>QK8ZqV&`LS4yOMhR{eg#<6&ZeeLmBpCq#$gUG;niG!*U%i}<Jy)uiSj>vkL
z?Q*00K!2UNe0Cfo%Majq%Zf6hA)Qg1FGwN^U+%!&g<u$##VT|gDGLD;Z$w^n{oOdb
zj@!UXrB8W{_5>AhBYDDWS-gj%oZIYX=VXcl^eVNZZkzrjs9)a+{vQU8TU-ZO|0l$8
zjv%NVmnkQuANp40MDAdWc^-S-IH@$v-PXyvr~`_x;tJOL@1GMH_Kq4>HhkKsrQtC*
z61|XyW}|iqtc5CjafRlOC(VbGbTPLL)Yt$*>y`AeJB{u!5w+W(g)wbUu)8KSrUl#`
zYooPhKnth`nmsJ1&xMu7oO3bz<PUjpf9DaN4q>1_!toStE}HACF=L&Hy30s{z+`#Z
zg>Bp2r3EQ-ukZu>h=%t02c(z2Oy?s40I1`IXrEBmn00?D#EwS+xg-Pwsjo}ij@v7r
zwaPwM7WJ2(p9BccHv&Ncy$7b}5AL{;*?u*F*_PnCfPU8#aDIPW@*ZVSo_Kqnq6eUG
z5C61Qjv{I9L(_>7;8Pt94>-@JerC+VNLlYYX40SrLj}(h2Ov!MHed9(_2P=psrt(J
zKNQNQ8r*C2yVUQ-5VA_ZFF~F(`?;|lFDGu#sSQq__1p8UWBSzKzkW|%JaS_>|2grI
z9$>um#`pQPjN4jJ;Zc=2#(7s<8#l0AjvCpgJMEQ?bdA|qY`(AtMi5XV+Tc<`$YTlx
z*8)H~)4z0!xW$lUp;Dq2)qg;^Fr>$!@!1sXfa^`B;k$sYaUK}UZ{=knPz<mBt|>-}
z{=>K7+$@eJ?bOKMS7IQ{zHihqHgg9aFK^sMrJ8$%T5sZ6{>159p$w>6NPrmPEMevz
z_HDdfjOqevL+fT8M!gQHnt_unamyX2IX4IuxuIX+=f|WgQ=LOTOz(Gv_M{lR<{~8`
zzKc3bkH!)+HyYd2f%25YWd(oE8Q2sil%^z}`{*U2$pKEuI%SHfoST=%$6^e}`5rEz
zJubHcP5fI%L%VUff3cv;=g#4Qz9@p8vUx98uh37%TN1MRYrF}Da5tuFYk`WgYkOcb
z8Uko|xhkUEbYs#5ysQ!RQk&+Q1x5?{9C?iA_4Z6JbR_1CTMY;lN;;`p;98~#{6(_T
z`DF>QkQ`T3J#g_S^UtGtF`c`tEsdZe81^>~j2$~d4g?p#g`be|IgEPilv~AnT=_Bc
zq)IU>beaON88t{x=?!r2lgv9<Yxd<8Q56>S#y;JU7*(LxP{QfKKHgoML&lHp233y$
z&g8FNX?6GzA)6=wF03&ZYVG40J!$(dgC{yC-odJwA*Jw`@0=dXZj=PpSe5o0Oncml
zYqw%HHdDw8xp2^C)<Er!q%xS7R)Jb;RvEP^l)9%qar7IofEejl46xj_^{6n!Vca{G
zOX+;2z-Uv=@!o4ZXW<d(ngpax#18%FO(N-5)a!6`g+=2@nu}%4^v(ix;L2G#JO!aq
zE$NP!KLqr<!-h?x%V3L8){wNb33D_zI7168pTf0bC}RSbn#u_0j7_%?B=D=JIG|VA
zKV^c~h#<!5=z&{hO?k=?iaBJ8lD-dyt^8^bNU&tBdN&<Zk=x(`h!r+t<EVfZx0kon
zY5@e5o(^6RrclBoEG=RAkQ$rOyQ_*GtS?Lfa0C6;<8uXa+WX%MW2Pb5<0a5TH~esx
ztZY^wu}s?<i+}6{bb<xLb#<-zAjg0m95#I$oo`$RF4V~oTUu3F*)*rXI{#lLjzyLH
z*}}K+Qdl{M1dMQS{Wk)fVjK(vUl^cnlfw9Y16v1X>z#c;;tEj17p~-@MVDYb-*g6|
z*@@1VPv**AEDEc|R<%L~)IGv&;AW>(FXf90DM^C5*A+{Qrk&w=zfNiZI5i+b&m4&^
z>BeM|R~~|&3NG+Jgte}Hi86g*KAu%YfFY~*;o~;y9b0?7=z5(*@#=^k8ZIKW3pnOf
zD!Z8-zP7g^Wsz1Le$>qk1?wxr9d1C|i;xpG?8=amwmsjsi5G``D4QfnoGG3#-l&`E
z;xv6pH~R)>!8CrVvP23QTuhIVxL^h2>zUx9NO!MDS^ThH>WG2bKUM=sw){<HQ}CW|
zXX$1bUp&rF*^}rCN830juUL}$*<*G%hAjr9kfQ+<+`e`;ZoFhYeDQ$<00vtBB#?$`
zRQuuhSP4F?d7rx3zuM0sIytj=5<;Ydsd~jz>#LF^w9bjfsw!&@?Ka{ys(pFai~EwO
zpL@ftvxOle`SZGfe<xSLKaaoNLOYN45P(~SO?gHT;H6)M?IkLiX)oNk?$_cKit#Hf
zLWBl|dYl_4H-%kBc9m*V%(F=u+&K{R5F}2M0-2s(nI-Gy5*lP4h?Z$h2ENq(S`?Sf
z+h#=N$v=|D{gzn%;{a|K5)ttknQiM6e%qi`@aP!?VYevbCm&IX7<{?|K=#3eE+#qm
zfbVD376nXn+}C$kdve)c4^^f2A!pyi|AvpD^q+e+GmBLtVcl-~qct=Mja^uBgetx9
zXF}6)AeMz$azmHt074cXe&+!>(U5o7@oQ#g7SPc+8v}bOrXj45sM{JVCr-&Ud;Rb)
z8Y{-;v0U?<sSLh-eESBz_4<HWaM;6CEG*Q>49aTJFkyF?J@y@ektz}qUsw{O9;I=2
zUf`D?yk3irXC~=a<R!V!eLv`991wkMm_!^=-f}^U6LD%qm~H@Ty9XyaUIGb|Vx7@$
zJP#gF^-_aHKPie7E}OlJOX2~7mc_P>TO|PdQ#K1z6?<^5NEBZVk}z5e1o#@-^w;If
zmiZD`8TcFnGTWL`81I7=9DpmozDFEPH4gaLvecpyCjj~|%)bt}7EOgsi^Kj%i^IyW
z792<g*Eqf&<$q6Ls#d0jrP+hgBi>mb1ScCY;AATY28Nm=B_^yQ6r>2F?|w@qHC3dP
zt6?#U<LcaKe;$H6)`=@2L}4b2YYWB_xDLGuD@`?N#0M(R_t3GnN{X9cXG_YWZ^gl5
z^w4x*+r5;4x9aJ&xuUB%u&AoN$uOJ2+#{3!LzodpBz1MX%pk0Isy&yLTni%QJs+Zb
zXQ|&(A1^x}%uF6spd_pYb%&x1+J<r4dWX7V_!L$y!UM=9@9ALWg2~WjOh|DHLER+c
zJX-~A(E$Pygak{4YF)Sz`kN21gbk4X*oHyk5BUG2mz}(zDR_-2+JZb8Ol?S8U|NfK
zLE>B<7POfDNY^1-fK2#qbih*Wf%FG4uSdd{ptosY3RfOX1<@Zvw7m^hWsW=QJmXrb
z@a#4HPKmgzUk3C5r{*KqPWLlDrv>?9byp?0x*e^J+ino3mjsr&>qwT!$w}nyxmn8>
zFc<e=zWMw}Z*0^S41;+Xvn4WGNEzyO193!Yj0EG-;b0MHaT2CI30a?;<Ls3giIG<G
z5fgTk6sN^{8!S-(yD9V~==N)HJDrn3+UI;n`#lHK@QAr5L9@vLYk#q#gRt8Hm3GRk
z?bSY*>2)BgAciR<A=(iUP~(2(scJC-W?@^tl86|h*-(zhY^16L+-xGMGkq-{J=<Xg
z9ix{R0k}P^zFRZ?CgLn4)RUcku33)2Bdx(mR8Kd1pZqcO-JL;<6H5l^SCaaGAcq4c
z{#GK1>NEe>2P{{lYt*gWEb+(EmUg5<xTywn+#?9;>*T?i)WL>Om%_E64Hhd&%IEjG
z*-3TZyH|YP+zp+IY%PNNG+eEuQ1Au_r8+o!cLhM3dP-VXgq0D;an{2@MLKK`$q<#f
z8^R*FY2V!4NmgamE|+d|UiR=@D(6dwuOoxsf(nQ*czw)E#nWbF?`l&ColP;;G05b0
z!4a|!%1AmQlv~-oAD4*!(CIH4ii9nSa(DFh*b|DzDdA?{&y-QaC-Af?7Filp9icDv
z&0+(NC}tmd5}335z6IXwoDW77hF#2;$i39UYz$~n^&*xXvg5l&OTSl__0hVHBMUCB
zKb?BGs*KwApoI>xpYR|62v-#LqvM3ZAgoJ-@cpT0^4BYk;n&;TD>0{agInN`TP@u-
zE3k7D+nOBHOePg^pw;w{?PrkK>p|YIM4d6S%Oz0~F$UY36CSm&+)JS|5=la2k)N1+
zvCrs0#cf*ykE~;D&A`KIZt<+;`OEpZ6d$&AMY#Qu<sfqT+rM@~a-jHr7KdLHVew4T
zdrL(D@g3WpgW<T0-uS)`5r?_TwTmrn@cphCb`iN?t*trqZLxXtL`6JJB*Eoc!wR-I
zu_?vL29z34RV}!1{l;QlmzF+lD_mb_sHxage@m`GW(PBg>ypt}Uf^W(E4QNF;Z&hL
zVa@WP&esEw?p>FQ^Rl%yUcjAyfyn)@zl}}u@`gCX!X~^?C;V!TmS;~hfXFmd6iIU#
z&fEroR+HRdnAOc(%7hdIfV<jsOdU*cxDomVmOMEoyNWELppqq6w7OIx!5%rd#56I?
zo)Y4AxdnJ_4l`6acV6zI(uV%;qR7Wd=48lsy;G~Wwhh|nKWX8fH>Bp9Os7=0zMj`l
zD&L%;?Y!)P;zEjg<Pjp6P(3-+P)H)v@1y}0d82um@-&adzG}Whvb+|&_SP&gWfmEf
zMMXWh;=)R=B2dv(Vu$Z1>gpZnu}6AQIAL#&0e17Qz?#|HjC8y)BcQh%3AjE&tmMhI
zX*griI~oi|dKpR$5yJ-@uKRrc4+KI7R`5a72_~LW!eHP~XhJ{V3|0_hB~z|R{526f
zCqpzn_k2=2<Cpa}Z3=I4?im#Gq@dDS4ZP{#Nd3Sd{&}m>_7nSZ*zThgvod2=xM2L%
z>CP>$ccEY(WnuH6nd0aT?_bCN^Gwh1Vm_R^9dqHkI2dqy)<I5k)O;OH-%Qpu(w%h2
z47_RoIrh&_HTni;MDu3P?)EV3jA%$OlydR#qRo4%`p<rglw((Nl}5wF*t_g|n=dvf
zT_WV3&A9kbVt%y{4%8nJf)c|F&ZV7j1_QcE$_ubFe7VDi{>R_`)2t+p6TIKP_+hqx
z7_=m%n5?+yzy1Rh8fjdo`9GKLuTSLI2KJskDz5+`Li)ZP4>r%=R}{gQr&%%KhBmgu
zt8L8_)de$g`YjbC-+YI>J%aTtoEo*VB9PAF_LP_AC{4b(;i|~O`RxL9dSQ~rv5-_W
z$Bc863FysWm&SE{Bn!uTfrpQmG(0+MqNKbb^Cq*&Bs`Crro-vEYC?(Ib^Q}27Iv(p
zn}s+J`7fi@se=wWmU{UXAy3SxsjZv2<62~Q8k7bj5V*4UEvn<D^e&c?iYY<60odHH
zU{*2kfl`j^mEL<7xroS_p_vFys-;;5UELVn%u6Y~R!Ob*OPHQIrk0iwUKdZq7Hy8|
zmI_%(f?gL^*Ed7;_e9FxH$~PAtCac&02qdB9~Yq*b*A83cL&AQmf4x({m4iJ-N#sJ
zK@{TKp^^qS7xg2%en;eNpQbq{@%=F`X2`(6@&c1h4?5<T_7yS2_ws4lT1yA2^9<Wh
zfv{)k{4JEi<|2Hahoz>e)xfsT&)ip2WH%wdjr>Rom?z~3?n~GwU+D7srPvl5o3pX{
zm+{1(D=NmRpk}PT80Z?dQ)3<vB$m9aek?=Ktm1o%kDs1*Zy)32#FucKMeK@nFy(dB
zjJaJAH)@)HwyTt!(cvZqb6Fs;w0ID8UQ{9zQp?1_p@uNK)qEGws-u}!CDzXMkXT!{
zn*1`IQ>rVCkLY{#!`xTe)hw><4{(e0oWleJoQ-b#zFa_}DZPuUORE+hDH*v$UDZY1
z48aUryUlDaUEl|}UMob?NNOQaSNE6eb`^l#$q3&WLi_#|4IRpgGJP7?<2otl(Fyqe
z9oXNzlN29fL^3Rd&A2t8^K{DGL~}>k^;}>cT%y0vMDCcLj+w!pb3?8f>eI%kvTi^u
zbH$d)FirMT_oxaSlyU3vjQRGNX?0!o(l_0A)(L8ILaog%WwU*HP|o@=40JpMpV&%d
z59hY?D`ZG<KX@J;8PyP-IXXH&eDergrJjAiWLHB`8Z-LJ&D*$&8c~@NllRoOO5<_<
zPHV(J1-Hrjd)89>B6W=Cmo%})<1tshdjBVI?lMpIi-YU2vCuRjH&uF$#09iZg&*N#
zC6Y-sGZMD;ZvuWBR54M54PE(H5++Dc<Y@1JyH37Q6<;+W-zHAPDGf^MZ>$i{%o=;R
z^0V==sXD6LdRMELUo2>3<30k#d!ubk4eTT_FhnqN;r$Sk@s|ZFvRCFh8a8d*r@tK~
zy_}m27Sna9D%>Zk2yY8R4t_PJbbC(Yo2h6k1s(ZP(6&xJJ1c9at)2_f`KsG(aMENT
z207Vjrsu00*6MHZ#J>nGRx%8MJy2FX2ecjT+WjOw=4*Rb=n2@XCBe%~@vAiHI;X-#
z*dKkWl+iex(<)}iP#Z3K-*Yonw#f6Aj5MaX#q>T&TJC+`V4~Gaht^{NA<tdi!>KEY
zH0g;6R@}?k%6znXMx)1O@+P12f@wnj9c0rQ3hUyKM0xMYpu~y7s(AsFJ&WS<^6z`f
z$TC8Te}?%#VwL|p(DV>iz+o)TXjfCG%9d<40I{4)icgg%gUv{101qfF-9B3$e7jOv
z|HeNty+JFVlvx3rNj5gVuwynzxVhx{x}okvE&;;=0D5t1y}PaD;yacD$4B9i(9l-O
zfY-z`VnI}N%5Rmox&lKTK9#Q!brZ8%q_b;5eBm&zm7_cu=bzUnV-i@2(p2|VvrhVw
zGN!}j^H~p@S=u38yczNY`tNz^hrwYVz`}!Qh1o|gpd>B|e43?#2F=jt^bcuDd<D{$
zRJlLI#WAh!N`$Fdv-jvNr%Xs^2(We$%V?IcBN;iFb+x<tQr)8xC3TP#xd0c5p>1u8
zW7}5*Zd-TstDo1B%LQ<ehK^lnm~1o>Gmo-570ZrF=eX1?6*BGN!z!b1M^EF+ne_UJ
zaB&l$?Gd*EmwC54yYP#j&cd!&Ocbi^Y|nnTHbvMU*WIR~{J3C5!hg)zH#N%eo@d97
zt8^GMfXV*E(O*lOAv`?%McTsXbJ202!C+`{#3gdD5tV#A)QkYyS8p7rK~Z1d?Ds_)
zJI(WNNz>9QhOz~o+OAXj_j)+L%}rDM9n^0`Nxkp;pWuRM(NYS)*f9#=CC-~(o_Hy*
ziJSAPYRjNJ=(yJdYmUZs8@GrR@Jgg$79G2;lqyq^H@D|~Hl4lR{55y|bdOJTLgZv=
z3xMEGL?~%c+YkhA{O)f_2gm3iZ1+L{+zjfiIk2{5f1mwFDlmaV8i(fXC?RGb?LPvb
zGJ5`f0{7F0&f<$7tC&E?`6X-kV~V?x_7e-JV1n)XJ*9vnU9$zpfPZQi5DWe7&L{Qr
ztALWEyxDg^L;Cl@p0G*d)_@11PQT5bpr8N0K8b&9M>j?DEiD?#^;rMZPR1W$A|)Oo
zJRI@+mb<+&$ly*dko7Ft73~V+nfhE_9)@s;zq!96I4C_~{XdYNfQE_{3;DN5_2Wcq
Zf}?arc1umr{a~P%l(@WDxrjl){{SCs;NAcL

literal 0
HcmV?d00001

diff --git a/src/main/webapp/connect/trello/index.html b/src/main/webapp/connect/trello/index.html
new file mode 100644
index 000000000..20c961195
--- /dev/null
+++ b/src/main/webapp/connect/trello/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+  </head>
+  <body>
+    <script src="https://trello.com/power-ups/power-up.js"></script>
+    <script src="js/common.js"></script>
+    <script src="js/client.js"></script>
+    <h1>
+      draw.io Trello Power-Up
+    </h1>
+  </body>
+</html>
diff --git a/src/main/webapp/connect/trello/js/attSection.js b/src/main/webapp/connect/trello/js/attSection.js
new file mode 100644
index 000000000..a8466d81a
--- /dev/null
+++ b/src/main/webapp/connect/trello/js/attSection.js
@@ -0,0 +1,201 @@
+// Resize sensor not needed
+GraphViewer.useResizeSensor = false;
+
+var t = window.TrelloPowerUp.iframe();
+
+t.render(function()
+{
+	var idSep = encodeURIComponent('|$|');
+	var ident = 'attachment-thumbnail-details-options-item dark-hover';
+	var data = null;
+	
+	// NOTE: Autosave is enabled to avoid possible data loss due
+	// to no event fired before the modal dialog closes
+	var getEditFunction = function(att, name)
+	{
+		return function() 
+		{
+			var id = t.getContext().card + idSep + att.id;
+
+			t.modal({
+				url: './editor.html',
+				fullscreen: true,
+				title: 'draw.io: ' + name,
+				args: {url: mxTrelloCommon.editorURL +
+					((location.hostname != 'www.draw.io') ?
+						'?dev=1&test=1&embed=1&libraries=1&tr=1&gapi=1&od=1&gh=1&db=1&gl=1&p=tr' :
+						'?embed=1&libraries=1&tr=1&gapi=1&od=1&gh=1&db=1&gl=1&p=tr') +
+					'#T' + id}
+	        });
+	    }  
+	};
+
+	var getPrevFunction = function(prevURL, name)
+	{
+		return function(evt)
+		{
+			var source = mxEvent.getSource(evt);
+			
+			while (source != null)
+			{
+				if (source.className != null && source.className.
+					toString().substring(0, ident.length) == ident)
+				{
+					return;
+				}
+				
+				source = source.parentNode;
+			}
+			
+			// Redirect via editor.html to avoid Trello injecting crap
+			// after the hash in the URL
+			t.modal({
+				url: './editor.html',
+				fullscreen: true,
+				title: 'draw.io: ' + name,
+				args: {url: prevURL}
+	        });
+		}
+	};
+
+	t.card('attachments')
+		.get('attachments')
+		.filter(mxTrelloCommon.attFilterFn)
+		.then(function(drawioAtts)
+		{
+			var content = document.getElementById('content');
+			content.innerHTML = "";
+
+			for (var i = 0; i < drawioAtts.length; i++)
+			{
+				(function(atts)
+				{
+					var div = document.createElement('div');
+					div.className = "attachment-thumbnail";
+	
+					var attName = atts.name;
+	
+					//TODO add preview modal on click
+					//For PNG and SVG (on supported browsers) show them as images, otherwise, load them inside a lightbox editor [size 300px max for images]
+					//Click shows a preview
+					var previews = atts.previews;
+	
+					var prevURL = mxTrelloCommon.editorURL + '?lightbox=1&nav=1&layers=1&highlight=3572b0';
+					var fileId = '#T' + t.getContext().card + idSep + atts.id;
+					
+					if (previews.length > 0)
+					{
+						//find the best size (max dim is 300px)
+						var maxPrev = previews[0];
+	
+						for (var j = 1; j < previews.length; j++)
+						{
+							if (previews[j].width <= 350 && previews[j].height <= 260 && maxPrev.width < previews[j].width)
+							{
+								maxPrev = previews[j];
+							}
+						}
+	
+						var imgLink = document.createElement('a');
+						imgLink.className = "attachment-thumbnail-preview";
+						imgLink.setAttribute('href', 'javascript:void(0);');
+						imgLink.setAttribute('title', attName);
+						imgLink.style.cssText = "background-image: url('" + maxPrev.url + "');background-color: #fcfcfc;";
+						
+						div.appendChild(imgLink);
+					}
+					else
+					{
+						var id = t.getContext().card + encodeURIComponent('|$|') + atts.id;
+						
+						var container = document.createElement('div');
+						container.style.cssText = 'position:absolute;top:0px;left:0px;width:110px;' +
+							'height:80px;border:1px solid transparent;cursor:pointer;' +
+							'background-position:center;background-repeat:no-repeat;background-image:url(/images/spin.gif);';
+						div.appendChild(container);
+						
+						// Does not use iframe for quicker loading and avoiding authorize dialog
+						mxUtils.get('/proxy?url=' + encodeURIComponent(atts.url), function(req)
+						{
+							container.style.backgroundImage = 'none';
+	
+							if (req.getStatus() >= 200 && req.getStatus() < 300)
+							{
+								var viewer = new GraphViewer(container, req.getDocumentElement(),
+									{highlight: '#3572b0', border: 4, lightbox: false,
+									nav: true, 'max-height': 72});
+								container.style.width = '110px';
+								container.style.height = '80px';
+								
+								if (viewer.graph != null)
+								{	
+									// Adds transparent background
+									viewer.graph.view.canvas.ownerSVGElement.style.backgroundColor = 'transparent';
+									
+									// Undo container resize and center
+									var bounds = viewer.graph.getGraphBounds();
+									var dx = (110 - bounds.width) / 2 - bounds.x;
+									var dy = (80 - bounds.height) / 2 - bounds.y;
+									viewer.graph.view.canvas.ownerSVGElement.setAttribute('transform',
+										'translate(' + dx + ' ' + dy + ')');
+								}
+							}
+						});
+					}
+
+					var prevFn = getPrevFunction(prevURL + fileId, attName);
+					mxEvent.addListener(div, 'click', prevFn);
+					
+					var detailsP = document.createElement('p');
+					detailsP.className = "attachment-thumbnail-details";
+	
+					var nameSpan = document.createElement('span');
+					nameSpan.className = "attachment-thumbnail-name";
+					mxUtils.write(nameSpan, attName);
+					detailsP.appendChild(nameSpan);
+	
+					var detailOpt = document.createElement('span');
+					detailOpt.className = "u-block quiet attachment-thumbnail-details-title-options";
+	
+					var addedSpan = document.createElement('span');
+					addedSpan.innerHTML = "&nbsp;"; //Add more details about the file here
+					detailOpt.appendChild(addedSpan);
+					// <span>
+					//   Added <span class="date" dt="2017-09-09T13:28:14.099Z" title="September 9, 2017 3:28 PM">an hour ago</span>
+					// </span>
+					// <span><a class="attachment-thumbnail-details-title-options-item dark-hover js-confirm-delete" href="#">
+					//   <span class="attachment-thumbnail-details-options-item-text">Delete</span></a>
+					// </span>
+					detailsP.appendChild(detailOpt);
+	
+					var actionsSpan = document.createElement('span');
+					actionsSpan.className = "quiet attachment-thumbnail-details-options";
+					detailsP.appendChild(actionsSpan);
+	
+					var downloadLink = document.createElement('a');
+					downloadLink.className = "attachment-thumbnail-details-options-item dark-hover";
+					downloadLink.setAttribute('href', atts.url);
+					downloadLink.setAttribute('target', '_blank');
+					downloadLink.setAttribute('download', attName);
+					downloadLink.innerHTML = '<span class="icon-sm icon-download"></span> <span class="attachment-thumbnail-details-options-item-text">Download</span>';
+					actionsSpan.appendChild(downloadLink);
+	
+					var editLink = document.createElement('a');
+					editLink.className = "attachment-thumbnail-details-options-item dark-hover";
+					editLink.setAttribute('href', 'javascript:void(0);');
+					editLink.innerHTML = '<span class="icon-sm icon-edit"></span> <span class="attachment-thumbnail-details-options-item-text">Edit</span>';
+					editLink.addEventListener("click", getEditFunction(atts, attName));
+					actionsSpan.appendChild(editLink);
+	
+					detailsP.appendChild(actionsSpan);
+					div.appendChild(detailsP);
+	
+					content.appendChild(div);
+				})(drawioAtts[i]);
+			}
+		})
+		.then(function()
+		{
+			return t.sizeTo('#content');
+		});
+});
diff --git a/src/main/webapp/connect/trello/js/client.js b/src/main/webapp/connect/trello/js/client.js
new file mode 100644
index 000000000..c299f03b1
--- /dev/null
+++ b/src/main/webapp/connect/trello/js/client.js
@@ -0,0 +1,69 @@
+/* global TrelloPowerUp */
+
+var Promise = TrelloPowerUp.Promise;
+
+TrelloPowerUp
+		.initialize({
+			'card-buttons' : function(t, options) 
+			{
+				return [ {
+					icon : 'https://www.draw.io/images/drawlogo48-gray.png',
+					text : 'draw.io',
+					callback : function(t) 
+					{
+						return t.popup({
+							title : 'Create a New Diagram...',
+							url : './new.html',
+							height : 190
+						});
+					}
+				} ];
+			},
+			'attachment-sections' : function(t, options) 
+			{
+				// Claim all png attachment that is created by draw.io
+				var claimed = options.entries.filter(mxTrelloCommon.attFilterFn);
+
+				if (claimed && claimed.length > 0) 
+				{
+					return [ {
+						claimed : claimed,
+						icon : 'https://www.draw.io/images/drawlogo48-gray.png',
+						title : 'draw.io Diagrams',
+						content : 
+						{
+							type : 'iframe',
+							url : t.signUrl('./attSection.html', {
+								arg: ""
+							}),
+							height : 230
+						}
+					} ];
+				} 
+				else 
+				{
+					return [];
+				}
+			},
+			'card-badges' : function(t, options) 
+			{
+				 return t.card('attachments')
+				    .get('attachments')
+				    .filter(mxTrelloCommon.attFilterFn)
+				    .then(function(claimed)
+		    		{
+						if (claimed && claimed.length > 0) 
+						{
+							return [{ 
+								  text: claimed.length,
+								  icon: 'https://www.draw.io/images/drawlogo48-gray.png', 
+								  color: 'white' 
+							}];
+						}
+						else
+						{
+							return [];
+						}
+		    		});
+			}
+		});
diff --git a/src/main/webapp/connect/trello/js/common.js b/src/main/webapp/connect/trello/js/common.js
new file mode 100644
index 000000000..81c9174bd
--- /dev/null
+++ b/src/main/webapp/connect/trello/js/common.js
@@ -0,0 +1,8 @@
+mxTrelloCommon = {
+	editorURL: location.protocol + '//' + location.hostname + '/',
+	attFilterFn: function(attachment) 
+	{
+		// Returns true for files ending with .drawio and an optional extension
+		return /.*\.drawio(\.[A-Za-z]*)?$/.test(attachment.name);
+	}
+};
diff --git a/src/main/webapp/connect/trello/js/editor.js b/src/main/webapp/connect/trello/js/editor.js
new file mode 100644
index 000000000..2a2956668
--- /dev/null
+++ b/src/main/webapp/connect/trello/js/editor.js
@@ -0,0 +1,29 @@
+(function () {
+  var t = window.TrelloPowerUp.iframe();
+  var url = t.arg('url');
+
+  var iframe = document.getElementById("editorFrame");
+  iframe.setAttribute('src', url);
+
+  // Only needed to invoke closeModal via embed button in toolbar
+  // and to receive messages from iframe (cannot recv from t.modal)
+  window.addEventListener('message', function(evt)
+  {
+		if (evt.data.length > 0)
+		{
+			try
+			{
+				var msg = JSON.parse(evt.data);
+	
+				if (msg != null && msg.event == 'exit')
+				{
+					t.closeModal();
+				}
+			}
+			catch (e)
+			{
+				// ignore
+			}
+		}
+  });
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/trello/js/new.js b/src/main/webapp/connect/trello/js/new.js
new file mode 100644
index 000000000..21590cff1
--- /dev/null
+++ b/src/main/webapp/connect/trello/js/new.js
@@ -0,0 +1,104 @@
+(function()
+{
+	var t = window.TrelloPowerUp.iframe();
+	var diagName = document.getElementById("diagName");
+	var errorMsg = document.getElementById("errorMsg");
+	
+	diagName.focus();
+
+	function create(fileName, type, templateId)
+	{
+		t.closePopup();
+		
+		t.modal({
+	          url: './editor.html',
+	          fullscreen: true,
+	          title: 'draw.io: ' + fileName,
+	          args: {url: mxTrelloCommon.editorURL +
+					((location.hostname != 'www.draw.io') ?
+						'?dev=1&drawdev=1&embed=1&tr=1&gapi=1&od=1&gh=1&db=1&p=tr' :
+						'?embed=1&tr=1&gapi=1&od=1&gh=1&db=1&p=tr') +
+					'&filename=' + encodeURIComponent(fileName + '.drawio' + (type == 'xml' ? '' : '.' + type)) +
+					'&filetype=' + encodeURIComponent(type) +
+					'&card=' + encodeURIComponent(t.getContext().card) +
+					((templateId != null) ? '&template=' + encodeURIComponent(templateId) : '')}
+	        });
+	};
+
+	//Fill the dialog with other attachments
+	var select = document.getElementById("otherAtt");
+	var importBtn = document.getElementById("importBtn");
+
+	t.card('attachments')
+		.get('attachments')
+		.then(function(atts)
+		{
+			var count = 0;
+			for (var i = 0; i < atts.length; i++)
+			{
+				if (!mxTrelloCommon.attFilterFn(atts[i]))
+				{
+					var opt = document.createElement("option");
+					opt.setAttribute('value', atts[i].id);
+					mxUtils.write(opt, atts[i].name);
+					select.appendChild(opt);
+					count++;
+				}
+			}
+
+			if (count == 0)
+			{
+				document.getElementById("importLbl").style.display = "none";
+				select.style.display = "none";
+				importBtn.style.display = "none";
+			}
+			
+			var newDiagFn = function()
+			{
+				var name = diagName.value;
+				var type = document.getElementById("format").value;
+				
+				if (name == null || name.length == 0)
+				{
+					errorMsg.style.display = "";
+					errorMsg.innerHTML = 'Diagram name cannot be empty';
+					return;
+				}
+				else
+				{
+					for (var i = 0; i < atts.length; i++)
+					{
+						if (atts[i].name == name + '.drawio' + (type == 'xml' ? '' : '.' + type))
+						{
+							errorMsg.style.display = "";
+							errorMsg.innerHTML = 'Diagram already exists';
+							return;
+						}
+					}
+				}
+				
+				create(name, type);
+			};
+
+			diagName.addEventListener("keypress", function(e)
+			{
+				if (e.keyCode == 13)
+					newDiagFn();
+				else
+					errorMsg.style.display = "none";
+			});
+
+			document.getElementById("createBtn").addEventListener("click", newDiagFn);
+			document.getElementById("createBtn").removeAttribute('disabled');
+		})
+		.then(function()
+		{
+			return t.sizeTo('#content');
+		});
+
+	importBtn.addEventListener("click", function()
+	{
+		create(select.options[select.selectedIndex].text, 'xml', select.value);
+	});
+
+})();
\ No newline at end of file
diff --git a/src/main/webapp/connect/trello/manifest.json b/src/main/webapp/connect/trello/manifest.json
new file mode 100644
index 000000000..9bf9113d3
--- /dev/null
+++ b/src/main/webapp/connect/trello/manifest.json
@@ -0,0 +1,19 @@
+{
+  "name": "draw.io",
+  "details":"[draw.io](https://www.draw.io) is a free diagramming Power-up that enables you to draw a wide range of diagrams including flowcharts, BPMN, network diagrams, UML and ER diagrams, and much more. draw.io offers these advantages:\n\n* Fully open source platform.\n* All data stored inside Trello, nothing externally.\n* Import diagrams from other diagramming tools.\n\n### Screenshot\n\n![Screenshot of a draw.io diagram insertion in Trello card.](https://www.draw.io/connect/trello/images/drawio-trello-ss.png)",
+  "icon": {
+    "url": "https://www.draw.io/images/drawlogo128.png"
+  },
+  "author": "draw.io",
+  "capabilities": [
+    "callback",
+    "card-buttons",
+    "card-badges",
+    "attachment-sections"
+  ],
+  "connectors": {
+    "iframe": {
+      "url": "./index.html"
+    }
+  }
+}
diff --git a/src/main/webapp/connect/trello/new.html b/src/main/webapp/connect/trello/new.html
new file mode 100644
index 000000000..a0a1355ad
--- /dev/null
+++ b/src/main/webapp/connect/trello/new.html
@@ -0,0 +1,32 @@
+<html>
+  <head>
+      <link rel="stylesheet" href="https://trello.com/power-ups/power-up.css">
+      <script src="https://trello.com/power-ups/power-up.min.js"></script>
+      <script src="/js/viewer.min.js"></script>
+      <script src="js/common.js"></script>
+  </head>
+  <body>
+    <div id="content" style="width:100%;height:100%">
+      <label for="diagName">Diagram Name</label> 
+      <input type="text" id="diagName" placeholder="New Diagram Name">
+      <div id="errorMsg" style="display: none; color: red"></div>
+      <label for="format">File Type</label>
+	  <select id="format">
+		  <option value="xml">XML</option>
+		  <option value="png">PNG</option>
+		  <option value="svg">SVG</option>
+		  <option value="html">HTML</option>
+	  </select>
+      <button disabled="disabled" id="createBtn">
+        Create
+      </button>
+      <br>
+      <label id="importLbl" for="otherAtt">Or import an existing attachment</label>
+      <select id="otherAtt"></select>
+      <button id="importBtn">
+        Import
+      </button>      
+    </div>
+    <script src="js/new.js"></script>
+  </body>
+</html>
diff --git a/src/main/webapp/connect/vsdx/importer.js b/src/main/webapp/connect/vsdx/importer.js
new file mode 100644
index 000000000..34c83866f
--- /dev/null
+++ b/src/main/webapp/connect/vsdx/importer.js
@@ -0,0 +1,79 @@
+function convertVSDXtoMX(file, filename, success, error)
+{
+	function doImport(vsdxFile)
+	{
+		try
+		{
+			new com.mxgraph.io.mxVsdxCodec({
+				addRemoteServiceSecurityCheck: function() {}
+			}).decodeVsdx(vsdxFile, success, null, error);
+		}
+		catch (e)
+		{
+			error();
+		}
+	};
+	
+	var delayed = function()
+	{
+		if (typeof mxVsdxCodec === 'undefined')
+		{
+			if (/(\.v(sd|dx))($|\?)/i.test(filename)) 
+			{
+				if (VSD_CONVERT_URL != null)
+				{
+					var formData = new FormData();
+					formData.append('file1', file, filename);
+
+					var xhr = new XMLHttpRequest();
+					xhr.open('POST', VSD_CONVERT_URL);
+					xhr.responseType = 'blob';
+					
+					xhr.onreadystatechange = function()
+					{
+						if (xhr.readyState == 4)
+						{	
+							if (xhr.status >= 200 && xhr.status <= 299)
+							{
+								doImport(xhr.response);
+							}
+							else
+							{
+								error();
+							}
+						}
+					};
+					
+					xhr.send(formData);
+				}
+				else
+				{
+					error();
+				}
+			}
+			else
+			{
+				doImport(file);
+			}
+		}
+		else
+		{
+			error();
+		}
+	};
+	
+	//Load extensions.min.js lazily
+	if (typeof mxVsdxCodec === 'undefined')
+	{
+		var script = document.createElement('script');
+		script.onload = delayed;
+		script.src = '/js/extensions.min.js';
+		script.setAttribute('type', 'text/javascript');
+		var head = document.getElementsByTagName('head')[0];
+		head.appendChild(script);
+	}
+	else
+	{
+		delayed();
+	}
+};
\ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index e368258ff..004808800 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -2166,7 +2166,7 @@ d=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var
 c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));u.toolbar.setFontName(d);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var w=
 b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){try{w.apply(this,arguments),v()}catch(G){u.handleError(G)}};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(F){}var t=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=this.menus&&(b.popupMenuHandler.factoryMethod=
 mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var y="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=b.view.getState(a);if(null!=c){var d=
-a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(M){this.handleError(M)}};
+a.clone();d.style="";var e=b.getCellStyle(d);a=[];var d=[],f;for(f in c.style)e[f]!=c.style[f]&&(a.push(c.style[f]),d.push(f));for(var g=b.getModel().getStyle(c.cell),h=null!=g?g.split(";"):[],g=0;g<h.length;g++){var k=h[g],l=k.indexOf("=");if(0<=l){f=k.substring(0,l);var m=k.substring(l+1);null!=e[f]&&"none"==m&&(a.push(m),d.push(f))}}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",d,"values",a,"cells",[c.cell]))}}catch(L){this.handleError(L)}};
 this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var C=["fontFamily","fontSize","fontColor"],B="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),D=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
 ["fillColor","gradientColor"],C,["opacity"],["align"],["html"]];for(a=0;a<D.length;a++)for(c=0;c<D[a].length;c++)y.push(D[a][c]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(y,x[a])&&y.push(x[a]);var A=function(a,c){var d=b.getModel();d.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e],g;if(c)g=["fontSize","fontFamily","fontColor"];else{var h=d.getStyle(f),k=null!=h?h.split(";"):[];g=y.slice();for(var l=0;l<k.length;l++){var m=k[l],n=m.indexOf("=");if(0<=n){var p=m.substring(0,n),q=mxUtils.indexOf(g,
 p);0<=q&&g.splice(q,1);for(var v=0;v<D.length;v++){var r=D[v];if(0<=mxUtils.indexOf(r,p))for(var u=0;u<r.length;u++){var t=mxUtils.indexOf(g,r[u]);0<=t&&g.splice(t,1)}}}}}for(var w=d.isEdge(f),C=w?b.currentEdgeStyle:b.currentVertexStyle,B=d.getStyle(f),l=0;l<g.length;l++){var p=g[l],A=C[p];null==A||"shape"==p&&!w||w&&!(0>mxUtils.indexOf(x,p))||(B=mxUtils.setStyle(B,p,A))}d.setStyle(f,B)}}finally{d.endUpdate()}};b.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});b.addListener("textInserted",
@@ -2468,13 +2468,13 @@ Sidebar.prototype.createDragSource=function(a,c,d,b,f){function e(a,b){var c;mxC
 "inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==A?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
 m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=this.isDropStyleEnabled(b,m),v=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,e,g,f){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=t&&E==A){var h=a.isCellSelected(t.cell)?a.getSelectionCells():[t.cell],h=this.updateShapes(a.model.isEdge(t.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=
 b&&null!=E&&null!=r&&E!=A?(h=a.model.isEdge(r.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(r.cell,b,J,h,d))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,k.autoscroll,!0,!0);k.addListener(mxEvent.ESCAPE,function(a,b){v.isActive()&&v.reset()});var u=v.mouseDown;v.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),u.apply(this,arguments))};var r=null,w=
-null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),C=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),F=null,I=e(this.roundDrop),G=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,E=null,N=v.createPreviewElement;v.createPreviewElement=function(a){var b=N.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=
-b.style.width;this.previewElementHeight=b.style.height;return b};var R=v.dragEnter;v.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");R.apply(this,arguments)};var S=v.dragExit;v.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");S.apply(this,arguments)};v.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&E==A)this.previewElement.style.display=
+null,t=null,y=!1,x=e(this.triangleUp,mxResources.get("connect")),C=e(this.triangleRight,mxResources.get("connect")),B=e(this.triangleDown,mxResources.get("connect")),D=e(this.triangleLeft,mxResources.get("connect")),A=e(this.refreshTarget,mxResources.get("replace")),F=null,I=e(this.roundDrop),G=e(this.roundDrop),J=mxConstants.DIRECTION_NORTH,E=null,O=v.createPreviewElement;v.createPreviewElement=function(a){var b=O.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents="none");this.previewElementWidth=
+b.style.width;this.previewElementHeight=b.style.height;return b};var U=v.dragEnter;v.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");U.apply(this,arguments)};var R=v.dragExit;v.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");R.apply(this,arguments)};v.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=a.view;if(null!=t&&E==A)this.previewElement.style.display=
 a.model.isEdge(t.cell)?"none":"",this.previewElement.style.left=t.x+"px",this.previewElement.style.top=t.y+"px",this.previewElement.style.width=t.width+"px",this.previewElement.style.height=t.height+"px";else if(null!=r&&null!=E){var e=a.model.isEdge(r.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(r.cell,b[e],J,b),h=a.model.isEdge(r.cell)?null:a.getCellGeometry(r.cell),k=a.getCellGeometry(b[e]),p=a.model.getParent(r.cell),q=d.translate.x*d.scale,u=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(p)&&
 p!=d.currentRoot&&(u=d.getState(p),q=u.x,u=u.y);h=k.x;k=k.y;a.model.isEdge(b[e])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+q+"px";this.previewElement.style.top=(g.y-k)*d.scale+u+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=v.currentHighlight.state&&a.model.isEdge(v.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-
-f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var K=(new Date).getTime(),H=0,M=null,ba=this.editorUi.editor.graph.getCellStyle(b[0]);v.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
-this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=E=null;M!=k?(M=k,K=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(M=k,v.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-K;if(q&&2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
-mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ba,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!=
+f.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-f.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var K=(new Date).getTime(),H=0,L=null,ca=this.editorUi.editor.graph.getCellStyle(b[0]);v.getDropTarget=mxUtils.bind(this,function(a,c,d,e){var g=mxEvent.isAltDown(e)||null==b?null:a.getCellAt(c,d);if(null!=g&&!this.graph.isCellConnectable(g)){var f=
+this.graph.getModel().getParent(g);this.graph.getModel().isVertex(f)&&this.graph.isCellConnectable(f)&&(g=f)}a.isCellLocked(g)&&(g=null);var k=a.view.getState(g),f=E=null;L!=k?(L=k,K=(new Date).getTime(),H=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(L=k,v.getDropTarget(a,c,d,e))},this.dropTargetDelay+10))):H=(new Date).getTime()-K;if(q&&2500>H&&null!=k&&!mxEvent.isShiftDown(e)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=
+mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(k.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ca,mxConstants.STYLE_SHAPE)||1500<H||a.model.isEdge(k.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(k)&&(a.model.isVertex(k.cell)&&null!=
 m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){t=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);A.style.left=Math.floor(l.x)+"px";A.style.top=Math.floor(l.y)+"px";null==F&&(a.container.appendChild(A),F=A.parentNode);h(c,d,l,A)}else null==t||!mxUtils.contains(t,c,d)||1500<H&&!mxEvent.isShiftDown(e)?(t=null,null!=F&&(A.parentNode.removeChild(A),
 F=null)):null!=t&&null!=F&&(l=a.model.isEdge(t.cell)?a.view.getPoint(t):new mxPoint(t.getCenterX(),t.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,A));if(y&&null!=r&&!mxEvent.isAltDown(e)&&null==E){f=mxRectangle.fromRectangle(r);if(a.model.isEdge(r.cell)){var n=r.absolutePoints;null!=I.parentNode&&(l=n[0],f.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,
 this.roundDrop.height),I)));null!=G.parentNode&&(n=n[n.length-1],f.add(h(c,d,new mxRectangle(n.x-this.roundDrop.width/2,n.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),G)))}else l=mxRectangle.fromRectangle(r),null!=r.shape&&null!=r.shape.boundingBox&&(l=mxRectangle.fromRectangle(r.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),n=this.graph.selectionCellsHandler.getHandler(r.cell),null!=n&&(l.x-=n.horizontalOffset/2,l.y-=n.verticalOffset/
@@ -2553,11 +2553,11 @@ Graph.prototype.labelLinkClicked=function(a,c,d){c=c.getAttribute("href");if(nul
 Graph.prototype.openLink=function(a,c,d){var b=window;try{if("_self"==c&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==c&&window==window.top){var f=a.split("#")[1];window.location.hash=="#"+f&&(window.location.hash="");window.location.hash=f}else b=window.open(a,null!=c?c:"_blank"),null==b||d||(b.opener=null)}catch(e){}return b};
 Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
 Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a,c){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){var d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var b=new mxStackLayout(this.graph,!0);b.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");b.horizontal="1"==mxUtils.getValue(d,"horizontalStack","1");b.resizeParent="1"==mxUtils.getValue(d,"resizeParent",
-"1");b.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");b.spacing=d.stackSpacing||b.spacing;b.border=d.stackBorder||b.border;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.fill=!0;return b}return"treeLayout"==d.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.groupPadding=mxUtils.getValue(d,"parentPadding",
-20),b.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b):"flowLayout"==d.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.parentBorder=mxUtils.getValue(d,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),
-b.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):"circleLayout"==d.childLayout?new mxCircleLayout(this.graph):"organicLayout"==d.childLayout?new mxFastOrganicLayout(this.graph):"tableLayout"==d.childLayout?
-new TableLayout(this.graph):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,c){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,c){if(c==mxEvent.END_UPDATE){var d=this.graph.getCellStyle(a);if("stackLayout"==d.childLayout){var b=new mxStackLayout(this.graph,!0);b.resizeParentMax="1"==mxUtils.getValue(d,"resizeParentMax","1");b.horizontal="1"==mxUtils.getValue(d,"horizontalStack","1");b.resizeParent="1"==
+mxUtils.getValue(d,"resizeParent","1");b.resizeLast="1"==mxUtils.getValue(d,"resizeLast","0");b.spacing=d.stackSpacing||b.spacing;b.border=d.stackBorder||b.border;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.fill=!0;return b}if("treeLayout"==d.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(d,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.groupPadding=
+mxUtils.getValue(d,"parentPadding",20),b.levelDistance=mxUtils.getValue(d,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==d.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(d,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.parentBorder=mxUtils.getValue(d,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(d,"intraCellSpacing",
+mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(d,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(d,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(d,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==d.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==d.childLayout)return new mxFastOrganicLayout(this.graph);
+if("tableLayout"==d.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
 Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var d=Math.floor(Math.ceil(c.x/this.view.scale-this.view.translate.x)/a.width),b=Math.floor(Math.ceil(c.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(d,b,Math.ceil((Math.floor((c.x+c.width)/this.view.scale)-this.view.translate.x)/a.width)-d,Math.ceil((Math.floor((c.y+c.height)/this.view.scale)-this.view.translate.y)/a.height)-
 b)};Graph.prototype.sanitizeHtml=function(a,c){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var d=this.model.cells[c];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
 Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
@@ -2637,8 +2637,8 @@ Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;
 null,"",0,e,c*d+e,b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;resizeLast=1;resizeParent=0;container=0;");f.insert(this.createParent(h,this.createVertex(null,null,"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),c,d,0));return 1<a?(h.geometry.y=b+e,this.createParent(f,this.createParent(h,this.createVertex(null,null,"",e,0,d,b,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),
 c,d,0),a-1,0,b)):f};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType};
 Graph.prototype.updateTableRowHeight=function(a,c){var d=this.getModel();d.beginUpdate();try{var b=this.getCellGeometry(a);if(null!=b){b=b.clone();b.height+=c;d.setGeometry(a,b);var f=d.getParent(a),e=this.getCellGeometry(f);null!=e&&(e=e.clone(),e.height+=c,d.setGeometry(f,e))}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,c){var d=this.getModel(),b=d.getParent(a),f=d.getParent(b),e=b.getIndex(a);d.beginUpdate();try{var h=this.getCellGeometry(a),g=0;null!=h&&(g=c-h.width);for(var k=0;k<d.getChildCount(f);k++)if(b=d.getChildAt(f,k),d.isVertex(b)){var l=d.getChildAt(b,e);d.isVertex(l)&&(h=this.getCellGeometry(l),null!=h&&(h=h.clone(),h.width=c,d.setGeometry(l,h)));e<d.getChildCount(b)-1&&(l=d.getChildAt(b,e+1),d.isVertex(l)&&(h=this.getCellGeometry(l),null!=h&&(h=h.clone(),
-h.x+=g,h.width-=g,d.setGeometry(l,h))))}}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.getLayout=function(a,c){for(var d=this.graph.getModel(),b=[],f=0,e=0;e<d.getChildCount(a);e++){var h=d.getChildAt(a,e);if(!this.isVertexIgnored(h)){var g=this.graph.getCellGeometry(h);null!=g&&(f+=c?g.height:g.width,b.push(h))}}return[b,f]};
+Graph.prototype.updateTableColumnWidth=function(a,c){var d=this.getModel(),b=d.getParent(a),f=d.getParent(b),e=b.getIndex(a);d.beginUpdate();try{for(var h=0;h<d.getChildCount(f);h++)if(b=d.getChildAt(f,h),d.isVertex(b)){var g=d.getChildAt(b,e);if(d.isVertex(g)){var k=this.getCellGeometry(g);null!=k&&(k=k.clone(),k.width+=c,d.setGeometry(g,k))}e<d.getChildCount(b)-1&&(g=d.getChildAt(b,e+1),d.isVertex(g)&&(k=this.getCellGeometry(g),null!=k&&(k=k.clone(),k.x+=c,k.width-=c,d.setGeometry(g,k))))}}finally{d.endUpdate()}};
+function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.getLayout=function(a,c){for(var d=this.graph.getModel(),b=[],f=0,e=0;e<d.getChildCount(a);e++){var h=d.getChildAt(a,e);if(!this.isVertexIgnored(h)){var g=this.graph.getCellGeometry(h);null!=g&&(f+=c?g.height:g.width,b.push(h))}}return[b,f]};
 TableLayout.prototype.execute=function(a){if(null!=a){var c=this.graph.getActualStartSize(a),d=this.graph.getCellGeometry(a),b=this.graph.getModel();b.beginUpdate();try{var f=this.getLayout(a,!0),e=f[0],h=f[1],g=c.y;for(a=0;a<e.length;a++){var k=d.height-c.y-c.height,l=this.graph.getCellGeometry(e[a]),l=l.clone();l.height=l.height/h*k;l.width=d.width;l.x=c.x;l.y=g;b.setGeometry(e[a],l);for(var g=g+l.height,m=this.graph.getActualStartSize(e[a]),n=this.getLayout(e[a],!1),p=n[0],q=n[1],v=m.x,f=0;f<p.length;f++){var u=
 this.graph.getCellGeometry(p[f]),r=l.width-m.x-m.width,u=u.clone();u.width=u.width/q*r;u.height=l.height;u.y=0;u.x=v;b.setGeometry(p[f],u);v+=u.width}}}finally{b.endUpdate()}}};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var d=this.getState(a);null!=d&&b&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,
@@ -2670,143 +2670,145 @@ orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edg
 (a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+
 "/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,b){b=null!=b?b:{};for(var c=0;c<a.length;c++){var d=a[c];b[mxObjectIdentity.get(d)]=d.getId();for(var e=this.model.getChildCount(d),f=0;f<e;f++)this.createCellLookup([this.model.getChildAt(d,f)],b)}return b};Graph.prototype.createCellMapping=function(a,b,c){c=null!=c?c:{};for(var d in a){var e=b[d];null==c[e]&&(c[e]=a[d].getId()||"")}return c};
 Graph.prototype.importGraphModel=function(a,b,c,d){b=null!=b?b:0;c=null!=c?c:0;var e=new mxCodec(a.ownerDocument),f=new mxGraphModel;e.decode(a,f);a=[];var e={},g={},h=f.getChildren(this.cloneCell(f.root,this.isCloneInvalidEdges(),e));if(null!=h){var k=this.createCellLookup([f.root]),h=h.slice();this.model.beginUpdate();try{if(1!=h.length||this.isCellLocked(this.getDefaultParent()))for(f=0;f<h.length;f++){var l=this.model.getChildren(this.moveCells([h[f]],b,c,!1,this.model.getRoot())[0]);null!=l&&
-(a=a.concat(l))}else a=this.moveCells(f.getChildren(h[0]),b,c,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(e,k,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var L=this.getBoundingBoxFromGeometry(a,!0);null!=L&&this.moveCells(a,b-L.x,c-L.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary,
+(a=a.concat(l))}else a=this.moveCells(f.getChildren(h[0]),b,c,!1,this.getDefaultParent()),g[f.getChildAt(f.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(e,k,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(b=this.snap(b),c=this.snap(c));var N=this.getBoundingBoxFromGeometry(a,!0);null!=N&&this.moveCells(a,b-N.x,c-N.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var b={},c=this.cloneCells(a,null,b),d=new mxDictionary,
 e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<c.length;e++){var f=this.view.getState(a[e]);if(null!=f){var g=this.getCellGeometry(c[e]);null==g||!g.relative||this.model.isEdge(a[e])||d.get(this.model.getParent(a[e]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}d=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(e=0;e<c.length;e++)f.add(g,c[e]);this.updateCustomLinks(this.createCellMapping(b,this.createCellLookup(a)),c);return d.encode(f)};
-var e=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,c,d,f,g,h){h=null!=h?h:{};var k=e.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(h,this.createCellLookup(a)),k);return k};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=b[c]&&this.updateCustomLinksForCell(a,b[c])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,
-"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(ka){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=
-a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.getCurrentCellStyle(a),b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=
-this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(b,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=
-mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=
-b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),L=k.getTerminalPoint(!1);k.setTerminalPoint(l,
-!1);k.setTerminalPoint(L,!0);c.setGeometry(f,k);var m=this.view.getState(f),n=this.view.getState(g),p=this.view.getState(h);if(null!=m){var W=null!=n?this.getConnectionConstraint(m,n,!0):null,q=null!=p?this.getConnectionConstraint(m,p,!1):null;this.setConnectionConstraint(f,g,!0,q);this.setConnectionConstraint(f,h,!1,W)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var v=k.width;k.width=k.height;k.height=v;c.setGeometry(f,
-k);var r=this.view.getState(f);if(null!=r){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],u=mxUtils.getValue(r.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,u)+(b?-1:1),t.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=
-a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);
-null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){if(null!=
-a)for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=
-Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};
-Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||b.get(e)||(b.put(e,!0),d.push(e))}for(c=0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=!0,g=0;g<this.model.getChildCount(e.cell)&&f;g++)b.get(this.model.getChildAt(e.cell,g))||(f=
-!1);f&&a.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)this.isCellDeletable(a[c])&&this.isTransparentState(this.view.getState(a[c]))&&b.push(a[c]);a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.getAttributeForCell=
-function(a,b,c){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b):null;return null!=a?a:c};Graph.prototype.setAttributeForCell=function(a,b,c){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;
-for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?
-this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(null==d&&(d=this.view.getState(this.getCellAt(c.x,
-c.y))),b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,
-b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/
-2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c&&this.model.isEdge(c.cell)){d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else e=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-
-e.x-(null!=c?c.origin.x:0),d.geometry.y=Math.round(b/this.view.scale)-e.y-(null!=c?c.origin.y:0),d.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));
-null!=d&&(a[c].setAttribute("rel",this.linkRelation),a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var b=a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=
-g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,b,c){return null==g.getLinkForCell(a.cell)}),b=g.view.getState(a);b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(b)},mouseMove:function(a,b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(b,!0,this.currentState),(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||
-!g.intersects(this.currentState,b.getGraphX(),b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=
-this.currentLink?(e=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,
-b){a=null!=a?a:this.getSelectionCells();b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),
-e=[],f=0;f<d.length;f++)e.push(d[f]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);
-document.execCommand("createlink",!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=
-this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):
-h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};
-Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:
-!0;g=null!=g?g:!0;var n=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,L=mxUtils.createXmlDocument(),q=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"svg"):L.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==L.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-q.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var v=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),W=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",v+"px");q.setAttribute("height",W+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+v+" "+W);L.appendChild(q);var ea=null!=L.createElementNS?L.createElementNS(mxConstants.NS_SVG,"g"):L.createElement("g");q.appendChild(ea);var r=this.createSvgCanvas(ea);
-r.foOffset=e?-.5:0;r.textOffset=e?-.5:0;r.imageOffset=e?-.5:0;r.translate(Math.floor((c/b-n.x)/p),Math.floor((c/b-n.y)/p));var t=document.createElement("div"),u=r.getAlternateText;r.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(t.innerHTML=f,f=mxUtils.extractTextWithWhitespace(t.childNodes));for(var L=Math.ceil(2*d/this.state.fontSize),z=[],na=0,ha=0;(0==L||na<L)&&ha<f.length;){var qa=f.charCodeAt(ha);if(10==qa||13==qa){if(0<
-na)break}else z.push(f.charAt(ha)),255>qa&&na++;ha++}z.length<f.length&&1<f.length-z.length&&(f=mxUtils.trim(z.join(""))+"...");return f}catch(Sa){return u.apply(this,arguments)}else return u.apply(this,arguments)};var P=this.backgroundImage;if(null!=P){b=p/b;var x=this.view.translate,C=new mxRectangle(x.x*b,x.y*b,P.width*b,P.height*b);mxUtils.intersects(n,C)&&r.image(x.x,x.y,P.width,P.height,P.src,!0)}r.scale(a);r.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var w=h.drawCellState,T=h.getLinkForCellState;
-h.getLinkForCellState=function(a,b){var c=T.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&w.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),r);this.updateSvgLinks(q,k,!0);this.addForeignObjectWarning(r,q);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),
-this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target",
-"_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");
-for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);
-b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertTableColumn=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=f.getIndex(a);else this.isTableRow(a)&&(d=c.getParent(a)),b||(e=c.getChildCount(c.getChildAt(d,0))-1);for(var g=0;g<c.getChildCount(d);g++){var f=c.getChildAt(d,
-g),h=c.getChildAt(f,e),k=c.cloneCell(h),l=this.getCellGeometry(k);k.value=null;if(null!=l){l.width=Graph.minTableColumnWidth;var m=this.getCellGeometry(f);null!=m&&(l.height=m.height)}c.add(f,k,e+(b?0:1))}var n=this.getCellGeometry(d);null!=n&&(n=n.clone(),n.width+=Graph.minTableColumnWidth,c.setGeometry(d,n))}finally{c.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=d.getIndex(f);
-else this.isTableRow(a)?(d=c.getParent(a),e=d.getIndex(a)):b||(e=c.getChildCount(d)-1);f=c.cloneCell(c.getChildAt(d,e));f.value=null;var g=this.getCellGeometry(f);if(null!=g){g.height=Graph.minTableRowHeight;for(var h=0;h<c.getChildCount(f);h++){a=c.getChildAt(f,h);a.value=null;var k=this.getCellGeometry(a);null!=k&&(k.height=g.height)}c.add(d,f,e+(b?0:1));var l=this.getCellGeometry(d);null!=l&&(l=l.clone(),l.height+=g.height,c.setGeometry(d,l))}}finally{c.endUpdate()}};Graph.prototype.deleteTableColumn=
-function(a){var b=this.getModel();b.beginUpdate();try{var c=a,d=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),d=e.getIndex(a);else this.isTableRow(a)?(c=b.getParent(a),d=b.getChildCount(a)-1):this.isTable(a)&&(d=b.getChildCount(b.getChildAt(a,0))-1);for(var f=a=0;f<b.getChildCount(c);f++){var e=b.getChildAt(c,f),g=b.getChildAt(e,d);b.remove(g);var h=this.getCellGeometry(g);null!=h&&(a=Math.max(a,h.width))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width-=a,b.setGeometry(c,
-k))}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var b=this.getModel();b.beginUpdate();try{var c=a;this.isTableCell(a)?c=b.getParent(a):this.isTable(a)&&(c=b.getChildAt(a,b.getChildCount(a)-1));var d=b.getParent(c);b.remove(c);a=0;var e=this.getCellGeometry(c);null!=e&&(a=e.height);var f=this.getCellGeometry(d);null!=f&&(f=f.clone(),f.height-=a,b.setGeometry(d,f))}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,f=0;f<
-d.length;f++)var g=d[f].getAttribute("colspan"),e=e+(null!=g?parseInt(g):1);c=c.insertRow(b);for(f=0;f<e;f++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=
-b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&
-"Control"!=b.type&&b.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,b){function c(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLinkTitle(a):
-a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,c(b,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.customLinkClicked(a);mxEvent.consume(b)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
-function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,
-f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&
-this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&
-null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea,function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&
-document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(T){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));h.apply(this,arguments)};var g=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?g.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var k=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){k.apply(this,
-arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||
-mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var l=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=
-a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),
-a.removeAttribute("border"))):a.parentNode.removeChild(a)}l.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?c(this.textarea,d):Graph.removePasteFormatting(this.textarea))}),
-0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,
-mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,h=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
-h.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=h.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=
-b;this.textarea.style.textAlign=e;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||
-(k=mxUtils.replaceTrailingNewlines(k,"<div><br></div>"));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle=
-"";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var m=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),
-this.codeViewMode&&null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=
+var e=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,b,c){if(b||c)e.apply(this,arguments);else{var d=this.getSelectionCell(),f=null,g=[],h=mxUtils.bind(this,function(b){if(null!=this.view.getState(b)&&(this.model.isVertex(b)||this.model.isEdge(b)))if(g.push(b),b==d)f=g.length-1;else if(a&&null==d&&0<g.length||null!=f&&a&&g.length>f||!a&&0<f)return;for(var c=0;c<this.model.getChildCount(b);c++)h(this.model.getChildAt(b,c))});h(this.model.root);0<g.length&&(f=null!=f?mxUtils.mod(f+
+(a?1:-1),g.length):0,this.setSelectionCell(g[f]))}};var h=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,b,c,d,e,f,g){g=null!=g?g:{};var k=h.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),k);return k};var g=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,b){var c=[];this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.isTableCell(a[d])||this.isTableRow(a[d])?this.labelChanged(a[d],""):c.push(a[d]);c=g.apply(this,
+[c,b])}finally{this.model.endUpdate()}return c};Graph.prototype.updateCustomLinks=function(a,b){for(var c=0;c<b.length;c++)null!=b[c]&&this.updateCustomLinksForCell(a,b[c])};Graph.prototype.updateCustomLinksForCell=function(a,b){};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:
+!0,null,3<f.length?f[3]:0,4<f.length?f[4]:0))}}catch(va){}return d}if(null!=a.shape&&null!=a.shape.bounds){f=a.shape.direction;e=a.shape.bounds;c=a.shape.scale;d=e.width/c;e=e.height/c;if(f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)f=d,d=e,e=f;c=a.shape.getConstraints(a.style,d,e);if(null!=c)return c;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=
+function(a){if(null!=a){var b=this.getCurrentCellStyle(a),b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a])}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};
+Graph.prototype.isValidDropTarget=function(a){var b=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(b,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(b,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
+arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a,b){var c=this.getModel(),d=[];c.beginUpdate();
+try{for(var e=0;e<a.length;e++){var f=a[e];if(c.isEdge(f)){var g=c.getTerminal(f,!0),h=c.getTerminal(f,!1);c.setTerminal(f,h,!0);c.setTerminal(f,g,!1);var k=c.getGeometry(f);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var l=k.getTerminalPoint(!0),N=k.getTerminalPoint(!1);k.setTerminalPoint(l,!1);k.setTerminalPoint(N,!0);c.setGeometry(f,k);var m=this.view.getState(f),n=this.view.getState(g),T=this.view.getState(h);if(null!=m){var p=null!=n?this.getConnectionConstraint(m,n,!0):null,q=
+null!=T?this.getConnectionConstraint(m,T,!1):null;this.setConnectionConstraint(f,g,!0,q);this.setConnectionConstraint(f,h,!1,p)}d.push(f)}}else if(c.isVertex(f)&&(k=this.getCellGeometry(f),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var v=k.width;k.width=k.height;k.height=v;c.setGeometry(f,k);var r=this.view.getState(f);if(null!=r){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],u=mxUtils.getValue(r.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,u)+(b?-1:1),t.length)],[f])}d.push(f)}}}finally{c.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);
+a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)?this.removeStateForCell(a[b]):this.isReplacePlaceholders(a[b])&&this.view.invalidate(a[b],!1,!1)}};
+Graph.prototype.replaceElement=function(a,b){for(var c=a.ownerDocument.createElement(null!=b?b:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)c.setAttribute(attr.nodeName,attr.nodeValue);c.innerHTML=a.innerHTML;a.parentNode.replaceChild(c,a)};Graph.prototype.processElements=function(a,b){if(null!=a)for(var c=a.getElementsByTagName("*"),d=0;d<c.length;d++)b(c[d])};Graph.prototype.updateLabelElements=function(a,b,c){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),
+e=0;e<a.length;e++)if(this.isHtmlLabel(a[e])){var f=this.convertValueToString(a[e]);if(null!=f&&0<f.length){d.innerHTML=f;for(var g=d.getElementsByTagName(null!=c?c:"*"),h=0;h<g.length;h++)b(g[h]);d.innerHTML!=f&&this.cellLabelChanged(a[e],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,b,c){b=Graph.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),
+e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(var d=[],c=0;c<a.length;c++){var e=this.model.getParent(a[c]);null==e||
+b.get(e)||(b.put(e,!0),d.push(e))}for(c=0;c<d.length;c++)if(e=this.view.getState(d[c]),null!=e&&(this.model.isEdge(e.cell)||this.model.isVertex(e.cell))&&this.isCellDeletable(e.cell)&&this.isTransparentState(e)){for(var f=!0,g=0;g<this.model.getChildCount(e.cell)&&f;g++)b.get(this.model.getChildAt(e.cell,g))||(f=!1);f&&a.push(e.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)this.isCellDeletable(a[c])&&
+this.isTransparentState(this.view.getState(a[c]))&&b.push(a[c]);a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.getAttributeForCell=function(a,b,c){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(b):null;return null!=a?a:c};Graph.prototype.setAttributeForCell=function(a,b,c){var d;
+null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=c?d.setAttribute(b,c):d.removeAttribute(b);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,b,c,d){this.getModel();if(mxEvent.isAltDown(b))return null;for(var e=0;e<a.length;e++)if(this.model.isEdge(this.model.getParent(a[e])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=
+function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,b){if(this.isEnabled()){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(b)){var d=this.model.isEdge(b)?this.view.getState(b):null,e=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=e||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,
+c.x,c.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&e==this.view.getCanvas()||mxClient.IS_SVG&&e==this.view.getCanvas().ownerSVGElement)||(null==d&&(d=this.view.getState(this.getCellAt(c.x,c.y))),b=this.addText(c.x,c.y,d))}mxGraph.prototype.dblClick.call(this,a,b)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),b=this.container.scrollLeft/this.view.scale-
+this.view.translate.x,c=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),e=this.getPageSize(),b=Math.max(b,d.x*e.width),c=Math.max(c,d.y*e.height);return new mxPoint(this.snap(b+a),this.snap(c+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,b=this.getGraphBounds(),c=this.getInsertPoint(),d=this.snap(Math.round(Math.max(c.x,b.x/a.scale-a.translate.x+(0==b.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(c.y,
+(b.y+b.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-
+this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,b,c){var d=new mxCell;d.value="Text";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=c&&this.model.isEdge(c.cell)){d.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";d.geometry.relative=!0;d.connectable=!1;var e=this.view.getRelativePoint(c,a,b);
+d.geometry.x=Math.round(1E4*e.x)/1E4;d.geometry.y=Math.round(e.y);d.geometry.offset=new mxPoint(0,0);var e=this.view.getPoint(c,d.geometry),f=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-e.x)/f),Math.round((b-e.y)/f))}else e=this.view.translate,d.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-e.x-(null!=c?c.origin.x:0),d.geometry.y=Math.round(b/this.view.scale)-e.y-(null!=
+c?c.origin.y:0),d.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([d],null!=c?c.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,b,c){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var c=0;c<a.length;c++){var d=this.getAbsoluteUrl(a[c].getAttribute("href"));null!=d&&(a[c].setAttribute("rel",this.linkRelation),
+a[c].setAttribute("href",d),null!=b&&mxEvent.addGestureListeners(a[c],null,null,b))}});this.model.addListener(mxEvent.CHANGE,d);d();var e=this.container.style.cursor,f=this.getTolerance(),g=this,h={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var b=a.sourceState;if(null==b||null==g.getLinkForCell(b.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,
+function(a,b,c){return null==g.getLinkForCell(a.cell)}),b=g.view.getState(a);b!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=b,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(b)},mouseMove:function(a,
+b){if(g.isMouseDown){if(null!=this.currentLink){var c=Math.abs(this.startX-b.getGraphX()),d=Math.abs(this.startY-b.getGraphY());(c>f||d>f)&&this.clear()}}else{for(c=b.getSource();null!=c&&"a"!=c.nodeName.toLowerCase();)c=c.parentNode;null!=c?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(b,!0,this.currentState),(null==this.currentState||b.getState()!=this.currentState&&null!=b.sourceState||!g.intersects(this.currentState,b.getGraphX(),
+b.getGraphY()))&&this.updateCurrentState(b))}},mouseUp:function(a,d){for(var e=d.getSource(),h=d.getEvent();null!=e&&"a"!=e.nodeName.toLowerCase();)e=e.parentNode;null==e&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(e=g.isBlankLink(this.currentLink),
+"data:"!==this.currentLink.substring(0,5)&&e||null==b||b(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":e?g.linkTarget:"_top",g.openLink(this.currentLink,h),d.consume())):null!=c&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<f&&Math.abs(this.scrollTop-g.container.scrollTop)<f&&Math.abs(this.startX-d.getGraphX())<f&&Math.abs(this.startY-d.getGraphY())<f&&c(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));
+null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=e);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(h);mxEvent.addListener(document,"mouseleave",function(a){h.clear()})};Graph.prototype.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();
+b=null!=b?b:!0;a=this.model.getTopmostCells(a);var c=this.getModel(),d=this.gridSize,e=[];c.beginUpdate();try{for(var f=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var h=c.getParent(a[g]),k=this.moveCells([f[g]],d,d,!1)[0];e.push(k);if(b)c.add(h,f[g]);else{var l=h.getIndex(a[g]);c.add(h,f[g],l+1)}}}finally{c.endUpdate()}return e};Graph.prototype.insertImage=function(a,b,c){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),e=[],f=0;f<d.length;f++)e.push(d[f]);
+document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==e.length+1)for(f=a.length-1;0<=f;f--)if(0==f||a[f]!=e[f-1]){a[f].setAttribute("width",b);a[f].setAttribute("height",c);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var b=this.cellEditor.textarea.getElementsByTagName("a"),c=[],d=0;d<b.length;d++)c.push(b[d]);document.execCommand("createlink",
+!1,mxUtils.trim(a));b=this.cellEditor.textarea.getElementsByTagName("a");if(b.length==c.length+1)for(d=b.length-1;0<=d;d--)if(b[d]!=c[d-1]){for(b=b[d].getElementsByTagName("a");0<b.length;){for(c=b[0].parentNode;null!=b[0].firstChild;)c.insertBefore(b[0].firstChild,b[0]);c.removeChild(b[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var b=mxGraph.prototype.isCellResizable.apply(this,arguments),c=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&
+!this.isTableRow(a)&&(b||"0"!=mxUtils.getValue(c,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==c[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,b){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){for(var c=[],d=null,e=null,f=0;f<b.length;f++)if(this.getModel().isVertex(b[f])){var g=this.view.getState(b[f]);if(null!=g){var h=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,h):h,e=null!=e?Math.min(e,h):h;c.push(g)}}if(2<c.length){c.sort(function(b,c){return a?
+b.x-c.x:b.y-c.y});g=this.view.translate;h=this.view.scale;e=e/h-(a?g.x:g.y);d=d/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var k=(d-e)/(c.length-1),d=e,f=1;f<c.length-1;f++){var l=this.view.getState(this.model.getParent(c[f].cell)),m=this.getCellGeometry(c[f].cell),d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.y=Math.round(d-m.height/2)-l.origin.y,this.getModel().setGeometry(c[f].cell,m))}}finally{this.getModel().endUpdate()}}}return b};Graph.prototype.isCloneEvent=
+function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,g,h,k,l){var m=this.useCssTransforms;m&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var n=f||d?
+this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==n)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,N=mxUtils.createXmlDocument(),q=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"svg"):N.createElement("svg");null!=a&&(null!=q.style?q.style.backgroundColor=a:q.setAttribute("style","background-color:"+a));null==N.createElementNS?(q.setAttribute("xmlns",mxConstants.NS_SVG),q.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):q.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:xlink",mxConstants.NS_XLINK);a=b/p;var Q=Math.max(1,Math.ceil(n.width*a)+2*c)+(l?5:0),v=Math.max(1,Math.ceil(n.height*a)+2*c)+(l?5:0);q.setAttribute("version","1.1");q.setAttribute("width",Q+"px");q.setAttribute("height",v+"px");q.setAttribute("viewBox",(e?"-0.5 -0.5":"0 0")+" "+Q+" "+v);N.appendChild(q);var T=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"g"):N.createElement("g");q.appendChild(T);var P=this.createSvgCanvas(T);P.foOffset=e?-.5:0;P.textOffset=e?-.5:0;P.imageOffset=
+e?-.5:0;P.translate(Math.floor((c/b-n.x)/p),Math.floor((c/b-n.y)/p));var r=document.createElement("div"),t=P.getAlternateText;P.getAlternateText=function(a,b,c,d,e,f,g,h,k,l,m,n,z){if(null!=f&&0<this.state.fontSize)try{mxUtils.isNode(f)?f=f.innerText:(r.innerHTML=f,f=mxUtils.extractTextWithWhitespace(r.childNodes));for(var pa=Math.ceil(2*d/this.state.fontSize),ha=[],qa=0,Ca=0;(0==pa||qa<pa)&&Ca<f.length;){var p=f.charCodeAt(Ca);if(10==p||13==p){if(0<qa)break}else ha.push(f.charAt(Ca)),255>p&&qa++;
+Ca++}ha.length<f.length&&1<f.length-ha.length&&(f=mxUtils.trim(ha.join(""))+"...");return f}catch(Ta){return t.apply(this,arguments)}else return t.apply(this,arguments)};var u=this.backgroundImage;if(null!=u){b=p/b;var x=this.view.translate,C=new mxRectangle(x.x*b,x.y*b,u.width*b,u.height*b);mxUtils.intersects(n,C)&&P.image(x.x,x.y,u.width,u.height,u.src,!0)}P.scale(a);P.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var V=h.drawCellState,w=h.getLinkForCellState;h.getLinkForCellState=function(a,
+b){var c=w.apply(this,arguments);return null==c||a.view.graph.isCustomLink(c)?null:c};h.drawCellState=function(a,b){for(var c=a.view.graph,d=c.isCellSelected(a.cell),e=c.model.getParent(a.cell);!f&&!d&&null!=e;)d=c.isCellSelected(e),e=c.model.getParent(e);(f||d)&&V.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),P);this.updateSvgLinks(q,k,!0);this.addForeignObjectWarning(P,q);return q}finally{m&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+function(a,b){if(0<b.getElementsByTagName("foreignObject").length){var c=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var e=a.createElement("a");e.setAttribute("transform","translate(0,-5)");null==e.setAttributeNS||b.ownerDocument!=document&&null==document.documentMode?(e.setAttribute("xlink:href",Graph.foreignObjectWarningLink),e.setAttribute("target","_blank")):(e.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",
+Graph.foreignObjectWarningLink),e.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var f=a.createElement("text");f.setAttribute("text-anchor","middle");f.setAttribute("font-size","10px");f.setAttribute("x","50%");f.setAttribute("y","100%");mxUtils.write(f,Graph.foreignObjectWarningText);c.appendChild(d);e.appendChild(f);c.appendChild(e);b.appendChild(c)}};Graph.prototype.updateSvgLinks=function(a,b,c){a=a.getElementsByTagName("a");for(var d=0;d<a.length;d++){var e=a[d].getAttribute("href");
+null==e&&(e=a[d].getAttribute("xlink:href"));null!=e&&(null!=b&&/^https?:\/\//.test(e)?a[d].setAttribute("target",b):c&&this.isCustomLink(e)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
+return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,b,c){for(;null!=a&&!(0<=mxUtils.indexOf(b,a.nodeName));){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&
+"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertTableColumn=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=f.getIndex(a);else this.isTableRow(a)&&(d=c.getParent(a)),b||(e=c.getChildCount(c.getChildAt(d,0))-1);for(var g=0;g<c.getChildCount(d);g++){var f=c.getChildAt(d,g),h=c.getChildAt(f,e),k=c.cloneCell(h),l=this.getCellGeometry(k);
+k.value=null;if(null!=l){l.width=Graph.minTableColumnWidth;var m=this.getCellGeometry(f);null!=m&&(l.height=m.height)}c.add(f,k,e+(b?0:1))}var n=this.getCellGeometry(d);null!=n&&(n=n.clone(),n.width+=Graph.minTableColumnWidth,c.setGeometry(d,n))}finally{c.endUpdate()}};Graph.prototype.insertTableRow=function(a,b){var c=this.getModel();c.beginUpdate();try{var d=a,e=0;if(this.isTableCell(a))var f=c.getParent(a),d=c.getParent(f),e=d.getIndex(f);else this.isTableRow(a)?(d=c.getParent(a),e=d.getIndex(a)):
+b||(e=c.getChildCount(d)-1);f=c.cloneCell(c.getChildAt(d,e));f.value=null;var g=this.getCellGeometry(f);if(null!=g){g.height=Graph.minTableRowHeight;for(var h=0;h<c.getChildCount(f);h++){a=c.getChildAt(f,h);a.value=null;var k=this.getCellGeometry(a);null!=k&&(k.height=g.height)}c.add(d,f,e+(b?0:1));var l=this.getCellGeometry(d);null!=l&&(l=l.clone(),l.height+=g.height,c.setGeometry(d,l))}}finally{c.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var b=this.getModel();b.beginUpdate();try{var c=
+a,d=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),d=e.getIndex(a);else this.isTableRow(a)?(c=b.getParent(a),d=b.getChildCount(a)-1):this.isTable(a)&&(d=b.getChildCount(b.getChildAt(a,0))-1);for(var f=a=0;f<b.getChildCount(c);f++){var e=b.getChildAt(c,f),g=b.getChildAt(e,d);b.remove(g);var h=this.getCellGeometry(g);null!=h&&(a=Math.max(a,h.width))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width-=a,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.deleteTableRow=
+function(a){var b=this.getModel();b.beginUpdate();try{var c=a;this.isTableCell(a)?c=b.getParent(a):this.isTable(a)&&(c=b.getChildAt(a,b.getChildCount(a)-1));var d=b.getParent(c);b.remove(c);a=0;var e=this.getCellGeometry(c);null!=e&&(a=e.height);var f=this.getCellGeometry(d);null!=f&&(f=f.clone(),f.height-=a,b.setGeometry(d,f))}finally{b.endUpdate()}};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=c.rows[0].cells,e=0,f=0;f<d.length;f++)var g=d[f].getAttribute("colspan"),e=e+(null!=
+g?parseInt(g):1);c=c.insertRow(b);for(f=0;f<e;f++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
+function(a,b){if(0<=b)for(var c=a.tBodies[0].rows,d=0;d<c.length;d++)c[d].cells.length>b&&c[d].deleteCell(b)};Graph.prototype.pasteHtmlAtCaret=function(a){var b;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){b=b.getRangeAt(0);b.deleteContents();var c=document.createElement("div");c.innerHTML=a;a=document.createDocumentFragment();for(var d;d=c.firstChild;)lastNode=a.appendChild(d);b.insertNode(a)}}else(b=document.selection)&&"Control"!=b.type&&b.createRange().pasteHTML(a)};
+Graph.prototype.createLinkForHint=function(a,b){function c(a,b){a.length>b&&(a=a.substring(0,Math.round(b/2))+"..."+a.substring(a.length-Math.round(b/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==b||0==b.length)b=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",c(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&d.setAttribute("target",
+this.linkTarget);mxUtils.write(d,c(b,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(b){this.customLinkClicked(a);mxEvent.consume(b)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,b){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(b){b=a.apply(this,arguments);if(mxEvent.isTouchEvent(b.getEvent())&&
+null==b.getState()){var c=this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),
+c=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,b){var c=null!=b&&mxEvent.isShiftDown(b);if(c||null!=window.getSelection&&null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea,
+function(a){c||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var b=[],c=0,d=a.rangeCount;c<d;++c)b.push(a.getRangeAt(c));return b}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(V){}};var k=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));k.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var m=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){m.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=
+c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":
+"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var n=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=
+a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}n.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=b(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?c(this.textarea,d):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=
+this.graph.view.getState(this.editingCell);if(null!=a){var b=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),c=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),b=mxUtils.getValue(a.style,
+mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),e=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),f=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,h=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&h.push("underline");(mxUtils.getValue(a.style,
+mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&h.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=h.join(" ");this.textarea.style.fontWeight=f?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=b;this.textarea.style.textAlign=
+e;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,
+"<div><br></div>"));k=this.graph.sanitizeHtml(b?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
+mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=c;this.resize()}};var p=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
+null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=
 Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-
-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",m.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",p.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
 function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var n=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();n.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(L){}};var p=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
-b){this.graph.getModel().beginUpdate();try{p.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
-mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var q=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);q.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
+!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var q=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();q.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(N){}};var v=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+b){this.graph.getModel().beginUpdate();try{v.apply(this,arguments),""==b&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=b&&b!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var u=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);u.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
 function(a){return a?c(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(b){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,e=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/e-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/e-d.y);e=this.graph.view.unit;this.hint.innerHTML=c(b,e)+", "+c(d,e);this.hint.style.left=this.pBounds.x+this.currentDx+
-Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var v=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=v.apply(this,arguments),c=
-new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var u=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=u.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var r=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=
-r.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var w=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(!this.graph.isCellResizable(this.state.cell)||this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:w.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=
--12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
-!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var t=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return t.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=
-function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var x=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
-function(a){return a.tableHandle||x.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var C=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=C.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var B=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
-function(){var a=B.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=this.graph,c=b.model,d=b.getActualStartSize(this.state.cell),e=c.getChildAt(this.state.cell,0),f=this.state;null==a&&(a=[]);for(var g=0;g<c.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(d){if(null!=d&&c.isVertex(d.cell)){var e=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);d=new mxHandle(d,"row-resize",null,e);d.tableHandle=!0;var f=0;d.shape.node.parentNode.insertBefore(d.shape.node,
-d.shape.node.parentNode.firstChild);d.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+f,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};d.setPosition=function(a,b,c){f=b.y-a.y-a.height};d.execute=function(){b.updateTableRowHeight(this.state.cell,f);f=0};a.push(d)}})(this.graph.view.getState(c.getChildAt(this.state.cell,g)));for(g=
-0;g<c.getChildCount(e)-1;g++)mxUtils.bind(this,function(b){if(null!=b){var c=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);b=new mxHandle(b,"col-resize",null,c);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+e,this.shape.bounds.width=1,this.shape.bounds.y=f.y+d.y,this.shape.bounds.height=f.height-d.y-
-d.height,this.shape.redraw())};b.setPosition=function(a,b,c){e=b.x-a.x-a.width};b.execute=function(){var a=this.graph.model.getGeometry(this.state.cell);this.graph.setTableColumnWidth(this.state.cell,a.width+e);e=0};a.push(b)}})(this.graph.view.getState(c.getChildAt(e,g)))}return a};var D=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){D.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.visibility=a?"":"hidden")};mxVertexHandler.prototype.refresh=
-function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())};mxVertexHandler.prototype.isTableHandler=function(){return this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTable(this.state.cell)};var A=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,
-c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+
-this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=A.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=
-this.currentAlpha+"&deg;";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&
-(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var F=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){F.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var I=mxEdgeHandler.prototype.mouseUp;
-mxEdgeHandler.prototype.mouseUp=function(a,b){I.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility=
-"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
-"none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",
-17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):
-new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
-24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=
-HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;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);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,
-(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
-!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
-function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var G=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){G.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=
-a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<
-this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=
-this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c],l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;
-var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
-0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
-this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var E=(new Date).getTime(),N=0,R=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){R.apply(this,arguments);c!=this.currentTerminalState?(E=(new Date).getTime(),N=0):N=(new Date).getTime()-E;this.currentTerminalState=
-c};var S=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<N||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&S.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
-a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;
-this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var K=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return K.apply(this,arguments)};var H=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return H.apply(this,arguments)};var M=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=M.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=
-mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var ba=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):
-ba.apply(this,arguments)};var ca=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ca.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,
-mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var ia=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,
-b){ia.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var X=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){X.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
-"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var Y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Y.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));
-null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor="pointer",this.rowMoveHandle.style.width="24px",this.rowMoveHandle.style.height="24px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=
-!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var b=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||
-1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=
-document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);
-e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var f=document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),
-mxUtils.getTextContent(c[d])));this.linkHint.appendChild(f)}}}catch(U){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var da=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){da.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");
-null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),
-c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var V=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){V.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Z=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=
-this.rowState.x+this.rowState.width+"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Z.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-
-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/
-2+Editor.hintOffset)+"px"}};var ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){ja.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var Q=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Q.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ga=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ga.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var r=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){c.get(a)||(c.put(a,!0),e.push(a))}for(var b=r.apply(this,arguments),c=
+new mxDictionary,d=this.graph.model,e=[],f=0;f<b.length;f++){var g=b[f];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return e};var w=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var b=w.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var t=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var b=
+t.apply(this,arguments);b.stroke="#C0C0C0";b.strokewidth=1;return b};var y=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:y.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(b.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,b){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,
+"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(b.getEvent())||mxEvent.isMetaDown(b.getEvent())};var x=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return x.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
+this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var C=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return C.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var B=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||B.apply(this,arguments)&&
+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var D=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=D.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var A=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var b=
+this.graph,c=b.model,d=b.getActualStartSize(this.state.cell),e=c.getChildAt(this.state.cell,0),f=this.state;null==a&&(a=[]);for(var g=0;g<c.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(d){if(null!=d&&c.isVertex(d.cell)){var e=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);d=new mxHandle(d,"row-resize",null,e);d.tableHandle=!0;var f=0;d.shape.node.parentNode.insertBefore(d.shape.node,d.shape.node.parentNode.firstChild);d.redraw=function(){null!=this.shape&&null!=
+this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+f,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};d.setPosition=function(a,b,c){f=b.y-a.y-a.height};d.execute=function(){b.updateTableRowHeight(this.state.cell,f);f=0};a.push(d)}})(this.graph.view.getState(c.getChildAt(this.state.cell,g)));for(g=0;g<c.getChildCount(e)-1;g++)mxUtils.bind(this,function(b){if(null!=b){var c=new mxLine(new mxRectangle,
+mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);b=new mxHandle(b,"col-resize",null,c);b.tableHandle=!0;var e=0;b.shape.node.parentNode.insertBefore(b.shape.node,b.shape.node.parentNode.firstChild);b.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+e,this.shape.bounds.width=1,this.shape.bounds.y=f.y+d.y,this.shape.bounds.height=f.height-d.y-d.height,this.shape.redraw())};b.setPosition=function(a,b,c){e=b.x-a.x-a.width};b.execute=function(){this.graph.updateTableColumnWidth(this.state.cell,
+e);e=0};a.push(b)}})(this.graph.view.getState(c.getChildAt(e,g)))}return a};var F=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){F.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.visibility=a?"":"hidden")};mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())};
+mxVertexHandler.prototype.isTableHandler=function(){return this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTable(this.state.cell)};var I=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance,c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&mxStencilRegistry.getStencil(c);c=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!c&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var e=this.customHandles[d].shape.bounds,f=e.getCenterX(),g=e.getCenterY();if(Math.abs(this.state.x-f)<e.width/2||Math.abs(this.state.y-g)<e.height/2||Math.abs(this.state.x+this.state.width-f)<e.width/2||Math.abs(this.state.y+this.state.height-g)<e.height/2){c=!0;break}}c&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(b/=2,a.x=
+this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b):a=I.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(b){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{b=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=c(this.roundLength(this.bounds.width/b),d)+" x "+c(this.roundLength(this.bounds.height/
+b),d)}b=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==b&&(b=this.bounds);this.hint.style.left=b.x+Math.round((b.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=b.y+b.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
+"")};var G=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,b){G.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var J=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,b){J.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(b,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var e=this.graph.view.translate,f=this.graph.view.scale,g=this.roundLength(d.x/f-e.x),e=this.roundLength(d.y/f-e.y),f=this.graph.view.unit;this.hint.innerHTML=c(g,f)+", "+c(e,f);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML=
+"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(b.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(b.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):
+new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
+5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;
+mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;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);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=
+HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
+!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
+0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||
+mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};var E=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){E.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==
+a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,b){if(this.cancelled)this.cancelled=
+!1,b.consume();else{var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-e)/this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(f)<this.graph.tolerance&&(f=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&
+this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),h=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMovable(h[c])){var k=this.graph.view.getState(h[c]),l=this.graph.getCellGeometry(h[c]);null!=k&&null!=l&&(l=l.clone(),l.translate(f,g),this.graph.model.setGeometry(h[c],
+l))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),
+this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var O=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);O.apply(this,arguments)};var U=(new Date).getTime(),R=0,K=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){K.apply(this,arguments);c!=this.currentTerminalState?(U=(new Date).getTime(),R=0):R=(new Date).getTime()-U;this.currentTerminalState=c};var H=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
+this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&H.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==
+mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+var L=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return L.apply(this,arguments)};var ca=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&
+null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return ca.apply(this,arguments)};var da=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=da.apply(this,arguments),b=[],c=0;c<a.length;c++)"1"!=mxUtils.getValue(a[c].style,"part","0")&&b.push(a[c]);return b};var ia=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=
+function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):ia.apply(this,arguments)};var X=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),
+e=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&X.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),b=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&
+b==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){Y.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),
+null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){ea.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var W=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=
+function(){W.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor=
+"pointer",this.rowMoveHandle.style.width="24px",this.rowMoveHandle.style.height="24px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var b=mxUtils.bind(this,function(){null!=
+this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=
+mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){try{if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",
+mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";this.linkHint.appendChild(e);mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var f=document.createElement("div");f.style.marginTop=null!=b||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));
+this.linkHint.appendChild(f)}}}catch(Q){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Z=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
+this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);
+if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var ja=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){ja.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var aa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=this.rowState.x+this.rowState.width+
+"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");aa.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+
+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+Editor.hintOffset)+"px"}};
+var S=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){S.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);
+null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var fa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(fa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/
+2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ga=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ga.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
 this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();Format=function(a,c){this.editorUi=a;this.container=c};Format.prototype.labelIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;Format.prototype.inactiveTabBackgroundColor="#f1f3f4";Format.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput curlyBracket singleArrow callout doubleArrow flexArrow card umlLifeline".split(" ");
 Format.prototype.init=function(){var a=this.editorUi.editor,c=a.graph;this.update=mxUtils.bind(this,function(a,b){this.clearSelectionState();this.refresh()});c.getSelectionModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.EDITING_STARTED,this.update);c.addListener(mxEvent.EDITING_STOPPED,this.update);c.getModel().addListener(mxEvent.CHANGE,this.update);c.addListener(mxEvent.ROOT,mxUtils.bind(this,function(){this.refresh()}));a.addListener("autosaveChanged",mxUtils.bind(this,function(){this.refresh()}));
 this.refresh()};Format.prototype.clearSelectionState=function(){this.selectionState=null};Format.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};Format.prototype.createSelectionState=function(){for(var a=this.editorUi.editor.graph.getSelectionCells(),c=this.initSelectionState(),d=0;d<a.length;d++)this.updateSelectionStateForCell(c,a[d],a);return c};
@@ -2915,44 +2917,44 @@ mxResources.get("numberedList"),function(){document.execCommand("insertorderedli
 "0px";n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var G=document.createElement("select");G.style.position="absolute";G.style.right="20px";G.style.width="97px";G.style.marginTop="-2px";for(var r="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),J={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
 mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
 mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},p=0;p<r.length;p++){var E=document.createElement("option");E.setAttribute("value",r[p]);mxUtils.write(E,mxResources.get(r[p]));G.appendChild(E)}n.appendChild(G);r=e.cloneNode(!1);r.style.marginLeft="0px";r.style.paddingTop=
-"4px";r.style.paddingBottom="4px";r.style.fontWeight="normal";mxUtils.write(r,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var E=["automatic","leftToRight","rightToLeft"],R={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<E.length;p++){var S=document.createElement("option");S.setAttribute("value",E[p]);mxUtils.write(S,
-mxResources.get(E[p]));N.appendChild(S)}r.appendChild(N);b.isEditing()||(a.appendChild(n),mxEvent.addListener(G,"change",function(a){b.getModel().beginUpdate();try{var c=J[G.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(r),mxEvent.addListener(N,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,R[N.value],b.getSelectionCells());mxEvent.consume(a)}));var K=document.createElement("input");K.style.textAlign="right";K.style.marginTop="4px";mxClient.IS_QUIRKS||(K.style.position="absolute",K.style.right="32px");K.style.width="46px";K.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(K);var H=null,n=this.installInputHandler(K,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+"4px";r.style.paddingBottom="4px";r.style.fontWeight="normal";mxUtils.write(r,mxResources.get("writingDirection"));var O=document.createElement("select");O.style.position="absolute";O.style.right="20px";O.style.width="97px";O.style.marginTop="-2px";for(var E=["automatic","leftToRight","rightToLeft"],U={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},p=0;p<E.length;p++){var R=document.createElement("option");R.setAttribute("value",E[p]);mxUtils.write(R,
+mxResources.get(E[p]));O.appendChild(R)}r.appendChild(O);b.isEditing()||(a.appendChild(n),mxEvent.addListener(G,"change",function(a){b.getModel().beginUpdate();try{var c=J[G.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
+a.appendChild(r),mxEvent.addListener(O,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,U[O.value],b.getSelectionCells());mxEvent.consume(a)}));var K=document.createElement("input");K.style.textAlign="right";K.style.marginTop="4px";mxClient.IS_QUIRKS||(K.style.position="absolute",K.style.right="32px");K.style.width="46px";K.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(K);var H=null,n=this.installInputHandler(K,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
 1,999," pt",function(a){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=function(c,e){null!=b.cellEditor.textarea&&c!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(c)&&(e||d.containsNode(c,!0))&&("FONT"==c.nodeName?(c.removeAttribute("size"),c.style.fontSize=a+"px"):mxUtils.getCurrentStyle(c).fontSize!=a+"px"&&(mxUtils.getCurrentStyle(c.parentNode).fontSize!=a+"px"?c.style.fontSize=a+"px":c.style.fontSize=""))},d=window.getSelection(),e=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:
 b.cellEditor.textarea;e!=b.cellEditor.textarea&&e.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");e!=b.cellEditor.textarea&&(e=e.parentNode);if(null!=e&&e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getElementsByTagName("*");c(e);for(e=0;e<f.length;e++)c(f[e])}K.value=a+" pt"}else if(window.getSelection||document.selection)if(c=function(a,b){for(;null!=b;){if(b===a)return!0;b=b.parentNode}return!1},f=null,document.selection?f=document.selection.createRange().parentElement():
 (d=window.getSelection(),0<d.rangeCount&&(f=d.getRangeAt(0).commonAncestorContainer)),null!=f&&c(b.cellEditor.textarea,f))for(H=a,document.execCommand("fontSize",!1,"4"),f=b.cellEditor.textarea.getElementsByTagName("font"),e=0;e<f.length;e++)if("4"==f[e].getAttribute("size")){f[e].removeAttribute("size");f[e].style.fontSize=H+"px";window.setTimeout(function(){K.value=H+" pt";H=null},0);break}},!0),n=this.createStepper(K,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=K.style.display;n.style.marginTop=
-"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var M=null,ba="#ffffff",ca=null,ia="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ba},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){M=a},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
+"4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];g.style.cssFloat="right";var L=null,ca="#ffffff",da=null,ia="#000000",X=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ca},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){L=a},destroy:function(){L=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),
 mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff",null,function(a){b.updateLabelElements(b.getSelectionCells(),function(a){a.style.backgroundColor=null})});X.style.fontWeight="bold";var Y=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");Y.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ia},function(a){if(mxClient.IS_FF){for(var c=b.cellEditor.textarea.getElementsByTagName("font"),
 d=[],e=0;e<c.length;e++)d.push({node:c[e],color:c[e].getAttribute("color")});document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent");a=b.cellEditor.textarea.getElementsByTagName("font");for(e=0;e<a.length;e++)if(e>=d.length||a[e]!=d[e].node||a[e]==d[e].node&&a[e].getAttribute("color")!=d[e].color){d=a[e].firstChild;if(null!=d&&"A"==d.nodeName&&null==d.nextSibling&&null!=d.firstChild){a[e].parentNode.insertBefore(d,a[e]);for(c=d.firstChild;null!=c;){var f=c.nextSibling;a[e].appendChild(c);
-c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){ca=a},destroy:function(){ca=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";Y.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
+c=f}d.appendChild(a[e])}break}}else document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){da=a},destroy:function(){da=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){X.style.display=null==a||a==mxConstants.NONE?"none":"";Y.style.display=X.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,
 null,b.getSelectionCells());b.updateLabelElements(b.getSelectionCells(),function(a){a.removeAttribute("color");a.style.color=null})});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(X);b.cellEditor.isContentEditing()||h.appendChild(Y);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0);g.style.fontWeight="bold";f.containsLabel||f.autoSize||
-0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var da,V,Z,
-ja,aa,Q=this.addUnitInput(g,"pt",91,44,function(){da.apply(this,arguments)}),ga=this.addUnitInput(g,"pt",20,44,function(){V.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var L=this.addUnitInput(g,"pt",162,44,function(){Z.apply(this,arguments)}),W=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),ea=this.addUnitInput(g,"pt",20,44,function(){aa.apply(this,arguments)});mxUtils.br(g);
-this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var T=null,fa=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=T&&(b.cellEditor.restoreSelection(T),T=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
-null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){fa=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(T=b.cellEditor.saveSelection())});
+0!=f.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var ea,W,Z,
+ja,aa,S=this.addUnitInput(g,"pt",91,44,function(){ea.apply(this,arguments)}),fa=this.addUnitInput(g,"pt",20,44,function(){W.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var ba=this.addUnitInput(g,"pt",162,44,function(){Z.apply(this,arguments)}),ga=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),N=this.addUnitInput(g,"pt",20,44,function(){aa.apply(this,arguments)});mxUtils.br(g);
+this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var T=null,P=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=T&&(b.cellEditor.restoreSelection(T),T=null);for(var d=b.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;
+null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&null!=b.cellEditor.textarea&&d!=b.cellEditor.textarea&&b.cellEditor.textarea.contains(d)&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){P=a;mxEvent.addListener(a,"mousedown",function(){document.activeElement==b.cellEditor.textarea&&(T=b.cellEditor.saveSelection())});
 mxEvent.addListener(a,"touchstart",function(){document.activeElement==b.cellEditor.textarea&&(T=b.cellEditor.saveSelection())});a.value="120 %"}));h=e.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),
 !1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=e.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=
-A&&b.insertColumn(A,null!=F?F.cellIndex:0)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=F?F.cellIndex+1:-1)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=F&&b.deleteColumn(A,F.cellIndex)}catch(P){this.editorUi.handleError(P)}}),
-g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex+1)}catch(P){this.editorUi.handleError(P)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
-mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.deleteRow(A,I.sectionRowIndex)}catch(P){this.editorUi.handleError(P)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
+A&&b.insertColumn(A,null!=F?F.cellIndex:0)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=A&&b.insertColumn(A,null!=F?F.cellIndex+1:-1)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=A&&null!=F&&b.deleteColumn(A,F.cellIndex)}catch(Q){this.editorUi.handleError(Q)}}),
+g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.insertRow(A,I.sectionRowIndex+1)}catch(Q){this.editorUi.handleError(Q)}}),g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),
+mxUtils.bind(this,function(){try{null!=A&&null!=I&&b.deleteRow(A,I.sectionRowIndex)}catch(Q){this.editorUi.handleError(Q)}}),g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");e=e.cloneNode(!1);e.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),
 mxUtils.bind(this,function(a){if(null!=A){var c=A.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,function(c){var d=null==F||null!=a&&mxEvent.isShiftDown(a)?A:F;b.processElements(d,function(a){a.style.border=null});null==c||c==mxConstants.NONE?(d.removeAttribute("border"),d.style.border="",d.style.borderCollapse=
 ""):(d.setAttribute("border","1"),d.style.border="1px solid "+c,d.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(a){if(null!=A){var c=A.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(c,
 function(c){var d=null==F||null!=a&&mxEvent.isShiftDown(a)?A:F;b.processElements(d,function(a){a.style.backgroundColor=null});d.style.backgroundColor=null==c||c==mxConstants.NONE?"":c})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=A){var a=A.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?A.setAttribute("cellPadding",a):A.removeAttribute("cellPadding")}),mxResources.get("spacing"));
 d.showDialog(a.container,300,80,!0,!0);a.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=A&&A.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=A&&A.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=A&&A.setAttribute("align","right")},e)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&
-(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var U=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
+(mxUtils.br(h),mxUtils.br(h));h.appendChild(e);a.appendChild(h);D=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var V=mxUtils.bind(this,function(a,b,d){f=this.format.getSelectionState();a=mxUtils.getValue(f.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);
 k.firstChild.nodeValue=mxUtils.getValue(f.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);c(m,"0"==mxUtils.getValue(f.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=K)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),K.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);c(q,a==mxConstants.ALIGN_LEFT);c(v,a==mxConstants.ALIGN_CENTER);c(u,a==mxConstants.ALIGN_RIGHT);
 a=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(t,a==mxConstants.ALIGN_MIDDLE);c(y,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(f.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(f.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);G.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?"topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&
-b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
-N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(d||document.activeElement!=ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
-W)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),W.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=L)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),L.value=isNaN(a)?"":a+" pt"});V=this.installInputHandler(ga,mxConstants.STYLE_SPACING,2,-999,999," pt");da=this.installInputHandler(Q,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");aa=this.installInputHandler(ea,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(W,
-mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");Z=this.installInputHandler(L,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(K,U);this.addKeyHandler(ga,U);this.addKeyHandler(Q,U);this.addKeyHandler(ea,U);this.addKeyHandler(W,U);this.addKeyHandler(L,U);b.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){b.getModel().removeListener(U)}});U();if(b.cellEditor.isContentEditing()){var ka=!1,e=function(){ka||(ka=!0,window.setTimeout(function(){for(var a=
+b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(f.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);a==mxConstants.TEXT_DIRECTION_RTL?O.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?
+O.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(O.value="automatic");if(d||document.activeElement!=fa)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING,2)),fa.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=S)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_TOP,0)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=N)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_RIGHT,0)),N.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=
+ga)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ga.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_SPACING_LEFT,0)),ba.value=isNaN(a)?"":a+" pt"});W=this.installInputHandler(fa,mxConstants.STYLE_SPACING,2,-999,999," pt");ea=this.installInputHandler(S,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");aa=this.installInputHandler(N,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(ga,
+mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");Z=this.installInputHandler(ba,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(K,V);this.addKeyHandler(fa,V);this.addKeyHandler(S,V);this.addKeyHandler(N,V);this.addKeyHandler(ga,V);this.addKeyHandler(ba,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var la=!1,e=function(){la||(la=!0,window.setTimeout(function(){for(var a=
 b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){var d=function(a,b){if(null!=a&&null!=b){if(a==b)return!0;if(a.length>b.length+1)return a.substring(a.length-b.length-1,a.length)=="-"+b}return!1},e=function(c){if(null!=b.getParentByName(a,c,b.cellEditor.textarea))return!0;for(var d=a;null!=d&&1==d.childNodes.length;)if(d=d.childNodes[0],d.nodeName==c)return!0;return!1},g=function(a){a=null!=a?a.fontSize:null;return null!=a&&"px"==a.substring(a.length-
 2)?parseFloat(a):mxConstants.DEFAULT_FONTSIZE},h=function(a,b,c){return null!=c.style&&null!=b?(b=b.lineHeight,null!=c.style.lineHeight&&"%"==c.style.lineHeight.substring(c.style.lineHeight.length-1)?parseInt(c.style.lineHeight)/100:"px"==b.substring(b.length-2)?parseFloat(b)/a:parseInt(b)):""};a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var m=mxUtils.getCurrentStyle(a),
 n=g(m),p=h(n,m,a),r=a.getElementsByTagName("*");if(0<r.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var t=window.getSelection(),w=0;w<r.length;w++)if(t.containsNode(r[w],!0)){temp=mxUtils.getCurrentStyle(r[w]);var n=Math.max(g(temp),n),y=h(n,temp,r[w]);if(y!=p||isNaN(y))p=""}null!=m&&(c(l[0],"bold"==m.fontWeight||400<m.fontWeight||e("B")||e("STRONG")),c(l[1],"italic"==m.fontStyle||e("I")||e("EM")),c(l[2],e("U")),c(C,e("SUP")),c(x,e("SUB")),b.cellEditor.isTableSelected()?(c(B,
 d(m.textAlign,"justify")),c(q,d(m.textAlign,"left")),c(v,d(m.textAlign,"center")),c(u,d(m.textAlign,"right"))):(e=b.cellEditor.align||mxUtils.getValue(f.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),d(m.textAlign,"justify")?(c(B,d(m.textAlign,"justify")),c(q,!1),c(v,!1),c(u,!1)):(c(B,!1),c(q,e==mxConstants.ALIGN_LEFT),c(v,e==mxConstants.ALIGN_CENTER),c(u,e==mxConstants.ALIGN_RIGHT))),A=b.getParentByName(a,"TABLE",b.cellEditor.textarea),I=null==A?null:b.getParentByName(a,"TR",A),F=null==
-A?null:b.getParentByNames(a,["TD","TH"],A),D.style.display=null!=A?"":"none",document.activeElement!=K&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=H?(a.removeAttribute("size"),a.style.fontSize=H+" pt",H=null):K.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?fa.value="100 %":fa.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+
-("0"+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=ca&&(ia="#"==d.charAt(0)?d:"#000000",ca(ia,!0)),null!=M&&(ba="#"==n.charAt(0)?n:null,M(ba,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),
-'"'==m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}ka=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
+A?null:b.getParentByNames(a,["TD","TH"],A),D.style.display=null!=A?"":"none",document.activeElement!=K&&("FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=H?(a.removeAttribute("size"),a.style.fontSize=H+" pt",H=null):K.value=isNaN(n)?"":n+" pt",y=parseFloat(p),isNaN(y)?P.value="100 %":P.value=Math.round(100*y)+" %"),d=m.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+
+Number(d).toString(16)).substr(-2)}),n=m.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)}),null!=da&&(ia="#"==d.charAt(0)?d:"#000000",da(ia,!0)),null!=L&&(ca="#"==n.charAt(0)?n:null,L(ca,!0)),null!=k.firstChild&&(m=m.fontFamily,"'"==m.charAt(0)&&(m=m.substring(1)),"'"==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),'"'==
+m.charAt(0)&&(m=m.substring(1)),'"'==m.charAt(m.length-1)&&(m=m.substring(0,m.length-1)),k.firstChild.nodeValue=m))}la=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(b.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(b.cellEditor.textarea,"input",e);mxEvent.addListener(b.cellEditor.textarea,"touchend",e);mxEvent.addListener(b.cellEditor.textarea,"mouseup",e);mxEvent.addListener(b.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});
 e()}return a};StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
 StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsLabel||(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
 a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -3011,19 +3013,19 @@ null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"e
 this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(u,
 8);this.addArrow(x);this.addArrow(C);this.addArrow(B);t=this.addArrow(l,9);t.className="geIcon";t.style.width="84px";y=this.addArrow(m,9);y.className="geIcon";y.style.width="22px";var D=document.createElement("div");D.style.width="85px";D.style.height="1px";D.style.borderBottom="1px solid "+this.defaultStrokeColor;D.style.marginBottom="9px";t.appendChild(D);var A=document.createElement("div");A.style.width="23px";A.style.height="1px";A.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.marginBottom=
 "9px";y.appendChild(A);l.style.height="15px";m.style.height="15px";u.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(v);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop="2px";m.style.fontWeight=
-"normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var F,I,G=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),J=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var E,N,R=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),S=this.addUnitInput(l,
-"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop=
-"1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var K,H=this.addUnitInput(h,"pt",20,41,function(){K.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var M=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];
+"normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var F,I,G=this.addUnitInput(l,"pt",74,33,function(){F.apply(this,arguments)}),J=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);t=document.createElement("div");t.style.height="8px";l.appendChild(t);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var E,O,U=this.addUnitInput(l,"pt",74,33,function(){E.apply(this,arguments)}),R=this.addUnitInput(l,
+"pt",20,33,function(){O.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";m.style.marginTop=
+"1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var K,H=this.addUnitInput(h,"pt",20,41,function(){K.apply(this,arguments)});e.edges.length==f.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):e.vertices.length==f.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var L=mxUtils.bind(this,function(a,c,d){function h(a,c,d,f){d=d.getElementsByTagName("div")[0];
 d.className=b.getCssClassForMarker(f,e.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.style.filter="none",d.style.color=this.defaultStrokeColor,d.nextSibling.style.marginTop="0px");return d}e=this.format.getSelectionState();mxUtils.getValue(e.style,n,null);if(d||document.activeElement!=r)a=parseInt(mxUtils.getValue(e.style,
 mxConstants.STYLE_STROKEWIDTH,1)),r.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?
 null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?D.style.borderBottom="1px dashed "+this.defaultStrokeColor:D.style.borderBottom="1px dotted "+this.defaultStrokeColor:D.style.borderBottom="1px solid "+this.defaultStrokeColor;A.style.borderBottom=D.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(e.style,
 mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className="straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):
 "geSprite geSprite-orthogonal";u.getElementsByTagName("div")[0].className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";e.edges.length==f.getSelectionCount()?(v.style.display="",p.style.display="none"):(v.style.display="none",p.style.display="");a=h(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),C,"start");
 c=h(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,"endFill","1"),B,"end");"arrow"==e.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(B,
-30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=S)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),S.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)?
-"":a+" pt";if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=H)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(S,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(R,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(J,
-mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(H,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(r,M);this.addKeyHandler(S,M);this.addKeyHandler(R,M);this.addKeyHandler(J,M);this.addKeyHandler(G,M);this.addKeyHandler(H,M);f.getModel().addListener(mxEvent.CHANGE,M);this.listeners.push({destroy:function(){f.getModel().removeListener(M)}});
-M();return a};
+30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=R)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),R.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),U.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=J)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),J.value=isNaN(a)?
+"":a+" pt";if(d||document.activeElement!=U)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=H)a=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),H.value=isNaN(a)?"":a+" pt"});O=this.installInputHandler(R,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");E=this.installInputHandler(U,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(J,
+mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");F=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");K=this.installInputHandler(H,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(r,L);this.addKeyHandler(R,L);this.addKeyHandler(U,L);this.addKeyHandler(J,L);this.addKeyHandler(G,L);this.addKeyHandler(H,L);f.getModel().addListener(mxEvent.CHANGE,L);this.listeners.push({destroy:function(){f.getModel().removeListener(L)}});
+L();return a};
 StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,f=document.createElement("div");f.style.position="absolute";f.style.fontWeight="bold";f.style.width="80px";mxUtils.write(f,mxResources.get("lineJumps"));a.appendChild(f);var e=document.createElement("select");e.style.position="absolute";e.style.marginTop="-2px";
 e.style.right="76px";e.style.width="62px";for(var f=["none","arc","gap","sharp"],h=0;h<f.length;h++){var g=document.createElement("option");g.setAttribute("value",f[h]);mxUtils.write(g,mxResources.get(f[h]));e.appendChild(g)}mxEvent.addListener(e,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",e.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
 mxEvent.addListener(e,"click",function(a){mxEvent.consume(a)});a.appendChild(e);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();e.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -3051,14 +3053,14 @@ DiagramFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxReso
 c.setAttribute("title",mxResources.get("clearDefaultStyle")+" ("+this.editorUi.actions.get("clearDefaultStyle").shortcut+")");c.style.width="202px";a.appendChild(c);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function e(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function v(a,b){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,v.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,v.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,v.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,v.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
 this.canvas.curveTo=mxUtils.bind(this,v.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,v.prototype.arcTo)}function u(){mxRectangleShape.call(this)}function r(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function y(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function D(){mxShape.call(this)}function A(){mxShape.call(this)}
-function F(){mxEllipse.call(this)}function I(){mxShape.call(this)}function G(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function N(){mxShape.call(this)}function R(){mxShape.call(this)}function S(){mxShape.call(this)}function K(){mxShape.call(this)}function H(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function ba(){mxRectangleShape.call(this)}function ca(){mxDoubleEllipse.call(this)}function ia(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);
-this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function da(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ja(){mxActor.call(this)}function aa(){mxActor.call(this)}function Q(){mxActor.call(this)}function ga(){mxActor.call(this)}function L(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxActor.call(this)}function T(){mxActor.call(this)}function fa(){mxActor.call(this)}function U(){mxEllipse.call(this)}
-function ka(){mxEllipse.call(this)}function P(){mxEllipse.call(this)}function Ba(){mxRhombus.call(this)}function Ca(){mxEllipse.call(this)}function Da(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function wa(){mxActor.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Ha(a,b,c,d,e,f,g,h,k,l){g+=k;var z=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(z.x-
+function F(){mxEllipse.call(this)}function I(){mxShape.call(this)}function G(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function O(){mxShape.call(this)}function U(){mxShape.call(this)}function R(){mxShape.call(this)}function K(){mxShape.call(this)}function H(){mxCylinder.call(this)}function L(){mxCylinder.call(this)}function ca(){mxRectangleShape.call(this)}function da(){mxDoubleEllipse.call(this)}function ia(){mxDoubleEllipse.call(this)}function X(){mxArrowConnector.call(this);
+this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function ea(){mxActor.call(this)}function W(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ja(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function fa(){mxActor.call(this)}function ba(){mxActor.call(this)}function ga(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function P(){mxActor.call(this)}function V(){mxEllipse.call(this)}
+function la(){mxEllipse.call(this)}function Q(){mxEllipse.call(this)}function va(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function wa(){mxEllipse.call(this)}function xa(){mxActor.call(this)}function ra(){mxActor.call(this)}function sa(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ia(a,b,c,d,e,f,g,h,k,l){g+=k;var z=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(z.x-
 e-g,z.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),z=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
 a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(f,e);a.lineTo(0,e-f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-f,0),a.lineTo(d,f),a.lineTo(f,f),a.close(),a.fill()),0!=z&&(a.setFillAlpha(Math.abs(z)),a.setFillColor(0>z?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f,f),a.lineTo(f,e),a.lineTo(0,e-f),
-a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Fa=Math.tan(mxUtils.toRadians(30)),pa=(.5-Fa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
-e/Fa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*pa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-pa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Fa));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-pa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-pa)*b),a.lineTo(.5*b,(1-pa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*pa),
-a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-pa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,
+a.close(),a.fill()),a.begin(),a.moveTo(f,e),a.lineTo(f,f),a.lineTo(0,0),a.moveTo(f,f),a.lineTo(d,f),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Ga=Math.tan(mxUtils.toRadians(30)),oa=(.5-Ga)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,
+e/Ga);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*oa);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-oa)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",c);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+Ga));f?(a.moveTo(0,.25*b),a.lineTo(.5*b,(.5-oa)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-oa)*b),a.lineTo(.5*b,(1-oa)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*oa),
+a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-oa)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.registerShape("isoCube",d);mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,
 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",b);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.max(0,Math.min(d,
 Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(b,c);a.begin();a.moveTo(0,0);a.lineTo(d-f,0);a.lineTo(d,f);a.lineTo(d,e);a.lineTo(0,e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.close(),a.fill()),
 a.begin(),a.moveTo(d-f,0),a.lineTo(d-f,f),a.lineTo(d,f),a.end(),a.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(e,mxActor);e.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.registerShape("switch",e);mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,
@@ -3066,18 +3068,18 @@ Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c
 mxCellRenderer.registerShape("folder",h);mxUtils.extend(g,mxActor);g.prototype.size=30;g.prototype.isRoundable=function(){return!0};g.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("card",
 g);mxUtils.extend(k,mxActor);k.prototype.size=.4;k.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,b/2);a.quadTo(d/4,1.4*b,d/2,b/2);a.quadTo(3*d/4,b*(1-1.4),d,b/2);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=mxUtils.getValue(this.style,"size",
 this.size),c=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return b*=d,new mxRectangle(a.x,a.y+b,c,d-2*b);b*=c;return new mxRectangle(a.x+b,a.y,c-2*b,d)}return a};mxCellRenderer.registerShape("tape",k);mxUtils.extend(l,mxActor);l.prototype.size=.3;l.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*
-a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,
-Math.min(1,e)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
+a.height):null};l.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.registerShape("document",l);var Ma=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,b,c,d){var e=mxUtils.getValue(this.style,"size");return null!=e?d*Math.max(0,
+Math.min(1,e)):Ma.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var b=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*b),0,0)}return null};mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.isRoundable=function(){return!0};m.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
 mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("parallelogram",m);mxUtils.extend(n,mxActor);n.prototype.size=.2;n.prototype.isRoundable=function(){return!0};n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
 2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.registerShape("trapezoid",n);mxUtils.extend(p,mxActor);p.prototype.size=.5;p.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(b,0),new mxPoint(b,
 e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",p);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);v.prototype.moveTo=function(a,b){this.originalMoveTo.apply(this.canvas,
 arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};v.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};v.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};v.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};
 v.prototype.arcTo=function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};v.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),z=this.defaultVariation;5>g&&(g=5,z/=3);for(var h=c(a-this.lastX)*
 d/g,c=c(b-this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*z;this.originalLineTo.call(this.canvas,h*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};v.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;
-this.canvas.arcTo=this.originalArcTo};var Oa=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new v(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Oa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Pa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Pa.apply(this,arguments)};var Qa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Qa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
+this.canvas.arcTo=this.originalArcTo};var Na=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new v(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Na.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Oa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Oa.apply(this,arguments)};var Ra=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ra.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
 mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,
-c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ra=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ra.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Sa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Sa.apply(this,arguments)};mxUtils.extend(u,mxRectangleShape);u.prototype.size=.1;u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
 mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=Math.round(d);a.width-=Math.round(2*d)}return a};
 u.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));f=Math.round(f);a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",
 u);mxUtils.extend(r,mxRectangleShape);r.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};r.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.registerShape("transparent",r);mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.isRoundable=
@@ -3088,7 +3090,7 @@ function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.s
 b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Ka=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
 b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ka.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ka.apply(this,[a,b,c,d,e]))}};mxUtils.extend(C,mxRectangleShape);C.prototype.isHtmlAllowed=function(){return!1};C.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
 this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};C.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],z=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],na=this.style["symbol"+f+"Spacing"]||0,qa=this.style["symbol"+f+"VSpacing"]||na,m=this.style["symbol"+f+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),na+=m,qa+=m);var m=b,ha=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-na):m+na,ha=z==mxConstants.ALIGN_MIDDLE?ha+(e-l)/2:z==
+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],z=this.style["symbol"+f+"VerticalAlign"],k=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],pa=this.style["symbol"+f+"Spacing"]||0,qa=this.style["symbol"+f+"VSpacing"]||pa,m=this.style["symbol"+f+"ArcSpacing"];null!=m&&(m*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),pa+=m,qa+=m);var m=b,ha=c,m=h==mxConstants.ALIGN_CENTER?m+(d-k)/2:h==mxConstants.ALIGN_RIGHT?m+(d-k-pa):m+pa,ha=z==mxConstants.ALIGN_MIDDLE?ha+(e-l)/2:z==
 mxConstants.ALIGN_BOTTOM?ha+(e-l-qa):ha+qa;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,m,ha,k,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",C);mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.registerShape("message",
 B);mxUtils.extend(D,mxShape);D.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",D);mxUtils.extend(A,mxShape);A.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};A.prototype.paintBackground=
 function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",A);mxUtils.extend(F,mxEllipse);F.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
@@ -3109,79 +3111,79 @@ Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),n
 Math.min(1,f)),h=[new mxPoint(g+e,h),new mxPoint(g+k,h),new mxPoint(g+k-e,a),new mxPoint(g+k,h+z),new mxPoint(g+e,h+z),new mxPoint(g,a),new mxPoint(g+e,h)]):b==mxConstants.DIRECTION_NORTH?(e=e?Math.max(0,Math.min(z,f)):z*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h+e),new mxPoint(l,h),new mxPoint(g+k,h+e),new mxPoint(g+k,h+z),new mxPoint(l,h+z-e),new mxPoint(g,h+z),new mxPoint(g,h+e)]):(e=e?Math.max(0,Math.min(z,f)):z*Math.max(0,Math.min(1,f)),h=[new mxPoint(g,h),new mxPoint(l,h+e),new mxPoint(g+
 k,h),new mxPoint(g+k,h+z-e),new mxPoint(l,h+z),new mxPoint(g,h+z-e),new mxPoint(g,h)]);l=new mxPoint(l,a);d&&(c.x<g||c.x>g+k?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(h,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,z=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
 mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(z,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(z,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(z,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);z=new mxPoint(z,a);d&&(c.x<f||c.x>f+
-h?z.y=c.y:z.x=c.x);return mxUtils.getPerimeterPoint(g,z,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",N);mxUtils.extend(R,mxShape);R.prototype.size=
-10;R.prototype.inset=2;R.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(S,mxShape);S.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",S);mxUtils.extend(K,mxShape);K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+h?z.y=c.y:z.x=c.x);return mxUtils.getPerimeterPoint(g,z,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(U,mxShape);U.prototype.size=
+10;U.prototype.inset=2;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",U);mxUtils.extend(R,mxShape);R.prototype.paintBackground=
+function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",R);mxUtils.extend(K,mxShape);K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.ellipse(0,f,d-2*f,e-2*f);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d/2,e);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
 K);mxUtils.extend(H,mxCylinder);H.prototype.jettyWidth=20;H.prototype.jettyHeight=10;H.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=Math.min(b,e-b),k=Math.min(h+2*b,e-b);f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,
-e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",H);mxUtils.extend(M,mxCylinder);M.prototype.jettyWidth=32;M.prototype.jettyHeight=12;M.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/
-2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",M);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ba);mxUtils.extend(ca,mxDoubleEllipse);ca.prototype.outerStroke=!0;ca.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*
-f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",ca);mxUtils.extend(ia,ca);ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ia);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded};
+e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("module",H);mxUtils.extend(L,mxCylinder);L.prototype.jettyWidth=32;L.prototype.jettyHeight=12;L.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/
+2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.registerShape("component",L);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintForeground=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(b+f,c),new mxPoint(b+d,c+g),new mxPoint(b+f,c+e),new mxPoint(b,c+g)],this.isRounded,h,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ca);mxUtils.extend(da,mxDoubleEllipse);da.prototype.outerStroke=!0;da.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*
+f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.registerShape("endState",da);mxUtils.extend(ia,da);ia.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ia);mxUtils.extend(X,mxArrowConnector);X.prototype.defaultWidth=4;X.prototype.isOpenEnded=function(){return!0};X.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};X.prototype.isArrowRounded=function(){return this.isRounded};
 mxCellRenderer.registerShape("link",X);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+
-Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Y);mxUtils.extend(da,mxActor);da.prototype.size=30;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",
-da);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,
-parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",V);mxUtils.extend(Z,mxActor);Z.prototype.dx=20;Z.prototype.dy=20;Z.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Y);mxUtils.extend(ea,mxActor);ea.prototype.size=30;ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("manualInput",
+ea);mxUtils.extend(W,mxRectangleShape);W.prototype.dx=20;W.prototype.dy=20;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",W);mxUtils.extend(Z,mxActor);Z.prototype.dx=20;Z.prototype.dy=20;Z.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,
 "size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("corner",Z);mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.registerShape("crossbar",
 ja);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+
-b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",aa);mxUtils.extend(Q,mxActor);Q.prototype.arrowWidth=.3;Q.prototype.arrowSize=.2;Q.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,
-g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",Q);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Q.prototype.arrowWidth))));b=d*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Q.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",ga);mxUtils.extend(L,mxActor);L.prototype.size=
-.1;L.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(W,mxActor);W.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",W);mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=
-function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",ea);mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-
-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",T);mxUtils.extend(fa,mxActor);fa.prototype.size=.375;fa.prototype.isRoundable=function(){return!0};fa.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
-0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",fa);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",U);mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ka);mxUtils.extend(P,mxEllipse);P.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+
-.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",P);mxUtils.extend(Ba,mxRhombus);Ba.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",Ba);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();
-a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Ca);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",
-Da);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+
-e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",
-va);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",wa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,
+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.registerShape("tee",aa);mxUtils.extend(S,mxActor);S.prototype.arrowWidth=.3;S.prototype.arrowSize=.2;S.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,
+g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",S);mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth))));b=d*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",fa);mxUtils.extend(ba,mxActor);ba.prototype.size=
+.1;ba.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ba);mxUtils.extend(ga,mxActor);ga.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.registerShape("or",ga);mxUtils.extend(N,mxActor);N.prototype.redrawPath=
+function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",N);mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-
+b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("loopLimit",T);mxUtils.extend(P,mxActor);P.prototype.size=.375;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",P);mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",V);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",la);mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+
+.855*e);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",Q);mxUtils.extend(va,mxRhombus);va.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",va);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();
+a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",
+Ea);mxUtils.extend(Fa,mxEllipse);Fa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+
+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Fa);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",
+wa);mxUtils.extend(xa,mxActor);xa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.registerShape("delay",xa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,
 0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.registerShape("cross",ra);mxUtils.extend(sa,mxActor);sa.prototype.size=.25;sa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};
-mxCellRenderer.registerShape("display",sa);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),oa.prototype.origPaintEdgeShape.apply(this,
-[a,b,c])))};mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1);return function(){a.begin();
+mxCellRenderer.registerShape("display",sa);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,b,c){for(var d=[],e=0;e<b.length;e++)d.push(mxUtils.clone(b[e]));var e=a.state.dashed,f=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,c]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(e,f),na.prototype.origPaintEdgeShape.apply(this,
+[a,b,c])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var b=this.format.getSelectionState(),c=a.apply(this,arguments);"umlFrame"==b.style.shape&&c.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return c}}();mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1);return function(){a.begin();
 a.moveTo(d.x-m/2-z/2,d.y-z/2+m/2);a.lineTo(d.x+z/2-3*m/2,d.y-3*z/2-m/2);a.stroke()}});mxMarker.addMarker("box",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1),n=d.x+m/2,p=d.y+z/2;d.x-=m;d.y-=z;return function(){a.begin();a.moveTo(n-m/2-z/2,p-z/2+m/2);a.lineTo(n-m/2+z/2,p-z/2-m/2);a.lineTo(n+z/2-3*m/2,p-3*z/2-m/2);a.lineTo(n-z/2-3*m/2,p-3*z/2+m/2);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1);return function(){a.begin();
-a.moveTo(d.x-m/2-z/2,d.y-z/2+m/2);a.lineTo(d.x+z/2-3*m/2,d.y-3*z/2-m/2);a.moveTo(d.x-m/2+z/2,d.y-z/2-m/2);a.lineTo(d.x-z/2-3*m/2,d.y-3*z/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ha);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),z=Ha.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){z.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});
+a.moveTo(d.x-m/2-z/2,d.y-z/2+m/2);a.lineTo(d.x+z/2-3*m/2,d.y-3*z/2-m/2);a.moveTo(d.x-m/2+z/2,d.y-z/2-m/2);a.lineTo(d.x-z/2-3*m/2,d.y-3*z/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ia);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),z=Ia.apply(this,arguments),n=e*(g+2*k),p=f*(g+2*k);return function(){z.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*n+e*k,m.y-2*p+f*k);a.moveTo(m.x-n-p+f*k,m.y-p+n-e*k);a.lineTo(m.x+p-n-f*k,m.y-p-n+e*k);a.stroke()}});
 mxMarker.addMarker("halfCircle",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),z=f*(g+k+1),n=d.clone();d.x-=m;d.y-=z;return function(){a.begin();a.moveTo(n.x-z,n.y+m);a.quadTo(d.x-z,d.y+m,d.x,d.y);a.quadTo(d.x+z,d.y-m,n.x+z,n.y-m);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);
-a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var z=e.clone();return function(){b.begin();b.moveTo(z.x,z.y);k?b.lineTo(z.x-f-g/a,z.y-g+f/a):b.lineTo(z.x+g/a-f,z.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ia=function(a,b,c){return ta(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+
-e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ta=function(a,b,c,d,e){return O(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:
-g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,z=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,z,h/z,m/z,l,g,d,f)})},ma=function(a){return function(b){return[O(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Q.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",Q.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=
-Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ga=function(a,b,c){return function(d){var e=[O(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,
-mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},xa=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[O(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/
-a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(la(f));return g}},Ja=function(a){return function(b){var c=[O(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,
-!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(la(b));return c}},ua=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b}},la=function(a,b){return O(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/
+a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var z=e.clone();return function(){b.begin();b.moveTo(z.x,z.y);k?b.lineTo(z.x-f-g/a,z.y-g+f/a):b.lineTo(z.x+g/a-f,z.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var La=function(a,b,c){return ua(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+
+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ua=function(a,b,c,d,e){return M(a,b,function(b){var e=a.absolutePoints,f=e.length-1;b=a.view.translate;var g=a.view.scale,h=c?e[0]:e[f],e=c?e[1]:e[f-1],f=e.x-h.x,k=e.y-h.y,l=Math.sqrt(f*f+k*k),h=d.call(this,l,f/l,k/l,h,e);return new mxPoint(h.x/g-b.x,h.y/g-b.y)},function(b,d,f){var g=a.absolutePoints,h=g.length-1;b=a.view.translate;var k=a.view.scale,l=c?g[0]:
+g[h],g=c?g[1]:g[h-1],h=g.x-l.x,m=g.y-l.y,z=Math.sqrt(h*h+m*m);d.x=(d.x+b.x)*k;d.y=(d.y+b.y)*k;e.call(this,z,h/z,m/z,l,g,d,f)})},ma=function(a){return function(b){return[M(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",S.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",S.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=
+Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Ha=function(a,b,c){return function(d){var e=[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,
+mxConstants.STYLE_ROUNDED,!1)&&e.push(ka(d));return e}},ya=function(a,b,c,d,e){c=null!=c?c:1;return function(f){var g=[M(f,["size"],function(b){var c=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",c?e:a));return new mxPoint(b.x+Math.max(0,Math.min(b.width,d*(c?1:b.width))),b.getCenterY())},function(a,b,d){var g=null!=e?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?b.x-a.x:Math.max(0,Math.min(c,(b.x-a.x)/
+a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=f.view.graph.snap(a));this.state.style.size=a},null,d)];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ka(f));return g}},Ja=function(a){return function(b){var c=[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,
+!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ka(b));return c}},ta=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b}},ka=function(a,b){return M(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/
 2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,
-Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},O=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},ya={link:function(a){return[Ia(a,!0,10),Ia(a,!1,10)]},flexArrow:function(a){var b=
-a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*
+Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[La(a,!0,10),La(a,!1,10)]},flexArrow:function(a){var b=
+a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*
 b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ta(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=
+b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=
 Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ta(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,
+parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ua(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,
 mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ta(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
+a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ua(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
 5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[O(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,
+a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[M(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,
 mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(la(a,c/2))}return b},label:ua(),ext:ua(),rectangle:ua(),triangle:ua(),rhombus:ua(),umlLifeline:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
-b.y-a.y)))},!1)]},umlFrame:function(a){return[O(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,
-Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},cross:function(a){return[O(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"size",ra.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-
-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[O(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",da.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));
-return b},dataStorage:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[O(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));
-return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),O(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+
-d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},internalStorage:function(a){var b=[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},module:function(a){return[O(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",H.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,
-mxUtils.getValue(this.state.style,"jettyHeight",H.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Z.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",Z.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[O(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,
-b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),folder:function(a){return[O(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[O(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[O(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:xa(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:xa(y.prototype.size,!0,.5,!0),curlyBracket:xa(p.prototype.size,!1),display:xa(sa.prototype.size,!1),cube:Ga(1,a.prototype.size,!1),card:Ga(.5,g.prototype.size,!0),loopLimit:Ga(.5,
-T.prototype.size,!0),trapezoid:Ja(.5),parallelogram:Ja(1)};Graph.createHandle=O;Graph.handleFactory=ya;var Ma=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Ma.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);b=ya[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&
-(b=ya[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=ya[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var za=new mxPoint(1,0),Aa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),za=mxUtils.getRotatedPoint(za,
-Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),Aa=mxUtils.getRotatedPoint(Aa,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=za.x,l=za.y,m=Aa.x,n=Aa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Na=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Na.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,
+mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ka(a,c/2))}return b},label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
+b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,
+Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"size",ra.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(a.x+a.width-
+b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));
+return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));
+return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+
+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",W.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ka(a));return b},module:function(a){return[M(a,["jettyWidth","jettyHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",H.prototype.jettyWidth))),c=Math.max(0,Math.min(a.height,
+mxUtils.getValue(this.state.style,"jettyHeight",H.prototype.jettyHeight)));return new mxPoint(a.x+b/2,a.y+2*c)},function(a,b){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y))/2)})]},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",Z.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
+"dy",Z.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,
+b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ma(1),doubleArrow:ma(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,
+["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ya(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ya(y.prototype.size,!0,.5,!0),curlyBracket:ya(p.prototype.size,!1),display:ya(sa.prototype.size,!1),cube:Ha(1,a.prototype.size,!1),card:Ha(.5,g.prototype.size,!0),loopLimit:Ha(.5,
+T.prototype.size,!0),trapezoid:Ja(.5),parallelogram:Ja(1)};Graph.createHandle=M;Graph.handleFactory=za;var Pa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Pa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&null==mxStencilRegistry.getStencil(b)&&(b=mxConstants.SHAPE_RECTANGLE);b=za[b];null==b&&null!=this.state.shape&&this.state.shape.isRoundable()&&
+(b=za[mxConstants.SHAPE_RECTANGLE]);null!=b&&(b=b(this.state),null!=b&&(a=null==a?b:a.concat(b)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Aa=new mxPoint(1,0),Ba=new mxPoint(1,0),ma=mxUtils.toRadians(-30),Aa=mxUtils.getRotatedPoint(Aa,
+Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),Ba=mxUtils.getRotatedPoint(Ba,Math.cos(ma),Math.sin(ma));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=Aa.x,l=Aa.y,m=Ba.x,n=Ba.y,p="horizontal"==mxUtils.getValue(a.style,"elbow",
+"horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;
+Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Qa.apply(this,arguments)};c.prototype.constraints=[];d.prototype.getConstraints=function(a,b,c){a=[];var d=Math.tan(mxUtils.toRadians(30)),e=(.5-d)/2,d=Math.min(b,c/(.5+d));b=(b-d)/2;c=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+d*e));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,b+d,c+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+d,c+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b+.5*d,c+(1-e)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c+.75*d));return a};w.prototype.getConstraints=function(a,b,c){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,
 "position",this.position));var e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,b,.5*(c-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-d)));b>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,
@@ -3196,19 +3198,19 @@ c){a=[];var d=Math.max(0,Math.min(b,Math.min(c,parseFloat(mxUtils.getValue(this.
 parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,.5*(b+d),e))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,e)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,b,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(c-e)+e));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};V.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;ka.prototype.constraints=mxEllipse.prototype.constraints;P.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=
-mxEllipse.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};W.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;la.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=
+mxEllipse.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;xa.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.getConstraints=function(a,b,c){a=[];var d=Math.min(b,c/2),e=Math.min(b-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
 .5*(e+b-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(e+b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};H.prototype.getConstraints=function(a,b,c){b=parseFloat(mxUtils.getValue(a,"jettyWidth",H.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,
 "jettyHeight",H.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,b),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,b),
 new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(c-.5*a,3.5*a))];c>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,b));c>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,b));c>15*
-a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};T.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,b));return d};T.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
 .7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
-1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
 .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
 .25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];e.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
 .5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
 1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
 1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
 [new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
 new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
@@ -3218,15 +3220,15 @@ new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new
 0),!1,null,.5*(b+d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*b-.25*d,e));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*e));return a};Z.prototype.getConstraints=function(a,b,c){a=[];var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),e=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,b,.5*e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(c+e)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return a};ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Q.prototype.getConstraints=
+1),!1));return a};ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];S.prototype.getConstraints=
 function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};ga.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Q.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Q.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b-e),c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c-d));return a};fa.prototype.getConstraints=function(a,b,c){a=[];var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),e=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",S.prototype.arrowSize)))),d=(c-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
 .5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b-e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*b,c-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));return a};ra.prototype.getConstraints=
 function(a,b,c){a=[];var d=Math.min(c,b),e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(c-e)/2,f=d+e,g=(b-e)/2,e=g+e;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,e,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,c-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,e,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),d));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,b,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,b,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(b+e),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};J.prototype.constraints=null;W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};J.prototype.constraints=null;ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
 .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
 Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.selectParentAfterDelete?b.model.getParents(c):null;b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,f=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",
 function(){b.openLink(c.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);d.graph.setSelectionCells(d.graph.importGraphModel(c.documentElement))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
@@ -8491,8 +8493,8 @@ DrawioFile.prototype.synchronizeFile=function(a,d){this.savingFile?null!=d&&d({m
 DrawioFile.prototype.updateFile=function(a,d,c,b){null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(g){try{null!=c&&c()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=g?this.mergeFile(g,a,d,b):this.reloadFile(a,d))}catch(f){null!=d&&d(f)}}),d))};
 DrawioFile.prototype.mergeFile=function(a,d,c,b){var g=!0;try{this.stats.fileMerged++;var f=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),k=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=k&&0<k.length){this.shadowPages=k;this.backupPatch=this.isModified()?this.ui.diffPages(f,this.ui.pages):null;var l=[this.ui.diffPages(null!=b?b:f,this.shadowPages)];if(!this.ignorePatches(l)){var n=this.ui.patchPages(f,
 l[0]);b={};var q=this.ui.getHashValueForPages(n,b),f={},e=this.ui.getHashValueForPages(this.shadowPages,f);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",l,"checksum",e==q,q);if(null!=q&&q!=e){var m=this.compressReportData(this.getAnonymizedXmlForPages(k)),p=this.compressReportData(this.getAnonymizedXmlForPages(n)),u=this.ui.hashValue(a.getCurrentEtag()),t=this.ui.hashValue(this.getCurrentEtag());this.checksumError(c,l,"Shadow Details: "+JSON.stringify(b)+
-"\nChecksum: "+q+"\nCurrent: "+e+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=c&&c(x);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var v=this.getCurrentUser(),y=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),y,x)}}catch(B){}}};
+"\nChecksum: "+q+"\nCurrent: "+e+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+u+"\nTo: "+t+"\n\nFile Data:\n"+m+"\nPatched Shadow:\n"+p,null,"mergeFile");return}this.patch(l,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw g=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(y){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=c&&c(y);try{if(g)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,y);else{var v=this.getCurrentUser(),x=null!=v?v.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,y)}}catch(B){}}};
 DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var d=new mxCodec(mxUtils.createXmlDocument()),c=d.document.createElement("mxfile");if(null!=a)for(var b=0;b<a.length;b++){var g=d.encode(new mxGraphModel(a[b].root));"1"!=urlParams.dev&&(g=this.ui.anonymizeNode(g,!0));g.setAttribute("id",a[b].getId());a[b].viewState&&this.ui.editor.graph.saveViewState(a[b].viewState,g,!0);c.appendChild(g)}return mxUtils.getPrettyXml(c)};
 DrawioFile.prototype.compressReportData=function(a,d,c){d=null!=d?d:1E4;null!=c&&null!=a&&a.length>c?a=a.substring(0,c)+"[...]":null!=a&&a.length>d&&(a=Graph.compress(a)+"\n");return a};
 DrawioFile.prototype.checksumError=function(a,d,c,b,g){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=d)for(a=0;a<d.length;a++)this.ui.anonymizePatch(d[a]);var f=mxUtils.bind(this,function(a){var b=this.compressReportData(JSON.stringify(d,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
@@ -8578,10 +8580,10 @@ mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalSto
 "drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");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);StorageDialog.extended&&("function"===typeof window.DropboxClient&&b(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,
 "dropbox"),null!=a.gitHub&&b(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub"),null!=a.gitLab&&b(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab"))};g.appendChild(f);p();k=document.createElement("p");k.style.marginTop="8px";k.style.marginBottom="6px";var u=document.createElement("div");u.style.marginBottom="10px";if(!a.isOfflineApp()){var t=document.createElement("a");t.style.color="gray";t.style.fontSize="12px";t.style.cursor="pointer";
 t.style.userSelect="none";mxUtils.write(t,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");u.appendChild(t);k.appendChild(u);mxEvent.addListener(t,"click",function(a){e.innerHTML="";t.innerHTML="";StorageDialog.extended=!StorageDialog.extended;p();mxUtils.write(t,(StorageDialog.extended?mxResources.get("showLess"):mxResources.get("showMore"))+"...");mxEvent.consume(a)})}k.appendChild(n);var v=document.createElement("span");v.style.color="gray";v.style.fontSize=
-"12px";v.style.userSelect="none";mxUtils.write(v," "+mxResources.get("rememberThisSetting"));k.appendChild(v);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var y=document.createElement("select");y.style.marginTop="8px";y.style.maxWidth="170px";var x=document.createElement("option");x.setAttribute("value","");x.setAttribute("selected","selected");x.style.textAlign="center";mxUtils.write(x,mxResources.get("openRecent")+"...");y.appendChild(x);for(x=0;x<u.length;x++)(function(a){var b=
-a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var e=document.createElement("option");e.setAttribute("value",a.id);mxUtils.write(e,a.title+" ("+mxResources.get(b)+")");y.appendChild(e)})(u[x]);k.appendChild(y);mxEvent.addListener(y,"change",function(b){""!=y.value&&a.loadFile(y.value)})}else k.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),u.style.marginBottom="10px",u.style.padding="18px 0px 6px 0px",
-x=document.createElement("a"),x.style.cursor="pointer",x.style.fontSize="12px",x.style.color="gray",x.style.userSelect="none",mxUtils.write(x,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(x,"click",function(){if(null==a.storageFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&
-(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(x),k.appendChild(u),f.style.paddingBottom="4px");f.appendChild(k);mxEvent.addListener(v,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&
+"12px";v.style.userSelect="none";mxUtils.write(v," "+mxResources.get("rememberThisSetting"));k.appendChild(v);mxUtils.br(k);u=a.getRecent();if(!a.isOfflineApp()&&null!=u&&0<u.length){var x=document.createElement("select");x.style.marginTop="8px";x.style.maxWidth="170px";var y=document.createElement("option");y.setAttribute("value","");y.setAttribute("selected","selected");y.style.textAlign="center";mxUtils.write(y,mxResources.get("openRecent")+"...");x.appendChild(y);for(y=0;y<u.length;y++)(function(a){var b=
+a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var e=document.createElement("option");e.setAttribute("value",a.id);mxUtils.write(e,a.title+" ("+mxResources.get(b)+")");x.appendChild(e)})(u[y]);k.appendChild(x);mxEvent.addListener(x,"change",function(b){""!=x.value&&a.loadFile(x.value)})}else k.style.marginTop="20px",f.style.padding="30px 0px 26px 0px";Graph.fileSupport&&(u=document.createElement("div"),u.style.marginBottom="10px",u.style.padding="18px 0px 6px 0px",
+y=document.createElement("a"),y.style.cursor="pointer",y.style.fontSize="12px",y.style.color="gray",y.style.userSelect="none",mxUtils.write(y,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(y,"click",function(){if(null==a.storageFileInputElt){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&
+(a.hideDialog(),a.openFiles(b.files,!0),b.type="",b.type="file",b.value="")});b.style.display="none";document.body.appendChild(b);a.storageFileInputElt=b}a.storageFileInputElt.click()}),u.appendChild(y),k.appendChild(u),f.style.paddingBottom="4px");f.appendChild(k);mxEvent.addListener(v,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&
 (m.style.padding="8px",m.style.fontSize="9pt",m.style.marginTop="-14px",m.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(m))},5E3);this.container=g};StorageDialog.extended=!1;
 var SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";var c=a.addLanguageMenu(d,!0);null!=c&&(c.style.bottom="19px");c=null;c=a.getServiceCount();if(!a.isOffline()&&1<c){c=document.createElement("a");c.setAttribute("href","https://about.draw.io/support/");c.setAttribute("title",mxResources.get("help"));c.setAttribute("target","_blank");c.style.position="absolute";c.style.fontSize="12px";c.style.textDecoration="none";c.style.cursor="pointer";c.style.bottom="22px";
 c.style.left="26px";c.style.color="gray";var b=document.createElement("img");mxUtils.setOpacity(b,50);b.style.height="16px";b.style.width="16px";b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";c.appendChild(b);mxUtils.write(c,mxResources.get("help"));d.appendChild(c)}c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";b=document.createElement("img");
@@ -8605,14 +8607,14 @@ q=document.createElement("img"),q.setAttribute("src",Editor.tweetImage),q.setAtt
 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>d.length?mxClient.IS_SF||null!=document.documentMode?q.className="geBtn gePrimaryBtn":(f.appendChild(e),e.className="geBtn gePrimaryBtn",q.className="geBtn"):(f.appendChild(n),q.className="geBtn",n.className="geBtn gePrimaryBtn");b.appendChild(f);this.container=b};
 EmbedDialog.showPreviewOption=!0;
 var GoogleSitesDialog=function(a,d){function c(){var a=null!=D&&null!=D.getTitle()?D.getTitle():this.defaultFilename;if(z.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<F.length&&(b+="&s="+F);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=m.value&&(b+="&height="+m.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(A.checked?"1":"0");
-b+="&resize="+(B.checked?"1":"0");b+="&x0="+Number(e.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");x.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));q.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
+b+="&resize="+(B.checked?"1":"0");b+="&x0="+Number(e.value);b+="&y0="+n;g.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));q.value=b}else D.constructor==DriveFile||D.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=D.getHash().substring(1),b=D.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=
 a&&(b+="&title="+encodeURIComponent(a)),""!=m.value&&(a=parseInt(m.value)+parseInt(e.value),b+="&height="+a),q.value=b):q.value=""}var b=document.createElement("div"),g=a.editor.graph,f=g.getGraphBounds(),k=g.view.scale,l=Math.floor(f.x/k-g.view.translate.x),n=Math.floor(f.y/k-g.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var q=document.createElement("input");q.setAttribute("type","text");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";
 b.appendChild(q);mxUtils.br(b);this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","4");e.style.marginRight="16px";e.style.marginLeft="4px";e.value=l;b.appendChild(e);mxUtils.write(b,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type",
 "text");m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(f.height/k);b.appendChild(m);mxUtils.br(b);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";b.appendChild(f);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=d||"";
 b.appendChild(p);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";b.appendChild(u);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 v=document.createElement("input");
-v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);b.appendChild(y);mxUtils.write(b,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";b.appendChild(x);mxUtils.write(b,
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";b.appendChild(v);mxUtils.write(b,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);b.appendChild(x);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 B=document.createElement("input");B.setAttribute("type","checkbox");B.setAttribute("checked","checked");B.defaultChecked=!0;B.style.marginLeft="16px";b.appendChild(B);mxUtils.write(b,mxResources.get("resize")+" ");var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.marginLeft="8px";b.appendChild(A);mxUtils.write(b,mxResources.get("fit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft=
-"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(e,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(p,"change",c);c();
+"8px";b.appendChild(z);mxUtils.write(b,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),D=a.getCurrentFile();mxEvent.addListener(t,"change",c);mxEvent.addListener(v,"change",c);mxEvent.addListener(B,"change",c);mxEvent.addListener(A,"change",c);mxEvent.addListener(x,"change",c);mxEvent.addListener(y,"change",c);mxEvent.addListener(z,"change",c);mxEvent.addListener(m,"change",c);mxEvent.addListener(e,"change",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(p,"change",c);c();
 mxEvent.addListener(q,"click",function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";f.appendChild(k);b.appendChild(f);this.container=b},CreateGraphDialog=function(a,d,c){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 f=new Graph(d);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 k="curved=1;";f.cellRenderer.installCellOverlayListeners=
 function(a,b,e){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(e.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(e){b.fireEvent(new mxEventObject("pointerdown","event",e,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchstart",function(e){b.fireEvent(new mxEventObject("pointerdown","event",e,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
@@ -8649,42 +8651,42 @@ try{k=a.editor.graph.importCells(d.getModel().getChildren(d.getDefaultParent()),
 c&&n.setAttribute("selected","selected");var q=document.createElement("option");q.setAttribute("value","plantUmlPng");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var e=document.createElement("option");e.setAttribute("value","plantUmlTxt");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==c&&(l.appendChild(n),l.appendChild(q),l.appendChild(e));var m=g();k.value=
 m;d.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));d.appendChild(l);mxEvent.addListener(l,"change",function(){var a=g();if(0==k.value.length||k.value==m)m=a,k.value=m});
 a.isOffline()||"mermaid"!=c&&"plantUml"!=c||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink("mermaid"==c?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),n.className="geBtn",d.appendChild(n));n=mxUtils.button(mxResources.get("close"),function(){k.value==m?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);q=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
-b(k.value,l.value)});d.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);this.container=d},NewDialog=function(a,d,c,b,g,f,k,l,n,q,e,m,p,u,t,v,y){function x(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));){var b=S[J++],b=z(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function B(){if(X)c||a.hideDialog(),u(X,aa,H.value);else if(b)c||a.hideDialog(),b(fa,H.value);
+b(k.value,l.value)});d.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);this.container=d},NewDialog=function(a,d,c,b,g,f,k,l,n,q,e,m,p,u,t,v,x){function y(){var a=!0;if(null!=S)for(;J<S.length&&(a||0!=mxUtils.mod(J,30));){var b=S[J++],b=z(b.url,b.libs,b.title,b.tooltip?b.tooltip:b.title,b.select,b.imgUrl,b.info,b.onClick,b.preview,b.noImg,b.clibs);a&&b.click();a=!1}}function B(){if(X)c||a.hideDialog(),u(X,aa,H.value);else if(b)c||a.hideDialog(),b(fa,H.value);
 else{var e=H.value;null!=e&&0<e.length&&a.pickFolder(a.mode,function(b){a.createFile(e,fa,null!=W&&0<W.length?W:null,null,function(){a.hideDialog()},null,b,null,null!=ga&&0<ga.length?ga:null)},a.mode!=App.MODE_GOOGLE||null==a.stateArg||null==a.stateArg.folderId)}}function A(a,b,e,c,d,m){null!=ba&&(ba.style.backgroundColor="transparent",ba.style.border="1px solid transparent");E.removeAttribute("disabled");fa=b;W=e;ga=m;ba=a;X=c;aa=d;ba.style.backgroundColor=l;ba.style.border=n}function z(b,e,c,d,
 m,p,f,g,t,u,k){var v=document.createElement("div");v.className="geTemplate";v.style.height=Z+"px";v.style.width=da+"px";null!=c?v.setAttribute("title",mxResources.get(c,null,c)):null!=d&&0<d.length&&v.setAttribute("title",d);if(null!=p)v.style.backgroundImage="url("+p+")",v.style.backgroundSize="contain",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",mxEvent.addListener(v,"click",function(a){A(v,null,null,b,f,k)}),mxEvent.addListener(v,"dblclick",function(a){B()});
 else if(!u&&null!=b&&0<b.length){d=t||TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png";v.style.backgroundImage="url("+d+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";null!=c&&(v.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;'+("dark"==uiTheme?"":"background:rgba(255,255,255,0.85);")+'border:inherit;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:rgba(255,255,255,0.85);overflow:hidden;text-overflow:ellipsis;max-width:'+
 (Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>");var C=!1;mxEvent.addListener(v,"click",function(c){E.setAttribute("disabled","disabled");v.style.backgroundColor="transparent";v.style.border="1px solid transparent";c=b;c=/^https?:\/\//.test(c)&&!a.editor.isCorsEnabledForUrl(c)?PROXY_URL+"?url="+encodeURIComponent(c):TEMPLATE_PATH+"/"+c;I.spin(P);mxUtils.get(c,mxUtils.bind(this,function(a){I.stop();200<=a.getStatus()&&299>=a.getStatus()&&(A(v,a.getText(),e,null,null,k),C&&B())}))});
 mxEvent.addListener(v,"dblclick",function(a){C=!0})}else v.innerHTML='<table width="100%" height="100%" style="line-height:1.3em;"><tr><td align="center" valign="middle"><span style="display:inline-block;padding:4px 8px 4px 8px;user-select:none;border-radius:3px;background:#ffffff;overflow:hidden;text-overflow:ellipsis;max-width:'+(Z-34)+'px;">'+mxResources.get(c,null,c)+"</span></td></tr></table>",m&&A(v),null!=g?mxEvent.addListener(v,"click",g):(mxEvent.addListener(v,"click",function(a){A(v,null,
-null,b,f)}),mxEvent.addListener(v,"dblclick",function(a){B()}));P.appendChild(v);return v}function F(){T&&(T=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(x(),mxEvent.consume(a))}));var a=null;if(0<ea){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ca.appendChild(b);for(var e in M){var c=document.createElement("div"),b=e,d=M[e];
-18<b.length&&(b=b.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=q&&(c.style.padding=q);ca.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=M[b],O=null,x())})})(e,
+null,b,f)}),mxEvent.addListener(v,"dblclick",function(a){B()}));P.appendChild(v);return v}function F(){T&&(T=!1,mxEvent.addListener(P,"scroll",function(a){P.scrollTop+P.clientHeight>=P.scrollHeight&&(y(),mxEvent.consume(a))}));var a=null;if(0<ea){var b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,mxResources.get("custom"));ca.appendChild(b);for(var e in M){var c=document.createElement("div"),b=e,d=M[e];
+18<b.length&&(b=b.substring(0,18)+"&hellip;");c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";c.setAttribute("title",b+" ("+d.length+")");mxUtils.write(c,c.getAttribute("title"));null!=q&&(c.style.padding=q);ca.appendChild(c);(function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=M[b],O=null,y())})})(e,
 c)}b=document.createElement("div");b.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(b,"draw.io");ca.appendChild(b)}for(e in R)c=document.createElement("div"),b=mxResources.get(e),d=R[e],null==b&&(b=e.substring(0,1).toUpperCase()+e.substring(1)),18<b.length&&(b=b.substring(0,18)+"&hellip;"),c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;",
-c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=q&&(c.style.padding=q),ca.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=k,S=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=R[b],O=null,x())})}(e,c);x()}c=null!=c?c:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"dark"==uiTheme?"transparent":"#e6eff8";n=null!=n?n:"dark"==uiTheme?
+c.setAttribute("title",b+" ("+d.length+")"),mxUtils.write(c,c.getAttribute("title")),null!=q&&(c.style.padding=q),ca.appendChild(c),null==a&&0<d.length&&(a=c,a.style.backgroundColor=k,S=d),function(b,e){mxEvent.addListener(c,"click",function(){a!=e&&(a.style.backgroundColor="",a=e,a.style.backgroundColor=k,P.scrollTop=0,P.innerHTML="",J=0,S=R[b],O=null,y())})}(e,c);y()}c=null!=c?c:!0;g=null!=g?g:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"dark"==uiTheme?"transparent":"#e6eff8";n=null!=n?n:"dark"==uiTheme?
 "1px dotted rgb(235, 242, 249)":"1px solid #ccd9ea";e=null!=e?e:EditorUi.templateFile;var D=document.createElement("div");D.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";c&&D.appendChild(C);var G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("align","absmiddle");G.style.width="40px";G.style.height="40px";G.style.marginRight="10px";G.style.paddingBottom="4px";G.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
 a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&c&&C.appendChild(G);c&&mxUtils.write(C,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
 mxResources.get("filename"))+":");G=".drawio";a.mode==App.MODE_GOOGLE&&null!=a.drive?G=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?G=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?G=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?G=a.gitHub.extension:a.mode==App.MODE_GITLAB&&null!=a.gitLab?G=a.gitLab.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(G=a.trello.extension);var H=document.createElement("input");H.setAttribute("value",a.defaultFilename+
 G);H.style.marginLeft="10px";H.style.width=d?"144px":"284px";this.init=function(){c&&(H.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?H.select():document.execCommand("selectAll",!1,null))};c&&(C.appendChild(H),null!=a.editor.diagramFileTypes&&(G=FilenameDialog.createFileTypes(a,H,a.editor.diagramFileTypes),G.style.marginLeft="6px",G.style.width=d?"80px":"140px",C.appendChild(G)),null!=a.editor.fileExtensions&&(G=FilenameDialog.createTypeHint(a,H,a.editor.fileExtensions),
 G.style.marginTop="12px",C.appendChild(G)));var C=!1,J=0,I=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),E=mxUtils.button(v||mxResources.get("create"),function(){E.setAttribute("disabled","disabled");B();E.removeAttribute("disabled")});E.className="geBtn gePrimaryBtn";if(m||p){var K=[],O=null,Q=null,Y=null,U=function(a){E.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=b==a?"geBtn gePrimaryBtn":
 "geBtn"},C=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";D.appendChild(v);G=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ca.style.display="";P.style.left="160px";U(0);P.scrollTop=0;P.innerHTML="";J=0;O!=S&&(S=O,R=Q,ea=Y,ca.innerHTML="",F(),O=null)});K.push(G);v.appendChild(G);var L=function(a){ca.style.display="none";P.style.left="30px";U(a?-1:1);null==O&&(O=S);P.scrollTop=0;P.innerHTML="";I.spin(P);var b=function(a,b,e){J=0;I.stop();
-S=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){ca.style.display="";P.style.left="160px";ca.innerHTML="";ea=0;R={"draw.io":a};for(d in e)R[d]=e[d];F()}else x()};a?p(V.value,b):m(b)};m&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),v.appendChild(G),K.push(G));if(p){G=document.createElement("span");G.style.marginLeft=
+S=a;e=e||{};var c=0,d;for(d in e)c+=e[d].length;if(b)P.innerHTML=b;else if(0==a.length&&0==c)P.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(P.innerHTML="",0<c){ca.style.display="";P.style.left="160px";ca.innerHTML="";ea=0;R={"draw.io":a};for(d in e)R[d]=e[d];F()}else y()};a?p(V.value,b):m(b)};m&&(G=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){L()}),v.appendChild(G),K.push(G));if(p){G=document.createElement("span");G.style.marginLeft=
 "10px";G.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");v.appendChild(G);var V=document.createElement("input");V.style.marginRight="10px";V.style.marginLeft="10px";V.style.width="220px";mxEvent.addListener(V,"keypress",function(a){13==a.keyCode&&L(!0)});v.appendChild(V);G=mxUtils.button(mxResources.get("search"),function(){L(!0)});G.className="geBtn";v.appendChild(G)}U(0)}var W=null,ga=null,fa=null,ba=null,X=null,aa=null,P=document.createElement("div");P.style.border="1px solid #d3d3d3";
 P.style.position="absolute";P.style.left="160px";P.style.right="34px";v=(c?72:40)+(C?30:0);P.style.top=v+"px";P.style.bottom="68px";P.style.margin="6px 0 0 -1px";P.style.padding="6px";P.style.overflow="auto";var ca=document.createElement("div");ca.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var Z=140,da=140,R={},M={},ea=0,T=!0;R.basic=[{title:"blankDiagram",select:!0}];var S=R.basic;if(!d){var ha=function(){mxUtils.get(N,
 function(a){if(!ma){ma=!0;a=a.getXml().documentElement.firstChild;for(var b={};null!=a;){if("undefined"!==typeof a.getAttribute)if("clibs"==a.nodeName){for(var e=a.getAttribute("name"),c=a.getElementsByTagName("add"),d=[],m=0;m<c.length;m++)d.push(encodeURIComponent(mxUtils.getTextContent(c[m])));null!=e&&0<d.length&&(b[e]=d.join(";"))}else e=a.getAttribute("url"),null!=e&&(c=a.getAttribute("section"),null==c&&(c=e.indexOf("/"),c=e.substring(0,c)),e=R[c],null==e&&(e=[],R[c]=e),c=a.getAttribute("clibs"),
-null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}I.stop();F()}})};D.appendChild(ca);D.appendChild(P);var ma=!1,N=e;/^https?:\/\//.test(N)&&!a.editor.isCorsEnabledForUrl(N)&&(N=PROXY_URL+"?url="+encodeURIComponent(N));I.spin(P);null!=y?y(function(a,b){M=a;Y=ea=b;ha()},ha):ha();Q=R}mxEvent.addListener(H,"keypress",function(b){a.dialog.container.firstChild==
-D&&13==b.keyCode&&B()});e=document.createElement("div");e.style.marginTop=d?"4px":"16px";e.style.textAlign="right";e.style.position="absolute";e.style.left="40px";e.style.bottom="24px";e.style.right="40px";d||a.isOffline()||!c||null!=b||g||(y=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",e.appendChild(y));y=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});y.className=
-"geBtn";!a.editor.cancelFirst||g&&null==f||e.appendChild(y);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),
+null!=b[c]&&(c=b[c]),e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),preview:a.getAttribute("preview"),clibs:c}));a=a.nextSibling}I.stop();F()}})};D.appendChild(ca);D.appendChild(P);var ma=!1,N=e;/^https?:\/\//.test(N)&&!a.editor.isCorsEnabledForUrl(N)&&(N=PROXY_URL+"?url="+encodeURIComponent(N));I.spin(P);null!=x?x(function(a,b){M=a;Y=ea=b;ha()},ha):ha();Q=R}mxEvent.addListener(H,"keypress",function(b){a.dialog.container.firstChild==
+D&&13==b.keyCode&&B()});e=document.createElement("div");e.style.marginTop=d?"4px":"16px";e.style.textAlign="right";e.style.position="absolute";e.style.left="40px";e.style.bottom="24px";e.style.right="40px";d||a.isOffline()||!c||null!=b||g||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",e.appendChild(x));x=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});x.className=
+"geBtn";!a.editor.cancelFirst||g&&null==f||e.appendChild(x);d||"1"==urlParams.embed||g||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(H.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),
 d.className="geBtn",e.appendChild(d));Graph.fileSupport&&t&&(t=mxUtils.button(mxResources.get("import"),function(){if(null==a.newDlgFileInputElt){var b=document.createElement("input");b.setAttribute("multiple","multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(e){a.openFiles(b.files,!0);b.value=""});b.style.display="none";document.body.appendChild(b);a.newDlgFileInputElt=b}a.newDlgFileInputElt.click()}),t.className="geBtn",e.appendChild(t));e.appendChild(E);a.editor.cancelFirst||
-null!=b||g&&null==f||e.appendChild(y);D.appendChild(e);this.container=D},CreateDialog=function(a,d,c,b,g,f,k,l,n,q,e,m,p,u,t,v,y){function x(b,e,c,p){function f(){mxEvent.addListener(g,"click",function(){var b=c;if(k){var e=z.value,m=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var b=null!=b?b:C.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
+null!=b||g&&null==f||e.appendChild(x);D.appendChild(e);this.container=D},CreateDialog=function(a,d,c,b,g,f,k,l,n,q,e,m,p,u,t,v,x){function y(b,e,c,p){function f(){mxEvent.addListener(g,"click",function(){var b=c;if(k){var e=z.value,m=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>m){var b=null!=b?b:C.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_GITLAB?p=a.gitLab.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:
 b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".drawio");0<=m&&(e=e.substring(0,m));z.value=e+p}}B(c)})}var g=document.createElement("a");g.style.overflow="hidden";var v=document.createElement("img");v.src=b;v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";g.className="geBaseButton";g.style.position="relative";g.style.margin="4px";g.style.padding=
 "8px 8px 10px 8px";g.style.whiteSpace="nowrap";g.appendChild(v);mxClient.IS_QUIRKS&&(g.style.cssFloat="left",g.style.zoom="1");g.style.color="gray";g.style.fontSize="11px";var t=document.createElement("div");g.appendChild(t);mxUtils.write(t,e);if(null!=p&&null==a[p]){v.style.visibility="hidden";mxUtils.setOpacity(t,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(g);var A=window.setTimeout(function(){null==
-a[p]&&(u.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(A),mxUtils.setOpacity(t,100),v.style.visibility="",u.stop(),f())}))}else f();F.appendChild(g);++D==m&&(mxUtils.br(F),D=0)}function B(b){var e=z.value;if(null==b||null!=e&&0<e.length)y&&a.hideDialog(),c(e,b,z)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;y=null!=y?y:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var A=
+a[p]&&(u.stop(),g.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(A),mxUtils.setOpacity(t,100),v.style.visibility="",u.stop(),f())}))}else f();F.appendChild(g);++D==m&&(mxUtils.br(F),D=0)}function B(b){var e=z.value;if(null==b||null!=e&&0<e.length)x&&a.hideDialog(),c(e,b,z)}k=null!=k?k:!0;l=null!=l?l:!0;m=null!=m?m:4;x=null!=x?x:!0;f=document.createElement("div");f.style.whiteSpace="nowrap";null==b&&a.addLanguageMenu(f);var A=
 document.createElement("h2");mxUtils.write(A,g||mxResources.get("create"));A.style.marginTop="0px";A.style.marginBottom="24px";f.appendChild(A);mxUtils.write(f,mxResources.get("filename")+":");var z=document.createElement("input");z.setAttribute("value",d);z.style.width="200px";z.style.marginLeft="10px";z.style.marginBottom="20px";z.style.maxWidth="70%";this.init=function(){z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?z.select():document.execCommand("selectAll",
 !1,null)};f.appendChild(z);null!=v&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,z,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="80px",f.appendChild(g)),f.appendChild(FilenameDialog.createTypeHint(a,z,v)));null==p||null==u||"image/"!=u.substring(0,6)||"image/svg"==u.substring(0,9)&&!mxClient.IS_SVG||(z.style.width="160px",v=document.createElement("img"),p=t?p:btoa(unescape(encodeURIComponent(p))),v.setAttribute("src","data:"+u+";base64,"+p),v.style.position=
 "absolute",v.style.top="70px",v.style.right="100px",v.style.maxWidth="120px",v.style.maxHeight="80px",mxUtils.setPrefixedStyle(v.style,"transform","translate(50%,-50%)"),f.appendChild(v),n&&Editor.popupsAllowed&&(v.style.cursor="pointer",mxEvent.addGestureListeners(v,null,null,function(){B("_blank")})));mxUtils.br(f);var F=document.createElement("div");F.style.textAlign="center";var D=0;F.style.marginTop="6px";f.appendChild(F);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||
-a.isOffline()||("function"===typeof window.DriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(u,mxResources.get("googleDrive")),C.appendChild(u),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(u,mxResources.get("oneDrive")),C.appendChild(u),a.mode==App.MODE_ONEDRIVE&&
-u.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(u,mxResources.get("dropbox")),C.appendChild(u),a.mode==App.MODE_DROPBOX&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(u=document.createElement("option"),
-u.setAttribute("value",App.MODE_GITHUB),mxUtils.write(u,mxResources.get("github")),C.appendChild(u),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GITLAB),mxUtils.write(u,mxResources.get("gitlab")),C.appendChild(u),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(u=document.createElement("option"),u.setAttribute("value",
-App.MODE_TRELLO),mxUtils.write(u,mxResources.get("trello")),C.appendChild(u),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(u=document.createElement("option"),u.setAttribute("value",App.MODE_DEVICE),mxUtils.write(u,mxResources.get("device")),C.appendChild(u),a.mode!=App.MODE_DEVICE&&l||u.setAttribute("selected","selected"),e&&x(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")),C.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(q)}),
+a.isOffline()||("function"===typeof window.DriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(u,mxResources.get("googleDrive")),C.appendChild(u),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(u,mxResources.get("oneDrive")),C.appendChild(u),a.mode==App.MODE_ONEDRIVE&&
+u.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(u,mxResources.get("dropbox")),C.appendChild(u),a.mode==App.MODE_DROPBOX&&u.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(u=document.createElement("option"),
+u.setAttribute("value",App.MODE_GITHUB),mxUtils.write(u,mxResources.get("github")),C.appendChild(u),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.gitLab&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_GITLAB),mxUtils.write(u,mxResources.get("gitlab")),C.appendChild(u),y(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(u=document.createElement("option"),u.setAttribute("value",
+App.MODE_TRELLO),mxUtils.write(u,mxResources.get("trello")),C.appendChild(u),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));Editor.useLocalStorage&&"device"!=urlParams.storage&&null==a.getCurrentFile()||(u=document.createElement("option"),u.setAttribute("value",App.MODE_DEVICE),mxUtils.write(u,mxResources.get("device")),C.appendChild(u),a.mode!=App.MODE_DEVICE&&l||u.setAttribute("selected","selected"),e&&y(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")),C.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(q)}),
 e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==b&&(u=mxUtils.button(mxResources.get("decideLater"),function(){B(null)}),u.className="geBtn",l.appendChild(u));n&&Editor.popupsAllowed&&(n=mxUtils.button(mxResources.get("openInNewWindow"),function(){B("_blank")}),n.className="geBtn",l.appendChild(n));
 CreateDialog.showDownloadButton&&(n=mxUtils.button(mxResources.get("download"),function(){B("download")}),n.className="geBtn",l.appendChild(n));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(z,"keypress",function(b){13==b.keyCode?B(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});f.appendChild(l);this.container=f};CreateDialog.showDownloadButton=!0;
 var PopupDialog=function(a,d,c,b,g){g=null!=g?g:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&a.hideDialog();null!=b&&b()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";f.appendChild(k);mxUtils.br(f);var l=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&a.hideDialog();null!=c&&c();a.openLink(d,
@@ -8699,7 +8701,7 @@ function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancel
 m.files&&(a.importFiles(m.files,0,0,a.maxImageSize,function(a,b,c,d,m,p){e(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0),m.type="",m.type="file",m.value="")});m.style.display="none";document.body.appendChild(m);a.imgDlgFileInputElt=m}var p=mxUtils.button(mxResources.get("open"),function(){a.imgDlgFileInputElt.click()});p.className="geBtn";c.appendChild(p)}document.createElement("canvas").getContext&&"data:image/"==n.value.substring(0,
 11)&&"data:image/svg"!=n.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,n.value,function(a){n.value=a});a.showDialog(b.container,300,380,!0,!0);b.init()}),p.className="geBtn",c.appendChild(p));mxEvent.addListener(n,"keypress",function(a){13==a.keyCode&&e(n.value)});p=mxUtils.button(mxResources.get("apply"),function(){e(n.value)});p.className="geBtn gePrimaryBtn";c.appendChild(p);a.editor.cancelFirst||c.appendChild(d);Graph.fileSupport&&(c.style.marginTop=
 "120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.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")),l.appendChild(d));l.appendChild(c);this.container=l},LinkDialog=function(a,d,c,b,g){function f(a,b,e){e=mxUtils.button("",e);e.className=
-"geBtn";e.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(b);y.appendChild(e)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor=
+"geBtn";e.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(b);x.appendChild(e)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor=
 "default";mxClient.IS_VML||(l.style.paddingRight="20px");var n=document.createElement("input");n.setAttribute("placeholder",mxResources.get("dragUrlsHere"));n.setAttribute("type","text");n.style.marginTop="6px";n.style.width="100%";n.style.boxSizing="border-box";n.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";n.style.backgroundRepeat="no-repeat";n.style.backgroundPosition="100% 50%";n.style.paddingRight="14px";var q=document.createElement("div");q.setAttribute("title",mxResources.get("reset"));
 q.style.position="relative";q.style.left="-16px";q.style.width="12px";q.style.height="14px";q.style.cursor="pointer";q.style.display=mxClient.IS_VML?"inline":"inline-block";q.style.top=(mxClient.IS_VML?0:3)+"px";q.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(q,"click",function(){n.value="";n.focus()});var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name",
 "current-linkdialog");var m=document.createElement("input");m.style.cssText="margin-right:8px;margin-bottom:8px;";m.setAttribute("value","url");m.setAttribute("type","radio");m.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="100%";if(g&&null!=a.pages){null!=d&&"data:page/id,"==d.substring(0,13)?(m.setAttribute("checked","checked"),m.defaultChecked=!0):(n.setAttribute("value",d),e.setAttribute("checked","checked"),e.defaultChecked=!0);l.appendChild(e);
@@ -8707,13 +8709,13 @@ l.appendChild(n);l.appendChild(q);mxUtils.br(l);l.appendChild(m);g=!1;for(q=0;q<
 t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");p.appendChild(t);mxEvent.addListener(p,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}l.appendChild(p)}else n.setAttribute("value",d),l.appendChild(n),l.appendChild(q);k.appendChild(l);var v=mxUtils.button(c,function(){a.hideDialog();b(m.checked?"pageNotFound"!==p.value?p.value:d:n.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=
 function(){m.checked?p.focus():(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){e.removeAttribute("checked");m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(n,"focus",function(){m.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
 c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(e){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));e.stopPropagation();e.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(n.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),e.setAttribute("checked",
-"checked"),e.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";y.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign=
-"middle";c.className="geBtn";a.editor.cancelFirst&&y.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);
+"checked"),e.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");x.style.marginTop="20px";x.style.textAlign="center";c=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/solution/articles/16000080137")});c.style.verticalAlign="middle";c.className="geBtn";x.appendChild(c);a.isOffline()&&!mxClient.IS_CHROMEAPP&&(c.style.display="none");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.style.verticalAlign=
+"middle";c.className="geBtn";a.editor.cancelFirst&&x.appendChild(c);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||null!=a.docs[0].mimeType&&"application/vnd.jgraph."==a.docs[0].mimeType.substring(0,23)?b="https://www.draw.io/#G"+a.docs[0].id:"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);
 n.value=b;n.focus()}else LinkDialog.selectedDocs=null;n.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&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=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),
 e=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(b).addView(e).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED);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){n.value=a[0].link;n.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){n.value=b.value[0].webUrl;n.focus()})});null!=a.gitHub&&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],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value="https://github.com/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});null!=a.gitLab&&f(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){a.gitLab.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],e=a[1],c=a[2];a=a.slice(3,a.length).join("/");n.value=DRAWIO_GITLAB_URL+"/"+b+"/"+e+"/blob/"+c+"/"+a;n.focus()}})});mxEvent.addListener(n,"keypress",function(e){13==e.keyCode&&(a.hideDialog(),b(m.checked?
-p.value:n.value,LinkDialog.selectedDocs))});y.appendChild(v);a.editor.cancelFirst||y.appendChild(c);k.appendChild(y);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f);
+p.value:n.value,LinkDialog.selectedDocs))});x.appendChild(v);a.editor.cancelFirst||x.appendChild(c);k.appendChild(x);this.container=k},FeedbackDialog=function(a,d,c,b){var g=document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedback"));f.style.fontSize="18px";f.style.marginBottom="18px";g.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+(c?"":" ("+mxResources.get("required")+")"));g.appendChild(f);
 var k=document.createElement("input");k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="600px";var l=mxUtils.button(mxResources.get("sendMessage"),function(){var c=e.value+(q.checked?"\nDiagram:\n"+(null!=b?b:mxUtils.getXml(a.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;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(k.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=d?d:"Feedback")+":\n"+c),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"))}))});
 l.className="geBtn gePrimaryBtn";if(!c){l.setAttribute("disabled","disabled");var n=/^(([^<>()[\]\\.,;:\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(k,"change",function(){0<k.value.length&&0<n.test(k.value)?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled")});mxEvent.addListener(k,"keyup",function(){0<k.value.length&&n.test(k.value)?l.removeAttribute("disabled"):l.setAttribute("disabled",
@@ -8722,42 +8724,42 @@ mxUtils.write(f,mxResources.get("feedback"));g.appendChild(f);var e=document.cre
 c.appendChild(f));g.appendChild(c);this.container=g};FeedbackDialog.maxAttachmentSize=1E6;
 var RevisionDialog=function(a,d,c){var b=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));b.appendChild(g);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";b.appendChild(f);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height=
 "376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);b.appendChild(k);var l=new Graph(k);l.setTooltips(!1);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var n=0,q=null,e=0,m=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=q&&null!=q[e]?q[e].getAttribute("name"):"pagenumber"==a?e+1:"pagecount"==a?null!=q?q.length:1:m.apply(this,arguments)};l.getLinkForCell=
-function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),t=null,v=null,y=null,x=null,B=mxUtils.button("",function(){null!=y&&l.zoomIn()});B.className="geSprite geSprite-zoomin";
-B.setAttribute("title",mxResources.get("zoomIn"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var A=mxUtils.button("",function(){null!=y&&l.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var z=mxUtils.button("",function(){null!=y&&
-(l.maxFitScale=8,l.fit(8),l.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var F=mxUtils.button("",function(){null!=y&&(l.zoomActual(),l.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled",
-"disabled");mxUtils.setOpacity(F,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var C=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=mxUtils.getXml(y.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b=
-"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});C.className="geBtn";C.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(x):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(x);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var J=null;mxEvent.addListener(H,"change",function(a){null!=
-J&&(J(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("edit"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),a.openLink(a.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");null!=c&&(I.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(H.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
+function(){return null};Editor.MathJaxRender&&l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var p=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),t=null,v=null,x=null,y=null,B=mxUtils.button("",function(){null!=x&&l.zoomIn()});B.className="geSprite geSprite-zoomin";
+B.setAttribute("title",mxResources.get("zoomIn"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var A=mxUtils.button("",function(){null!=x&&l.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var z=mxUtils.button("",function(){null!=x&&
+(l.maxFitScale=8,l.fit(8),l.center())});z.className="geSprite geSprite-fit";z.setAttribute("title",mxResources.get("fit"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var F=mxUtils.button("",function(){null!=x&&(l.zoomActual(),l.center())});F.className="geSprite geSprite-actualsize";F.setAttribute("title",mxResources.get("actualSize"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled",
+"disabled");mxUtils.setOpacity(F,20);var D=document.createElement("div");D.style.position="absolute";D.style.textAlign="right";D.style.color="gray";D.style.marginTop="10px";D.style.backgroundColor="transparent";D.style.top="440px";D.style.right="32px";D.style.maxWidth="380px";D.style.cursor="default";var C=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var b=mxUtils.getXml(x.documentElement),e=a.getBaseFilename()+".drawio";a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml"):(b=
+"undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(Graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml"+b)).simulate(document,"_blank"))}});C.className="geBtn";C.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){null!=c?c(y):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(y);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 H=document.createElement("select");H.setAttribute("disabled","disabled");H.style.maxWidth="80px";H.style.position="relative";H.style.top="-2px";H.style.verticalAlign="bottom";H.style.marginRight="6px";H.style.display="none";var J=null;mxEvent.addListener(H,"change",function(a){null!=
+J&&(J(a),mxEvent.consume(a))});var I=mxUtils.button(mxResources.get("edit"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),a.openLink(a.getUrl(),null,!0))});I.className="geBtn";I.setAttribute("disabled","disabled");null!=c&&(I.style.display="none");var E=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl(H.selectedIndex))});E.className="geBtn gePrimaryBtn";E.setAttribute("disabled",
 "disabled");null!=c&&(E.style.display="none",G.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var K=document.createElement("div");K.className="geToolbarContainer";K.style.backgroundColor="transparent";K.style.padding="2px";K.style.border="none";K.style.left="199px";K.style.top="442px";var O=null;if(null!=d&&0<d.length){k.style.cursor="move";var Q=document.createElement("table");Q.style.border=
 "1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";var Y=document.createElement("tbody"),U=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var L=d.length-1;0<=L;L--){var V=function(b){var c=new Date(b.modifiedDate),m=null;if(0<=c.getTime()){var f=function(d){p.stop();var f=mxUtils.parseXml(d),g=a.editor.extractGraphModel(f.documentElement,!0);if(null!=g){var v=function(a){null!=a&&(a=
-t(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},t=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};H.style.display="none";H.innerHTML="";y=f;x=d;q=parseSelectFunction=null;e=0;if("mxfile"==g.nodeName){f=g.getElementsByTagName("diagram");q=[];for(d=0;d<f.length;d++)q.push(f[d]);e=Math.min(n,
+t(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},t=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";k.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center();return a};H.style.display="none";H.innerHTML="";x=f;y=d;q=parseSelectFunction=null;e=0;if("mxfile"==g.nodeName){f=g.getElementsByTagName("diagram");q=[];for(d=0;d<f.length;d++)q.push(f[d]);e=Math.min(n,
 q.length-1);0<q.length&&v(q[e]);if(1<q.length)for(H.removeAttribute("disabled"),H.style.display="",d=0;d<q.length;d++)f=document.createElement("option"),mxUtils.write(f,q[d].getAttribute("name")||mxResources.get("pageWithNumber",[d+1])),f.setAttribute("value",d),d==e&&f.setAttribute("selected","selected"),H.appendChild(f);J=function(){try{var b=parseInt(H.value);e=n=b;v(q[b])}catch(M){H.value=n,a.handleError(M)}}}else t(g);d=b.lastModifyingUserName;null!=d&&20<d.length&&(d=d.substring(0,20)+"...");
 D.innerHTML="";mxUtils.write(D,(null!=d?d+" ":"")+c.toLocaleDateString()+" "+c.toLocaleTimeString());D.setAttribute("title",m.getAttribute("title"));B.removeAttribute("disabled");A.removeAttribute("disabled");z.removeAttribute("disabled");F.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),C.removeAttribute("disabled"),E.removeAttribute("disabled"),I.removeAttribute("disabled"));mxUtils.setOpacity(B,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(z,
 60);mxUtils.setOpacity(F,60)}else H.style.display="none",H.innerHTML="",D.innerHTML="",mxUtils.write(D,mxResources.get("errorLoadingFile"))},m=document.createElement("tr");m.style.borderBottom="1px solid lightGray";m.style.fontSize="12px";m.style.cursor="pointer";var g=document.createElement("td");g.style.padding="6px";g.style.whiteSpace="nowrap";b==d[d.length-1]?mxUtils.write(g,mxResources.get("current")):c.toDateString()===U?mxUtils.write(g,c.toLocaleTimeString()):mxUtils.write(g,c.toLocaleDateString()+
-" "+c.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){v!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),v=b,t=m,t.style.backgroundColor="#ebf2f9",x=y=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
+" "+c.toLocaleTimeString());m.appendChild(g);m.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString()+(null!=b.fileSize?" "+a.formatFileSize(parseInt(b.fileSize)):"")+(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(m,"click",function(a){v!=b&&(p.stop(),null!=t&&(t.style.backgroundColor=""),v=b,t=m,t.style.backgroundColor="#ebf2f9",y=x=null,D.removeAttribute("title"),D.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),k.style.backgroundColor=
 "#ffffff",l.getModel().clear(),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),mxUtils.setOpacity(B,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(F,20),p.spin(k),b.getXml(function(a){if(v==
 b)try{f(a)}catch(ca){D.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ca.message)}},function(a){p.stop();H.style.display="none";H.innerHTML="";D.innerHTML="";mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(m,"dblclick",function(a){E.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);Y.appendChild(m)}return m}(d[L]);null!=V&&L==d.length-1&&(O=V)}Q.appendChild(Y);
 f.appendChild(Q)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",K.style.display="none",mxUtils.write(f,mxResources.get("noRevisions")));this.init=function(){null!=O&&O.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";K.appendChild(H);K.appendChild(B);K.appendChild(A);
 K.appendChild(F);K.appendChild(z);a.editor.cancelFirst?(g.appendChild(f),g.appendChild(C),g.appendChild(I),g.appendChild(G),g.appendChild(E)):(g.appendChild(C),g.appendChild(I),g.appendChild(G),g.appendChild(E),g.appendChild(f));b.appendChild(g);b.appendChild(K);b.appendChild(D);this.container=b},DraftDialog=function(a,d,c,b,g,f,k,l,n){var q=document.createElement("div"),e=document.createElement("div");e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.lineHeight=
 "normal";mxUtils.write(e,d);q.appendChild(e);var m=document.createElement("select"),p=mxUtils.bind(this,function(){B=mxUtils.parseXml(n[m.value].data);A=a.editor.extractGraphModel(B.documentElement,!0);z=0;this.init()});if(null!=n){m.style.marginLeft="4px";for(d=0;d<n.length;d++){var u=document.createElement("option");u.setAttribute("value",d);var t=new Date(n[d].created),v=new Date(n[d].modified);mxUtils.write(u,t.toLocaleDateString()+" "+t.toLocaleTimeString()+" - "+(t.toDateString(),v.toDateString(),
-v.toLocaleDateString())+" "+v.toLocaleTimeString());m.appendChild(u)}e.appendChild(m);mxEvent.addListener(m,"change",p)}null==c&&(c=n[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";y.style.marginTop="10px";y.style.width="640px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);q.appendChild(y);var x=new Graph(y);x.setEnabled(!1);x.setPanning(!0);x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=
-!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var B=mxUtils.parseXml(c),A=a.editor.extractGraphModel(B.documentElement,!0),z=0,F=null,D=x.getGlobalVariable;x.getGlobalVariable=function(a){return"page"==a&&null!=F&&null!=F[z]?F[z].getAttribute("name"):"pagenumber"==a?z+1:"pagecount"==a?null!=F?F.length:1:D.apply(this,arguments)};x.getLinkForCell=function(){return null};c=mxUtils.button("",function(){x.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));
-c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);e=mxUtils.button("",function(){x.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);d=mxUtils.button("",function(){x.maxFitScale=8;x.fit(8);x.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border=
-"none";d.style.margin="2px";mxUtils.setOpacity(d,60);u=mxUtils.button("",function(){x.zoomActual();x.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);k=mxUtils.button(k||mxResources.get("discard"),function(){g.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),
+v.toLocaleDateString())+" "+v.toLocaleTimeString());m.appendChild(u)}e.appendChild(m);mxEvent.addListener(m,"change",p)}null==c&&(c=n[0].data);var x=document.createElement("div");x.style.position="absolute";x.style.border="1px solid lightGray";x.style.marginTop="10px";x.style.width="640px";x.style.top="46px";x.style.bottom="74px";x.style.overflow="hidden";mxEvent.disableContextMenu(x);q.appendChild(x);var y=new Graph(x);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=
+!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=mxUtils.parseXml(c),A=a.editor.extractGraphModel(B.documentElement,!0),z=0,F=null,D=y.getGlobalVariable;y.getGlobalVariable=function(a){return"page"==a&&null!=F&&null!=F[z]?F[z].getAttribute("name"):"pagenumber"==a?z+1:"pagecount"==a?null!=F?F.length:1:D.apply(this,arguments)};y.getLinkForCell=function(){return null};c=mxUtils.button("",function(){y.zoomIn()});c.className="geSprite geSprite-zoomin";c.setAttribute("title",mxResources.get("zoomIn"));
+c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);e=mxUtils.button("",function(){y.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);d=mxUtils.button("",function(){y.maxFitScale=8;y.fit(8);y.center()});d.className="geSprite geSprite-fit";d.setAttribute("title",mxResources.get("fit"));d.style.outline="none";d.style.border=
+"none";d.style.margin="2px";mxUtils.setOpacity(d,60);u=mxUtils.button("",function(){y.zoomActual();y.center()});u.className="geSprite geSprite-actualsize";u.setAttribute("title",mxResources.get("actualSize"));u.style.outline="none";u.style.border="none";u.style.margin="2px";mxUtils.setOpacity(u,60);k=mxUtils.button(k||mxResources.get("discard"),function(){g.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),
 0<m.options.length?(m.value=m.options[0].value,p()):a.hideDialog(!0))})])});k.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";f=mxUtils.button(f||mxResources.get("edit"),function(){b.apply(this,[m.value])});f.className="geBtn gePrimaryBtn";t=document.createElement("div");t.style.position="absolute";t.style.bottom="30px";t.style.width="640px";
-t.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="dark"==uiTheme?"transparent":"#ffffff";y.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}}function b(b){null!=
+t.style.textAlign="right";v=document.createElement("div");v.className="geToolbarContainer";v.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="dark"==uiTheme?"transparent":"#ffffff";x.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,y.getModel());y.maxFitScale=1;y.fit(8);y.center()}}function b(b){null!=
 b&&(b=a(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(C,"change",function(a){z=parseInt(C.value);b(F[z]);mxEvent.consume(a)});if("mxfile"==A.nodeName){var e=A.getElementsByTagName("diagram");F=[];for(var c=0;c<e.length;c++)F.push(e[c]);0<F.length&&b(F[z]);C.innerHTML="";if(1<F.length)for(C.style.display="",c=0;c<F.length;c++)e=document.createElement("option"),mxUtils.write(e,F[c].getAttribute("name")||mxResources.get("pageWithNumber",
 [c+1])),e.setAttribute("value",c),c==z&&e.setAttribute("selected","selected"),C.appendChild(e);else C.style.display="none"}else a(A)};v.appendChild(C);v.appendChild(c);v.appendChild(e);v.appendChild(u);v.appendChild(d);c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});c.className="geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(t.appendChild(c),null!=l&&t.appendChild(l),t.appendChild(k),t.appendChild(f)):
 (t.appendChild(f),t.appendChild(k),null!=l&&t.appendChild(l),t.appendChild(c));q.appendChild(t);q.appendChild(v);this.container=q},FindWindow=function(a,d,c,b,g){function f(a,b,e){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var c=0;c<b.length;c++)if("label"!=b[c].nodeName){var d=mxUtils.trim(b[c].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&d.substring(0,e.length)===e||null!=a&&a.test(d))return!0}}return!1}function k(b){var c=n.model.getDescendants(n.model.getRoot()),
 d=u.value.toLowerCase(),p=t.checked?new RegExp(d):null,g=null;q!=d&&(q=d,e=null,m=!1);var v=null==e;if(0<d.length){if(m){m=!1;for(var A,l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){A=l;break}b=(A+1)%a.pages.length;e=null;do m=!1,c=a.pages[b],n=a.createTemporaryGraph(n.getStylesheet()),a.updatePageRoot(c),n.model.setRoot(c.root),b=(b+1)%a.pages.length;while(!k(!0)&&b!=A);e&&(e=null,a.selectPage(c));m=!1;n=a.editor.graph;return k(!0)}for(l=0;l<c.length;l++){A=n.view.getState(c[l]);if(null!=
-A&&null!=A.cell.value&&(v||null==g)&&(n.model.isVertex(A.cell)||n.model.isEdge(A.cell))&&(n.isHtmlLabel(A.cell)?(x.innerHTML=n.getLabel(A.cell),label=mxUtils.extractTextWithWhitespace([x])):label=n.getLabel(A.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==p&&(label.substring(0,d.length)===d||f(p,A.cell,d))||null!=p&&(p.test(label)||f(p,A.cell,d))))if(v){g=A;break}else null==g&&(g=A);v=v||A==e}}if(null!=g){if(l==c.length&&y.checked)return e=null,m=!0,k(!0);
-e=g;n.scrollCellToVisible(e.cell);n.isEnabled()?n.setSelectionCell(e.cell):n.highlightCell(e.cell)}else{if(!b&&y.checked)return m=!0,k(!0);n.isEnabled()&&n.clearSelection()}return 0==d.length||null!=g}var l=a.actions.get("find"),n=a.editor.graph,q=null,e=null,m=!1,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.style.height="100%";var u=document.createElement("input");u.setAttribute("placeholder",mxResources.get("find"));u.setAttribute("type",
+A&&null!=A.cell.value&&(v||null==g)&&(n.model.isVertex(A.cell)||n.model.isEdge(A.cell))&&(n.isHtmlLabel(A.cell)?(y.innerHTML=n.getLabel(A.cell),label=mxUtils.extractTextWithWhitespace([y])):label=n.getLabel(A.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==p&&(label.substring(0,d.length)===d||f(p,A.cell,d))||null!=p&&(p.test(label)||f(p,A.cell,d))))if(v){g=A;break}else null==g&&(g=A);v=v||A==e}}if(null!=g){if(l==c.length&&x.checked)return e=null,m=!0,k(!0);
+e=g;n.scrollCellToVisible(e.cell);n.isEnabled()?n.setSelectionCell(e.cell):n.highlightCell(e.cell)}else{if(!b&&x.checked)return m=!0,k(!0);n.isEnabled()&&n.clearSelection()}return 0==d.length||null!=g}var l=a.actions.get("find"),n=a.editor.graph,q=null,e=null,m=!1,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.padding="10px";p.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";p.appendChild(u);mxUtils.br(p);var t=document.createElement("input");t.setAttribute("id","geFindWinRegExChck");t.setAttribute("type","checkbox");t.style.marginRight="4px";p.appendChild(t);var v=document.createElement("label");v.setAttribute("for","geFindWinRegExChck");p.appendChild(v);mxUtils.write(v,mxResources.get("regularExpression"));p.appendChild(v);
-v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";p.appendChild(v);mxUtils.br(p);var y=document.createElement("input");y.setAttribute("id","geFindWinAllPagesChck");y.setAttribute("type","checkbox");y.style.marginRight="4px";p.appendChild(y);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");p.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));p.appendChild(v);
-var x=document.createElement("div");mxUtils.br(p);v=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";q=e=null;m=!1;u.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";p.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=k()?"":"#ffcfcf"}catch(A){a.handleError(A)}});v.setAttribute("title",mxResources.get("find")+
+v=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000088250");v.style.position="relative";v.style.marginLeft="6px";v.style.top="-1px";p.appendChild(v);mxUtils.br(p);var x=document.createElement("input");x.setAttribute("id","geFindWinAllPagesChck");x.setAttribute("type","checkbox");x.style.marginRight="4px";p.appendChild(x);v=document.createElement("label");v.setAttribute("for","geFindWinAllPagesChck");p.appendChild(v);mxUtils.write(v,mxResources.get("allPages"));p.appendChild(v);
+var y=document.createElement("div");mxUtils.br(p);v=mxUtils.button(mxResources.get("reset"),function(){u.value="";u.style.backgroundColor="";q=e=null;m=!1;u.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.marginLeft=(b-20-156)/2+"px";v.className="geBtn";p.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{u.style.backgroundColor=k()?"":"#ffcfcf"}catch(A){a.handleError(A)}});v.setAttribute("title",mxResources.get("find")+
 " (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";p.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(q!=u.value.toLowerCase()||13==a.keyCode)try{u.style.backgroundColor=k()?"":"#ffcfcf"}catch(z){u.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(p,"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"),p,d,c,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.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?y.removeAttribute("disabled"):(y.checked=!1,y.setAttribute("disabled",
+new mxWindow(mxResources.get("find"),p,d,c,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.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null),null!=a.pages&&1<a.pages.length?x.removeAttribute("disabled"):(x.checked=!1,x.setAttribute("disabled",
 "disabled"))):n.container.focus()}));this.window.setLocation=function(a,b){var e=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,e-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var B=mxUtils.bind(this,function(){var a=this.window.getX(),
 b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",B);this.destroy=function(){mxEvent.removeListener(window,"resize",B);this.window.destroy()}},FreehandWindow=function(a,d,c,b,g){var f=a.editor.graph;a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.height="100%";var k=mxUtils.button(mxResources.get("startDrawing"),function(){f.freehand.isDrawing()&&f.freehand.stopDrawing();f.freehand.startDrawing()});k.setAttribute("title",
 mxResources.get("startDrawing"));k.style.marginTop="8px";k.style.marginRight="4px";k.style.width="160px";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";a.appendChild(k);var l=k.cloneNode(!1);mxUtils.write(l,mxResources.get("stopDrawing"));l.setAttribute("title",mxResources.get("stopDrawing"));l.style.marginTop="4px";mxEvent.addListener(l,"click",function(){f.freehand.stopDrawing()});a.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),
@@ -8781,9 +8783,9 @@ b.title+" ("+b.id+")");var g=document.createElement("input");g.setAttribute("typ
 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");m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";mxClient.IS_QUIRKS&&(m.style.width=parseInt(f.style.width)-202+"px",m.style.height=e.style.height,
 m.style.marginTop=e.style.marginTop);var p=null,u=[],t=document.createElement("div");t.style.position="relative";t.style.left="0px";t.style.right="0px";n(c);b.style.padding="30px";b.appendChild(f);b.appendChild(e);b.appendChild(m);c=document.createElement("div");c.className="geDialogFooter";c.style.position="absolute";c.style.paddingRight="16px";c.style.color="gray";c.style.left="0px";c.style.right="0px";c.style.bottom="0px";c.style.height="60px";c.style.lineHeight="52px";mxClient.IS_QUIRKS&&(c.style.width=
 f.style.width,c.style.paddingTop="12px");var v=document.createElement("input");v.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)f=document.createElement("span"),f.style.paddingRight="20px",f.appendChild(v),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),v.checked=!0,v.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){mxEvent.getSource(a)!=v&&(v.checked=!v.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(f.style.position="relative",f.style.top="-6px"),
-c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var y=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");y.style.width=
-"100%";d=document.createElement("td");var g=document.createElement("td"),k=document.createElement("td"),x=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";y.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var m=document.createElement("span");mxUtils.write(m,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?
-c:null}});n.appendChild(d);n.appendChild(g);n.appendChild(k);f.appendChild(n);y.appendChild(f);for(var u=[],B=0,f=0;f<c.length;f++)for(n=0;n<c[f].entries.length;n++)B++;for(var A=[d,g,k],z=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(x(A[Math.floor(z/(B/3))],e.title,e.id));z++}})(c[f]);b.appendChild(y);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type",
+c.appendChild(f);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),v.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table"),f=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";n=document.createElement("tr");x.style.width=
+"100%";d=document.createElement("td");var g=document.createElement("td"),k=document.createElement("td"),y=mxUtils.bind(this,function(b,e,c){var d=document.createElement("input");d.type="checkbox";x.appendChild(d);d.checked=a.sidebar.isEntryVisible(c);var m=document.createElement("span");mxUtils.write(m,e);e=document.createElement("div");e.style.display="block";e.appendChild(d);e.appendChild(m);mxEvent.addListener(m,"click",function(a){d.checked=!d.checked;mxEvent.consume(a)});b.appendChild(e);return function(){return d.checked?
+c:null}});n.appendChild(d);n.appendChild(g);n.appendChild(k);f.appendChild(n);x.appendChild(f);for(var u=[],B=0,f=0;f<c.length;f++)for(n=0;n<c[f].entries.length;n++)B++;for(var A=[d,g,k],z=0,f=0;f<c.length;f++)(function(a){for(var b=0;b<a.entries.length;b++){var e=a.entries[b];u.push(y(A[Math.floor(z/(B/3))],e.title,e.id));z++}})(c[f]);b.appendChild(x);c=document.createElement("div");c.style.marginTop="18px";c.style.textAlign="center";v=document.createElement("input");isLocalStorage&&(v.setAttribute("type",
 "checkbox"),v.checked=!0,v.defaultChecked=!0,c.appendChild(v),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberThisSetting")),c.appendChild(f),mxEvent.addListener(f,"click",function(a){v.checked=!v.checked;mxEvent.consume(a)}));b.appendChild(c);f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],e=0;e<u.length;e++){var c=u[e].apply(this,arguments);null!=c&&
 b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",v.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="right"}a.editor.cancelFirst?(c.appendChild(f),c.appendChild(n)):(c.appendChild(n),c.appendChild(f));b.appendChild(c);this.container=b},PluginsDialog=function(a){function d(){if(0==g.length)b.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{b.innerHTML="";for(var e=0;e<g.length;e++){var c=
 document.createElement("span");c.style.whiteSpace="nowrap";var p=document.createElement("span");p.className="geSprite geSprite-delete";p.style.position="relative";p.style.cursor="pointer";p.style.top="5px";p.style.marginRight="4px";p.style.display="inline-block";c.appendChild(p);mxUtils.write(c,g[e]);b.appendChild(c);mxUtils.br(b);mxEvent.addListener(p,"click",function(b){return function(){a.confirm(mxResources.get("delete")+' "'+g[b]+'"?',function(){g.splice(b,1);d()})}}(e))}}}var c=document.createElement("div"),
@@ -8798,25 +8800,25 @@ document.createElement("tr"),n=document.createElement("td"),q=document.createEle
 mxUtils.write(n,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=b?b.x:"";q.appendChild(m);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=b?b.y:"";q.appendChild(p);l.appendChild(n);
 l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dx")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=b&&null!=b.offset?b.offset.x:"";q.appendChild(u);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("dy")+
 ":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b&&null!=b.offset?b.offset.y:"";q.appendChild(t);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.width:"";q.appendChild(v);l.appendChild(n);l.appendChild(q);
-k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=b?b.height:"";q.appendChild(y);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var x=document.createElement("input");
-x.setAttribute("type","text");x.style.width="100px";x.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";q.appendChild(x);l.appendChild(n);l.appendChild(q);k.appendChild(l);f.appendChild(k);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var f=c.getCellGeometry(d[b]);null!=
-f&&(f=f.clone(),c.isCellMovable(d[b])&&(f.relative=e.checked,0<mxUtils.trim(m.value).length&&(f.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(f.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(t.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(t.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(v.value).length&&(f.width=Number(v.value)),0<mxUtils.trim(y.value).length&&(f.height=Number(y.value))),
-c.getModel().setGeometry(d[b],f));0<mxUtils.trim(x.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[d[b]])}}finally{c.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&B.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(B)):(f.appendChild(B),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,
-d,c,b,g,f){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var e=u.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function l(b,c,d,m,f,p,g,n,x){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var C=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=K.title&&0<K.title.length?K.title:
+k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("height")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=b?b.height:"";q.appendChild(x);l.appendChild(n);l.appendChild(q);k.appendChild(l);l=document.createElement("tr");n=document.createElement("td");q=document.createElement("td");mxUtils.write(n,mxResources.get("rotation")+":");var y=document.createElement("input");
+y.setAttribute("type","text");y.style.width="100px";y.value=1==d.length?mxUtils.getValue(c.getCellStyle(d[0]),mxConstants.STYLE_ROTATION,0):"";q.appendChild(y);l.appendChild(n);l.appendChild(q);k.appendChild(l);f.appendChild(k);g.appendChild(f);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var B=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var f=c.getCellGeometry(d[b]);null!=
+f&&(f=f.clone(),c.isCellMovable(d[b])&&(f.relative=e.checked,0<mxUtils.trim(m.value).length&&(f.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(f.y=Number(p.value)),0<mxUtils.trim(u.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.x=Number(u.value)),0<mxUtils.trim(t.value).length&&(null==f.offset&&(f.offset=new mxPoint),f.offset.y=Number(t.value))),c.isCellResizable(d[b])&&(0<mxUtils.trim(v.value).length&&(f.width=Number(v.value)),0<mxUtils.trim(x.value).length&&(f.height=Number(x.value))),
+c.getModel().setGeometry(d[b],f));0<mxUtils.trim(y.value).length&&c.setCellStyles(mxConstants.STYLE_ROTATION,Number(y.value),[d[b]])}}finally{c.getModel().endUpdate()}});B.className="geBtn gePrimaryBtn";mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&B.click()});f=document.createElement("div");f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(b),f.appendChild(B)):(f.appendChild(B),f.appendChild(b));g.appendChild(f);this.container=g},LibraryDialog=function(a,
+d,c,b,g,f){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var e=u.firstChild,b=0;null!=e&&e!=a;)e=e.nextSibling,b++;return b}function l(b,c,d,m,f,p,g,n,y){try{if(a.spinner.stop(),null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==v[b]){var C=function(){I.innerHTML="";I.style.cursor="pointer";I.style.whiteSpace="nowrap";I.style.textOverflow="ellipsis";mxUtils.write(I,null!=K.title&&0<K.title.length?K.title:
 mxResources.get("untitled"));I.style.color=null==K.title||0==K.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var G=f,D=p;if(f>a.maxImageSize||p>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,p));f*=F;p*=F}G>D?(D=Math.round(100*D/G),G=100):(G=Math.round(100*G/D),D=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";
 E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var J=document.createElement("img");J.setAttribute("src",A.convert(b));J.style.width=G+"px";J.style.height=D+"px";J.style.margin="10px";J.style.paddingBottom=Math.floor((100-D)/2)+"px";J.style.paddingLeft=Math.floor((100-G)/2)+"px";E.appendChild(J)}else if(null!=g){var q=a.stringToCells(Graph.decompress(g.xml));0<q.length&&(a.sidebar.createThumb(q,100,100,E,null,!0,!1),E.firstChild.style.display=
 mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var H=document.createElement("img");H.setAttribute("src",Editor.closeImage);H.setAttribute("border","0");H.setAttribute("title",mxResources.get("delete"));H.setAttribute("align","top");H.style.paddingTop="4px";H.style.position="absolute";H.style.marginLeft="-12px";H.style.zIndex="1";H.style.cursor="pointer";mxEvent.addListener(H,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(H,"click",function(d){v[b]=
 null;for(var m=0;m<e.length;m++)if(null!=e[m].data&&e[m].data==b||null!=e[m].xml&&null!=c&&e[m].xml==c.xml){e.splice(m,1);break}E.parentNode.removeChild(a);0==e.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(d)});mxEvent.addListener(H,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(H);E.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 K=null;null!=b?(K={data:b,w:f,h:p,title:x},null!=n&&(K.aspect=n),v[b]=J,e.push(K)):null!=g&&(g.aspect="fixed",e.push(g),K=g);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(a))});C();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});q=function(b){if(mxClient.IS_IOS||
+"-18px";I.style.left="10px";I.style.right="10px";I.style.backgroundColor="#ffffff";I.style.overflow="hidden";I.style.textAlign="center";var K=null;null!=b?(K={data:b,w:f,h:p,title:y},null!=n&&(K.aspect=n),v[b]=J,e.push(K)):null!=g&&(g.aspect="fixed",e.push(g),K=g);mxEvent.addListener(I,"keydown",function(a){13==a.keyCode&&null!=B&&(B(),B=null,mxEvent.consume(a))});C();E.appendChild(I);mxEvent.addListener(I,"mousedown",function(a){"true"!=I.getAttribute("contentEditable")&&mxEvent.consume(a)});q=function(b){if(mxClient.IS_IOS||
 mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,K.title||"",mxResources.get("ok"),function(a){null!=a&&(K.title=a,C())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=I.getAttribute("contentEditable")){null!=B&&(B(),B=null);if(null==K.title||0==K.title.length)I.innerHTML="";I.style.textOverflow="";I.style.whiteSpace="";I.style.cursor="text";I.style.color="";I.setAttribute("contentEditable",
 "true");mxUtils.setPrefixedStyle(I.style,"user-select","text");I.focus();document.execCommand("selectAll",!1,null);B=function(){I.removeAttribute("contentEditable");I.style.cursor="pointer";K.title=I.innerHTML;C()};mxEvent.consume(b)}};mxEvent.addListener(I,"click",q);mxEvent.addListener(E,"dblclick",q);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=g&&(H.style.visibility="hidden",I.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",
-g.xml);y=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");y=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=
+g.xml);x=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);H.style.visibility="";I.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==H.style.visibility&&(H.style.visibility="",I.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else z||(z=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=
 !1;try{if(G=mxUtils.parseXml(b),"mxlibrary"==G.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=D&&0<D.length)for(var O=0;O<D.length;O++)null!=D[O].xml?l(null,null,0,0,0,0,D[O]):l(D[O].data,null,0,0,D[O].w,D[O].h,null,"fixed",D[O].title);f=!0}else if("mxfile"==G.documentElement.nodeName){for(var Q=G.documentElement.getElementsByTagName("diagram"),O=0;O<Q.length;O++){var D=mxUtils.getTextContent(Q[O]),q=a.stringToCells(Graph.decompress(D)),Z=a.editor.graph.getBoundingBoxFromGeometry(q);
-l(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(da){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function n(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}function q(b){b.stopPropagation();b.preventDefault();z=!1;x=k(b);if(null!=y)null!=x&&x<u.children.length?(e.splice(x>y?x-1:x,0,e.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[x])):(e.push(e.splice(y,1)[0]),u.appendChild(u.children[y]));
+l(null,null,0,0,0,0,{xml:D,w:Z.width,h:Z.height})}f=!0}}catch(da){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function n(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function q(b){b.stopPropagation();b.preventDefault();z=!1;y=k(b);if(null!=x)null!=y&&y<u.children.length?(e.splice(y>x?y-1:y,0,e.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(e.push(e.splice(x,1)[0]),u.appendChild(u.children[x]));
 else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,F(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){l(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var e=[];c=document.createElement("div");
 c.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";c.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",d);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==g||g.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||
 5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==e.length&&Graph.fileSupport&&(u.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"));c.appendChild(t);var v={},y=null,x=null,B=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",
+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"));c.appendChild(t);var v={},x=null,y=null,B=null;d=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=B&&(B(),B=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",
 d);var A=new mxUrlConverter,z=!1;if(null!=b)for(d=0;d<b.length;d++)m=b[d],l(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(u,"dragleave",function(a){t.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==t){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var F=function(b){return function(e,c,d,m,f,p,g,v,k){null!=k&&(/(\.vsdx)($|\?)/i.test(k.name)||/(\.vssx)($|\?)/i.test(k.name))?a.importVisio(k,mxUtils.bind(this,function(a){l(a,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?
 null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," "))})):null!=k&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,k.name)?a.parseFile(k,mxUtils.bind(this,function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(l(e.responseText,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(e,c,d,m,f,p,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g,
 " ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",n);mxEvent.addListener(u,"drop",q);mxEvent.addListener(t,"dragover",n);mxEvent.addListener(t,"drop",q);c.appendChild(u);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);m=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(e),
@@ -8839,23 +8841,23 @@ TemplatesDialog.prototype.init=function(a,d,c,b,g,f,k,l,n,q){function e(){null!=
 m+".svg";return!0}function p(a){function b(a){W.removeChild(c);F.removeChild(e);W.scrollTop=m}a=a.prevImgUrl||a.imgUrl||TEMPLATE_PATH+"/"+a.url.substring(0,a.url.length-4)+".png";var e=document.createElement("div");e.className="geTempDlgDialogMask";F.appendChild(e);var c=document.createElement("div");c.className="geTempDlgDiagramPreviewBox";var d=document.createElement("img");d.src=a;c.appendChild(d);a=document.createElement("img");a.src="/images/close.png";a.className="geTempDlgPreviewCloseBtn";
 a.setAttribute("title",mxResources.get("close"));c.appendChild(a);var m=W.scrollTop;mxEvent.addListener(a,"click",b);mxEvent.addListener(e,"click",b);W.appendChild(c);W.scrollTop=0;c.style.lineHeight=c.clientHeight+"px"}function u(a,b,e){if(null!=H){for(var c=H.className.split(" "),d=0;d<c.length;d++)if(-1<c[d].indexOf("Active")){c.splice(d,1);break}H.className=c.join(" ")}null!=a?(H=a,H.className+=" "+b,J=e,X.className="geTempDlgCreateBtn"):(J=H=null,X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled")}
 function t(b){if(null!=J){var e=J;J=null;X.className="geTempDlgCreateBtn geTempDlgCreateBtnDisabled geTempDlgCreateBtnBusy";e.isExternal?(1==b?q(e.url,e,"nameInput.value"):n(e.url,e,"nameInput.value"),a.hideDialog(!0)):mxUtils.get(TEMPLATE_PATH+"/"+e.url,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(d(b.getText(),"nameInput.value"),a.hideDialog(!0))}))}}function v(a){a=a?"":"none";for(var b=F.querySelectorAll(".geTempDlgLinkToDiagram"),e=0;e<b.length;e++)b[e].style.display=
-a}function y(a,b,e){function c(){X.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!b)}U.innerHTML="";u();O=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=
+a}function x(a,b,e){function c(){X.innerHTML=b?mxUtils.htmlEntities(mxResources.get("create")):mxUtils.htmlEntities(mxResources.get("copy"));v(!b)}U.innerHTML="";u();O=a;var d=null;if(e){d=document.createElement("table");d.className="geTempDlgDiagramsListGrid";var m=document.createElement("tr"),f=document.createElement("th");f.style.width="50%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram",null,"Diagram"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=
 mxUtils.htmlEntities(mxResources.get("changedBy",null,"Changed By"));m.appendChild(f);f=document.createElement("th");f.style.width="25%";f.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn",null,"Last modified on"));m.appendChild(f);d.appendChild(m);U.appendChild(d)}for(m=0;m<a.length;m++){a[m].isExternal=!b;var g=a[m].url,f=mxUtils.htmlEntities(a[m].title),k=a[m].tooltip||a[m].title,C=a[m].imgUrl,z=mxUtils.htmlEntities(a[m].changedBy||""),A=mxUtils.htmlEntities(a[m].lastModifiedOn||
 "");C||(C=TEMPLATE_PATH+"/"+g.substring(0,g.length-4)+".png");g=e?50:15;null!=f&&f.length>g&&(f=f.substring(0,g)+"&hellip;");if(e){var l=document.createElement("tr"),C=document.createElement("td"),n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramListPreviewBtn";n.setAttribute("title",mxResources.get("preview"));C.appendChild(n);k=document.createElement("span");k.className="geTempDlgDiagramTitle";k.innerHTML=f;C.appendChild(k);l.appendChild(C);C=document.createElement("td");
-C.innerHTML=z;l.appendChild(C);C=document.createElement("td");C.innerHTML=A;l.appendChild(C);d.appendChild(l);null==H&&(c(),u(l,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(l,"click",function(){H!=b&&(c(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",t);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],l)}else{var y=document.createElement("div");y.className="geTempDlgDiagramTile";y.setAttribute("title",k);null==H&&(c(),u(y,"geTempDlgDiagramTileActive",
-a[m]));z=document.createElement("div");z.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var x=document.createElement("img");x.style.display="none";(function(a,b){x.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};x.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(x,z);x.src=C;z.appendChild(x);y.appendChild(z);z=document.createElement("div");z.className="geTempDlgDiagramTileLbl";z.innerHTML=null!=f?f:"";y.appendChild(z);
-n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));y.appendChild(n);(function(a,b){mxEvent.addListener(y,"click",function(){H!=b&&(c(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(y,"dblclick",t);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],y);U.appendChild(y)}}}function x(a,b){ba.innerHTML="";u();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory=
+C.innerHTML=z;l.appendChild(C);C=document.createElement("td");C.innerHTML=A;l.appendChild(C);d.appendChild(l);null==H&&(c(),u(l,"geTempDlgDiagramsListGridActive",a[m]));(function(a,b){mxEvent.addListener(l,"click",function(){H!=b&&(c(),u(b,"geTempDlgDiagramsListGridActive",a))});mxEvent.addListener(l,"dblclick",t);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],l)}else{var x=document.createElement("div");x.className="geTempDlgDiagramTile";x.setAttribute("title",k);null==H&&(c(),u(x,"geTempDlgDiagramTileActive",
+a[m]));z=document.createElement("div");z.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var y=document.createElement("img");y.style.display="none";(function(a,b){y.onload=function(){b.className="geTempDlgDiagramTileImg";a.style.display=""};y.onerror=function(){b.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(y,z);y.src=C;z.appendChild(y);x.appendChild(z);z=document.createElement("div");z.className="geTempDlgDiagramTileLbl";z.innerHTML=null!=f?f:"";x.appendChild(z);
+n=document.createElement("img");n.src="/images/icon-search.svg";n.className="geTempDlgDiagramPreviewBtn";n.setAttribute("title",mxResources.get("preview"));x.appendChild(n);(function(a,b){mxEvent.addListener(x,"click",function(){H!=b&&(c(),u(b,"geTempDlgDiagramTileActive",a))});mxEvent.addListener(x,"dblclick",t);mxEvent.addListener(n,"click",function(){p(a)})})(a[m],x);U.appendChild(x)}}}function y(a,b){ba.innerHTML="";u();for(var e=!b&&5<a.length?5:a.length,c=0;c<e;c++){var d=a[c];d.isCategory=
 !0;var m=document.createElement("div"),f=mxResources.get(d.title);null==f&&(f=d.title.substring(0,1).toUpperCase()+d.title.substring(1));m.className="geTempDlgNewDiagramCatItem";m.setAttribute("title",f);f=mxUtils.htmlEntities(f);15<f.length&&(f=f.substring(0,15)+"&hellip;");null==H&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(m,"geTempDlgNewDiagramCatItemActive",d));var p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemImg";var g=document.createElement("img");
 g.src=NEW_DIAGRAM_CATS_PATH+"/"+d.img;p.appendChild(g);m.appendChild(p);p=document.createElement("div");p.className="geTempDlgNewDiagramCatItemLbl";p.innerHTML=f;m.appendChild(p);ba.appendChild(m);(function(a,b){mxEvent.addListener(m,"click",function(){H!=b&&(X.innerHTML=mxUtils.htmlEntities(mxResources.get("create")),v(),u(b,"geTempDlgNewDiagramCatItemActive",a))});mxEvent.addListener(m,"dblclick",t)})(d,m)}Y.style.display=5>a.length?"none":""}function B(a){var b=F.querySelector(".geTemplatesList"),
 e;for(e in a){var c=document.createElement("div"),d=mxResources.get(e),m=a[e];null==d&&(d=e.substring(0,1).toUpperCase()+e.substring(1));c.className="geTemplateCatLink";c.setAttribute("title",d+" ("+m.length+")");d=mxUtils.htmlEntities(d);15<d.length&&(d=d.substring(0,15)+"&hellip;");c.innerHTML=d+" ("+m.length+")";b.appendChild(c);(function(b,e,d){mxEvent.addListener(c,"click",function(){G!=d&&(null!=G?(G.style.fontWeight="normal",G.style.textDecoration="none"):(fa.style.display="none",ga.style.minHeight=
-"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",W.scrollTop=0,D&&(C=!0),L.innerHTML=e,V.style.display="none",y(a[b],!0))})})(e,d,c)}}function A(a){k&&(W.scrollTop=0,U.innerHTML="",aa.spin(U),C=!1,D=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(M,a?null:f))}function z(a){e();W.scrollTop=0;U.innerHTML="";aa.spin(U);C=!1;D=!0;ea=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
+"100%"),G=d,G.style.fontWeight="bold",G.style.textDecoration="underline",W.scrollTop=0,D&&(C=!0),L.innerHTML=e,V.style.display="none",x(a[b],!0))})})(e,d,c)}}function A(a){k&&(W.scrollTop=0,U.innerHTML="",aa.spin(U),C=!1,D=!0,L.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag",null,"Recent Diagrams")),Q=null,k(M,a?null:f))}function z(a){e();W.scrollTop=0;U.innerHTML="";aa.spin(U);C=!1;D=!0;ea=null;L.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults",null,"Search Results"))+' "'+
 mxUtils.htmlEntities(a)+'"';l(a,M,E?null:f);Q=a}b=null!=b?b:TEMPLATE_PATH+"/index.xml";g=null!=g?g:NEW_DIAGRAM_CATS_PATH+"/index.xml";var F=this.container,D=!1,C=!1,G=null,H=null,J=null,I=!1,E=!0,K=!1,O=[],Q,Y=F.querySelector(".geTempDlgShowAllBtn"),U=F.querySelector(".geTempDlgDiagramsTiles"),L=F.querySelector(".geTempDlgDiagramsListTitle"),V=F.querySelector(".geTempDlgDiagramsListBtns"),W=F.querySelector(".geTempDlgContent"),ga=F.querySelector(".geTempDlgDiagramsList"),fa=F.querySelector(".geTempDlgNewDiagramCat"),
 ba=F.querySelector(".geTempDlgNewDiagramCatList"),X=F.querySelector(".geTempDlgCreateBtn"),aa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(F.querySelector(".geTempDlgNewDiagramlbl"),"click",function(){e();fa.style.display="";ga.style.minHeight="calc(100% - 280px)";A(E)});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){m(this,"geTempDlgAllDiagramsBtnImg",
 "all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(E=!0,null==Q?A(E):z(Q))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){m(this,"geTempDlgMyDiagramsBtnImg","my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(E=!1,null==Q?A(E):z(Q))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){m(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg",
-"tiles",!1)&&(K=!0,y(O,!1,K))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,y(O,!1,K))});mxEvent.addListener(Y,"click",function(){I?(fa.style.height="280px",ba.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),x(da)):(fa.style.height="440px",ba.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
-null,"- Show less")),x(da,!0));I=!I});var P=!1,ca=!1,Z={},da=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(R++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
-a.nextSibling}B(Z)}});mxUtils.get(g,function(a){if(!ca){ca=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&da.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;x(da)}});var M=function(a,b){V.style.display="";aa.stop();D=!1;C?C=!1:b?U.innerHTML=b:0==a.length?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
-y(a,!1,K)};A(E);var ea=null;l&&mxEvent.addListener(F.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ea&&clearTimeout(ea);13==a.keyCode?z(b.value):ea=setTimeout(function(){z(b.value)},500)});mxEvent.addListener(X,"click",t);mxEvent.addListener(F.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){t(!0)});mxEvent.addListener(F.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
+"tiles",!1)&&(K=!0,x(O,!1,K))});mxEvent.addListener(F.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){m(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(K=!1,x(O,!1,K))});mxEvent.addListener(Y,"click",function(){I?(fa.style.height="280px",ba.style.height="190px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showAll",null,"+ Show all")),y(da)):(fa.style.height="440px",ba.style.height="355px",Y.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess",
+null,"- Show less")),y(da,!0));I=!I});var P=!1,ca=!1,Z={},da=[],R=1;mxUtils.get(b,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var e=b.indexOf("/"),b=b.substring(0,e),e=Z[b];null==e&&(R++,e=[],Z[b]=e);e.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url"),imgUrl:a.getAttribute("imgUrl")})}}a=
+a.nextSibling}B(Z)}});mxUtils.get(g,function(a){if(!ca){ca=!0;for(a=a.getXml().documentElement.firstChild;null!=a;)"undefined"!==typeof a.getAttribute&&null!=a.getAttribute("title")&&da.push({img:a.getAttribute("img"),libs:a.getAttribute("libs"),clibs:a.getAttribute("clibs"),title:a.getAttribute("title")}),a=a.nextSibling;y(da)}});var M=function(a,b){V.style.display="";aa.stop();D=!1;C?C=!1:b?U.innerHTML=b:0==a.length?U.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found")):
+x(a,!1,K)};A(E);var ea=null;l&&mxEvent.addListener(F.querySelector(".geTempDlgSearchBox"),"keyup",function(a){var b=this;null!=ea&&clearTimeout(ea);13==a.keyCode?z(b.value):ea=setTimeout(function(){z(b.value)},500)});mxEvent.addListener(X,"click",t);mxEvent.addListener(F.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(a){t(!0)});mxEvent.addListener(F.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=c&&c();a.hideDialog(!0)})};
 var BtnDialog=function(a,d,c,b){var g=document.createElement("div");g.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,mxResources.get("done"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";d==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?
 (k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.gitLab?(k=mxResources.get("gitlab"),l.src=IMAGE_PATH+"/gitlab-logo.svg"):d==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizedIn",[k],"You are now authorized in {1}"));
 c=mxUtils.button(c,b);c.insertBefore(l,c.firstChild);c.style.marginTop="6px";c.className="geBigButton";c.style.fontSize="18px";c.style.padding="14px";g.appendChild(f);g.appendChild(a);g.appendChild(c);this.container=g},FontDialog=function(a,d,c,b,g){function f(a){this.style.border="";13==a.keyCode&&B.click()}var k,l,n,q=document.createElement("table"),e=document.createElement("tbody");q.style.marginTop="8px";k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace=
@@ -8864,12 +8866,12 @@ k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace
 l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var u=document.createElement("input");u.style.cssText="margin-right:8px;margin-bottom:8px;";u.setAttribute("value","googlefonts");u.setAttribute("type","radio");u.setAttribute("name","current-fontdialog");u.setAttribute("id","fontdialog-googlefonts");l.appendChild(u);n=document.createElement("label");n.setAttribute("for","fontdialog-googlefonts");mxUtils.write(n,mxResources.get("googleFonts",
 null,"Google Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var t=document.createElement("input");"g"==b&&t.setAttribute("value",d);t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_g";l=document.createElement("td");l.appendChild(t);
 k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-webfonts");l.appendChild(v);n=document.createElement("label");n.setAttribute("for",
-"fontdialog-webfonts");mxUtils.write(n,mxResources.get("webfonts",null,"Web Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var y=document.createElement("input");"w"==b&&y.setAttribute("value",d);y.style.marginLeft="4px";y.style.width="250px";
-y.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(y);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var x=document.createElement("input");x.setAttribute("value",c||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";l=document.createElement("td");
-l.appendChild(x);k.appendChild(l);e.appendChild(k);this.init=function(){var a=p;"g"==b?a=t:"w"==b&&(a=y);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
-d.className="geBtn",l.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&l.appendChild(d);var B=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;m.checked?(b=p.value,c="s"):u.checked?(b=t.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=y.value,e=x.value,c="w");var d;d=e;var f=c,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
-b||0==b.length?(q.querySelector(".dlg_fontName_"+f).style.border="1px solid red",d=!1):"w"!=f||k.test(d)?d=!0:(q.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",f);mxEvent.addListener(t,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(t,"focus",
-function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});l.appendChild(B);a.editor.cancelFirst||l.appendChild(d);k.appendChild(l);e.appendChild(k);q.appendChild(e);this.container=q};
+"fontdialog-webfonts");mxUtils.write(n,mxResources.get("webfonts",null,"Web Fonts"));l.appendChild(n);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontname",null,"Font Name")+":");k.appendChild(l);var x=document.createElement("input");"w"==b&&x.setAttribute("value",d);x.style.marginLeft="4px";x.style.width="250px";
+x.className="dlg_fontName_w";l=document.createElement("td");l.appendChild(x);k.appendChild(l);e.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.style.whiteSpace="nowrap";l.style.fontSize="10pt";l.style.width="120px";l.style.paddingLeft="15px";mxUtils.write(l,mxResources.get("fontUrl",null,"Font URL")+":");k.appendChild(l);var y=document.createElement("input");y.setAttribute("value",c||"");y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontUrl";l=document.createElement("td");
+l.appendChild(y);k.appendChild(l);e.appendChild(k);this.init=function(){var a=p;"g"==b?a=t:"w"==b&&(a=x);a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="20px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://www.diagrams.net/blog/external-fonts")}),
+d.className="geBtn",l.appendChild(d));d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&l.appendChild(d);var B=mxUtils.button(mxResources.get("apply"),function(){var b,e,c;m.checked?(b=p.value,c="s"):u.checked?(b=t.value,e=Editor.GOOGLE_FONTS+encodeURIComponent(b).replace(/%20/g,"+"),c="g"):v.checked&&(b=x.value,e=y.value,c="w");var d;d=e;var f=c,k=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==
+b||0==b.length?(q.querySelector(".dlg_fontName_"+f).style.border="1px solid red",d=!1):"w"!=f||k.test(d)?d=!0:(q.querySelector(".dlg_fontUrl").style.border="1px solid red",d=!1);d&&(g(b,e,c),a.hideDialog())});B.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",f);mxEvent.addListener(t,"keypress",f);mxEvent.addListener(x,"keypress",f);mxEvent.addListener(y,"keypress",f);mxEvent.addListener(p,"focus",function(){m.setAttribute("checked","checked");m.checked=!0});mxEvent.addListener(t,"focus",
+function(){u.setAttribute("checked","checked");u.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});l.appendChild(B);a.editor.cancelFirst||l.appendChild(d);k.appendChild(l);e.appendChild(k);q.appendChild(e);this.container=q};
 function AspectDialog(a,d,c,b,g){this.aspect={pageId:d||a.pages[0].getId(),layerIds:c||[]};d=document.createElement("div");var f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("pages"));d.appendChild(f);c=document.createElement("div");c.className="geAspectDlgList";d.appendChild(c);f=document.createElement("h5");f.style.margin="0 0 10px";mxUtils.write(f,mxResources.get("layers"));d.appendChild(f);f=document.createElement("div");f.className="geAspectDlgList";
 d.appendChild(f);this.pagesContainer=c;this.layersContainer=f;this.ui=a;c=document.createElement("div");c.style.marginTop="16px";c.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});f.className="geBtn";a.editor.cancelFirst&&c.appendChild(f);var k=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){a.hideDialog();b({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));c.appendChild(k);k.className="geBtn gePrimaryBtn";
 a.editor.cancelFirst||c.appendChild(f);k.setAttribute("disabled","disabled");this.okBtn=k;d.appendChild(c);this.container=d}AspectDialog.prototype.init=function(){this.ui.getFileData(!0);for(var a=0;a<this.ui.pages.length;a++){var d=this.ui.updatePageRoot(this.ui.pages[a]);this.createPageItem(d.getId(),d.getName(),d.node,d.root)}};
@@ -8986,15 +8988,15 @@ b);v.editorUi.fireEvent(new mxEventObject("styleChanged","keys",d,"values",m,"ce
 d.style.border="1px solid black";d.style.background=b&&"none"!=b?b:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(v,function(m){this.editorUi.pickColor(b,function(b){d.style.background="none"==b?"url('"+Dialog.prototype.noColorImage+"')":b;c(a,b,e)});mxEvent.consume(m)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(d);return btn}function f(a,b,e,d,m,f,p){null!=b&&(b=b.split(","),u.push({name:a,values:b,type:e,defVal:d,countProperty:m,
 parentRow:f,isDeletable:!0,flipBkg:p}));btn=mxUtils.button("+",mxUtils.bind(v,function(b){for(var g=f,v=0;null!=g.nextSibling;)if(g.nextSibling.getAttribute("data-pName")==a)g=g.nextSibling,v++;else break;var t={type:e,parentRow:f,index:v,isDeletable:!0,defVal:d,countProperty:m},v=k(a,"",t,0==v%2,p);c(a,d,t);g.parentNode.insertBefore(v,g.nextSibling);mxEvent.consume(b)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function p(a,b,e,c,d,m,f){if(0<d){var p=Array(d);
 b=null!=b?b.split(","):[];for(var g=0;g<d;g++)p[g]=null!=b[g]?b[g]:null!=c?c:"";u.push({name:a,values:p,type:e,defVal:c,parentRow:m,flipBkg:f,size:d})}return document.createElement("div")}function g(a,b,e){var d=document.createElement("input");d.type="checkbox";d.checked="1"==b;mxEvent.addListener(d,"change",function(){c(a,d.checked?"1":"0",e)});return d}function k(b,e,k,t,u){var z=k.dispName,l=k.type,A=document.createElement("tr");A.className="gePropRow"+(u?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";
-A.setAttribute("data-pName",b);A.setAttribute("data-pValue",e);t=!1;null!=k.index&&(A.setAttribute("data-index",k.index),z=(null!=z?z:"")+"["+k.index+"]",t=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));t&&(n.style.textAlign="right");A.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==l)n.appendChild(m(b,e,k));else if("bool"==l||"boolean"==l)n.appendChild(g(b,e,k));else if("enum"==l){var y=
-k.enumList;for(u=0;u<y.length;u++)if(z=y[u],z.val==e){n.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(v,function(){var m=document.createElement("select");d(n,m);for(var f=0;f<y.length;f++){var p=y[f],g=document.createElement("option");g.value=mxUtils.htmlEntities(p.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(p.dispName,null,p.dispName));m.appendChild(g)}m.value=e;a.appendChild(m);mxEvent.addListener(m,"change",
+A.setAttribute("data-pName",b);A.setAttribute("data-pValue",e);t=!1;null!=k.index&&(A.setAttribute("data-index",k.index),z=(null!=z?z:"")+"["+k.index+"]",t=!0);var n=document.createElement("td");n.className="gePropRowCell";n.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));t&&(n.style.textAlign="right");A.appendChild(n);n=document.createElement("td");n.className="gePropRowCell";if("color"==l)n.appendChild(m(b,e,k));else if("bool"==l||"boolean"==l)n.appendChild(g(b,e,k));else if("enum"==l){var x=
+k.enumList;for(u=0;u<x.length;u++)if(z=x[u],z.val==e){n.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(n,"click",mxUtils.bind(v,function(){var m=document.createElement("select");d(n,m);for(var f=0;f<x.length;f++){var p=x[f],g=document.createElement("option");g.value=mxUtils.htmlEntities(p.val);g.innerHTML=mxUtils.htmlEntities(mxResources.get(p.dispName,null,p.dispName));m.appendChild(g)}m.value=e;a.appendChild(m);mxEvent.addListener(m,"change",
 function(){var a=mxUtils.htmlEntities(m.value);c(b,a,k)});m.focus();mxEvent.addListener(m,"blur",function(){a.removeChild(m)})}))}else"dynamicArr"==l?n.appendChild(f(b,e,k.subType,k.subDefVal,k.countProperty,A,u)):"staticArr"==l?n.appendChild(p(b,e,k.subType,k.subDefVal,k.size,A,u)):(n.innerHTML=e,mxEvent.addListener(n,"click",mxUtils.bind(v,function(){function m(){var a=f.value,a=0==a.length&&"string"!=l?0:a;k.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",l="string"):(a=parseFloat(a),
 a=isNaN(a)?0:a));null!=k.min&&a<k.min?a=k.min:null!=k.max&&a>k.max&&(a=k.max);a=mxUtils.htmlEntities(("int"==l?parseInt(a):a)+"");c(b,a,k)}var f=document.createElement("input");d(n,f,!0);f.value=e;f.className="gePropEditor";"int"!=l&&"float"!=l||k.allowAuto||(f.type="number",f.step="int"==l?"1":"any",null!=k.min&&(f.min=parseFloat(k.min)),null!=k.max&&(f.max=parseFloat(k.max)));a.appendChild(f);mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&m()});f.focus();mxEvent.addListener(f,"blur",
 function(){m()})})));k.isDeletable&&(u=mxUtils.button("-",mxUtils.bind(v,function(a){c(b,"",k,k.index);mxEvent.consume(a)})),u.style.height="16px",u.style.width="25px",u.style["float"]="right",u.className="geColorBtn",n.appendChild(u));A.appendChild(n);return A}var v=this,t=this.editorUi.editor.graph,u=[];a.style.position="relative";a.style.padding="0";var z=document.createElement("table");z.style.whiteSpace="nowrap";z.style.width="100%";var l=document.createElement("tr");l.className="gePropHeader";
-var A=document.createElement("th");A.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;A.appendChild(n);mxUtils.write(A,mxResources.get("property"));l.style.cursor="pointer";var y=function(){var b=z.querySelectorAll(".gePropNonHeaderRow"),e;if(v.editorUi.propertiesCollapsed){n.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else n.src=
-Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(l,"click",function(){v.editorUi.propertiesCollapsed=!v.editorUi.propertiesCollapsed;y()});l.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");l.appendChild(A);z.appendChild(l);var x=!1,D=!1,B;for(B in b)if(l=b[B],"function"!=typeof l.isVisible||l.isVisible(e,this)){var F=null!=e.style[B]?mxUtils.htmlEntities(e.style[B]+""):null!=l.getDefaultValue?
-l.getDefaultValue(e,this):l.defVal;if("separator"==l.type)D=!D;else{if("staticArr"==l.type)l.size=parseInt(e.style[l.sizeProperty]||b[l.sizeProperty].defVal)||0;else if(null!=l.dependentProps){for(var C=l.dependentProps,q=[],G=[],A=0;A<C.length;A++){var H=e.style[C[A]];G.push(b[C[A]].subDefVal);q.push(null!=H?H.split(","):[])}l.dependentPropsDefVal=G;l.dependentPropsVals=q}z.appendChild(k(B,F,l,x,D));x=!x}}for(A=0;A<u.length;A++)for(l=u[A],b=l.parentRow,e=0;e<l.values.length;e++)B=k(l.name,l.values[e],
-{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:e,defVal:l.defVal,countProperty:l.countProperty,size:l.size},0==e%2,l.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(z);y();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(b=0;b<e.length;b++){for(var d=c.getModel().getStyle(e[b]),f=0;f<m.length;f++)d=mxUtils.removeStylename(d,
+var A=document.createElement("th");A.className="gePropHeaderCell";var n=document.createElement("img");n.src=Sidebar.prototype.expandedImage;A.appendChild(n);mxUtils.write(A,mxResources.get("property"));l.style.cursor="pointer";var x=function(){var b=z.querySelectorAll(".gePropNonHeaderRow"),e;if(v.editorUi.propertiesCollapsed){n.src=Sidebar.prototype.collapsedImage;e="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var d=a.childNodes[c],m=d.nodeName.toUpperCase();"INPUT"!=m&&"SELECT"!=m||a.removeChild(d)}catch(ka){}}else n.src=
+Sidebar.prototype.expandedImage,e="";for(c=0;c<b.length;c++)b[c].style.display=e};mxEvent.addListener(l,"click",function(){v.editorUi.propertiesCollapsed=!v.editorUi.propertiesCollapsed;x()});l.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");l.appendChild(A);z.appendChild(l);var y=!1,D=!1,B;for(B in b)if(l=b[B],"function"!=typeof l.isVisible||l.isVisible(e,this)){var F=null!=e.style[B]?mxUtils.htmlEntities(e.style[B]+""):null!=l.getDefaultValue?
+l.getDefaultValue(e,this):l.defVal;if("separator"==l.type)D=!D;else{if("staticArr"==l.type)l.size=parseInt(e.style[l.sizeProperty]||b[l.sizeProperty].defVal)||0;else if(null!=l.dependentProps){for(var C=l.dependentProps,q=[],G=[],A=0;A<C.length;A++){var H=e.style[C[A]];G.push(b[C[A]].subDefVal);q.push(null!=H?H.split(","):[])}l.dependentPropsDefVal=G;l.dependentPropsVals=q}z.appendChild(k(B,F,l,y,D));y=!y}}for(A=0;A<u.length;A++)for(l=u[A],b=l.parentRow,e=0;e<l.values.length;e++)B=k(l.name,l.values[e],
+{type:l.type,parentRow:l.parentRow,isDeletable:l.isDeletable,index:e,defVal:l.defVal,countProperty:l.countProperty,size:l.size},0==e%2,l.flipBkg),b.parentNode.insertBefore(B,b.nextSibling),b=B;a.appendChild(z);x();return a};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(b=0;b<e.length;b++){for(var d=c.getModel().getStyle(e[b]),f=0;f<m.length;f++)d=mxUtils.removeStylename(d,
 m[f]);var p=c.getModel().isVertex(e[b])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(p,mxConstants.STYLE_GRADIENTCOLOR,null)),d=""==a.fill?mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,null)),d=""==a.stroke?mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,
 a.stroke||mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null)))):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FILLCOLOR,"#ffffff")),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(p,mxConstants.STYLE_STROKECOLOR,"#000000")),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(p,
 mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(e[b])&&(d=mxUtils.setStyle(d,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(p,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(e[b],d)}}finally{c.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+
@@ -9014,10 +9016,10 @@ b.childLayout)return e=new mxTableLayout(this.graph),e.rows=b.tableRows||2,e.col
 0,e.marginBottom=b.marginBottom||0,e.autoAddCol="1"==mxUtils.getValue(b,"autoAddCol","0"),e.autoAddRow="1"==mxUtils.getValue(b,"autoAddRow",e.autoAddCol?"0":"1"),e.colWidths=b.colWidths||"100",e.rowHeights=b.rowHeights||"50",e}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var u=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return u.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
 Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var b in a)this.globalVars[b]=a[b]}catch(H){null!=window.console&&console.log("Error in vars URL parameter: "+H)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var t=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var b=
 t.apply(this,arguments);null==b&&null!=this.globalVars&&(b=this.globalVars[a]);return b};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var v=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,b,e,c,d,m,f,p,g,k,t){var u=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var z=v.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var l=z.ownerDocument,A=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");null!=l.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var n="",y="",x=0;x<this.extFonts.length;x++){var D=this.extFonts[x].name,B=this.extFonts[x].url;0==B.indexOf(Editor.GOOGLE_FONTS)?
-n+="@import url("+B+");\n":y+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+B+'");\n}\n'}A.appendChild(l.createTextNode(n+y));z.getElementsByTagName("defs")[0].appendChild(A)}null!=u&&(this.stylesheet=u,this.refresh());return z};var y=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=y.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
-(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){x.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
+(u=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var z=v.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var l=z.ownerDocument,A=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"style"):l.createElement("style");null!=l.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var n="",x="",y=0;y<this.extFonts.length;y++){var D=this.extFonts[y].name,B=this.extFonts[y].url;0==B.indexOf(Editor.GOOGLE_FONTS)?
+n+="@import url("+B+");\n":x+='@font-face {\nfont-family: "'+D+'";\nsrc: url("'+B+'");\n}\n'}A.appendChild(l.createTextNode(n+x));z.getElementsByTagName("defs")[0].appendChild(A)}null!=u&&(this.stylesheet=u,this.refresh());return z};var x=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=x.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var b=a.drawText;a.drawText=function(a,e){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var d=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=c.innerHTML&&(d=a.text.value,a.text.value=c.innerHTML,b.apply(this,arguments),a.text.value=d)}}else b.apply(this,arguments)}}return a};var y=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){y.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
 this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var B=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){B.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
 a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var b=0;b<a.actions.length;b++){var e=a.actions[b];if(null!=e.open)if(this.isCustomLink(e.open)){if(!this.customLinkClicked(e.open))return}else this.openLink(e.open)}this.model.beginUpdate();try{for(b=0;b<a.actions.length;b++)e=a.actions[b],null!=e.toggle&&this.toggleCells(this.getCellsForAction(e.toggle,!0)),null!=e.show&&this.setCellsVisible(this.getCellsForAction(e.show,!0),!0),null!=e.hide&&this.setCellsVisible(this.getCellsForAction(e.hide,
 !0),!1)}finally{this.model.endUpdate()}for(b=0;b<a.actions.length;b++){var e=a.actions[b],c=[];null!=e.select&&this.isEnabled()&&(c=this.getCellsForAction(e.select),this.setSelectionCells(c));null!=e.highlight&&(c=this.getCellsForAction(e.highlight),this.highlightCells(c,e.highlight.color,e.highlight.duration,e.highlight.opacity));null!=e.scroll&&(c=this.getCellsForAction(e.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,b){var e=this.getLinkForCell(b);
@@ -9043,29 +9045,29 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
 [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
 [SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var A=mxMarker.createMarker;mxMarker.createMarker=
 function(a,b,e,c,d,m,f,p,g,k){if(null!=e&&null==mxMarker.markers[e]){var v=this.getPackageForType(e);null!=v&&mxStencilRegistry.getStencil(v)}return A.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function e(){z.value=Math.max(1,Math.min(p,Math.max(parseInt(z.value),parseInt(t.value))));t.value=Math.max(1,Math.min(p,Math.min(parseInt(z.value),parseInt(t.value))))}function c(b){function e(b,e,m){var f=b.useCssTransforms,p=b.currentTranslate,g=b.currentScale,k=b.view.translate,v=
-b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var t=b.getGraphBounds(),u=0,z=0,l=ma.get(),A=1/b.pageScale,x=y.checked;if(x)var A=parseInt(S.value),D=parseInt(ha.value),A=Math.min(l.height*D/(t.height/b.view.scale),l.width*A/(t.width/b.view.scale));else A=parseInt(n.value)/(100*b.pageScale),isNaN(A)&&(c=1/b.pageScale,n.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*
-c);l.height=Math.ceil(l.height*c);A*=c;!x&&b.pageVisible?(t=b.getPageLayout(),u-=t.x*l.width,z-=t.y*l.height):x=!0;if(null==e){e=PrintDialog.createPrintPreview(b,A,l,0,u,z,x);e.pageSelector=!1;e.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(e.title=u.getTitle());var B=e.writeHead;e.writeHead=function(e){B.apply(this,arguments);null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=
+b.view.scale;b.useCssTransforms&&(b.useCssTransforms=!1,b.currentTranslate=new mxPoint(0,0),b.currentScale=1,b.view.translate=new mxPoint(0,0),b.view.scale=1);var t=b.getGraphBounds(),u=0,z=0,l=ma.get(),A=1/b.pageScale,y=x.checked;if(y)var A=parseInt(S.value),D=parseInt(ha.value),A=Math.min(l.height*D/(t.height/b.view.scale),l.width*A/(t.width/b.view.scale));else A=parseInt(n.value)/(100*b.pageScale),isNaN(A)&&(c=1/b.pageScale,n.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*
+c);l.height=Math.ceil(l.height*c);A*=c;!y&&b.pageVisible?(t=b.getPageLayout(),u-=t.x*l.width,z-=t.y*l.height):y=!0;if(null==e){e=PrintDialog.createPrintPreview(b,A,l,0,u,z,y);e.pageSelector=!1;e.mathEnabled=!1;u=a.getCurrentFile();null!=u&&(e.title=u.getTitle());var B=e.writeHead;e.writeHead=function(e){B.apply(this,arguments);null!=a.editor.fontCss&&(e.writeln('<style type="text/css">'),e.writeln(a.editor.fontCss),e.writeln("</style>"));if(null!=b.extFonts)for(var c=0;c<b.extFonts.length;c++){var d=
 b.extFonts[c].name,m=b.extFonts[c].url;0==m.indexOf(Editor.GOOGLE_FONTS)?e.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(e.writeln('<style type="text/css">'),e.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+m+'");\n}'),e.writeln("</style>"))}};if("undefined"!==typeof MathJax){var F=e.renderPage;e.renderPage=function(b,e,c,d,m,f){var p=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
-var g=F.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}u=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,m,!0);null!=u&&(d.stylesheet=u,d.refresh())}else{l=b.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";e.backgroundColor=l;e.autoOrigin=x;e.appendGraph(b,A,u,z,m,!0);if(null!=b.extFonts&&null!=e.wnd)for(m=
+var g=F.apply(this,arguments);mxClient.NO_FO=p;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:g.className="geDisableMathJax";return g}}u=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(u=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());e.open(null,null,m,!0);null!=u&&(d.stylesheet=u,d.refresh())}else{l=b.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";e.backgroundColor=l;e.autoOrigin=y;e.appendGraph(b,A,u,z,m,!0);if(null!=b.extFonts&&null!=e.wnd)for(m=
 0;m<b.extFonts.length;m++)u=b.extFonts[m].name,z=b.extFonts[m].url,0==z.indexOf(Editor.GOOGLE_FONTS)?e.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(e.wnd.document.writeln('<style type="text/css">'),e.wnd.document.writeln('@font-face {\n\tfont-family: "'+u+'";\n\tsrc: url("'+z+'");\n}'),e.wnd.document.writeln("</style>"))}f&&(b.useCssTransforms=f,b.currentTranslate=p,b.currentScale=g,b.view.translate=k,b.view.scale=v);return e}var c=parseInt(N.value)/
-100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,m=t.value,f=z.value,p=!v.checked,k=null;p&&(p=m==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var u=0,p=a.pages.length-1;v.checked||(u=parseInt(m)-1,p=parseInt(f)-1);for(var l=u;l<=p;l++){var A=a.pages[l],m=A==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),f=!0,u=!1,x=null,D=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(f=A.viewState.pageVisible,u=A.viewState.mathEnabled,x=A.viewState.background,
-D=A.viewState.backgroundImage,m.extFonts=A.viewState.extFonts);m.background=x;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=f;m.mathEnabled=u;var B=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?A.getName():"pagenumber"==b?l+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(A);m.model.setRoot(A.root)}k=e(m,k,l!=p);m!=d&&m.container.parentNode.removeChild(m.container)}}else k=
+100;isNaN(c)&&(c=1,N.value="100 %");var c=.75*c,m=t.value,f=z.value,p=!v.checked,k=null;p&&(p=m==g&&f==g);if(!p&&null!=a.pages&&a.pages.length){var u=0,p=a.pages.length-1;v.checked||(u=parseInt(m)-1,p=parseInt(f)-1);for(var l=u;l<=p;l++){var A=a.pages[l],m=A==a.currentPage?d:null;if(null==m){var m=a.createTemporaryGraph(d.getStylesheet()),f=!0,u=!1,y=null,D=null;null==A.viewState&&null==A.root&&a.updatePageRoot(A);null!=A.viewState&&(f=A.viewState.pageVisible,u=A.viewState.mathEnabled,y=A.viewState.background,
+D=A.viewState.backgroundImage,m.extFonts=A.viewState.extFonts);m.background=y;m.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;m.pageVisible=f;m.mathEnabled=u;var B=m.getGlobalVariable;m.getGlobalVariable=function(b){return"page"==b?A.getName():"pagenumber"==b?l+1:"pagecount"==b?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(m.container);a.updatePageRoot(A);m.model.setRoot(A.root)}k=e(m,k,l!=p);m!=d&&m.container.parentNode.removeChild(m.container)}}else k=
 e(d);null==k?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(k.mathEnabled&&(p=k.wnd.document,p.writeln('<script type="text/x-mathjax-config">'),p.writeln("MathJax.Hub.Config({"),p.writeln("showMathMenu: false,"),p.writeln('messageStyle: "none",'),p.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),p.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),p.writeln('"HTML-CSS": {'),p.writeln("imageFont: null"),p.writeln("},"),p.writeln("TeX: {"),
 p.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),p.writeln("},"),p.writeln("tex2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("},"),p.writeln("asciimath2jax: {"),p.writeln('\tignoreClass: "geDisableMathJax"'),p.writeln("}"),p.writeln("});"),b&&(p.writeln("MathJax.Hub.Queue(function () {"),p.writeln("window.print();"),p.writeln("});")),p.writeln("\x3c/script>"),p.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
 k.closeDocument(),!k.mathEnabled&&b&&PrintDialog.printPreview(k))}var d=a.editor.graph,m=document.createElement("div"),f=document.createElement("h3");f.style.width="100%";f.style.textAlign="center";f.style.marginTop="0px";mxUtils.write(f,b||mxResources.get("print"));m.appendChild(f);var p=1,g=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";
 v.setAttribute("value","all");v.setAttribute("type","radio");v.setAttribute("name","pages-printdialog");k.appendChild(v);f=document.createElement("span");mxUtils.write(f,mxResources.get("printAllPages"));k.appendChild(f);mxUtils.br(k);var u=v.cloneNode(!0);v.setAttribute("checked","checked");u.setAttribute("value","range");k.appendChild(u);f=document.createElement("span");mxUtils.write(f,mxResources.get("pages")+":");k.appendChild(f);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";
 t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";k.appendChild(t);f=document.createElement("span");mxUtils.write(f,mxResources.get("to"));k.appendChild(f);var z=t.cloneNode(!0);k.appendChild(z);mxEvent.addListener(t,"focus",function(){u.checked=!0});mxEvent.addListener(z,"focus",function(){u.checked=!0});mxEvent.addListener(t,"change",e);mxEvent.addListener(z,"change",e);if(null!=a.pages&&(p=a.pages.length,null!=a.currentPage))for(f=0;f<a.pages.length;f++)if(a.currentPage==
 a.pages[f]){g=f+1;t.value=g;z.value=g;break}t.setAttribute("max",p);z.setAttribute("max",p);1<p&&m.appendChild(k);var l=document.createElement("div");l.style.marginBottom="10px";var A=document.createElement("input");A.style.marginRight="8px";A.setAttribute("value","adjust");A.setAttribute("type","radio");A.setAttribute("name","printZoom");l.appendChild(A);f=document.createElement("span");mxUtils.write(f,mxResources.get("adjustTo"));l.appendChild(f);var n=document.createElement("input");n.style.cssText=
-"margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";l.appendChild(n);mxEvent.addListener(n,"focus",function(){A.checked=!0});m.appendChild(l);var k=k.cloneNode(!1),y=A.cloneNode(!0);y.setAttribute("value","fit");A.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(y);k.appendChild(f);l=document.createElement("table");l.style.display="inline-block";var x=document.createElement("tbody"),
+"margin:0 8px 0 8px;";n.setAttribute("value","100 %");n.style.width="50px";l.appendChild(n);mxEvent.addListener(n,"focus",function(){A.checked=!0});m.appendChild(l);var k=k.cloneNode(!1),x=A.cloneNode(!0);x.setAttribute("value","fit");A.setAttribute("checked","checked");f=document.createElement("div");f.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";f.appendChild(x);k.appendChild(f);l=document.createElement("table");l.style.display="inline-block";var y=document.createElement("tbody"),
 D=document.createElement("tr"),B=D.cloneNode(!0),F=document.createElement("td"),q=F.cloneNode(!0),C=F.cloneNode(!0),G=F.cloneNode(!0),ea=F.cloneNode(!0),T=F.cloneNode(!0);F.style.textAlign="right";G.style.textAlign="right";mxUtils.write(F,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";q.appendChild(S);f=document.createElement("span");mxUtils.write(f,
-mxResources.get("fitToSheetsAcross"));C.appendChild(f);mxUtils.write(G,mxResources.get("fitToBy"));var ha=S.cloneNode(!0);ea.appendChild(ha);mxEvent.addListener(S,"focus",function(){y.checked=!0});mxEvent.addListener(ha,"focus",function(){y.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));T.appendChild(f);D.appendChild(F);D.appendChild(q);D.appendChild(C);B.appendChild(G);B.appendChild(ea);B.appendChild(T);x.appendChild(D);x.appendChild(B);l.appendChild(x);
+mxResources.get("fitToSheetsAcross"));C.appendChild(f);mxUtils.write(G,mxResources.get("fitToBy"));var ha=S.cloneNode(!0);ea.appendChild(ha);mxEvent.addListener(S,"focus",function(){x.checked=!0});mxEvent.addListener(ha,"focus",function(){x.checked=!0});f=document.createElement("span");mxUtils.write(f,mxResources.get("fitToSheetsDown"));T.appendChild(f);D.appendChild(F);D.appendChild(q);D.appendChild(C);B.appendChild(G);B.appendChild(ea);B.appendChild(T);y.appendChild(D);y.appendChild(B);l.appendChild(y);
 k.appendChild(l);m.appendChild(k);k=document.createElement("div");f=document.createElement("div");f.style.fontWeight="bold";f.style.marginBottom="12px";mxUtils.write(f,mxResources.get("paperSize"));k.appendChild(f);f=document.createElement("div");f.style.marginBottom="12px";var ma=PageSetupDialog.addPageFormatPanel(f,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(f);f=document.createElement("span");mxUtils.write(f,mxResources.get("pageScale"));k.appendChild(f);
 var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","100 %");N.style.width="60px";k.appendChild(N);m.appendChild(k);f=document.createElement("div");f.style.cssText="text-align:right;margin:48px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&f.appendChild(k);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){d.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
 l.className="geBtn",f.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),l.className="geBtn",f.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";f.appendChild(l);a.editor.cancelFirst||f.appendChild(k);m.appendChild(f);this.container=m};var z=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)):(z.apply(this,arguments),null!=this.mathEnabled&&
 this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var F=document.createElement("canvas"),D=new Image;D.onload=function(){try{F.getContext("2d").drawImage(D,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=
 null!=a&&6<a.length}catch(G){}};D.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(C){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,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="12.9.10";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,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="12.9.11";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
 "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
 !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
 topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,d,f,g,k){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
@@ -9084,7 +9086,7 @@ function(a,b,c){c=null!=c?c:24;var e=new Spinner({lines:12,length:c,width:Math.r
 (null==document.documentMode||8>=document.documentMode)&&(f.style.left=Math.round(Math.max(0,a-f.offsetWidth/2))+"px",f.style.top=Math.round(Math.max(0,b+70-f.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,m)}));this.stop();return a}),f=!0);return f};var m=e.stop;e.stop=function(){m.call(this);this.active=!1;null!=e.status&&null!=e.status.parentNode&&e.status.parentNode.removeChild(e.status);e.status=null};
 e.pause=function(){return function(){}};return e};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),e=this.editor.extractGraphModel(b.documentElement,!0);return null!=e&&0==e.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
 80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=
-a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(y){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=
+a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),e=null!=g?mxUtils.getXml(g):""}catch(x){}return e};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=
 a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var e=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||
 1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=c.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(c[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));b.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
 [1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=e)for(d=0;d<e.length;d++)b.model.execute(new ChangePage(this,e[d],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,f,g,k,l,n,A,z){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;n=null!=n?n:!0;var e,m=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
@@ -9113,7 +9115,7 @@ this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.
 !1)}}catch(B){}};EditorUi.prototype.getBaseFilename=function(a){var b=this.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b)||/(\.png)$/i.test(b)||/(\.drawio)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(b=b+"-"+this.currentPage.getName());return b};
 EditorUi.prototype.downloadFile=function(a,b,c,d,f,g,k,l,n,A,z){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(!f),m=e+"."+a;if("xml"==a){var p='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,d,f,null,null,null,b);this.saveData(m,a,p,"text/xml")}else if("html"==a)p=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(m,a,p,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
 a?m=e+".png":"jpeg"==a&&(m=e+".jpg"),this.saveRequest(m,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var m=this.createDownloadRequest(b,a,d,c,k,f,l,n,A,z);this.editor.graph.pageVisible=e;return m}catch(Y){this.handleError(Y)}}));else{var v=null,t=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==a){var u=this.editor.graph.background;if(k||u==mxConstants.NONE)u=null;var x=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(x);this.convertImages(x,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else m=e+".svg",v=this.getFileData(!1,
+mxUtils.bind(this,function(){mxUtils.popup(v)}))});if("svg"==a){var u=this.editor.graph.background;if(k||u==mxConstants.NONE)u=null;var y=this.editor.graph.getSvg(u,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(y);this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else m=e+".svg",v=this.getFileData(!1,
 !0,null,mxUtils.bind(this,function(a){this.spinner.stop();t(a)}),d)}}catch(E){this.handleError(E)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,f,g,k,l,n,A){var e=this.editor.graph,m=e.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==g?!1:"xmlpng"!=b);var p="",v="";if(m.width*m.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==b&&0==g&&(v="&allPages=1");if("xmlpng"==b&&(A="1",b="png",null!=this.pages&&null!=this.currentPage))for(g=
 0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){p="&from="+g;break}g=e.background;"png"==b&&f?g=mxConstants.NONE:f||null!=g&&g!=mxConstants.NONE||(g="#ffffff");f={globalVars:e.getExportVariables()};n&&(f.grid={size:e.gridSize,steps:e.view.gridSteps,color:e.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+p+v+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+d+"&embedXml="+A+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(f))+
 (null!=k?"&scale="+k:"")+(null!=l?"&border="+l:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var e=window.location.hash,d=mxUtils.bind(this,function(c){var d=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<d.length&&(d+="\n"),d+=c);c=new LocalFile(this,"csv"!=a.format&&0<d.length?d:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return e};this.fileLoaded(c);"csv"==
@@ -9128,8 +9130,8 @@ c+(" "+(d+"-"+m+"-"+g+"-"+k+"-"+l+"-"+f));return c=mxResources.get("copyOf",[c])
 this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;
 this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
 mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));e=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
-a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(y){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(y){}}catch(y){this.fileLoadedError=y;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+y.message,label:"stack_"+y.stack})}catch(x){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?f():this.handleError(y,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
+a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
+(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(y){}var f=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):d()});b?f():this.handleError(x,mxResources.get("errorLoadingFile"),f,!0,null,null,!0)}else d();return e};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,e=new mxGraphModel,d=new mxCodec;null!=b&&(b.byteCount=
 0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var f=0;f<a.length;f++){this.updatePageRoot(a[f]);var m=a[f].node.cloneNode(!1);m.removeAttribute("name");e.root=a[f].root;var g=d.encode(e);this.editor.graph.saveViewState(a[f].viewState,g,!0);g.removeAttribute("pageWidth");g.removeAttribute("pageHeight");m.appendChild(g);null!=b&&(b.eltCount+=m.getElementsByTagName("*").length,b.nodeCount+=m.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(m,function(a,b,c,e){return!e||"mxGeometry"!=
 a.nodeName&&"mxPoint"!=a.nodeName||"x"!=b&&"y"!=b&&"width"!=b&&"height"!=b?e&&"mxCell"==a.nodeName&&"previous"==b?null:c:Math.round(c)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,c){var e=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(e^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var d=0;d<a.attributes.length;d++){var f=a.attributes[d].name,
 m=null!=b?b(a,f,a.attributes[d].value,!0):a.attributes[d].value;null!=m&&(e^=this.hashValue(f,b,c)+this.hashValue(m,b,c))}}if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)e=(e<<5)-e+this.hashValue(a.childNodes[d],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(d=0;d<a.length;d++)b=(b<<5)-b+a.charCodeAt(d)<<0;e^=b}return e};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
@@ -9219,11 +9221,11 @@ mxResources.get("image"));m.style.cssText="width:100%;text-align:center;margin-t
 "text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";e.appendChild(k);mxUtils.br(e)}var p=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),m=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),m.background==mxConstants.NONE||null==m.background);null!=n&&(n.style.marginBottom="16px");a=
 new CustomDialog(this,e,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,b=parseInt(k.value)||0;c(!p.checked,null!=l?l.checked:!1,null!=n?n.checked:!1,a,b)}),null,a,b);this.showDialog(a.container,300,(f?25:0)+(d?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,k,l){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=this.editor.graph,p="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
 e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value=this.lastExportZoom||"100%";e.appendChild(v);mxUtils.write(e,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";e.appendChild(u);mxUtils.br(e);var t=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),q=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,m.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&&(e.appendChild(x),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),p+=26,mxEvent.addListener(q,"change",function(){q.checked?
-x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(x.setAttribute("checked","checked"),x.defaultChecked=!0);var y=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(e.appendChild(E),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),p+=
+"0";e.appendChild(u);mxUtils.br(e);var t=this.addCheckbox(e,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=l),q=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");g&&(e.appendChild(y),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),p+=26,mxEvent.addListener(q,"change",function(){q.checked?
+y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));m.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var x=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||E.setAttribute("disabled","disabled");b&&(e.appendChild(E),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),p+=
 26);var K=null;if("png"==l||"jpeg"==l)K=this.addCheckbox(e,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),p+=26;var O=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),Q=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(e,Q?mxResources.get("allPages"):"",Q,!Q,null,"jpeg"!=l);Y.style.marginLeft="24px";Y.style.marginBottom="16px";Q?p+=26:Y.style.display="none";mxEvent.addListener(O,"change",function(){O.checked&&Q?Y.removeAttribute("disabled"):
 Y.setAttribute("disabled","disabled")});k&&Q||Y.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));U.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));U.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));U.appendChild(a);"svg"==l&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(U),mxUtils.br(e),mxUtils.br(e),p+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=v.value;f(v.value,t.checked,!q.checked,y.checked,O.checked,E.checked,u.value,x.checked,!Y.checked,U.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));U.appendChild(a);"svg"==l&&(mxUtils.write(e,mxResources.get("links")+":"),e.appendChild(U),mxUtils.br(e),mxUtils.br(e),p+=26);c=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=v.value;f(v.value,t.checked,!q.checked,x.checked,O.checked,E.checked,u.value,y.checked,!Y.checked,U.value,null!=K?K.checked:null)}),null,c,d);this.showDialog(c.container,340,p,!0,!0,null,
 null,null,null,!0);v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var m=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";e.appendChild(g)}var k=this.addCheckbox(e,mxResources.get("fit"),
 !0),p=this.addCheckbox(e,mxResources.get("shadow"),m.shadowVisible&&d,!d),l=this.addCheckbox(e,c),n=this.addCheckbox(e,mxResources.get("lightbox"),!0),u=this.addEditButton(e,n),t=u.getEditInput(),q=1<m.model.getChildCount(m.model.getRoot()),H=this.addCheckbox(e,mxResources.get("layers"),q,!q);H.style.marginLeft=t.style.marginLeft;H.style.marginBottom="12px";H.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(q&&H.removeAttribute("disabled"),t.removeAttribute("disabled")):
 (H.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&n.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(k.checked,p.checked,l.checked,n.checked,u.getLink(),H.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,l){function e(b){var e=" ",p="";d&&(e=" 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('"+
@@ -9235,8 +9237,8 @@ EditorUi.drawHost+"/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":"
 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.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&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(v){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{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()),f=d.getGlobalVariable,m=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?m.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(x){null!=
-b&&b(x)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,k,l){l=null!=l?l:!0;k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){l?this.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+d.model.setRoot(m.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(A){null!=b&&b(A)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(y){null!=
+b&&b(y)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,f,g,k,l){l=null!=l?l:!0;k=b.background;k==mxConstants.NONE&&(k=null);g=b.getSvg(k,null,null,null,null,g);b.shadowVisible&&b.addSvgShadow(g);null!=a&&g.setAttribute("content",a);null!=c&&g.setAttribute("resource",c);if(null!=f)this.embedFonts(g,mxUtils.bind(this,function(a){l?this.convertImages(a,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a))})):f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(g)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
 this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(u){b(a)}}))}catch(p){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,l,n,A,z){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
 try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,l):null,n,null==this.pages||0==this.pages.length,z)}catch(C){"Invalid image"==C.message?this.downloadFile(n):this.handleError(C)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k,A)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
@@ -9246,19 +9248,19 @@ a;e++;var b="application/x-font-ttf";if("svg"==k||/(\.svg)($|\?)/i.test(a))b="im
 function(a){var b=this.editor.graph.extFonts;if(null!=b&&0<b.length){var c="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(c,a)}),f=0;f<b.length;f++)mxUtils.bind(this,function(a,b){0==b.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[b]?(d++,this.loadUrl(b,mxUtils.bind(this,function(a){this.cachedGoogleFonts[b]=a;c+=a;d--;e()}),mxUtils.bind(this,function(a){d--;c+="@import url("+b+");";e()}))):c+=this.cachedGoogleFonts[b]:
 c+='@font-face {font-family: "'+a+'";src: url("'+b+'");}'})(b[f].name,b[f].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,l,n,A,z,q,D,C,G){try{g=null!=g?g:!0;k=null!=k?k:!0;q=null!=q?q:this.editor.graph;D=null!=D?D:0;var e=n?null:q.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(q.getSvg(null,null,null,C,null,k,null,null,null,A),mxUtils.bind(this,function(c){try{var d=new Image;d.onload=mxUtils.bind(this,function(){try{var m=
 function(){mxClient.IS_SF?window.setTimeout(function(){v.drawImage(d,D/l,D/l);a(k)},0):(v.drawImage(d,D/l,D/l),a(k))},k=document.createElement("canvas"),p=parseInt(c.getAttribute("width")),n=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=g?Math.min(1,Math.min(3*b/(4*n),b/p)):b/p);p=Math.ceil(l*p)+2*D;n=Math.ceil(l*n)+2*D;k.setAttribute("width",p);k.setAttribute("height",n);var v=k.getContext("2d");null!=e&&(v.beginPath(),v.rect(0,0,p,n),v.fillStyle=e,v.fill());v.scale(l,l);if(G){var z=
-q.view,A=z.scale;z.scale=1;var u=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=A;var u="data:image/svg+xml;base64,"+u,t=q.gridSize*z.gridSteps*l,F=q.getGraphBounds(),x=z.translate.x*A,y=z.translate.y*A,B=x+(F.x-x)/A,E=y+(F.y-y)/A,C=new Image;C.onload=function(){try{for(var a=-Math.round(t-mxUtils.mod((x-B)*l,t)),b=-Math.round(t-mxUtils.mod((y-E)*l,t));a<p;a+=t)for(var c=b;c<n;c+=t)v.drawImage(C,a/l,c/l);m()}catch(M){null!=f&&f(M)}};C.onerror=function(a){null!=f&&f(a)};C.src=
+q.view,A=z.scale;z.scale=1;var u=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=A;var u="data:image/svg+xml;base64,"+u,t=q.gridSize*z.gridSteps*l,F=q.getGraphBounds(),y=z.translate.x*A,x=z.translate.y*A,B=y+(F.x-y)/A,E=x+(F.y-x)/A,C=new Image;C.onload=function(){try{for(var a=-Math.round(t-mxUtils.mod((y-B)*l,t)),b=-Math.round(t-mxUtils.mod((x-E)*l,t));a<p;a+=t)for(var c=b;c<n;c+=t)v.drawImage(C,a/l,c/l);m()}catch(M){null!=f&&f(M)}};C.onerror=function(a){null!=f&&f(a)};C.src=
 u}else m()}catch(Z){null!=f&&f(Z)}});d.onerror=function(a){null!=f&&f(a)};A&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var m=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),d.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(K){null!=f&&f(K)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(m)}catch(O){null!=f&&f(O)}}))}catch(K){null!=
 f&&f(K)}}),c,z)}catch(J){null!=f&&f(J)}};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.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(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 m=a.getElementsByTagName(c),k=0;k<m.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var k=f[m];null==k?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,
 k)}else null!=m&&c.setAttribute(g,m)}}catch(C){}})(m[k])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g,k,l){try{var e=!k&&(d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));f=null!=f?f:!0;var m=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(e){if((9==document.documentMode||10==document.documentMode)&&
 "undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},e,this.timeout,function(){f&&
 null!=c&&c({code:App.ERROR_TIMEOUT,retry:m})},l)});m()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);
-c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(B){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(y){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!=
+c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(B){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!=
 b?b:0;c=null!=c?c:0;var e=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){g.model.beginUpdate();try{var m=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(m.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var p=k.getElementsByTagName("diagram");if(1==p.length)k=Editor.parseDiagramNode(p[0]),null!=this.currentPage&&(a[p[0].getAttribute("id")]=this.currentPage.getId());else if(1<p.length){var m=[],l=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
 (a[p[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(p[0]),d=!1,l=1);for(;l<p.length;l++){var n=p[l].getAttribute("id");p[l].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(p[l]));a[n]=p[l].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,u,u,t,!0));m.push(u)}this.updatePageLinks(a,m)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(e=g.importGraphModel(k,b,c,d),null!=
 e))for(l=0;l<e.length;l++)this.updatePageLinksForCell(a,e[l])}finally{g.model.endUpdate()}}}catch(G){if(f)throw G;this.handleError(G)}return e};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f=
 c.getElementsByTagName("a"),g=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),g=!0);g&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));
-if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(y){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,
+if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,
 function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var e=this.isRemoteVisioFormat(d);try{var f="UNKNOWN-VISIO",g=d.lastIndexOf(".");0<=g&&g<d.length&&(f=d.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+d,label:e?"remote":"local"})}catch(A){}if(e)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
 else{e=new FormData;e.append("file1",a,d);var m=new XMLHttpRequest;m.open("POST",VSD_CONVERT_URL);m.responseType="blob";this.addRemoteServiceSecurityCheck(m);m.onreadystatechange=mxUtils.bind(this,function(){if(4==m.readyState)if(200<=m.status&&299>=m.status)try{var a=m.response;if("text/xml"==a.type){var e=new FileReader;e.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(D){c({message:mxResources.get("errorLoadingFile")})}});e.readAsText(a)}else this.doImportVisio(a,b,c,d)}catch(F){c(F)}else c({})});
 m.send(e)}else try{this.doImportVisio(a,b,c,d)}catch(A){c(A)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
@@ -9266,7 +9268,7 @@ b,c)}catch(t){c(t)}else this.spinner.stop(),this.handleError({message:mxResource
 this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(t){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(t){null!=
 window.console&&console.error(t),c(t)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,d){var e=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel=
 "strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));c(e.convertDataUri(e.createSvgDataUri(a)),
-f,g)}else d({message:mxResources.get("invalidInput")})}catch(z){d(z)}})}catch(y){d(y)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(a){if(10>a)return String.fromCharCode(48+
+f,g)}else d({message:mxResources.get("invalidInput")})}catch(z){d(z)}})}catch(x){d(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,d){function e(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(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?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+e(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+e(a.charCodeAt(i),0,0):r+e(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType=
 "blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var e=new FileReader;e.readAsDataURL(this.response);e.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=e.result,m=g.indexOf(","),k=decodeURIComponent(escape(atob(g.substring(m+1)))),l=mxUtils.parseXml(k).getElementsByTagName("svg");0<l.length&&(a=parseFloat(l[0].getAttribute("width")),f=parseFloat(l[0].getAttribute("height")))}c(e.result,a,
 f)}catch(I){d(I)}};b.src=e.result};e.onerror=function(a){d(a)}}else d(a)};g.onerror=function(a){d(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&
@@ -9293,7 +9295,7 @@ l)l(t);else{var c=[];p.getModel().beginUpdate();try{for(var d=0;d<t.length;d++){
 if(0<u.length){var u=u[0],F=q?null:u.getAttribute("content");null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(F,!0)));null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F));null==F||"<mxfile "!==F.substring(0,8)&&"<mxGraphModel "!==F.substring(0,14)?D(e,mxUtils.bind(this,function(){try{if(l.substring(0,v+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var k=a[0],m=k.getAttribute("width"),z=k.getAttribute("height"),m=null!=m&&"%"!=m.charAt(m.length-
 1)?parseFloat(m):NaN,z=null!=z&&"%"!=z.charAt(z.length-1)?parseFloat(z):NaN,A=k.getAttribute("viewBox");if(null==A||0==A.length)k.setAttribute("viewBox","0 0 "+m+" "+z);else if(isNaN(m)||isNaN(z)){var u=A.split(" ");3<u.length&&(m=parseFloat(u[2]),z=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var q=Math.min(1,Math.min(d/Math.max(1,m)),d/Math.max(1,z)),D=f(l,g.type,b+e*n,c+e*n,Math.max(1,Math.round(m*q)),Math.max(1,Math.round(z*q)),g.name);if(isNaN(m)||isNaN(z)){var F=new Image;F.onload=
 mxUtils.bind(this,function(){m=Math.max(1,F.width);z=Math.max(1,F.height);D[0].geometry.width=m;D[0].geometry.height=z;k.setAttribute("viewBox","0 0 "+m+" "+z);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));p.setCellStyles("image",l,[D[0]])});F.src=this.createSvgDataUri(mxUtils.getXml(k))}return D}}}catch(ia){}return null})):D(e,mxUtils.bind(this,function(){return f(F,"text/xml",b+e*n,c+e*n,0,0,g.name)}))}else D(e,mxUtils.bind(this,
-function(){return null}))}else{u=!1;if("image/png"==g.type){var y=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var E=new Image;E.src=a.target.result;D(e,mxUtils.bind(this,function(){return f(y,"text/xml",b+e*n,c+e*n,E.width,E.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,
+function(){return null}))}else{u=!1;if("image/png"==g.type){var x=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=x&&0<x.length){var E=new Image;E.src=a.target.result;D(e,mxUtils.bind(this,function(){return f(x,"text/xml",b+e*n,c+e*n,E.width,E.height,g.name)}));u=!0}}u||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,
 function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,l,p){D(e,mxUtils.bind(this,function(){if(null!=k&&k.length<A){var v=m&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(d/l,d/p)):1;return f(k,g.type,b+e*n,c+e*n,Math.round(l*v),Math.round(p*v),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,d,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else l=
 a.target.result,f(l,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g)});/(\.v(dx|sdx?))($|\?)/i.test(g.name)||/(\.vs(x|sx?))($|\?)/i.test(g.name)?f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){D(e,function(){return a})},g):"image"==g.type.substring(0,5)||"application/pdf"==g.type?l.readAsDataURL(g):l.readAsText(g)}})(F)});if(p){p=[];for(u=0;u<a.length;u++)p.push(a[u]);a=p;this.confirmImageResize(function(a){m=a;t()},n)}else t()};EditorUi.prototype.confirmImageResize=
 function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,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+
@@ -9329,8 +9331,8 @@ c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g
 function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position=
 "absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var d=!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 e=mxEvent.getSource(a);
 null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,
-"keyup",mxUtils.bind(this,function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
-this.copyCells(c,!0),a()}catch(y){this.handleError(y)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
+"keyup",mxUtils.bind(this,function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
 EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
 "Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
 this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
@@ -9370,11 +9372,11 @@ k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discard
 1==k.enableRecent,v=1==k.enableSearch,u=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):
 null,v?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==
 k.action){var q=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:q,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var t=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,
-t):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 y=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,x=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(y);
-g.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(y)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);x(a)}),Q=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=Q){for(var Y=E.getGlobalVariable,E=this.createTemporaryGraph(E.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==
+t):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 x=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=this.editor.graph,y=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(x);
+g.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(x)));E!=this.editor.graph&&E.container.parentNode.removeChild(E.container);y(a)}),Q=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=Q){for(var Y=E.getGlobalVariable,E=this.createTemporaryGraph(E.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==
 Q){U=this.updatePageRoot(this.pages[L]);break}E.getGlobalVariable=function(a){return"page"==a?U.getName():"pagenumber"==a?1:Y.apply(this,arguments)};document.body.appendChild(E.container);E.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=E.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
-function(){O(null)}),null,null,k.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=Q?"&pageId="+Q:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(y))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?x("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=
-k.xml&&0<k.xml.length&&this.setFileData(k.xml);t=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();t.xml=mxUtils.getXml(ga);t.data=this.getFileData(null,null,!0,null,null,null,ga);t.format=k.format}else if("html"==k.format)y=this.editor.getGraphXml(),t.data=this.getHtml(y,this.editor.graph),t.xml=mxUtils.getXml(y),t.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;
+function(){O(null)}),null,null,k.scale,null,null,null,E)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=Q?"&pageId="+Q:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(x))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?y("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=
+k.xml&&0<k.xml.length&&this.setFileData(k.xml);t=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();t.xml=mxUtils.getXml(ga);t.data=this.getFileData(null,null,!0,null,null,null,ga);t.format=k.format}else if("html"==k.format)x=this.editor.getGraphXml(),t.data=this.getHtml(x,this.editor.graph),t.xml=mxUtils.getXml(x),t.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;
 fa==mxConstants.NONE&&(fa=null);t.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);t.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();t.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(t),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(t.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else 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);var X=this.editor.graph.getSvg(fa);this.embedFonts(X,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(t),"*")}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&&(n=document.createElement("span"),mxUtils.write(n,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&
@@ -9426,39 +9428,40 @@ allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowe
 a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);
 e&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=
 b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,
-k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(A){c(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
-b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
-"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
-function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
-{};try{f=JSON.parse(a.data)}catch(E){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(E){console.log(E)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
-function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(t){null!=b&&b(t)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.removeDatabaseItem=
-function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(y){null!=c&&c(y)}}),c)};EditorUi.prototype.getDatabaseItems=
-function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(y){null!=b&&b(y)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();
-e.onsuccess=function(){a(e.result)};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
-null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,
-a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
-function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===
-d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(A){c(null,"Invalid Call: An error occured, "+A.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){try{var c=d.result;1>a.oldVersion&&c.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(c.createObjectStore("files",{keyPath:"title"}),
+c.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=b&&b(x)}};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");
+b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,
+a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(I){console.log(I)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(I){console.log(I)}});a=mxUtils.bind(this,function(a){try{if(a.source==
+b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(E){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(E){console.log(E)}});window.addEventListener("message",
+a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(t){null!=b&&b(t)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(y){null!=d&&d(y)}}),d)};
+EditorUi.prototype.removeDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=
+c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(x){null!=b&&b(x)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=
+c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(v){null!=b&&b(v)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():
+!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();
+return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==
+DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&
+(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated",
+"1")}})();
 var CommentsWindow=function(a,d,c,b,g,f){function k(){for(var a=B.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==B&&b++;A.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}v={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
 "geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();v=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);v=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
 function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";l.focus()}function n(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
 [e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function q(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function e(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function m(a){a.style.border="";a.removeChild(a.busyImg)}function p(b,c,d,f,g){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});J.appendChild(e);d&&(e.style.display="none")}function F(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=y;a(b);return{pdiv:d,replies:c}}function E(c,d,g,k,n){function z(){q(t);b.addReply(u,function(a){u.id=a;b.replies.push(u);m(t);g&&g()},function(b){A();e(t);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function A(){l(u,t,function(a){z()},!0)}var v=F().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=p(u,b.replies,v,f+1);d?A():z()}if(g||!b.isResolved){A.style.display="none";var y=document.createElement("div");y.className="geCommentContainer";y.setAttribute("data-commentId",b.id);y.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(y.style.backgroundColor="ghostWhite");
-var x=document.createElement("div");x.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=b.user.pictureUrl||Editor.userImage;x.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";x.appendChild(C);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");C.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);n(b,
-G);C.appendChild(G);y.appendChild(x);x=document.createElement("div");x.className="geCommentTxt";mxUtils.write(x,b.content||"");y.appendChild(x);x=document.createElement("div");x.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";x.appendChild(J);u||0!=f&&!t||z(mxResources.get("reply"),function(){E("",!0)},b.isResolved);C=a.getCurrentUser();null==C||C.id!=b.user.id||u||(z(mxResources.get("edit"),function(){function c(){l(b,y,function(){q(y);b.editComment(b.content,
-function(){m(y)},function(b){e(y);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){q(y);b.deleteComment(function(){for(var a=F(b).replies,d=0;d<a.length;d++)B.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}A.style.display=0==B.getElementsByTagName("div").length?"block":"none"},function(b){e(y);a.handleError(b,null,null,
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});J.appendChild(e);d&&(e.style.display="none")}function F(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=x;a(b);return{pdiv:d,replies:c}}function E(c,d,g,k,n){function z(){q(t);b.addReply(u,function(a){u.id=a;b.replies.push(u);m(t);g&&g()},function(b){A();e(t);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},k,n)}function A(){l(u,t,function(a){z()},!0)}var v=F().pdiv,u=a.newComment(c,a.getCurrentUser());u.pCommentId=b.id;null==b.replies&&(b.replies=[]);var t=p(u,b.replies,v,f+1);d?A():z()}if(g||!b.isResolved){A.style.display="none";var x=document.createElement("div");x.className="geCommentContainer";x.setAttribute("data-commentId",b.id);x.style.marginLeft=20*f+5+"px";b.isResolved&&"dark"!=uiTheme&&(x.style.backgroundColor="ghostWhite");
+var y=document.createElement("div");y.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=b.user.pictureUrl||Editor.userImage;y.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";y.appendChild(C);var G=document.createElement("div");G.className="geCommentUsername";mxUtils.write(G,b.user.displayName||"");C.appendChild(G);G=document.createElement("div");G.className="geCommentDate";G.setAttribute("data-commentId",b.id);n(b,
+G);C.appendChild(G);x.appendChild(y);y=document.createElement("div");y.className="geCommentTxt";mxUtils.write(y,b.content||"");x.appendChild(y);y=document.createElement("div");y.className="geCommentActions";var J=document.createElement("ul");J.className="geCommentActionsList";y.appendChild(J);u||0!=f&&!t||z(mxResources.get("reply"),function(){E("",!0)},b.isResolved);C=a.getCurrentUser();null==C||C.id!=b.user.id||u||(z(mxResources.get("edit"),function(){function c(){l(b,x,function(){q(x);b.editComment(b.content,
+function(){m(x)},function(b){e(x);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){q(x);b.deleteComment(function(){for(var a=F(b).replies,d=0;d<a.length;d++)B.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}A.style.display=0==B.getElementsByTagName("div").length?"block":"none"},function(b){e(x);a.handleError(b,null,null,
 null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));u||0!=f||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=F(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
-m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);D||(e[g].style.display="none")}k()}b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});y.appendChild(x);null!=d?B.insertBefore(y,d.nextSibling):B.appendChild(y);for(d=0;null!=b.replies&&d<b.replies.length;d++)x=b.replies[d],x.isResolved=b.isResolved,p(x,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,l(b,y,v.saveCallback,v.deleteOnCancel),
-b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(B.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return y}}var u=!a.canComment(),t=a.canReplyToReplies(),v=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;B.style.bottom=parseInt(x)+7+"px";y.appendChild(B);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=x;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter="none");if(!u){var F=x.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){l(d,f,function(b){q(f);a.addComment(b,function(a){b.id=a;C.push(b);m(f)},function(b){e(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var d=a.newComment("",a.getCurrentUser()),f=p(d,C,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(F)}F=x.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});z.appendChild(F);a.commentsRefreshNeeded()&&
-(F=x.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),z.appendChild(F));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),z.appendChild(x));y.appendChild(z);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(E){a.handleError(E)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+m=0;m<l.length;m++)l[m]!=c.parentNode&&(l[m].style.display=d);D||(e[g].style.display="none")}k()}b.isResolved?E(mxResources.get("reOpened")+": ",!0,c,!1,!0):E(mxResources.get("markedAsResolved"),!1,c,!0)});x.appendChild(y);null!=d?B.insertBefore(x,d.nextSibling):B.appendChild(x);for(d=0;null!=b.replies&&d<b.replies.length;d++)y=b.replies[d],y.isResolved=b.isResolved,p(y,b.replies,null,f+1,g);null!=v&&(v.comment.id==b.id?(g=b.content,b.content=v.comment.content,l(b,x,v.saveCallback,v.deleteOnCancel),
+b.content=g):null==v.comment.id&&v.comment.pCommentId==b.id&&(B.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return x}}var u=!a.canComment(),t=a.canReplyToReplies(),v=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var y=EditorUi.compactUi?"26px":"30px",B=document.createElement("div");B.className="geCommentsList";B.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;B.style.bottom=parseInt(y)+7+"px";x.appendChild(B);var A=document.createElement("span");A.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(A,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=y;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
+"none");y=document.createElement("a");y.className="geButton";mxClient.IS_QUIRKS&&(y.style.filter="none");if(!u){var F=y.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){l(d,f,function(b){q(f);a.addComment(b,function(a){b.id=a;C.push(b);m(f)},function(b){e(f);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var d=a.newComment("",a.getCurrentUser()),f=p(d,C,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(F)}F=y.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var D=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(D=!D)?"geButton geCheckedBtn":"geButton";G();a.preventDefault();mxEvent.consume(a)});z.appendChild(F);a.commentsRefreshNeeded()&&
+(F=y.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){G();a.preventDefault();mxEvent.consume(a)}),z.appendChild(F));a.commentsSaveNeeded()&&(y=y.cloneNode(),y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',y.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(y.style.filter="invert(100%)"),mxEvent.addListener(y,"click",function(a){f();a.preventDefault();mxEvent.consume(a)}),z.appendChild(y));x.appendChild(z);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var b=v.div.querySelector(".geCommentEditTxtArea"),c=v.div.querySelector(".geCommentEditBtns");v.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(E){a.handleError(E)}B.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
 IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";t=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});B.innerHTML="";B.appendChild(A);A.style.display="block";C=a;for(a=0;a<C.length;a++)b(C[a].replies),
 p(C[a],C,null,0,D);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(B.appendChild(v.div),l(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(a){B.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):B.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(n(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
-if(this.window.isVisible()){for(var b=B.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),y,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+if(this.window.isVisible()){for(var b=B.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<C.length;d++)a(C[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),x,d,c,b,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
 mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var H=mxUtils.bind(this,function(){var a=this.window.getX(),
 b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",H);this.destroy=function(){mxEvent.removeListener(window,"resize",H);this.window.destroy()}},ConfirmDialog=function(a,d,c,b,g,f,k,l,n,q,e){var m=document.createElement("div");m.style.textAlign="center";e=null!=e?e:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=e+"px";p.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(p.style.height="60px");mxUtils.write(p,d);
 m.appendChild(p);null!=q&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",q),p.appendChild(d),m.appendChild(p));q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";var u=document.createElement("input");u.setAttribute("type","checkbox");f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(u.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom=
@@ -9466,8 +9469,8 @@ m.appendChild(p);null!=q&&(p=document.createElement("div"),p.style.padding="6px
 "10px",p=document.createElement("p"),p.style.marginTop="20px",p.appendChild(u),g=document.createElement("span"),mxUtils.write(g," "+mxResources.get("rememberThisSetting")),p.appendChild(g),m.appendChild(p),mxEvent.addListener(g,"click",function(a){u.checked=!u.checked;mxEvent.consume(a)})):q.style.marginTop="12px";this.init=function(){t.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,mxObjectId:!0,mxTransient:!0};
 EditorUi.prototype.patchPages=function(a,d,c,b,g){var f={},k=[],l={},n={},q={},e={};if(null!=b&&null!=b[EditorUi.DIFF_UPDATE])for(var m in b[EditorUi.DIFF_UPDATE])f[m]=b[EditorUi.DIFF_UPDATE][m];if(null!=d[EditorUi.DIFF_REMOVE])for(b=0;b<d[EditorUi.DIFF_REMOVE].length;b++)n[d[EditorUi.DIFF_REMOVE][b]]=!0;if(null!=d[EditorUi.DIFF_INSERT])for(b=0;b<d[EditorUi.DIFF_INSERT].length;b++)l[d[EditorUi.DIFF_INSERT][b].previous]=d[EditorUi.DIFF_INSERT][b];if(null!=d[EditorUi.DIFF_UPDATE])for(m in d[EditorUi.DIFF_UPDATE])b=
 d[EditorUi.DIFF_UPDATE][m],null!=b.previous&&(e[b.previous]=m);if(null!=a){var p="";for(b=0;b<a.length;b++){var u=a[b].getId();q[u]=a[b];null!=e[p]||n[u]||null!=d[EditorUi.DIFF_UPDATE]&&null!=d[EditorUi.DIFF_UPDATE][u]&&null!=d[EditorUi.DIFF_UPDATE][u].previous||(e[p]=u);p=u}}var t={},v=mxUtils.bind(this,function(a){var b=null!=a?a.getId():"";if(null!=a&&!t[b]){t[b]=!0;k.push(a);var m=null!=d[EditorUi.DIFF_UPDATE]?d[EditorUi.DIFF_UPDATE][b]:null;null!=m&&(this.updatePageRoot(a),null!=m.name&&a.setName(m.name),
-null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,f[a.getId()],g),!c||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=e[b];null!=a&&(delete e[b],v(q[a]));a=l[b];null!=a&&(delete l[b],y(a))}),y=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=q[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(m in e)v(q[e[m]]),
-delete e[m];for(m in l)y(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)a.viewState[c]=JSON.parse(d[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
+null!=m.view&&this.patchViewState(a,m.view),null!=m.cells&&this.patchPage(a,m.cells,f[a.getId()],g),!c||null==m.cells&&null==m.view||(a.needsUpdate=!0))}a=e[b];null!=a&&(delete e[b],v(q[a]));a=l[b];null!=a&&(delete l[b],x(a))}),x=mxUtils.bind(this,function(a){a=mxUtils.parseXml(a.data).documentElement;a=new DiagramPage(a);this.updatePageRoot(a);var b=q[a.getId()];null==b?v(a):(b.root=a.root,this.currentPage==b?this.editor.graph.model.setRoot(b.root):c&&(b.needsUpdate=!0))});v();for(m in e)v(q[e[m]]),
+delete e[m];for(m in l)x(l[m]),delete l[m];return k};EditorUi.prototype.patchViewState=function(a,d){if(null!=a.viewState&&null!=d){a==this.currentPage&&(a.viewState=this.editor.graph.getViewState());for(var c in d)a.viewState[c]=JSON.parse(d[c]);a==this.currentPage&&this.editor.graph.setViewState(a.viewState,!0)}};
 EditorUi.prototype.createParentLookup=function(a,d){function c(a){var c=b[a];null==c&&(c={inserted:[],moved:{}},b[a]=c);return c}var b={};if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++){var f=d[EditorUi.DIFF_INSERT][g],k=null!=f.parent?f.parent:"",l=null!=f.previous?f.previous:"";c(k).inserted[l]=f}if(null!=d[EditorUi.DIFF_UPDATE])for(var n in d[EditorUi.DIFF_UPDATE])f=d[EditorUi.DIFF_UPDATE][n],null!=f.previous&&(k=f.parent,null==k&&(g=a.getCell(n),null!=g&&(g=
 a.getParent(g),null!=g&&(k=g.getId()))),null!=k&&(c(k).moved[f.previous]=n));return b};
 EditorUi.prototype.patchPage=function(a,d,c,b){var g=a==this.currentPage?this.editor.graph.model:new mxGraphModel(a.root),f=this.createParentLookup(g,d);g.beginUpdate();try{var k=g.updateEdgeParent,l=new mxDictionary,n=[];g.updateEdgeParent=function(a,c){!l.get(a)&&b&&(l.put(a,!0),n.push(a))};var q=f[""],e=null!=q&&null!=q.inserted?q.inserted[""]:null,m=null;null!=e&&(m=this.getCellForJson(e));if(null==m){var p=null!=q&&null!=q.moved?q.moved[""]:null;null!=p&&(m=g.getCell(p))}null!=m&&(g.setRoot(m),
@@ -9526,7 +9529,7 @@ DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mx
 DrawioFileSync.prototype.updateDescriptor=function(a){this.file.setDescriptor(a);this.file.descriptorChanged();this.start()};
 DrawioFileSync.prototype.catchup=function(a,d,c,b){if(null!=a&&(null==b||!b())){var g=this.file.getDescriptorRevisionId(a),f=this.file.getCurrentRevisionId();if(f==g)this.file.patchDescriptor(this.file.getDescriptor(),a),null!=d&&d();else if(this.isValidState()){var k=this.file.getDescriptorSecret(a),l=0,n=!1,q=mxUtils.bind(this,function(){if(null==b||!b())if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var e=!0,m=window.setTimeout(mxUtils.bind(this,function(){e=!1;
 this.reload(d,c,b)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(f)+"&to="+encodeURIComponent(g)+(null!=k?"&secret="+encodeURIComponent(k):""),mxUtils.bind(this,function(g){this.file.stats.bytesReceived+=g.getText().length;window.clearTimeout(m);if(e&&(null==b||!b()))if(f!=this.file.getCurrentRevisionId())null!=d&&d();else if(this.isValidState()){var k=null,p=[];if(200<=g.getStatus()&&299>=g.getStatus()&&0<g.getText().length)try{var v=
-JSON.parse(g.getText());if(null!=v&&0<v.length)for(var y=0;y<v.length;y++){var x=this.stringToObject(v[y]);if(x.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(x.v===DrawioFileSync.PROTOCOL&&null!=x.d)k=x.d.checksum,p.push(x.d.patch);else{n=!0;p=[];break}}}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,d,c,b)):l<=this.maxCacheReadyRetries-1&&!n&&401!=g.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(q,
+JSON.parse(g.getText());if(null!=v&&0<v.length)for(var x=0;x<v.length;x++){var y=this.stringToObject(v[x]);if(y.v>DrawioFileSync.PROTOCOL){n=!0;p=[];break}else if(y.v===DrawioFileSync.PROTOCOL&&null!=y.d)k=y.d.checksum,p.push(y.d.patch);else{n=!0;p=[];break}}}catch(B){p=[],null!=window.console&&"1"==urlParams.test&&console.log(B)}try{0<p.length?(this.file.stats.cacheHits++,this.merge(p,k,a,d,c,b)):l<=this.maxCacheReadyRetries-1&&!n&&401!=g.getStatus()?(l++,this.file.stats.cacheMiss++,window.setTimeout(q,
 (l+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,this.reload(d,c,b))}catch(B){null!=c&&c(B)}}else null!=c&&c()}))}else null!=c&&c()});window.setTimeout(q,this.cacheReadyDelay)}else null!=c&&c()}};DrawioFileSync.prototype.reload=function(a,d,c,b){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=a&&a()}),mxUtils.bind(this,function(a){null!=d&&d(a)}),c,b)};
 DrawioFileSync.prototype.merge=function(a,d,c,b,g,f){try{this.file.stats.merged++;this.lastModified=new Date;this.file.shadowPages=null!=this.file.shadowPages?this.file.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.file.shadowData).documentElement);this.file.backupPatch=this.file.isModified()?this.ui.diffPages(this.file.shadowPages,this.ui.pages):null;var k=this.file.ignorePatches(a),l=this.file.getDescriptorRevisionId(c);if(!k){for(f=0;f<a.length;f++)this.file.shadowPages=this.ui.patchPages(this.file.shadowPages,
 a[f]);var n=null!=d?this.ui.getHashValueForPages(this.file.shadowPages):null;"1"==urlParams.test&&EditorUi.debug("Sync.merge",[this],"from",this.file.getCurrentRevisionId(),"to",l,"etag",this.file.getDescriptorEtag(c),"backup",this.file.backupPatch,"attempt",this.catchupRetryCount,"patches",a,"checksum",d==n,d);if(null!=d&&d!=n){var q=this.ui.hashValue(this.file.getCurrentRevisionId()),e=this.ui.hashValue(l);this.file.checksumError(g,a,"From: "+q+"\nTo: "+e+"\nChecksum: "+d+"\nCurrent: "+n,l,"merge");
@@ -9541,8 +9544,8 @@ DrawioFileSync.prototype.createMessage=function(a){return{v:DrawioFileSync.PROTO
 DrawioFileSync.prototype.stop=function(){null!=this.pusher&&(EditorUi.debug("Sync.stop",[this]),null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null);this.updateOnlineState();this.updateStatus()};
 DrawioFileSync.prototype.destroy=function(){if(null!=this.channelId){var a=this.file.getCurrentUser(),d={a:"leave"};null!=a&&(d.name=encodeURIComponent(a.displayName),d.uid=a.id);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(this.objectToString(this.createMessage(d))));this.file.stats.msgSent++}this.stop();null!=this.updateStatusThread&&(window.clearInterval(this.updateStatusThread),this.updateStatusThread=null);null!=this.onlineListener&&(mxEvent.removeListener(window,
 "online",this.onlineListener),this.onlineListener=null);null!=this.visibleListener&&(mxEvent.removeListener(document,"visibilitychange",this.visibleListener),this.visibleListener=null);null!=this.activityListener&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.activityListener),mxEvent.removeListener(document,"keypress",this.activityListener),mxEvent.removeListener(window,"focus",this.activityListener),!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(mxEvent.removeListener(document,
-"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;function mxAsyncCanvas(a){mxAbstractCanvas2D.call(this);this.htmlCanvas=a;a.images=a.images||[];a.subCanvas=a.subCanvas||[]}mxUtils.extend(mxAsyncCanvas,mxAbstractCanvas2D);mxAsyncCanvas.prototype.htmlCanvas=null;mxAsyncCanvas.prototype.canvasIndex=0;mxAsyncCanvas.prototype.waitCounter=0;mxAsyncCanvas.prototype.onComplete=null;mxAsyncCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
+"touchstart",this.activityListener),mxEvent.removeListener(document,"touchmove",this.activityListener)),this.activityListener=null);null!=this.collaboratorsElement&&(this.collaboratorsElement.parentNode.removeChild(this.collaboratorsElement),this.collaboratorsElement=null)};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></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><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></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="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></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,d,c,b,g){};
 mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
 mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,d,c,b){};mxAsyncCanvas.prototype.roundrect=function(a,d,c,b,g,f){};mxAsyncCanvas.prototype.ellipse=function(a,d,c,b){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
@@ -9614,9 +9617,9 @@ a.getStatus()&&299>=a.getStatus()?(a=JSON.parse(a.getText()),a.refresh_token=k.r
 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 d=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();d&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
 DriveClient.prototype.updateUser=function(a,d){try{var c={Authorization:"Bearer "+this.token};this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(b){var c=JSON.parse(b);this.executeRequest({url:"/about"},mxUtils.bind(this,function(b){var d=mxResources.get("notAvailable"),f=d,g=null;null!=b&&null!=b.user&&(d=b.user.emailAddress,f=b.user.displayName,g=null!=b.user.picture?b.user.picture.url:null);this.setUser(new DrawioUser(c.id,d,f,g,c.locale));this.userId=
-c.id;null!=a&&a()}),d)}),d,null,null,null,null,c)}catch(b){if(null!=d)d(b);else throw b;}};DriveClient.prototype.copyFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true",method:"POST",params:{title:d,properties:[{key:"channel",value:Editor.guid()}]}},c,b)};DriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest(this.createDriveRequest(a,{title:d}),c,b)};
-DriveClient.prototype.moveFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:d}]}),c,b)};DriveClient.prototype.createDriveRequest=function(a,d){return{url:"/files/"+a+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:d}};DriveClient.prototype.getLibrary=function(a,d,c){return this.getFile(a,d,c,!0,!0)};
-DriveClient.prototype.loadDescriptor=function(a,d,c,b){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=b?b:this.allFields)},d,c)};DriveClient.prototype.getCustomProperty=function(a,d){var c=a.properties,b=null;if(null!=c)for(var g=0;g<c.length;g++)if(c[g].key==d){b=c[g].value;break}return b};
+c.id;null!=a&&a()}),d)}),d,null,null,null,null,c)}catch(b){if(null!=d)d(b);else throw b;}};DriveClient.prototype.copyFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest({url:"/files/"+a+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",method:"POST",params:{title:d,properties:[{key:"channel",value:Editor.guid()}]}},c,b)};
+DriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest(this.createDriveRequest(a,{title:d}),c,b)};DriveClient.prototype.moveFile=function(a,d,c,b){null!=a&&null!=d&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:d}]}),c,b)};DriveClient.prototype.createDriveRequest=function(a,d){return{url:"/files/"+a+"?uploadType=multipart&supportsAllDrives=true",method:"PUT",contentType:"application/json; charset=UTF-8",params:d}};
+DriveClient.prototype.getLibrary=function(a,d,c){return this.getFile(a,d,c,!0,!0)};DriveClient.prototype.loadDescriptor=function(a,d,c,b){this.executeRequest({url:"/files/"+a+"?supportsAllDrives=true&fields="+(null!=b?b:this.allFields)},d,c)};DriveClient.prototype.getCustomProperty=function(a,d){var c=a.properties,b=null;if(null!=c)for(var g=0;g<c.length;g++)if(c[g].key==d){b=c[g].value;break}return b};
 DriveClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;g=null!=g?g:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+a+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},mxUtils.bind(this,function(b){b.title=b.originalFilename;b.headRevisionId=b.id;b.id=a;this.getXmlFile(b,d,c)}),c):this.loadDescriptor(a,mxUtils.bind(this,function(a){try{if(null!=this.user){var f=/\.png$/i.test(a.title);/\.v(dx|sdx?)$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&
 f?this.ui.convertFile(a.downloadUrl,a.title,a.mimeType,this.extension,d,c,null,{Authorization:"Bearer "+this.token}):b||g||a.mimeType==this.libraryMimeType||a.mimeType==this.xmlMimeType?this.getXmlFile(a,d,c,!0,g):this.getXmlFile(a,d,c)}else c({message:mxResources.get("loggedOut")})}catch(l){if(null!=c)c(l);else throw l;}}),c)};DriveClient.prototype.isGoogleRealtimeMimeType=function(a){return null!=a&&"application/vnd.jgraph.mxfile."==a.substring(0,30)};
 DriveClient.prototype.getXmlFile=function(a,d,c,b,g){try{var f={Authorization:"Bearer "+this.token},k=a.downloadUrl;this.ui.loadUrl(k,mxUtils.bind(this,function(b){try{if(null==b)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||g)a.mimeType!=this.libraryMimeType||g?d(new DriveLibrary(this.ui,b,a)):c({message:mxResources.get("notADiagramFile")});else{var f=!1;if(/\.png$/i.test(a.title)){var l=b.lastIndexOf(",");if(0<l){var e=this.ui.extractGraphModelFromPng(b.substring(l+
@@ -9626,12 +9629,12 @@ c)c(u);else throw u;}}),c,null!=a.mimeType&&"image/"==a.mimeType.substring(0,6)&
 DriveClient.prototype.saveFile=function(a,d,c,b,g,f,k,l){try{var n=0;a.saveLevel=1;var q=mxUtils.bind(this,function(c){if(null!=b)b(c);else throw c;try{if(!a.isConflict(c)){var d="sl_"+a.saveLevel+"-error_"+(a.getErrorMessage(c)||"unknown");null!=c&&null!=c.error&&null!=c.error.code&&(d+="-code_"+c.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+a.getHash()+"-rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+a.desc.mimeType+(this.ui.editor.autosave?"":
 "-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),action:d,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}}catch(D){}}),e=mxUtils.bind(this,function(b){q(b);try{EditorUi.logError(b.message,null,null,b),EditorUi.sendReport("Critical error in DriveClient.saveFile "+(new Date).toISOString()+":\n\nUserAgent="+navigator.userAgent+"\nAppVersion="+
 navigator.appVersion+"\nAppName="+navigator.appName+"\nPlatform="+navigator.platform+"\nFile="+a.desc.id+"."+a.desc.headRevisionId+"\nMime="+a.desc.mimeType+"\nUser="+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")+"\nSaveLevel="+a.saveLevel+"\nSaveAsPng="+(this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle()))+"\nRetryCount="+n+"\nError="+b+"\nMessage="+b.message+"\n\nStack:\n"+b.stack)}catch(F){}});if(a.isEditable()&&null!=a.desc){var m=(new Date).getTime(),
-p=a.desc.etag,u=a.desc.modifiedDate,t=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var y=null,x=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(B.mimeType))B.mimeType=this.xmlMimeType,y=a.desc,x=d=!0;else if("application/octet-stream"==B.mimeType||"1"==urlParams["override-mime"]&&B.mimeType!=this.xmlMimeType)B.mimeType=this.xmlMimeType;var A=mxUtils.bind(this,function(b,g,A){try{a.saveLevel=3;a.constructor==DriveFile&&
+p=a.desc.etag,u=a.desc.modifiedDate,t=a.desc.headRevisionId,v=this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle());f=null!=f?f:!1;var x=null,y=!1,B={mimeType:a.desc.mimeType,title:a.getTitle()};if(this.isGoogleRealtimeMimeType(B.mimeType))B.mimeType=this.xmlMimeType,x=a.desc,y=d=!0;else if("application/octet-stream"==B.mimeType||"1"==urlParams["override-mime"]&&B.mimeType!=this.xmlMimeType)B.mimeType=this.xmlMimeType;var A=mxUtils.bind(this,function(b,g,A){try{a.saveLevel=3;a.constructor==DriveFile&&
 (null==l&&(l=[]),null==a.getChannelId()&&l.push({key:"channel",value:Editor.guid(32)}),null==a.getChannelKey()&&l.push({key:"key",value:Editor.guid(32)}),l.push({key:"secret",value:Editor.guid(32)}));A||(null!=b||f||(b=this.placeholderThumbnail,g=this.placeholderMimeType),null!=b&&null!=g&&(B.thumbnail={image:b,mimeType:g}));var z=a.getData(),F=mxUtils.bind(this,function(b){try{if(a.saveDelay=(new Date).getTime()-m,a.saveLevel=11,null==b)q({message:mxResources.get("errorSavingFile")+": Empty response"});
 else{var f=(new Date(b.modifiedDate)).getTime()-(new Date(u)).getTime();if(0>=f||p==b.etag||d&&t==b.headRevisionId){a.saveLevel=12;var g=[];0>=f&&g.push("invalid modified time");p==b.etag&&g.push("stale etag");d&&t==b.headRevisionId&&g.push("stale revision");var k=g.join(", ");q({message:mxResources.get("errorSavingFile")+": "+k},b);try{EditorUi.logError("Critical: Error saving to Google Drive "+a.desc.id,null,"from-"+t+"."+u+"-"+this.ui.hashValue(p)+"-to-"+b.headRevisionId+"."+b.modifiedDate+"-"+
-this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(O){}}else if(a.saveLevel=null,c(b,z),null!=y){this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+y.id+"/revisions/"+y.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
-"-CONVERT-FILE-"+a.getHash(),action:"from_"+y.id+"."+y.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(O){}}}}catch(O){e(O)}}),D=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=l&&(B.properties=l);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=
-this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this,function(){l=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest(this.createUploadRequest(a.getId(),B,c,d||b||k,f,b?null:g,x),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&F(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+
+this.ui.hashValue(b.etag)+(0<k.length?"-errors-"+k:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync"))}catch(O){}}else if(a.saveLevel=null,c(b,z),null!=x){this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(a){a.pinned=!0;this.executeRequest({url:"/files/"+x.id+"/revisions/"+x.headRevisionId,method:"PUT",params:a})})));try{EditorUi.logEvent({category:a.convertedFrom+
+"-CONVERT-FILE-"+a.getHash(),action:"from_"+x.id+"."+x.headRevisionId+"-to_"+a.desc.id+"."+a.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=a.sync?"-client_"+a.sync.clientId:"nosync")})}catch(O){}}}}catch(O){e(O)}}),D=mxUtils.bind(this,function(c,f){a.saveLevel=4;try{null!=l&&(B.properties=l);var g=k||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),m=mxUtils.bind(this,function(b){a.saveLevel=5;try{var k=a.desc.mimeType!=
+this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,l=!0,m=null;try{m=window.setTimeout(mxUtils.bind(this,function(){l=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(W){}this.executeRequest(this.createUploadRequest(a.getId(),B,c,d||b||k,f,b?null:g,y),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&F(a)}),mxUtils.bind(this,function(b){window.clearTimeout(m);if(l){a.saveLevel=6;try{a.isConflict(b)?this.executeRequest({url:"/files/"+
 a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(c){a.saveLevel=7;try{if(null!=c&&c.etag==g)if(n<this.staleEtagMaxRetries){n++;var d=2*n*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(p,d);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",n,"delay",d)}else{p(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+a.getHash(),action:"rev_"+a.desc.headRevisionId+"-mod_"+a.desc.modifiedDate+"-size_"+a.getSize()+"-mime_"+
 a.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(a.isAutosave()?"":"-noauto")+(a.changeListenerEnabled?"":"-nolisten")+(a.inConflictState?"-conflict":"")+(a.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=a.sync?"-client_"+a.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&c.headRevisionId==t&&EditorUi.debug("DriveClient: Remote Etag Changed","local",g,"remote",c.etag,"rev",a.desc.headRevisionId,"response",[c],"file",[a]),q(b,c)}catch(ba){e(ba)}}),
 mxUtils.bind(this,function(){q(b)})):q(b)}catch(ga){e(ga)}}}))}catch(W){e(W)}}),p=mxUtils.bind(this,function(b){a.saveLevel=9;if(b)m(b);else{var c=!0,d=null;try{d=window.setTimeout(mxUtils.bind(this,function(){c=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),3*this.ui.timeout)}catch(V){}this.executeRequest({url:"/files/"+a.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(f){window.clearTimeout(d);if(c){a.saveLevel=10;try{null!=f&&f.headRevisionId==
@@ -9639,8 +9642,8 @@ t?("1"==urlParams.test&&g!=f.etag&&EditorUi.debug("DriveClient: Preflight Etag U
 a);b.getContext("2d").drawImage(A,0,0,b.width,b.height);var c=b.toDataURL(),c=c.substring(c.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");B.thumbnail={image:c,mimeType:"image/png"};p(!1)}catch(V){try{p(!1)}catch(W){e(W)}}});A.src="data:image/png;base64,"+c}else p(!1)}catch(Y){e(Y)}});v?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){D(a,!0)}),q,this.ui.getCurrentFile()!=a?z:null):D(z,!1)}catch(J){e(J)}});try{a.saveLevel=2,(f||v||a.constructor==DriveLibrary||!this.enableThumbnails||"0"==
 urlParams.thumb||null!=B.mimeType&&"application/vnd.jgraph.mxfile"!=B.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){try{var b=null;try{null!=a&&(b=a.toDataURL("image/png")),null!=b&&(b=b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(D){b=null}A(b,"image/png")}catch(D){e(D)}})))&&A(null,null,a.constructor!=DriveLibrary)}catch(z){e(z)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(z){e(z)}};
 DriveClient.prototype.insertFile=function(a,d,c,b,g,f,k){f=null!=f?f:this.xmlMimeType;a={mimeType:f,title:a};null!=c&&(a.parents=[{kind:"drive#fileLink",id:c}]);this.executeRequest(this.createUploadRequest(null,a,d,!1,k),mxUtils.bind(this,function(a){f==this.libraryMimeType?b(new DriveLibrary(this.ui,d,a)):0==a?null!=g&&g({message:mxResources.get("errorSavingFile")}):b(new DriveFile(this.ui,d,a))}),g)};
-DriveClient.prototype.createUploadRequest=function(a,d,c,b,g,f,k){g=null!=g?g:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(l["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:l,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(d)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+
-(null!=c?g?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");k&&(a.fullUrl+="&pinned=true");return a};
+DriveClient.prototype.createUploadRequest=function(a,d,c,b,g,f,k){g=null!=g?g:!1;var l={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=f&&(l["If-Match"]=f);a={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=a?"/"+a:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=a?"PUT":"POST",headers:l,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(d)+
+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=c?g?c:Base64.encode(c):"")+"\r\n---------314159265358979323846--"};b||(a.fullUrl+="&newRevision=false");k&&(a.fullUrl+="&pinned=true");return a};
 DriveClient.prototype.pickFile=function(a,d){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var a=d?"genericPicker":"filePicker",b=mxUtils.bind(this,function(c){"picker modal-dialog-bg picker-dialog-bg"==
 mxEvent.getSource(c).className&&(mxEvent.removeListener(document,"click",b),this[a].setVisible(!1))});if(null==this[a]||this[a+"Token"]!=this.token){this[a+"Token"]=this.token;var g=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);d?(g.setMimeTypes("*/*"),f.setMimeTypes("*/*"),
 k.setMimeTypes("*/*")):(g.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[a]=(new google.picker.PickerBuilder).setOAuthToken(this[a+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(g).addView(f).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
@@ -9721,7 +9724,7 @@ c,g))}),c)});null==this.token||6E4>this.tokenExpiresOn-Date.now()?this.authentic
 OneDriveClient.prototype.getItemURL=function(a,d){var c=a.split("/");return 1<c.length?(d?"":this.baseUrl)+"/drives/"+c[0]+"/items/"+c[1]:(d?"":this.baseUrl)+"/me/drive/items/"+a};OneDriveClient.prototype.getLibrary=function(a,d,c){this.getFile(a,d,c,!1,!0)};
 OneDriveClient.prototype.getFile=function(a,d,c,b,g){g=null!=g?g:!1;this.executeRequest(this.getItemURL(a),mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var b=JSON.parse(a.getText()),f=/\.png$/i.test(b.name);if(/\.v(dx|sdx?)$/i.test(b.name)||/\.gliffy$/i.test(b.name)||/\.pdf$/i.test(b.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(b["@microsoft.graph.downloadUrl"],b.name,null!=b.file?b.file.mimeType:null,this.extension,d,c);else{var n=!0,q=window.setTimeout(mxUtils.bind(this,
 function(){n=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(b["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){try{if(window.clearTimeout(q),n){var e=f?a.lastIndexOf(","):-1,k=null;if(0<e){var l=this.ui.extractGraphModelFromPng(a.substring(e+1));null!=l&&0<l.length?a=l:k=new LocalFile(this.ui,a,b.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==a.substring(0,32)){var t=a.substring(22);a=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t)}Graph.fileSupport&&(new XMLHttpRequest).upload&&
-this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(y){if(null!=c)c(y);else throw y;}}),b.name):null!=k?d(k):g?d(new OneDriveLibrary(this.ui,a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=c)c(v);else throw v;
+this.ui.isRemoteFileFormat(a,b["@microsoft.graph.downloadUrl"])?this.ui.parseFile(new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){try{4==a.readyState&&(200<=a.status&&299>=a.status?d(new LocalFile(this.ui,a.responseText,b.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(x){if(null!=c)c(x);else throw x;}}),b.name):null!=k?d(k):g?d(new OneDriveLibrary(this.ui,a,b)):d(new OneDriveFile(this.ui,a,b))}}catch(v){if(null!=c)c(v);else throw v;
 }}),mxUtils.bind(this,function(a){window.clearTimeout(q);n&&c(this.parseRequestText(a))}),f||null!=b.file&&null!=b.file.mimeType&&("image/"==b.file.mimeType.substring(0,6)||"application/pdf"==b.file.mimeType))}}else c(this.parseRequestText(a))}),c)};
 OneDriveClient.prototype.renameFile=function(a,d,c,b){null!=a&&null!=d&&(this.isValidFilename(d)?this.checkExists(a.getParentId(),d,!1,mxUtils.bind(this,function(g){g?this.writeFile(this.getItemURL(a.getId()),JSON.stringify({name:d}),"PATCH","application/json",c,b):b()})):b({message:this.invalidFilenameRegExs[0].test(d)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};
 OneDriveClient.prototype.moveFile=function(a,d,c,b){d=this.getItemRef(d);var g=this.getItemRef(a);d.driveId!=g.driveId?b({message:mxResources.get("cannotMoveOneDrive",null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(a),JSON.stringify({parentReference:d}),"PATCH","application/json",c,b)};OneDriveClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g)};
@@ -9757,7 +9760,7 @@ GitHubClient.prototype.getFile=function(a,d,c,b,g){b=null!=b?b:!1;var f=a.split(
 else f="&t="+(new Date).getTime(),a=new mxXmlRequest(this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+n+f,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{d(this.createGitHubFile(k,l,n,JSON.parse(a.getText()),b))}catch(m){c(m)}}),c)};
 GitHubClient.prototype.createGitHubFile=function(a,d,c,b,g){a={org:a,repo:d,ref:c,name:b.name,path:b.path,sha:b.sha,html_url:b.html_url,download_url:b.download_url};d=b.content;"base64"===b.encoding&&(/\.jpe?g$/i.test(b.name)?d="data:image/jpeg;base64,"+d:/\.gif$/i.test(b.name)?d="data:image/gif;base64,"+d:/\.png$/i.test(b.name)?(b=this.ui.extractGraphModelFromPng(d),d=null!=b&&0<b.length?b:"data:image/png;base64,"+d):d=Base64.decode(d));return g?new GitHubLibrary(this.ui,d,a):new GitHubFile(this.ui,
 d,a)};GitHubClient.prototype.insertLibrary=function(a,d,c,b,g){this.insertFile(a,d,c,b,!0,g,!1)};
-GitHubClient.prototype.insertFile=function(a,d,c,b,g,f,k){g=null!=g?g:!1;f=f.split("/");var l=f[0],n=f[1],q=f[2],e=f.slice(3,f.length).join("/");0<e.length&&(e+="/");e+=a;this.checkExists(l+"/"+n+"/"+q+"/"+e,!0,mxUtils.bind(this,function(f,p){f?g?(k||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,q,e,a,d,p,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());c(this.createGitHubFile(l,n,q,d.content,g))}catch(y){b(y)}}),b)}),b)):c(new GitHubFile(this.ui,
+GitHubClient.prototype.insertFile=function(a,d,c,b,g,f,k){g=null!=g?g:!1;f=f.split("/");var l=f[0],n=f[1],q=f[2],e=f.slice(3,f.length).join("/");0<e.length&&(e+="/");e+=a;this.checkExists(l+"/"+n+"/"+q+"/"+e,!0,mxUtils.bind(this,function(f,p){f?g?(k||(d=Base64.encode(d)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,n,q,e,a,d,p,mxUtils.bind(this,function(a){try{var d=JSON.parse(a.getText());c(this.createGitHubFile(l,n,q,d.content,g))}catch(x){b(x)}}),b)}),b)):c(new GitHubFile(this.ui,
 d,{org:l,repo:n,ref:q,name:a,path:e,sha:p,isNew:!0})):b()}))};GitHubClient.prototype.showCommitDialog=function(a,d,c,b){var g=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(d?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){g();c(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){b()}),null,280);this.ui.showDialog(a.container,400,80,!0,!1);a.init()};
 GitHubClient.prototype.writeFile=function(a,d,c,b,g,f,k,l,n){f.length>=this.maxFileSize?n({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(c={path:b,branch:decodeURIComponent(c),message:g,content:f},null!=k&&(c.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+d+"/contents/"+b,JSON.stringify(c),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),mxUtils.bind(this,function(a){404==a.code&&(a.helpLink="https://github.com/settings/connections/applications/"+
 this.clientId,a.code=null);n(a)})))};
@@ -9767,17 +9770,17 @@ q(a.meta.sha,Base64.encode(a.getData()))});b?this.getSha(f,k,n,l,mxUtils.bind(th
 GitHubClient.prototype.showGitHubDialog=function(a,d){var c=null,b=null,g=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing=
 "border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m=
 mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;B()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
-function(){f=null;x()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");y()})))})(a)}n.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),t=null,v=null,y=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
-"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){y(k+1)});mxEvent.addListener(t,
-"click",A);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var A=!0,z=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(e==("dir"==k.type)){var p=q.cloneNode();p.style.backgroundColor=
-A?"#eeeeee":"";A=!A;var v=document.createElement("img");v.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");v.setAttribute("align","absmiddle");v.style.marginRight="4px";v.style.marginTop="-4px";v.width=20;p.appendChild(v);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,y()):a&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);z++}})(l[k],k)});e(!0);a&&e(!1)}}),u,!0)}),x=mxUtils.bind(this,
+function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}n.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),t=null,v=null,x=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
+"/repos/"+c+"/"+b+"/contents/"+f+"?ref="+encodeURIComponent(g)+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){x(k+1)});mxEvent.addListener(t,
+"click",A);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var A=!0,z=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k,l){if(e==("dir"==k.type)){var p=q.cloneNode();p.style.backgroundColor=
+A?"#eeeeee":"";A=!A;var v=document.createElement("img");v.src=IMAGE_PATH+"/"+("dir"==k.type?"folder.png":"file.png");v.setAttribute("align","absmiddle");v.style.marginRight="4px";v.style.marginTop="-4px";v.width=20;p.appendChild(v);p.appendChild(m(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,x()):a&&"file"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+k.path))})));n.appendChild(p);z++}})(l[k],k)});e(!0);a&&e(!1)}}),u,!0)}),y=mxUtils.bind(this,
 function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+b+"/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=
-mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=
-a.name;f="";y()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),u)}),B=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&mxEvent.removeListener(n,"scroll",v);null!=t&&null!=t.parentNode&&
+mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=
+a.name;f="";x()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),u)}),B=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&mxEvent.removeListener(n,"scroll",v);null!=t&&null!=t.parentNode&&
 t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(d){this.ui.spinner.stop();d=JSON.parse(d.getText());if(null==d||0==d.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==a&&(n.appendChild(m(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 d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=g=null,x()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";y()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
+function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){if(null!=a){var d=a.split("/");if(1<d.length){a=d[0];var e=d[1];3>d.length?(c=a,b=e,f=g=null,y()):this.ui.spinner.spin(n,mxResources.get("loading"))&&(d=encodeURIComponent(d.slice(2,d.length).join("/")),this.getFile(a+"/"+e+"/"+d,mxUtils.bind(this,function(a){this.ui.spinner.stop();c=a.meta.org;b=a.meta.repo;g=decodeURIComponent(a.meta.ref);f="";x()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();
 this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var e=0;e<d.length;e++)mxUtils.bind(this,function(a,d){var e=q.cloneNode();e.style.backgroundColor=0==d%2?"#eeeeee":"";e.appendChild(m(a.full_name,mxUtils.bind(this,function(){c=a.owner.login;b=a.name;g=a.default_branch;
-f="";y()})));n.appendChild(e)})(d[e],e)}100==d.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}),u)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+f="";x()})));n.appendChild(e)})(d[e],e)}100==d.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}),u)});B()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,d,c){DrawioFile.call(this,a,d);this.meta=c;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
 TrelloFile.prototype.save=function(a,d,c){this.doSave(this.getTitle(),d,c)};TrelloFile.prototype.saveAs=function(a,d,c){this.doSave(a,d,c)};TrelloFile.prototype.doSave=function(a,d,c){var b=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=b;this.saveFile(a,!1,d,c)};
 TrelloFile.prototype.saveFile=function(a,d,c,b){if(this.isEditable())if(this.savingFile)null!=b&&(this.saveNeededCounter++,b({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.savingFileTime=new Date,this.getTitle()==a){var g=this.isModified,f=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return f}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(f){this.savingFile=!1;this.isModified=g;this.meta=f;this.contentChanged();null!=c&&
 c();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,d,c,b))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=g;this.setModified(f||this.isModified());if(null!=b){if(null!=a&&null!=a.retry){var c=a.retry;a.retry=function(){k();c()}}b(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(f){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(f){this.savingFile=!1;null!=c&&c();this.ui.fileLoaded(f);0<this.saveNeededCounter&&
@@ -9809,7 +9812,7 @@ mxResources.get("fileNotFound"))}):400===a.getStatus()?c({status:400}):c({status
 GitLabClient.prototype.getRefIndex=function(a,d,c,b,g){if(null!=g)c(a,g);else{var f=a.length-2,k=mxUtils.bind(this,function(){if(2>f)b({message:mxResources.get("fileNotFound")});else{var g=Math.max(f-1,0),n=a.slice(0,g).join("/"),g=a[g],q=a[f],e=a.slice(f+1,a.length).join("/"),n=this.baseUrl+"/projects/"+encodeURIComponent(n+"/"+g)+"/repository/"+(d?"tree?path="+e+"&ref="+q:"files/"+encodeURIComponent(e)+"?ref="+q),m=new mxXmlRequest(n,null,"HEAD");this.executeRequest(m,mxUtils.bind(this,function(){200==
 m.getStatus()?c(a,f):b({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==m.getStatus()?(f--,k()):b({message:mxResources.get("fileNotFound")})}))}});k()}};
 GitLabClient.prototype.getFile=function(a,d,c,b,g,f){b=null!=b?b:!1;this.getRefIndex(a.split("/"),!1,mxUtils.bind(this,function(f,l){var k=Math.max(l-1,0),q=f.slice(0,k).join("/"),e=f[k],m=f[l];a=f.slice(l+1,f.length).join("/");k=/\.png$/i.test(a);if(!g&&(/\.v(dx|sdx?)$/i.test(a)||/\.gliffy$/i.test(a)||/\.pdf$/i.test(a)||!this.ui.useCanvasForExport&&k))if(null!=this.token){var k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+e)+"/repository/files/"+encodeURIComponent(a)+
-"?ref="+m;f=a.split("/");this.ui.convertFile(p+k,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(x){c(x)}}),c)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+e)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(p+
+"?ref="+m;f=a.split("/");this.ui.convertFile(p+k,0<f.length?f[f.length-1]:a,null,this.extension,d,c,mxUtils.bind(this,function(a,b,c){a=new mxXmlRequest(a,null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.getFileContent(JSON.parse(a.getText())))}catch(y){c(y)}}),c)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),p=this.baseUrl+"/projects/"+encodeURIComponent(q+"/"+e)+"/repository/files/"+encodeURIComponent(a)+"?ref="+m,k=new mxXmlRequest(p+
 k,null,"GET"),this.executeRequest(k,mxUtils.bind(this,function(a){try{d(this.createGitLabFile(q,e,m,JSON.parse(a.getText()),b,l))}catch(t){c(t)}}),c)}),c,f)};
 GitLabClient.prototype.getFileContent=function(a){var d=a.file_name,c=a.content;"base64"===a.encoding&&(/\.jpe?g$/i.test(d)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(d)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(d)?c="data:application/pdf;base64,"+c:/\.png$/i.test(d)?(a=this.ui.extractGraphModelFromPng(c),c=null!=a&&0<a.length?a:"data:image/png;base64,"+c):c=Base64.decode(c));return c};
 GitLabClient.prototype.createGitLabFile=function(a,d,c,b,g,f){var k=DRAWIO_GITLAB_URL+"/";a={org:a,repo:d,ref:c,name:b.file_name,path:b.file_path,html_url:k+a+"/"+d+"/blob/"+c+"/"+b.file_path,download_url:k+a+"/"+d+"/raw/"+c+"/"+b.file_path+"?inline=false",last_commit_id:b.last_commit_id,refPos:f};b=this.getFileContent(b);return g?new GitLabLibrary(this.ui,b,a):new GitLabFile(this.ui,b,a)};
@@ -9823,18 +9826,18 @@ function(b){q(a.meta.last_commit_id,b)}),c,this.ui.getCurrentFile()!=a?a.getData
 GitLabClient.prototype.showGitLabDialog=function(a,d){var c=null,b=null,g=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="304px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.border="1px solid lightgray";n.style.boxSizing=
 "border-box";n.style.padding="4px";n.style.overflow="auto";n.style.lineHeight="1.2em";n.style.height="274px";k.appendChild(n);var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.boxSizing="border-box";q.style.overflow="hidden";q.style.padding="4px";q.style.width="100%";var e=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){d(c+"/"+b+"/"+encodeURIComponent(g)+"/"+f)}));this.ui.showDialog(e.container,420,360,!0,!0);a&&e.okButton.parentNode.removeChild(e.okButton);var m=
 mxUtils.bind(this,function(a,b,c){var d=document.createElement("a");d.setAttribute("href","javascript:void(0);");d.setAttribute("title",a);mxUtils.write(d,a);mxEvent.addListener(d,"click",b);null!=c&&(a=q.cloneNode(),a.style.padding=c,a.appendChild(d),d=a);return d}),p=mxUtils.bind(this,function(a){var d=document.createElement("div");d.style.marginBottom="8px";d.appendChild(m(c+"/"+b,mxUtils.bind(this,function(){f=null;B()})));a||(mxUtils.write(d," / "),d.appendChild(m(decodeURIComponent(g),mxUtils.bind(this,
-function(){f=null;x()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");y()})))})(a)}n.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),t=null,v=null,y=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
-"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){y(k+
-1)});mxEvent.addListener(t,"click",A);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");y()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var z=!0,u=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(e==("tree"==k.type)){var l=
-q.cloneNode();l.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;l.appendChild(p);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(f=k.path,y()):a&&"blob"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);u++}})(l[k])});e(!0);a&&e(!1);100==
-u&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&A()},mxEvent.addListener(n,"scroll",v))}}),u,!0)}),x=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&
-t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){x(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));
-else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";y()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),u)});e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var B=mxUtils.bind(this,
+function(){f=null;y()}))));if(null!=f&&0<f.length){var e=f.split("/");for(a=0;a<e.length;a++)(function(a){mxUtils.write(d," / ");d.appendChild(m(e[a],mxUtils.bind(this,function(){f=e.slice(0,a+1).join("/");x()})))})(a)}n.appendChild(d)}),u=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(f=g=b=c=null,B()):this.ui.hideDialog()}))}),t=null,v=null,x=mxUtils.bind(this,function(k){null==k&&(n.innerHTML="",k=1);var l=new mxXmlRequest(this.baseUrl+
+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/tree?path="+f+"&ref="+g+"&per_page=100&page="+k,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));e.okButton.removeAttribute("disabled");null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var A=mxUtils.bind(this,function(){x(k+
+1)});mxEvent.addListener(t,"click",A);this.executeRequest(l,mxUtils.bind(this,function(e){this.ui.spinner.stop();1==k&&(p(!g),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,B();else{var a=f.split("/");f=a.slice(0,a.length-1).join("/");x()}}),"4px")));var l=JSON.parse(e.getText());if(null==l||0==l.length)mxUtils.write(n,mxResources.get("noFiles"));else{var z=!0,u=0;e=mxUtils.bind(this,function(e){for(var k=0;k<l.length;k++)mxUtils.bind(this,function(k){if(e==("tree"==k.type)){var l=
+q.cloneNode();l.style.backgroundColor=z?"#eeeeee":"";z=!z;var p=document.createElement("img");p.src=IMAGE_PATH+"/"+("tree"==k.type?"folder.png":"file.png");p.setAttribute("align","absmiddle");p.style.marginRight="4px";p.style.marginTop="-4px";p.width=20;l.appendChild(p);l.appendChild(m(k.name+("tree"==k.type?"/":""),mxUtils.bind(this,function(){"tree"==k.type?(f=k.path,x()):a&&"blob"==k.type&&(this.ui.hideDialog(),d(c+"/"+b+"/"+g+"/"+k.path))})));n.appendChild(l);u++}})(l[k])});e(!0);a&&e(!1);100==
+u&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&A()},mxEvent.addListener(n,"scroll",v))}}),u,!0)}),y=mxUtils.bind(this,function(a){null==a&&(n.innerHTML="",a=1);var d=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+b)+"/repository/branches?per_page=100&page="+a,null,"GET");e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&
+t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(d,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(p(!0),n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){f=null;B()}),"4px")));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(n,mxResources.get("noFiles"));
+else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a,b){var c=q.cloneNode();c.style.backgroundColor=0==b%2?"#eeeeee":"";c.appendChild(m(a.name,mxUtils.bind(this,function(){g=encodeURIComponent(a.name);f="";x()})));n.appendChild(c)})(b[c],c);100==b.length&&(n.appendChild(t),v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",v))}}),u)});e.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(n,mxResources.get("loading"));var B=mxUtils.bind(this,
 function(a){this.ui.spinner.stop();null==a&&(n.innerHTML="",a=1);null!=v&&(mxEvent.removeListener(n,"scroll",v),v=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var d=mxUtils.bind(this,function(){B(a+1)});mxEvent.addListener(t,"click",d);var e=mxUtils.bind(this,function(a){this.ui.spinner.spin(n,mxResources.get("loading"));var b=new mxXmlRequest(this.baseUrl+
 "/groups?per_page=100",null,"GET");this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();a(JSON.parse(b.getText()))}),u)}),k=mxUtils.bind(this,function(a,b){this.ui.spinner.spin(n,mxResources.get("loading"));var c=new mxXmlRequest(this.baseUrl+"/groups/"+a.id+"/projects?per_page=100",null,"GET");this.executeRequest(c,mxUtils.bind(this,function(c){this.ui.spinner.stop();b(a,JSON.parse(c.getText()))}),u)});e(mxUtils.bind(this,function(e){var l=new mxXmlRequest(this.baseUrl+"/users/"+
 this.user.id+"/projects?per_page=100&page="+a,null,"GET");this.ui.spinner.spin(n,mxResources.get("loading"));this.executeRequest(l,mxUtils.bind(this,function(l){this.ui.spinner.stop();l=JSON.parse(l.getText());if(null!=l&&0!=l.length||null!=e&&0!=e.length){1==a&&(n.appendChild(m(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(a=a.split("/"),1<a.length?(c=a[0],b=a[1],g="master",
-f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),y()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var p=!0,z=0;z<l.length;z++)mxUtils.bind(this,function(a,d){var e=q.cloneNode();e.style.backgroundColor=p?"#eeeeee":"";p=!p;e.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=
-a.path;g=a.default_branch||"master";f="";y()})));n.appendChild(e)})(l[z],z);for(z=0;z<e.length;z++)k(e[z],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var k=q.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(d){k.appendChild(m(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";y()})));n.appendChild(k)})(d[e])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(t),
+f=null,2<a.length&&(f=encodeURIComponent(a.slice(2,a.length).join("/"))),x()):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n),mxUtils.br(n));for(var p=!0,z=0;z<l.length;z++)mxUtils.bind(this,function(a,d){var e=q.cloneNode();e.style.backgroundColor=p?"#eeeeee":"";p=!p;e.appendChild(m(a.name_with_namespace,mxUtils.bind(this,function(){c=a.owner.username;b=
+a.path;g=a.default_branch||"master";f="";x()})));n.appendChild(e)})(l[z],z);for(z=0;z<e.length;z++)k(e[z],mxUtils.bind(this,function(a,d){for(var e=0;e<d.length;e++){var k=q.cloneNode();k.style.backgroundColor=p?"#eeeeee":"";p=!p;mxUtils.bind(this,function(d){k.appendChild(m(d.name_with_namespace,mxUtils.bind(this,function(){c=a.full_path;b=d.path;g=d.default_branch||"master";f="";x()})));n.appendChild(k)})(d[e])}}))}else mxUtils.write(n,mxResources.get("noFiles"));100==l.length&&(n.appendChild(t),
 v=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&d()},mxEvent.addListener(n,"scroll",v))}),u)}))});this.token?this.user?B():this.updateUser(function(){B()},u,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){B()},u,!0)}),u)};GitLabClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};DrawioComment=function(a,d,c,b,g,f,k){this.file=a;this.id=d;this.content=c;this.modifiedDate=b;this.createdDate=g;this.isResolved=f;this.user=k;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,d,c,b,g){d()};DrawioComment.prototype.editComment=function(a,d,c){d()};DrawioComment.prototype.deleteComment=function(a,d){a()};DriveComment=function(a,d,c,b,g,f,k,l){DrawioComment.call(this,a,d,c,b,g,f,k);this.pCommentId=l};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(a,d,c,b,g){a={content:a.content};b?a.verb="resolve":g&&(a.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:a,method:"POST"},mxUtils.bind(this,function(a){d(a.replyId)}),c)};
 DriveComment.prototype.editComment=function(a,d,c){this.content=a;a={content:a};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:a,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:a,method:"PATCH"},d,c)};
 DriveComment.prototype.deleteComment=function(a,d){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},a,d)};App=function(a,d,c){EditorUi.call(this,a,d,null!=c?c:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.isModified()){var c={category:"DISCARD-FILE-"+a.getHash(),action:(a.savingFile?"saving":"")+(a.savingFile&&null!=a.savingFileTime?"_"+Math.round((Date.now()-a.savingFileTime.getTime())/1E3):"")+(null!=a.saveLevel?"-sl_"+a.saveLevel:"")+"-age_"+(null!=
@@ -9853,7 +9856,7 @@ App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage
 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&&(null==navigator.userAgent||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){function c(b){mxUtils.getAll("1"!=urlParams.dev?[b]:[b,STYLE_PATH+"/default.xml",STYLE_PATH+"/dark-default.xml"],function(b){mxResources.parse(b[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var c=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(!e[a[b]])throw Error(mxResources.get("invalidInput")+' "'+a[b])+'"';return!0},e={},f;for(f in App.pluginRegistry)e[App.pluginRegistry[f]]=!0;
-var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(y){window.location.hash="",alert(y)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
+var g=JSON.parse(Graph.decompress(window.location.hash.substring(9)));null!=g&&c(g.plugins)&&(EditorUi.debug("Setting configuration",JSON.stringify(g)),confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(".configuration",JSON.stringify(g)),window.location.hash="",window.location.reload()));window.location.hash=""}catch(x){window.location.hash="",alert(x)}2<b.length&&(Graph.prototype.defaultThemes["default-style2"]=b[1].getDocumentElement(),
 Graph.prototype.defaultThemes.darkTheme=b[2].getDocumentElement());b=null!=d?d():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)&&(null==navigator.userAgent||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)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):
@@ -9907,9 +9910,9 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxVie
 App.prototype.createCrcTable=function(){for(var a=[],d,c=0;256>c;c++){d=c;for(var b=0;8>b;b++)d=d&1?3988292384^d>>>1:d>>>1;a[c]=d}return a};
 App.prototype.getThumbnail=function(a,d){var c=!1;try{var b=!0,g=window.setTimeout(mxUtils.bind(this,function(){b=!1;d(null)}),this.timeout),f=mxUtils.bind(this,function(a){window.clearTimeout(g);b&&d(a)});null==this.thumbImageCache&&(this.thumbImageCache={});var k=this.editor.graph,l=null!=k.themes&&"darkTheme"==k.defaultThemeName;if(null!=this.pages&&(this.currentPage!=this.pages[0]||l)){var n=k.getGlobalVariable,k=this.createTemporaryGraph(l?k.getDefaultStylesheet():k.getStylesheet()),q=this.pages[0];
 l&&(k.defaultThemeName="default");k.getGlobalVariable=function(a){return"page"==a?q.getName():"pagenumber"==a?1:n.apply(this,arguments)};k.getGlobalVariable=n;document.body.appendChild(k.container);k.model.setRoot(q.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,function(a){try{k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(F){a=null}f(a)}),a,this.thumbImageCache,"#ffffff",function(){f()},null,
-null,null,null,null,null,k),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var e=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),u=Math.floor(m.x),t=Math.floor(m.y);e.setAttribute("width",Math.ceil(p*(m.width+4)));e.setAttribute("height",Math.ceil(p*(m.height+4)));var v=e.getContext("2d");v.scale(p,p);v.translate(-u,-t);var y=k.background;if(null==y||""==y||y==mxConstants.NONE)y="#ffffff";v.save();v.fillStyle=y;v.fillRect(u,
-t,Math.ceil(m.width+4),Math.ceil(m.height+4));v.restore();var x=new mxJsCanvas(e),B=new mxAsyncCanvas(this.thumbImageCache);x.images=this.thumbImageCache.images;var A=new mxImageExport;A.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};A.drawText=function(a,b){};A.drawState(k.getView().getState(k.model.root),B);B.finish(mxUtils.bind(this,function(){try{A.drawState(k.getView().getState(k.model.root),
-x),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(z){e=null}f(e)}));c=!0}}catch(z){c=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return c};
+null,null,null,null,null,k),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var e=document.createElement("canvas"),m=k.getGraphBounds(),p=a/m.width,p=Math.min(1,Math.min(3*a/(4*m.height),p)),u=Math.floor(m.x),t=Math.floor(m.y);e.setAttribute("width",Math.ceil(p*(m.width+4)));e.setAttribute("height",Math.ceil(p*(m.height+4)));var v=e.getContext("2d");v.scale(p,p);v.translate(-u,-t);var x=k.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";v.save();v.fillStyle=x;v.fillRect(u,
+t,Math.ceil(m.width+4),Math.ceil(m.height+4));v.restore();var y=new mxJsCanvas(e),B=new mxAsyncCanvas(this.thumbImageCache);y.images=this.thumbImageCache.images;var A=new mxImageExport;A.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};A.drawText=function(a,b){};A.drawState(k.getView().getState(k.model.root),B);B.finish(mxUtils.bind(this,function(){try{A.drawState(k.getView().getState(k.model.root),
+y),k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}catch(z){e=null}f(e)}));c=!0}}catch(z){c=!1,null!=k&&k!=this.editor.graph&&null!=k.container.parentNode&&k.container.parentNode.removeChild(k.container)}return c};
 App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
 (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,c){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var b=this.getCurrentFile();d=null!=b?b.getMode():d;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=d==App.MODE_DEVICE?"pointer":"default")}if(c)try{if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var g=new Date;g.setYear(g.getFullYear()+1);document.cookie="MODE="+d+"; expires="+g.toUTCString()}}catch(f){}}})();
@@ -9990,9 +9993,9 @@ App.prototype.getLibraryStorageHint=function(a){var d=a.getTitle();a.constructor
 mxResources.get("browser")+")":a.constructor==LocalLibrary&&(d+=" ("+mxResources.get("device")+")");return d};App.prototype.restoreLibraries=function(){this.loadLibraries(mxSettings.getCustomLibraries(),mxUtils.bind(this,function(){this.loadLibraries((urlParams.clibs||"").split(";"))}))};
 App.prototype.loadLibraries=function(a,d){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var c=mxUtils.bind(this,function(a,b){b||mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=0,g=[],f=mxUtils.bind(this,function(){if(0==b){if(null!=a)for(var c=a.length-1;0<=c;c--)null!=g[c]&&this.loadLibrary(g[c]);null!=d&&d()}});if(null!=a)for(var k=0;k<a.length;k++){var l=encodeURIComponent(decodeURIComponent(a[k]));mxUtils.bind(this,function(a,d){if(null!=
 a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){b++;var e=mxUtils.bind(this,function(c){delete this.pendingLibraries[a];g[d]=c;b--;f()}),k=mxUtils.bind(this,function(d){c(a,d);b--;f()});this.pendingLibraries[a]=!0;var l=a.substring(0,1);if("L"==l)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var b=decodeURIComponent(a.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(a){".scratchpad"==b&&null==a&&
-(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(x){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),n))}catch(x){k()}else k()}),function(){k()})}catch(y){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),
-!this.isOffline())try{var l=JSON.parse(l),q={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,q))}catch(x){k()}}),function(){k()})}catch(y){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(y){k()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&
-(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(x){k()}}),function(a){k()}):k(!0)}}})(l,k)}f()}};
+(a=this.emptyLibraryXml);null!=a?e(new StorageLibrary(this,a,b)):k()}),k)}catch(y){k()}}),0);else if("U"==l){var n=decodeURIComponent(a.substring(1));if(!this.isOffline()){l=n;this.editor.isCorsEnabledForUrl(l)||(l="t="+(new Date).getTime(),l=PROXY_URL+"?url="+encodeURIComponent(n)+"&"+l);try{mxUtils.get(l,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),n))}catch(y){k()}else k()}),function(){k()})}catch(x){k()}}}else if("R"==l){if(l=decodeURIComponent(a.substring(1)),
+!this.isOffline())try{var l=JSON.parse(l),q={id:l[0],title:l[1],downloadUrl:l[2]};this.remoteInvoke("getFileContent",[q.downloadUrl],null,mxUtils.bind(this,function(a){try{e(new RemoteLibrary(this,a,q))}catch(y){k()}}),function(){k()})}catch(x){k()}}else if("S"==l&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(a.substring(1)),function(a){e(a)},k)}catch(x){k()}else{var v=null;"G"==l?null!=this.drive&&null!=this.drive.user&&(v=this.drive):"H"==l?null!=this.gitHub&&null!=this.gitHub.getUser()&&
+(v=this.gitHub):"T"==l?null!=this.trello&&this.trello.isAuthorized()&&(v=this.trello):"D"==l?null!=this.dropbox&&null!=this.dropbox.getUser()&&(v=this.dropbox):"W"==l&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(v=this.oneDrive);null!=v?v.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(y){k()}}),function(a){k()}):k(!0)}}})(l,k)}f()}};
 App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();this.commentsSupported()?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+
 Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight="10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),
 this.commentButton=null);null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage="none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight=
@@ -10142,12 +10145,12 @@ b.createFile(c,b.getFileData(!0),null,d))}),mxUtils.bind(this,function(){b.hideD
 null!=a.desc.parents)for(var d=0;d<a.desc.parents.length;d++)if(a.desc.parents[d].isRoot){c=!0;break}b.pickFolder(a.getMode(),mxUtils.bind(this,function(c){b.spinner.spin(document.body,mxResources.get("moving"))&&a.move(c,mxUtils.bind(this,function(a){b.spinner.stop()}),mxUtils.bind(this,function(a){b.handleError(a)}))}),null,!0,c)}}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));b.actions.put("useOffline",new Action(mxResources.get("useOffline")+
 "...",function(){b.openLink("https://app.draw.io/")}));b.actions.put("downloadDesktop",new Action(mxResources.get("downloadDesktop")+"...",function(){b.openLink("https://get.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var a=b.getCurrentFile();null!=a&&b.drive.showPermissions(a.getId())}catch(z){b.handleError(z)}}));this.put("embed",new Menu(mxUtils.bind(this,function(a,c){var d=b.getCurrentFile();null==d||d.getMode()!=App.MODE_GOOGLE&&d.getMode()!=App.MODE_GITHUB||
 !/(\.png)$/i.test(d.getTitle())||this.addMenuItems(a,["liveImage","-"],c);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||b.isOffline()||this.addMenuItems(a,["embedIframe"],c);"1"==urlParams.embed||b.isOffline()||this.addMenuItems(a,"- googleDocs googleSlides googleSheets - microsoftOffice".split(" "),c)})));var v=function(a,c,d,e){("plantUml"!=e||EditorUi.enablePlantUml&&!b.isOffline())&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==
-e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},y=function(a,c,d,e){var f=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint(),k=new mxCell(a,new mxGeometry(f.x,f.y,c,d),e);k.vertex=!0;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);
+e||"plantUml"==e||"mermaid"==e){var a=new ParseDialog(b,d,e);b.showDialog(a.container,620,420,!0,!1);b.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(b,d,e),b.showDialog(a.container,620,420,!0,!1);a.init()}),c,null,f())},x=function(a,c,d,e){var f=g.isMouseInsertPoint()?g.getInsertPoint():g.getFreeInsertPoint(),k=new mxCell(a,new mxGeometry(f.x,f.y,c,d),e);k.vertex=!0;g.getModel().beginUpdate();try{k=g.addCell(k),g.fireEvent(new mxEventObject("cellsInserted","cells",[k]))}finally{g.getModel().endUpdate()}g.scrollCellToVisible(k);
 g.setSelectionCell(k);g.container.focus();g.editAfterInsert&&g.startEditing(k);window.setTimeout(function(){null!=b.hoverIcons&&b.hoverIcons.update(g.view.getState(k))},0);return k};b.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){b.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,c,d,e,f,g,k,l,m,n){a=parseInt(a);!isNaN(a)&&0<a&&b.exportSvg(a/100,c,d,e,f,g,
-k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.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=f;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
-y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=
-f;var x=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));
-this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){x(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){x(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,
+k,!l,m,n)}),!0,null,"svg")}));b.actions.put("insertText",new Action(mxResources.get("text"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&g.startEditingAtCell(x("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;b.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&
+x("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=f;b.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&x("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;b.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){g.isEnabled()&&!g.isCellLocked(g.getDefaultParent())&&x("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=
+f;var y=mxUtils.bind(this,function(a,b,c){for(var d=0;d<c.length;d++)"-"==c[d]?a.addSeparator(b):v(a,b,mxResources.get(c[d])+"...",c[d])});this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),c);b.insertTemplateEnabled&&!b.isOffline()&&this.addMenuItems(a,["insertTemplate"],c);a.addSeparator(c);this.addSubmenu("insertLayout",a,c,mxResources.get("layout"));
+this.addSubmenu("insertAdvanced",a,c,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){y(a,b,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,c){y(a,c,["fromText","plantUml","mermaid","-","formatSql"]);a.addItem(mxResources.get("csv")+"...",null,function(){b.showImportCsvDialog()},c,null,f())})));this.put("openRecent",new Menu(function(a,
 c){var d=b.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");a.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){b.loadFile(d.id)},c)})(d[e]);a.addSeparator(c)}a.addItem(mxResources.get("reset"),null,function(){b.resetRecent()},c)}));this.put("openFrom",new Menu(function(a,c){null!=b.drive?a.addItem(mxResources.get("googleDrive")+"...",null,function(){b.pickFile(App.MODE_GOOGLE)},c):k&&"function"===
 typeof window.DriveClient&&a.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.oneDrive?a.addItem(mxResources.get("oneDrive")+"...",null,function(){b.pickFile(App.MODE_ONEDRIVE)},c):n&&"function"===typeof window.OneDriveClient&&a.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=b.dropbox?a.addItem(mxResources.get("dropbox")+"...",null,function(){b.pickFile(App.MODE_DROPBOX)},
 c):l&&"function"===typeof window.DropboxClient&&a.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);a.addSeparator(c);null!=b.gitHub&&a.addItem(mxResources.get("github")+"...",null,function(){b.pickFile(App.MODE_GITHUB)},c);null!=b.gitLab&&a.addItem(mxResources.get("gitlab")+"...",null,function(){b.pickFile(App.MODE_GITLAB)},c);null!=b.trello?a.addItem(mxResources.get("trello")+"...",null,function(){b.pickFile(App.MODE_TRELLO)},c):q&&"function"===
@@ -10250,17 +10253,17 @@ return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=t.view.getState(a),
 a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function n(a,b){b=null!=b?b:!0;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=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;t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=t.view.getState(a),m=t.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=t.getOutgoingEdges(t.model.getTerminal(d[0],
 !0));if(null!=p){for(var v=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<p.length;q++){var u=t.model.getTerminal(p[q],!1);if(f==l(u)){var z=t.view.getState(u);u!=a&&null!=z&&(v&&b!=z.getCenterX()<k.getCenterX()||!v&&b!=z.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,z)&&(d=10+Math.max(d,(Math.min(n.x+n.width,z.x+z.width)-Math.max(n.x,z.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,z.y+z.height)-Math.max(n.y,z.y))/m))}}v?g=0:d=0;for(q=0;q<p.length;q++)if(u=t.model.getTerminal(p[q],
-!1),f==l(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(v&&b!=z.getCenterX()<k.getCenterX()||!v&&b!=z.getCenterY()<k.getCenterY()))){var y=[];t.traverse(z.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});t.moveCells(y,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function q(a){t.model.beginUpdate();try{var b=l(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);
+!1),f==l(u)&&(z=t.view.getState(u),u!=a&&null!=z&&(v&&b!=z.getCenterX()<k.getCenterX()||!v&&b!=z.getCenterY()<k.getCenterY()))){var x=[];t.traverse(z.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});t.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function q(a){t.model.beginUpdate();try{var b=l(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);
 var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);t.moveCells(g,k,m);return t.addCells(d,e)}finally{t.model.endUpdate()}}function e(a,b){t.model.beginUpdate();try{var c=
 t.model.getParent(a),d=t.getIncomingEdges(a),e=l(a);0==d.length&&(d=[t.createEdge(c,null,"",null,null,t.createCurrentEdgeStyle())],e=b);var f=t.cloneCells([d[0],a]);t.model.setTerminal(f[0],a,!0);if(null==t.model.getTerminal(f[0],!1)){t.model.setTerminal(f[0],f[1],!1);var g=t.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),m;for(m in k)t.setCellStyles(m,k[m],[f[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&t.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?
 "vertical":"horizontal",[f[0]])}catch(P){}}var d=t.getOutgoingEdges(a),n=c.geometry,g=[];t.view.currentRoot==c&&(n=new mxRectangle);for(k=0;k<d.length;k++){var p=t.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var v=t.view.getBounds(g),q=t.view.translate,u=t.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==v?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(v.x+v.width)/u-q.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
 null==v?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(v.x+v.width)/u-q.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==v?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(v.y+v.height)/u-q.y+-n.y+10);return t.addCells(f,c)}finally{t.model.endUpdate()}}function m(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 p(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?u.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=m(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 u=this,t=u.editor.graph,v=t.getModel(),y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){y.apply(this,arguments);
+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=m(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 u=this,t=u.editor.graph,v=t.getModel(),x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
 if(1==t.getSelectionCount()){c=t.getSelectionCell();var e=t.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(t.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(t.getSelectionCell())&&(b.addSeparator(),0<t.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};u.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");u.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");u.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");u.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var x=t.removeCells;t.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return x.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
+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");u.actions.addAction("selectDescendants",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+D");var y=t.removeCells;t.removeCells=function(b,c){c=null!=
+c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var e=[],f=0;f<b.length;f++){var g=b[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));if(a(g)){var k=[];t.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(e=e.concat(k),g=t.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&e.push(b[f])}b=e;return y.apply(this,arguments)};u.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
 d))};var B=t.duplicateCells;t.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=B.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var l=t.getIncomingEdges(k[e]),g=t.getIncomingEdges(b[e]);if(0==l.length&&0<g.length){var m=this.cloneCell(g[0]);this.addEdge(m,
 t.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var A=t.moveCells;t.moveCells=function(b,c,d,e,f,g,k){var l=null;this.model.beginUpdate();try{var m=f,n=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||t.model.isEdge(b[p])&&null==t.model.getTerminal(b[p],!0)){f=t.model.getParent(b[p]);break}if(null!=m&&f!=m&&null!=this.view.getState(b[0])){var v=t.getIncomingEdges(b[0]);
 if(0<v.length){var q=t.view.getState(t.model.getTerminal(v[0],!0));if(null!=q){var u=t.view.getState(m);null!=u&&(c=(u.getCenterX()-q.getCenterX())/t.view.scale,d=(u.getCenterY()-q.getCenterY())/t.view.scale)}}}}l=A.apply(this,arguments);if(null!=l&&null!=b&&l.length==b.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))a(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],m,!0);else if(a(b[p])&&(v=t.getIncomingEdges(b[p]),0<v.length))if(!e)a(m)&&0>mxUtils.indexOf(b,
@@ -10276,11 +10279,11 @@ this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.m
 60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");d.geometry.relative=
 !0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);a.insert(d);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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 g=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;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,
-0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);g.insertEdge(e,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.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);m.insertEdge(p,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.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);u.insertEdge(t,!1);a.insert(d);a.insert(e);a.insert(p);a.insert(t);a.insert(b);a.insert(c);a.insert(g);a.insert(m);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
-new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+b.insertEdge(d,!0);c.insertEdge(d,!1);var g=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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+e.geometry.relative=!0;e.edge=!0;b.insertEdge(e,!0);g.insertEdge(e,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.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);m.insertEdge(p,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');u.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);u.insertEdge(t,!1);a.insert(d);a.insert(e);a.insert(p);a.insert(t);a.insert(b);a.insert(c);a.insert(g);a.insert(m);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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 mindmaps 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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
 a.vertex=!0;var b=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
@@ -10348,14 +10351,14 @@ if(null!=I){this.tabContainer.style.right="70px";var E=p.addMenu("100%",I.funct)
 E.style.right="0px";E.style.bottom="0px";E.style.overflow="hidden";E.style.visibility="hidden";E.style.textAlign="center";E.style.color="#000";E.style.fontSize="12px";E.style.color="#707070";E.style.width="59px";E.style.cursor="pointer";E.style.borderTop="1px solid lightgray";E.style.borderLeft="1px solid lightgray";E.style.height=parseInt(k.tabContainerHeight)-1+"px";E.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";u.appendChild(E);I=mxUtils.bind(this,function(){E.innerHTML=Math.round(100*
 k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,I);k.editor.addListener("resetGraphView",I);k.editor.addListener("pageSelected",I);var K=k.setGraphEnabled;k.setGraphEnabled=function(){K.apply(this,arguments);null!=this.tabContainer&&(E.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}u.appendChild(k.tabContainer);u.appendChild(m);u.appendChild(k.diagramContainer);
 g.appendChild(u);k.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var f=c.y,g=c.x,q=!1,e=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,u=this.graph.getView().scale,t=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+f;p.width=b.width;p.height=b.height;for(var v=[],y=[],x=0;x<this.states.length;x++){var B=this.states[x];B instanceof mxCellState&&(k||!this.graph.isCellSelected(B.cell))&&((p.x>=B.x&&p.x<=B.x+B.width||B.x>=p.x&&B.x<=p.x+p.width)&&(p.y>
-B.y+B.height+4||p.y+p.height+4<B.y)?v.push(B):(p.y>=B.y&&p.y<=B.y+B.height||B.y>=p.y&&B.y<=p.y+p.height)&&(p.x>B.x+B.width+4||p.x+p.width+4<B.x)&&y.push(B))}var A=0,z=0,F=B=0,D=0,C=0,G=0,H=0,J=5*u;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var I=!1,x=p==v[0],u=p==v[v.length-1];if(!x&&!u)for(x=1;x<v.length-1;x++)if(p==v[x]){u=v[x-1];x=v[x+1];B=z=F=(x.y-u.y-u.height-p.height)/2;break}for(x=0;x<v.length-1;x++){var u=v[x],E=v[x+1],K=p==u||p==E,E=E.y-u.y-u.height,I=I|p==u;if(0==z&&
-0==A)z=E,A=1;else if(Math.abs(z-E)<=(K||1==x&&I?t:0))A+=1;else if(1<A&&I){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!I)A=0,B=z=0!=F?F:0,v.splice(0,0==x?1:x),x=-1;else break;0!=B||K||(z=B=E)}3==v.length&&v[1]==p&&(B=0)}if(1<y.length){y.push(p);y.sort(function(a,b){return a.x-b.x});I=!1;x=p==y[0];u=p==y[y.length-1];if(!x&&!u)for(x=1;x<y.length-1;x++)if(p==y[x]){u=y[x-1];x=y[x+1];G=C=H=(x.x-u.x-u.width-p.width)/2;break}for(x=0;x<y.length-1;x++){u=y[x];E=y[x+1];K=p==u||p==E;E=E.x-u.x-u.width;I|=p==
-u;if(0==C&&0==D)C=E,D=1;else if(Math.abs(C-E)<=(K||1==x&&I?t:0))D+=1;else if(1<D&&I){y=y.slice(0,x+1);break}else if(3<=y.length-x&&!I)D=0,G=C=0!=H?H:0,y.splice(0,0==x?1:x),x=-1;else break;0!=G||K||(C=G=E)}3==y.length&&y[1]==p&&(G=0)}t=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(m.graph.getView().getOverlayPane());return a};C=function(a,b){if(a&&null!=m.guidesArrHor)for(var c=0;c<m.guidesArrHor.length;c++)m.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=m.guidesArrVer)for(c=0;c<m.guidesArrVer.length;c++)m.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==y.length-1){D=[];H=m.guidesArrHor;q=[];g=0;x=y[0]==p?1:0;I=y[x].y+y[x].height;if(0<G)for(x=0;x<y.length-1;x++)u=
-y[x],E=y[x+1],p==u?(g=E.x-u.width-G,q.push(new mxPoint(g+u.width+J,I)),q.push(new mxPoint(E.x-J,I))):p==E?(q.push(new mxPoint(u.x+u.width+J,I)),g=u.x+u.width+G,q.push(new mxPoint(g-J,I))):(q.push(new mxPoint(u.x+u.width+J,I)),q.push(new mxPoint(E.x-J,I)));else u=y[0],x=y[2],g=u.x+u.width+(x.x-u.x-u.width-p.width)/2,q.push(new mxPoint(u.x+u.width+J,I)),q.push(new mxPoint(g-J,I)),q.push(new mxPoint(g+p.width+J,I)),q.push(new mxPoint(x.x-J,I));for(x=0;x<q.length;x+=2)y=q[x],G=q[x+1],y=t(y,G,null!=H?
-H[x/2]:null),y.node.style.visibility="visible",y.redraw(),D.push(y);for(x=q.length/2;null!=H&&x<H.length;x++)H[x].destroy();m.guidesArrHor=D;g-=b.x;q=!0}else C(!0);if(1<A&&A==v.length-1){D=[];H=m.guidesArrVer;e=[];f=0;x=v[0]==p?1:0;A=v[x].x+v[x].width;if(0<B)for(x=0;x<v.length-1;x++)u=v[x],E=v[x+1],p==u?(f=E.y-u.height-B,e.push(new mxPoint(A,f+u.height+J)),e.push(new mxPoint(A,E.y-J))):p==E?(e.push(new mxPoint(A,u.y+u.height+J)),f=u.y+u.height+B,e.push(new mxPoint(A,f-J))):(e.push(new mxPoint(A,u.y+
-u.height+J)),e.push(new mxPoint(A,E.y-J)));else u=v[0],x=v[2],f=u.y+u.height+(x.y-u.y-u.height-p.height)/2,e.push(new mxPoint(A,u.y+u.height+J)),e.push(new mxPoint(A,f-J)),e.push(new mxPoint(A,f+p.height+J)),e.push(new mxPoint(A,x.y-J));for(x=0;x<e.length;x+=2)y=e[x],G=e[x+1],y=t(y,G,null!=H?H[x/2]:null,!0),y.node.style.visibility="visible",y.redraw(),D.push(y);for(x=e.length/2;null!=H&&x<H.length;x++)H[x].destroy();m.guidesArrVer=D;f-=b.y;e=!0}else C(!1,!0)}if(q||e)return p=new mxPoint(g,f),v=a.call(this,
+(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)}})();(function(){var a=mxGuide.prototype.move;mxGuide.prototype.move=function(b,c,d,k){var f=c.y,g=c.x,q=!1,e=!1;if(null!=this.states&&null!=b&&null!=c){var m=this,p=new mxCellState,u=this.graph.getView().scale,t=Math.max(2,this.getGuideTolerance()/2);p.x=b.x+g;p.y=b.y+f;p.width=b.width;p.height=b.height;for(var v=[],x=[],y=0;y<this.states.length;y++){var B=this.states[y];B instanceof mxCellState&&(k||!this.graph.isCellSelected(B.cell))&&((p.x>=B.x&&p.x<=B.x+B.width||B.x>=p.x&&B.x<=p.x+p.width)&&(p.y>
+B.y+B.height+4||p.y+p.height+4<B.y)?v.push(B):(p.y>=B.y&&p.y<=B.y+B.height||B.y>=p.y&&B.y<=p.y+p.height)&&(p.x>B.x+B.width+4||p.x+p.width+4<B.x)&&x.push(B))}var A=0,z=0,F=B=0,D=0,C=0,G=0,H=0,J=5*u;if(1<v.length){v.push(p);v.sort(function(a,b){return a.y-b.y});var I=!1,y=p==v[0],u=p==v[v.length-1];if(!y&&!u)for(y=1;y<v.length-1;y++)if(p==v[y]){u=v[y-1];y=v[y+1];B=z=F=(y.y-u.y-u.height-p.height)/2;break}for(y=0;y<v.length-1;y++){var u=v[y],E=v[y+1],K=p==u||p==E,E=E.y-u.y-u.height,I=I|p==u;if(0==z&&
+0==A)z=E,A=1;else if(Math.abs(z-E)<=(K||1==y&&I?t:0))A+=1;else if(1<A&&I){v=v.slice(0,y+1);break}else if(3<=v.length-y&&!I)A=0,B=z=0!=F?F:0,v.splice(0,0==y?1:y),y=-1;else break;0!=B||K||(z=B=E)}3==v.length&&v[1]==p&&(B=0)}if(1<x.length){x.push(p);x.sort(function(a,b){return a.x-b.x});I=!1;y=p==x[0];u=p==x[x.length-1];if(!y&&!u)for(y=1;y<x.length-1;y++)if(p==x[y]){u=x[y-1];y=x[y+1];G=C=H=(y.x-u.x-u.width-p.width)/2;break}for(y=0;y<x.length-1;y++){u=x[y];E=x[y+1];K=p==u||p==E;E=E.x-u.x-u.width;I|=p==
+u;if(0==C&&0==D)C=E,D=1;else if(Math.abs(C-E)<=(K||1==y&&I?t:0))D+=1;else if(1<D&&I){x=x.slice(0,y+1);break}else if(3<=x.length-y&&!I)D=0,G=C=0!=H?H:0,x.splice(0,0==y?1:y),y=-1;else break;0!=G||K||(C=G=E)}3==x.length&&x[1]==p&&(G=0)}t=function(a,b,c,d){var e=[],f;d?(d=J,f=0):(d=0,f=J);e.push(new mxPoint(a.x-d,a.y-f));e.push(new mxPoint(a.x+d,a.y+f));e.push(a);e.push(b);e.push(new mxPoint(b.x-d,b.y-f));e.push(new mxPoint(b.x+d,b.y+f));if(null!=c)return c.points=e,c;a=new mxPolyline(e,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);a.dialect=mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.init(m.graph.getView().getOverlayPane());return a};C=function(a,b){if(a&&null!=m.guidesArrHor)for(var c=0;c<m.guidesArrHor.length;c++)m.guidesArrHor[c].node.style.visibility="hidden";if(b&&null!=m.guidesArrVer)for(c=0;c<m.guidesArrVer.length;c++)m.guidesArrVer[c].node.style.visibility="hidden"};if(1<D&&D==x.length-1){D=[];H=m.guidesArrHor;q=[];g=0;y=x[0]==p?1:0;I=x[y].y+x[y].height;if(0<G)for(y=0;y<x.length-1;y++)u=
+x[y],E=x[y+1],p==u?(g=E.x-u.width-G,q.push(new mxPoint(g+u.width+J,I)),q.push(new mxPoint(E.x-J,I))):p==E?(q.push(new mxPoint(u.x+u.width+J,I)),g=u.x+u.width+G,q.push(new mxPoint(g-J,I))):(q.push(new mxPoint(u.x+u.width+J,I)),q.push(new mxPoint(E.x-J,I)));else u=x[0],y=x[2],g=u.x+u.width+(y.x-u.x-u.width-p.width)/2,q.push(new mxPoint(u.x+u.width+J,I)),q.push(new mxPoint(g-J,I)),q.push(new mxPoint(g+p.width+J,I)),q.push(new mxPoint(y.x-J,I));for(y=0;y<q.length;y+=2)x=q[y],G=q[y+1],x=t(x,G,null!=H?
+H[y/2]:null),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=q.length/2;null!=H&&y<H.length;y++)H[y].destroy();m.guidesArrHor=D;g-=b.x;q=!0}else C(!0);if(1<A&&A==v.length-1){D=[];H=m.guidesArrVer;e=[];f=0;y=v[0]==p?1:0;A=v[y].x+v[y].width;if(0<B)for(y=0;y<v.length-1;y++)u=v[y],E=v[y+1],p==u?(f=E.y-u.height-B,e.push(new mxPoint(A,f+u.height+J)),e.push(new mxPoint(A,E.y-J))):p==E?(e.push(new mxPoint(A,u.y+u.height+J)),f=u.y+u.height+B,e.push(new mxPoint(A,f-J))):(e.push(new mxPoint(A,u.y+
+u.height+J)),e.push(new mxPoint(A,E.y-J)));else u=v[0],y=v[2],f=u.y+u.height+(y.y-u.y-u.height-p.height)/2,e.push(new mxPoint(A,u.y+u.height+J)),e.push(new mxPoint(A,f-J)),e.push(new mxPoint(A,f+p.height+J)),e.push(new mxPoint(A,y.y-J));for(y=0;y<e.length;y+=2)x=e[y],G=e[y+1],x=t(x,G,null!=H?H[y/2]:null,!0),x.node.style.visibility="visible",x.redraw(),D.push(x);for(y=e.length/2;null!=H&&y<H.length;y++)H[y].destroy();m.guidesArrVer=D;f-=b.y;e=!0}else C(!1,!0)}if(q||e)return p=new mxPoint(g,f),v=a.call(this,
 b,p,d,k),q&&!e?p.y=v.y:e&&!q&&(p.x=v.x),v.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;C(!0,!0);return a.apply(this,arguments)};var d=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(a){d.call(this,a);var b=this.guidesArrVer,c=this.guidesArrHor;if(null!=b)for(var k=0;k<b.length;k++)b[k].node.style.visibility=a?"visible":"hidden";if(null!=
 c)for(k=0;k<c.length;k++)c[k].node.style.visibility=a?"visible":"hidden"};var c=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){c.call(this);var a=this.guidesArrVer,d=this.guidesArrHor;if(null!=a){for(var f=0;f<a.length;f++)a[f].destroy();this.guidesArrVer=null}if(null!=d){for(f=0;f<d.length;f++)d[f].destroy();this.guidesArrHor=null}}})();function mxRuler(a,d,c,b){function g(){var b=a.diagramContainer;q.style.top=b.offsetTop-k+"px";q.style.left=b.offsetLeft-k+"px";q.style.width=(c?0:b.offsetWidth)+k+"px";q.style.height=(c?b.offsetHeight:0)+k+"px"}function f(a,b,c){var d;return function(){var e=this,f=arguments,g=c&&!d;clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(e,f)},b);g&&a.apply(e,f)}}var k=this.RULER_THICKNESS,l=this;this.unit=d;var n="dark"!=window.uiTheme?{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",
 strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"}:{bkgClr:"#202020",outBkgClr:"#2a2a2a",cornerClr:"#2a2a2a",strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"},q=document.createElement("div");q.style.position="absolute";q.style.background=n.bkgClr;q.style[c?"borderRight":"borderBottom"]="0.5px solid "+n.strokeClr;q.style.borderLeft="0.5px solid "+n.strokeClr;document.body.appendChild(q);mxEvent.disableContextMenu(q);this.editorUiRefresh=a.refresh;a.refresh=function(b){l.editorUiRefresh.apply(a,
@@ -10365,9 +10368,9 @@ a:Math.floor(((f.x+1)/a-d.x)/p.pageFormat.width)*p.pageFormat.width*a);var D,C,G
 c?e.height:e.width):c?e.height:e.width;g&&(m.fillStyle=n.outBkgClr,c?(m.fillRect(0,k,k,q-k),m.fillRect(0,b,k,e.height)):(m.fillRect(k,0,q-k,k),m.fillRect(b,0,e.width,k)));m.fillStyle=n.fontClr;for(g=g?q:q%(d*a);g<=b;g+=d*a)if(f=Math.round((g-q)/a/d),!(g<k||f==D)){D=f;var H=null;0==f%G&&(H=l.formatText(t+f*d)+"");c?u(k-C[Math.abs(f)%G],g,k,g,H):u(g,k-C[Math.abs(f)%G],g,k,H)}m.lineWidth=1;u(c?0:k,c?k:0,k,k);m.fillStyle=n.cornerClr;m.fillRect(0,0,k,k)};this.drawRuler=t;this.sizeListener=d=f(function(){var a=
 p.container;c?(a=a.offsetHeight+k,e.height!=a&&(e.height=a,q.style.height=a+"px",t())):(a=a.offsetWidth+k,e.width!=a&&(e.width=a,q.style.width=a+"px",t()))},10);this.pageListener=function(){t()};this.scrollListener=b=f(function(){var a=c?p.container.scrollTop:p.container.scrollLeft;l.lastScroll!=a&&(l.lastScroll=a,t())},10);this.unitListener=function(a,b){l.setUnit(b.getProperty("unit"))};p.addListener(mxEvent.SIZE,d);p.container.addEventListener("scroll",b);p.view.addListener("unitChanged",this.unitListener);
 a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){n=a;q.style.background=n.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,b,d,e){var f;if(c&&4<a.height||!c&&4<a.width){if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,
-l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,q,t,v,x,y,B,E;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);c?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,t=k/2,B=p+a.height,y=0,q=m.getImageData(g,p-1,k,3),u(g,p,k,p),p--,x=m.getImageData(t,v-1,k,3),u(t,v,k,v),v--,E=m.getImageData(y,B-1,k,3),u(y,B,k,B),B--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,t=g+a.width/2,B=0,y=g+a.width,q=m.getImageData(g-1,p,3,k),u(g,
-p,g,k),g--,x=m.getImageData(t-1,v,3,k),u(t,v,t,k),t--,E=m.getImageData(y-1,B,3,k),u(y,B,y,k),y--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:q,x1:g,y1:p,imgData2:x,x2:t,y2:v,imgData3:E,x3:y,y3:B}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,
-l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,l.guidePart.x3,l.guidePart.y3),l.guidePart=null}catch(y){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
+l.guidePart.x3,l.guidePart.y3)}catch(K){}f=l.origGuideMove.apply(this,arguments);try{var g,p,q,t,v,y,x,B,E;m.lineWidth=.5;m.strokeStyle=n.guideClr;m.setLineDash([2]);c?(p=a.y+f.y+k-this.graph.container.scrollTop,g=0,v=p+a.height/2,t=k/2,B=p+a.height,x=0,q=m.getImageData(g,p-1,k,3),u(g,p,k,p),p--,y=m.getImageData(t,v-1,k,3),u(t,v,k,v),v--,E=m.getImageData(x,B-1,k,3),u(x,B,k,B),B--):(p=0,g=a.x+f.x+k-this.graph.container.scrollLeft,v=k/2,t=g+a.width/2,B=0,x=g+a.width,q=m.getImageData(g-1,p,3,k),u(g,
+p,g,k),g--,y=m.getImageData(t-1,v,3,k),u(t,v,t,k),t--,E=m.getImageData(x-1,B,3,k),u(x,B,x,k),x--);if(null==l.guidePart||l.guidePart.x1!=g||l.guidePart.y1!=p)l.guidePart={imgData1:q,x1:g,y1:p,imgData2:y,x2:t,y2:v,imgData3:E,x3:x,y3:B}}catch(K){}}else f=l.origGuideMove.apply(this,arguments);return f};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=l.origGuideDestroy.apply(this,arguments);if(null!=l.guidePart)try{m.putImageData(l.guidePart.imgData1,l.guidePart.x1,
+l.guidePart.y1),m.putImageData(l.guidePart.imgData2,l.guidePart.x2,l.guidePart.y2),m.putImageData(l.guidePart.imgData3,l.guidePart.x3,l.guidePart.y3),l.guidePart=null}catch(x){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
 mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
 mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
 this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
@@ -10379,5 +10382,5 @@ b?"crosshair":"";a.fireEvent(new mxEventObject("freehandStateChanged"))};this.st
 k[l].y),f=Math.min(f,k[l].y));c-=d;e-=f;if(0<c&&0<e){var m=100/c,p=100/e;k.map(function(a){if(null==a)return a;a.x=(a.x-d)*m;a.y=(a.y-f)*p;return a});for(var t='<shape strokewidth="inherit"><foreground>',v=0,l=0;l<k.length;l++){var x=k[l];if(null==x){var x=!1,v=k[v],y=k[l-1];!n&&q&&(x=v.x-y.x,y=v.y-y.y,x=Math.sqrt(x*x+y*y)<=a.tolerance);if(n||x)t+='<line x="'+v.x.toFixed(2)+'" y="'+v.y.toFixed(2)+'"/>';t+="</path>"+(n||x?"<fillstroke/>":"<stroke/>");v=l+1}else t=l==v?t+('<path><move x="'+x.x.toFixed(2)+
 '" y="'+x.y.toFixed(2)+'"/>'):t+('<line x="'+x.x.toFixed(2)+'" y="'+x.y.toFixed(2)+'"/>')}var l=mxConstants.STYLE_SHAPE+"=stencil("+Graph.compress(t+"</foreground></shape>")+");fillColor=none;",t=a.view.scale,v=a.view.translate,K=new mxCell("",new mxGeometry(d/t-v.x,f/t-v.y,c/t,e/t),l);K.vertex=1;a.model.beginUpdate();try{K=a.addCell(K)}finally{a.model.endUpdate()}a.fireEvent(new mxEventObject("cellsInserted","cells",[K]));a.fireEvent(new mxEventObject("freehandInserted","cell",K));setTimeout(function(){a.setSelectionCells([K])},
 10)}for(l=0;l<g.length;l++)g[l].parentNode.removeChild(g[l]);b=null;g=[];k=[]}u(!1)};mxEvent.addGestureListeners(d,function(c){if(m){var g=parseFloat(a.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1),g=Math.max(1,g*a.view.scale);b=document.createElementNS("http://www.w3.org/2000/svg","path");b.setAttribute("fill","none");b.setAttribute("stroke",a.currentVertexStyle[mxConstants.STYLE_STROKECOLOR]||"#000");b.setAttribute("stroke-width",g);if("1"==a.currentVertexStyle[mxConstants.STYLE_DASHED]){var n=
-a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}e=[];n=v(c);y(n);f="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){y(v(a));var c=x(0);if(c){f+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<e.length;g+=2)c=x(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},t);var v=function(b){return mxUtils.convertPoint(a.container,
-mxEvent.getClientX(b),mxEvent.getClientY(b))},y=function(a){for(e.push(a);e.length>c;)e.shift()},x=function(a){var b=e.length;if(1===b%2||b>=c){var d=0,f=0,g,k=0;for(g=a;g<b;g++)k++,a=e[g],d+=a.x,f+=a.y;return{x:d/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
+a.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",n=n.split(" ").map(function(a){return parseFloat(a)*g}).join(" ");b.setAttribute("stroke-dasharray",n)}e=[];n=v(c);x(n);f="M"+n.x+" "+n.y;k.push(n);l=[];b.setAttribute("d",f);d.appendChild(b);mxEvent.consume(c)}},function(a){if(b){x(v(a));var c=y(0);if(c){f+=" L"+c.x+" "+c.y;k.push(c);var d="";l=[];for(var g=2;g<e.length;g+=2)c=y(g),d+=" L"+c.x+" "+c.y,l.push(c);b.setAttribute("d",f+d)}mxEvent.consume(a)}},t);var v=function(b){return mxUtils.convertPoint(a.container,
+mxEvent.getClientX(b),mxEvent.getClientY(b))},x=function(a){for(e.push(a);e.length>c;)e.shift()},y=function(a){var b=e.length;if(1===b%2||b>=c){var d=0,f=0,g,k=0;for(g=a;g<b;g++)k++,a=e[g],d+=a.x,f+=a.y;return{x:d/k,y:f/k}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index 9ad0ba1fd..56db371b5 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -827,7 +827,7 @@ DriveClient.prototype.copyFile = function(id, title, success, error)
 	if (id != null && title != null)
 	{
 		this.executeRequest({url: '/files/' + id + '/copy?fields=' + encodeURIComponent(this.allFields)
-				+ '&supportsAllDrives=true', //&alt=json
+				+ '&supportsAllDrives=true&enforceSingleParent=true', //&alt=json
 				method: 'POST',
 				params: {'title': title, 'properties':
 					[{'key': 'channel', 'value': Editor.guid()}]}
@@ -1924,7 +1924,7 @@ DriveClient.prototype.createUploadRequest = function(id, metadata, data, revisio
 	var reqObj = 
 	{
 		'fullUrl': 'https://content.googleapis.com/upload/drive/v2/files' + (id != null ? '/' + id : '') +
-			'?uploadType=multipart&supportsAllDrives=true&fields=' + this.allFields,
+			'?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields=' + this.allFields,
 		'method': (id != null) ? 'PUT' : 'POST',
 		'headers': headers,
 		'params': delim + 'Content-Type: application/json\r\n\r\n' + JSON.stringify(metadata) + delim +
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index c8b732fdc..1cef66642 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -13858,20 +13858,30 @@
 					
 					req.onupgradeneeded = function(e)
 					{
-						var db = req.result;
-						
-						if (e.oldVersion < 1)
+						try
 						{
-						    // Version 1 is the first version of the database.
-							db.createObjectStore('objects', {keyPath: 'key'});
+							var db = req.result;
+							
+							if (e.oldVersion < 1)
+							{
+							    // Version 1 is the first version of the database.
+								db.createObjectStore('objects', {keyPath: 'key'});
+							}
+							
+							if (e.oldVersion < 2)
+							{
+								// Version 2 introduces browser file storage.
+								db.createObjectStore('files', {keyPath: 'title'});
+								db.createObjectStore('filesInfo', {keyPath: 'title'});
+								EditorUi.migrateStorageFiles = isLocalStorage;
+							}
 						}
-						
-						if (e.oldVersion < 2)
+						catch (e)
 						{
-							// Version 2 introduces browser file storage.
-							db.createObjectStore('files', {keyPath: 'title'});
-							db.createObjectStore('filesInfo', {keyPath: 'title'});
-							EditorUi.migrateStorageFiles = isLocalStorage;
+							if (error != null)
+							{
+								error(e);
+							}
 						}
 					}
 					
diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.js
index b460d2b53..c43f80cdf 100644
--- a/src/main/webapp/js/diagramly/ElectronApp.js
+++ b/src/main/webapp/js/diagramly/ElectronApp.js
@@ -505,8 +505,8 @@ mxStencilRegistry.allowEval = false;
 	{
 		var paths = argsObj.args;
 		
-		// If a file is passed
-		if (paths !== undefined && paths[0] != null && this.spinner.spin(document.body, mxResources.get('loading')))
+		// If a file is passed, and it is not an argument (has a leading -)
+		if (paths !== undefined && paths[0] != null && paths[0].indexOf('-') != 0 && this.spinner.spin(document.body, mxResources.get('loading')))
 		{
 			var path = paths[0];
 			this.hideDialog();
diff --git a/src/main/webapp/js/diagramly/Extensions.js b/src/main/webapp/js/diagramly/Extensions.js
index a8a7b829f..8ce960172 100644
--- a/src/main/webapp/js/diagramly/Extensions.js
+++ b/src/main/webapp/js/diagramly/Extensions.js
@@ -3759,7 +3759,7 @@ LucidImporter = {};
 
 		var sMap = {}, ends = [];
 
-		for (var i = 0; i < m.length; i++)
+		for (var i = 0; i < m.length; i++) //TODO Using newlines to mark the end of blocks without end has some issues 
 		{
 			var item = m[i];
 			
@@ -3986,6 +3986,14 @@ LucidImporter = {};
 		{
 			var str = txt? txt.substring(curS, curE) : '';
 
+			//TODO Check this is always the case. Most of the time this is correct, also, the empty tag should be removed
+			if (str == '\n')
+			{
+				str = '';
+			}
+			
+			str = str.replace(/</g, '&lt;').replace(/>/g, '&gt;');
+			
 			do
 			{
 				var count = openTagsCount.pop();
@@ -4009,11 +4017,11 @@ LucidImporter = {};
 		
 		var curS = 0, curE = 0;
 		
-		while(i < m.length || j < ends.length)
+		while(i >= j && (i < m.length || j < ends.length))
 		{
 			var s = m[i], e = ends[j];
 
-			if (s && s.s < e.e) //s can be null when all starts are used, e ends after s
+			if (s && e && s.s < e.e) //s can be null when all starts are used, e ends after s BUT sometimes there are errors in the file
 			{
 				curS = s.s;
 				var newBlock = false;
@@ -4025,6 +4033,7 @@ LucidImporter = {};
 				
 				while(s != null && s.s == curS)
 				{
+					//TODO alignment ('a') sometimes introduce unnecessary new lines. Maybe use newline to define block elements
 					if (s.n == 'a' || s.n == 'il' || s.n == 'ir' || s.n == 'mt' || s.n == 'mb' || s.n == 't')
 					{
 						newBlock = true;
@@ -4036,7 +4045,7 @@ LucidImporter = {};
 				
 				html += startTag(curStyles, newBlock);
 			}
-			else
+			else if (e)
 			{
 				curE = e.e;
 
@@ -4053,7 +4062,7 @@ LucidImporter = {};
 		}
 		
 		html += endTag(null, null, null, true); //End any open tag
-		console.log(html);
+
 		return html;
 	};
 	
@@ -4117,9 +4126,6 @@ LucidImporter = {};
 		{
 			if (text.t != null)
 			{
-				text.t = text.t.replace(/</g, '&lt;');
-				text.t = text.t.replace(/>/g, '&gt;');
-				
 				var txt = text.t;
 				var m = text.m;
 				
@@ -4145,6 +4151,9 @@ LucidImporter = {};
 					console.log(e);
 				}
 				
+				txt = txt.replace(/</g, '&lt;');
+				txt = txt.replace(/>/g, '&gt;');
+				
 				return txt;
 			}
 			
@@ -4212,7 +4221,7 @@ LucidImporter = {};
 	
 	function getLabelStyle(properties, noLblStyle)
 	{
-		var style = (noLblStyle? 'overflow=width;' : 
+		var style = (noLblStyle? 'overflow=width;html=1;' : 
 				getFontSize(properties) +
 				getFontColor(properties) + 
 				getFontStyle(properties) +
@@ -4238,7 +4247,7 @@ LucidImporter = {};
 		}
 		
 		s +=	
-		  (noLblStyle? 'overflow=width;' : 
+		  (noLblStyle? 'overflow=width;html=1;' : 
 			addStyle(mxConstants.STYLE_FONTSIZE, style, properties, action, cell) +			
 			addStyle(mxConstants.STYLE_FONTCOLOR, style, properties, action, cell) +			
 			addStyle(mxConstants.STYLE_FONTSTYLE, style, properties, action, cell) +		
@@ -4742,6 +4751,16 @@ LucidImporter = {};
 		return '';
 	}
 	
+	function getLaneColor(color)
+	{
+		if (color != null)
+		{
+			return 'swimlaneFillColor=' + getColor(color) + ';';
+		}
+		
+		return '';
+	}
+	
 	function getOpacity(properties, action, cell)
 	{
 		var style = '';
@@ -4809,7 +4828,7 @@ LucidImporter = {};
 			
 			// Fixes the case for horizontal swimlanes where we use horizontal=0
 			// and Lucid uses rotation
-			if (deg != 0 && ((action.Class == 'UMLSwimLaneBlockV2') || (action.Class.indexOf('Rotated') >= 0 && (action.Class.indexOf('Pool') >= 0 || action.Class.indexOf('SwimLane') >= 0))))
+			if (deg != 0 && ((action.Class == 'UMLSwimLaneBlockV2') || ((action.Class.indexOf('Rotated') >= 0 || deg == -90 || deg == 270) && (action.Class.indexOf('Pool') >= 0 || action.Class.indexOf('SwimLane') >= 0))))
 			{
 				deg += 90;
 				cell.geometry.rotate90();
@@ -4918,7 +4937,11 @@ LucidImporter = {};
 		}
 		else if (properties.StrokeStyle == 'dotdotdot')
 		{
-			return 'dashed=1;dashPattern=1 1;';
+			return 'dashed=1;dashPattern=1 2;';
+		}
+		else if (properties.StrokeStyle == 'longdash')
+		{
+			return 'dashed=1;dashPattern=16 6;';
 		}
 		else if (properties.StrokeStyle != null && properties.
 			StrokeStyle.substring(0, 6) == 'dashed')
@@ -5090,7 +5113,7 @@ LucidImporter = {};
 				// Edge style
 				if (cell.edge)
 				{
-					if (p.Rounding != null)
+					if (p.Rounding != null && p.Shape != 'diagonal') //No rounding for diagornal edges
 					{
 						cell.style += 'rounded=1;arcSize=' + p.Rounding + ';';
 					}
@@ -5164,33 +5187,36 @@ LucidImporter = {};
 						}
 					}
 
+					var waypoints = p.ElbowControlPoints || p.Joints;
+					
+					if (waypoints != null)
+					{
+						cell.geometry.points = [];
+						
+						for (var i = 0; i < waypoints.length; i++)
+						{
+							var pt = waypoints[i];
+							
+							cell.geometry.points.push(new mxPoint(
+								Math.round(pt.x * scale + dx),
+								Math.round(pt.y * scale + dy)));
+						}
+					}
+					
 					// Inserts implicit or explicit control points for loops
 					var implicitY = false;
 					
 					if (p.ElbowPoints == null && p.Endpoint1.Block != null &&
 						p.Endpoint1.Block == p.Endpoint2.Block)
 					{
-						if (p.ElbowControlPoints != null)
-						{
-							cell.geometry.points = [];
-							
-							for (var i = 0; i < p.ElbowControlPoints.length; i++)
-							{
-								var pt = p.ElbowControlPoints[i];
-								
-								cell.geometry.points.push(new mxPoint(
-									Math.round(pt.x * scale + dx),
-									Math.round(pt.y * scale + dx)));
-							}
-						}
-						else if (source != null && target != null)
+						if (p.ElbowControlPoints == null && source != null && target != null)
 						{
 							var exit = new mxPoint(Math.round(source.geometry.x + source.geometry.width * p.Endpoint1.LinkX),
 								Math.round(source.geometry.y + source.geometry.height * p.Endpoint1.LinkY));
 							var entry = new mxPoint(Math.round(target.geometry.x + target.geometry.width * p.Endpoint2.LinkX),
 								Math.round(target.geometry.y + target.geometry.height * p.Endpoint2.LinkY));
-							var dx = (exit.x == entry.x) ? 20 : 0;
-							var dy = (exit.y == entry.y) ? 0 : 0;
+							dx = (exit.x == entry.x) ? 20 : 0;
+							dy = (exit.y == entry.y) ? 0 : 0;
 							
 							cell.geometry.points = [new mxPoint(exit.x + dx, exit.y + dy), new mxPoint(entry.x + dx, entry.y + dy)];
 							implicitX = (exit.y == entry.y);
@@ -5293,7 +5319,7 @@ LucidImporter = {};
 
 			if (ta.Text != null)
 			{
-				e = insertLabel(ta, e, obj);
+				e = insertLabel(ta.Text, e, obj);
 			}
 
 			var ta = (p != null) ? p.TextAreas : obj.TextAreas;
@@ -5342,7 +5368,19 @@ LucidImporter = {};
 				}
 				else if (obj.Value.m[i].n == 'c')
 				{
-					style += 'fontColor=' + obj.Value.m[i].v + ';'
+					var v = obj.Value.m[i].v;
+					
+					if (v != null)
+					{
+						if (v.charAt(0) != '#')
+						{
+							v = '#' + v;
+						}
+
+						v = v.substring(0, 7);
+					}
+					
+					style += 'fontColor=' + v + ';'
 				}
 			}
 		}
@@ -5403,6 +5441,51 @@ LucidImporter = {};
 		return hidden;
 	};
 	
+	function createGroup(obj, lookup)
+	{
+		try
+		{
+			var group = new mxCell('', new mxGeometry(), 'group;dropTarget=0;');
+			group.vertex = true;
+			var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
+			var members = obj.Members || obj.Action.Properties.Members;
+				
+			for (var key in members)
+			{
+				var v = lookup[key];
+				
+				if (v != null)
+				{
+					minX = Math.min(minX, v.geometry.x);
+					minY = Math.min(minY, v.geometry.y);
+					maxX = Math.max(maxX, v.geometry.x + v.geometry.width);
+					maxY = Math.max(maxY, v.geometry.y + v.geometry.height);
+				}
+				
+				v.parent = group;
+				group.insert(v);
+			}
+			
+			group.geometry.x = minX;
+			group.geometry.y = minY;
+			group.geometry.width = maxX - minX;
+			group.geometry.height = maxY - minY;
+			
+			for (var i = 0; i < group.children.length; i++)
+			{
+				var geo = group.children[i].geometry;
+				geo.x -= minX;
+				geo.y -= minY;
+			}
+			
+			return group;
+		}
+		catch(e)
+		{
+			console.log(e);
+		}
+	};
+	
 	function importLucidPage(graph, g, dx, dy, crop, noSelection)
 	{
 		graph.getModel().beginUpdate();
@@ -5492,6 +5575,51 @@ LucidImporter = {};
 					
 					queue.push(obj);
 				}
+				
+				//Add groups
+				for (var i = 0; i < g.Objects.length; i++)
+				{
+					var obj = g.Objects[i];
+					
+					if (obj.IsGroup)
+					{
+						var group = createGroup(obj, lookup);
+						
+						if (group)
+						{
+							lookup[obj.id] = group;
+							queue.push(obj);	
+						}
+					}
+				}
+			}
+			
+			//Create non-hidden groups
+			if (g.Groups != null)
+			{
+				try
+				{
+					for (var key in g.Groups)
+					{
+						var obj = g.Groups[key];
+						obj.id = key;
+
+						if (obj.Hidden == 0 && obj.Members != null)
+						{
+							var group = createGroup(obj, lookup);
+							
+							if (group)
+							{
+								lookup[obj.id] = group;
+								queue.push(obj);	
+							}
+						}
+					}
+				}
+				catch(e)
+				{
+					console.log(e);
+				}
 			}
 
 			if (g.Lines != null)
@@ -5549,7 +5677,10 @@ LucidImporter = {};
 				
 				if (v != null)
 				{
-					select.push(graph.addCell(v));
+					if (v.parent == null)
+					{
+						select.push(graph.addCell(v));
+					}
 				}
 				else if (obj.IsLine && obj.Action != null && obj.Action.Properties != null)
 				{
@@ -5931,7 +6062,8 @@ LucidImporter = {};
 									) +
 									getTextGlobalSpacing(p["Lane_" + i]) +
 									getTextVerticalAlignment(p["Lane_" + i]) +
-									getHeaderColor(p["HeaderFill_" + i]);
+									getHeaderColor(p["HeaderFill_" + i]) +
+									getLaneColor(p["BodyFill_" + i]);
 
 					totalOffset += currOffset;
 				}
@@ -6801,7 +6933,7 @@ LucidImporter = {};
 					v.insert(tab[i]);
 					tab[i].value = convertText(p["Tab_" + i]);
 					
-					tab[i].style += (isLastLblHTML? 'overflow=width;' :
+					tab[i].style += (isLastLblHTML? 'overflow=width;html=1;' :
 									getFontSize(p["Tab_" + i]) +
 									getFontColor(p["Tab_" + i]) + 
 									getFontStyle(p["Tab_" + i]) +
@@ -7135,7 +7267,7 @@ LucidImporter = {};
 				subtext.vertex = true;
 				v.insert(subtext);
 				subtext.value = convertText(p.text);
-				subtext.style += (isLastLblHTML? '' : 
+				subtext.style += (isLastLblHTML? 'html=1;' : 
 					getFontSize(p.text) +
 					getFontColor(p.text) + 
 					getFontStyle(p.text));
@@ -7237,7 +7369,7 @@ LucidImporter = {};
 				subtext.vertex = true;
 				v.insert(subtext);
 				subtext.value = convertText(p.text);
-				subtext.style += (isLastLblHTML? '' :
+				subtext.style += (isLastLblHTML? 'html=1;' :
 					getFontSize(p.text) +
 					getFontColor(p.text) + 
 					getFontStyle(p.text));
@@ -7252,7 +7384,7 @@ LucidImporter = {};
 				text.vertex = true;
 				v.insert(text);
 				text.value = convertText(p.subtext);
-				text.style += (isLastLblHTML? '' :
+				text.style += (isLastLblHTML? 'html=1;' :
 					getFontSize(p.subtext) +
 					getFontColor(p.subtext) + 
 					getFontStyle(p.subtext));
@@ -7261,7 +7393,7 @@ LucidImporter = {};
 				subtext.vertex = true;
 				v.insert(subtext);
 				subtext.value = convertText(p.text);
-				subtext.style += (isLastLblHTML? '' :
+				subtext.style += (isLastLblHTML? 'html=1;' :
 					getFontSize(p.text) +
 					getFontColor(p.text) + 
 					getFontStyle(p.text));
@@ -7310,7 +7442,7 @@ LucidImporter = {};
 				text1.vertex = true;
 				v.insert(text1);
 				text1.value = convertText(p.text);
-				text1.style += (isLastLblHTML? '' :
+				text1.style += (isLastLblHTML? 'html=1;' :
 					getFontSize(p.text) +
 					getFontColor(p.text) + 
 					getFontStyle(p.text));
@@ -7319,7 +7451,7 @@ LucidImporter = {};
 				text2.vertex = true;
 				v.insert(text2);
 				text2.value = convertText(p["bottom-text"]);
-				text2.style += (isLastLblHTML? '' :
+				text2.style += (isLastLblHTML? 'html=1;' :
 					getFontSize(p["bottom-text"]) +
 					getFontColor(p["bottom-text"]) + 
 					getFontStyle(p["bottom-text"]));
@@ -10776,7 +10908,7 @@ LucidImporter = {};
 				if (p.Simple == 0)
 				{
 					var st = getFillColor(p, a);
-					var th = Math.round(p.TitleHeight * scale);
+					var th = Math.round(p.TitleHeight * scale) || 25;
 					st = st.replace('fillColor', 'swimlaneFillColor');
 					
 					if (st == '')
@@ -10785,7 +10917,7 @@ LucidImporter = {};
 					}
 					
 					v.value = convertText(p.Title);
-					v.style += 'swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;' + st +
+					v.style += 'swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;' + st +
 						'startSize=' + th + ';' +
 						getLabelStyle(p.Title, isLastLblHTML);
 					v.style += addAllStyles(v.style, p, a, v, isLastLblHTML);
@@ -10805,17 +10937,28 @@ LucidImporter = {};
 						
 						var itemH = 0;
 						
-						if (i < p.Attributes)
+						//Text2 is used when p.Attributes is zero!
+						if (p.Attributes == 0)
 						{
-							itemH = p['Text' + (i + 1) + 'Percent'];
-							currH += itemH;
+							i = 1;
+							itemH = 1;
 						}
 						else
 						{
-							itemH = 1 - currH;
+							if (i < p.Attributes)
+							{
+								itemH = p['Text' + (i + 1) + 'Percent'];
+								currH += itemH;
+							}
+							else
+							{
+								itemH = 1 - currH;
+							}
 						}
 						
-						item[i] = new mxCell('', new mxGeometry(0, 0, w, Math.round((h - th) * itemH)), 'part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
+						var extH = p.ExtraHeightSet && i == 1? (p.ExtraHeight * scale) : 0;
+						
+						item[i] = new mxCell('', new mxGeometry(0, 0, w, Math.round((h - th) * itemH) + extH), 'part=1;html=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
 						item[i].vertex = true;
 						v.insert(item[i]);
 						item[i].style += st +
@@ -10869,7 +11012,7 @@ LucidImporter = {};
 				{
 					var itemH = 0;
 					
-					item[i] = new mxCell('', new mxGeometry(0, 0, w, p['Field' + (i + 1) + '_h'] * scale), 'part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
+					item[i] = new mxCell('', new mxGeometry(0, 0, w, p['Field' + (i + 1) + '_h'] * scale), 'part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;');
 					item[i].vertex = true;
 					v.insert(item[i]);
 					item[i].style += st +
@@ -10932,7 +11075,7 @@ LucidImporter = {};
 				{
 					var itemH = 0;
 
-					key[i] = new mxCell('', new mxGeometry(0, currH, keyW, p['Key' + (i + 1) + '_h'] * scale), 'strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
+					key[i] = new mxCell('', new mxGeometry(0, currH, keyW, p['Key' + (i + 1) + '_h'] * scale), 'strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;');
 					key[i].vertex = true;
 					v.insert(key[i]);
 					key[i].style += st +
@@ -10952,7 +11095,7 @@ LucidImporter = {};
 
 					key[i].value = convertText(p['Key' + (i + 1)]);
 					
-					item[i] = new mxCell('', new mxGeometry(keyW, currH, w - keyW, p['Field' + (i + 1) + '_h'] * scale), 'shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;');
+					item[i] = new mxCell('', new mxGeometry(keyW, currH, w - keyW, p['Field' + (i + 1) + '_h'] * scale), 'shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;');
 					item[i].vertex = true;
 					v.insert(item[i]);
 					item[i].style += st +
@@ -11379,6 +11522,11 @@ LucidImporter = {};
 				break;
 		}
 
+		if (v.style && v.style.indexOf('html') < 0)
+		{
+			v.style += 'html=1;';
+		}
+		
 	    return v;
 	};
 	
diff --git a/src/main/webapp/js/diagramly/Trees.js b/src/main/webapp/js/diagramly/Trees.js
index 0d0f23f54..2eb250c39 100644
--- a/src/main/webapp/js/diagramly/Trees.js
+++ b/src/main/webapp/js/diagramly/Trees.js
@@ -1296,7 +1296,7 @@
 					
 			    	var cell3 = 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;' +
+			    		'fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;' +
 			    		'snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;' + mmEdgeStyle);
 			    	cell3.vertex = true;
 
@@ -1323,7 +1323,7 @@
 					
 			    	var cell5 = 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;' +
+			    		'fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;' +
 			    		'snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;' + mmEdgeStyle);
 			    	cell5.vertex = true;
 	
@@ -1362,7 +1362,7 @@
 				{
 			    	var cell = 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;' +
+			    		'fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;' +
 			    		'snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;' + mmEdgeStyle);
 			    	cell.vertex = true;
 	
diff --git a/src/main/webapp/js/diagramly/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js
index e46cb86d9..7ac3a32bf 100644
--- a/src/main/webapp/js/diagramly/vsdx/importer.js
+++ b/src/main/webapp/js/diagramly/vsdx/importer.js
@@ -190,7 +190,7 @@ var com;
 	                    {
 	                        var array122 = (function (m) { if (m.entries == null)
 	                            m.entries = []; return m.entries; })(pages);
-	                        var _loop_1 = function (index121) {
+	                        var _loop_1 = function (index121, remaining) {
 	                            var entry = array122[index121];
 	                            {
 	                                var page_1 = entry.getValue();
@@ -199,27 +199,51 @@ var com;
 	                                {
 	                                    var graph_1 = this_1.createMxGraph();
 	                                    graph_1.getModel().beginUpdate();
-	                                    this_1.importPage(page_1, graph_1, graph_1.getDefaultParent());
+	                                    this_1.importPage(page_1, graph_1, graph_1.getDefaultParent(), true);
 	                                    this_1.scaleGraph(graph_1, page_1.getPageScale() / page_1.getDrawingScale());
 	                                    graph_1.getModel().endUpdate();
-	                                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_DIAGRAM_START); })(xmlBuilder);
-	                                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.processPage(graph_1, page_1)); })(xmlBuilder);
-	                                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_DIAGRAM_END); })(xmlBuilder);
+
+	                                    this_1.postImportPage(page_1, graph_1, function()
+	                                    {
+	                                    	this_1.sanitiseGraph(graph_1);
+		                                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_DIAGRAM_START); })(xmlBuilder);
+		                                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.processPage(graph_1, page_1)); })(xmlBuilder);
+		                                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_DIAGRAM_END); })(xmlBuilder);
+		                                    
+		                                    if (index121 < array122.length - 1)
+		                                	{
+		    	                            	_loop_1(index121 + 1, remaining);
+		                                	}
+		    	                            else
+		                                	{
+		    	                            	remaining();
+		                                	}
+	                                    });
 	                                }
 	                            }
 	                        };
 	                        var this_1 = _this;
-	                        for (var index121 = 0; index121 < array122.length; index121++) {
-	                            _loop_1(index121);
+	                        
+	                        if (array122.length > 0)
+                        	{
+	                        	_loop_1(0, remaining);
+                        	}
+	                        else
+	                        {
+	                        	remaining();
 	                        }
 	                    }
-	                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_END); })(xmlBuilder);
-	                    var dateAfter = new Date();
-                       	//console.log("File processed in " + (dateAfter - dateBefore) + "ms");
-	                    //console.log(xmlBuilder.str);
-	                    if (callback) 
+	                    
+	                    function remaining()
 	                    {
-                     		callback(xmlBuilder.str);
+		                    /* append */ (function (sb) { return sb.str = sb.str.concat(_this.RESPONSE_END); })(xmlBuilder);
+		                    var dateAfter = new Date();
+	                       	//console.log("File processed in " + (dateAfter - dateBefore) + "ms");
+		                    //console.log(xmlBuilder.str);
+		                    if (callback) 
+		                    {
+	                     		callback(xmlBuilder.str);
+		                    }
 	                    }
                     };
 
@@ -574,7 +598,7 @@ var com;
                  * @param {*} parent The parent of the elements to be imported.
                  * @return {number}
                  */
-                mxVsdxCodec.prototype.importPage = function (page, graph, parent) 
+                mxVsdxCodec.prototype.importPage = function (page, graph, parent, noSanitize) 
                 {
                 	//BackPages can include another backPage, so it is recursive
                 	var backPage = page.getBackPage();
@@ -663,9 +687,117 @@ var com;
                         }
                     }
                     ;
-                    this.sanitiseGraph(graph);
+                    if (!noSanitize)
+                    {
+                        this.sanitiseGraph(graph);
+                    }
+
                     return pageHeight;
                 };
+                
+                /**
+                 * This function is for doing any async processing needed after importing a page
+                 */
+                mxVsdxCodec.prototype.postImportPage = function(page, graph, callback)
+                {
+                	try
+                	{
+                		var me = this;
+                		var toCropImgs = [];
+	                	var shapes = page.getShapes().entries || [];
+	                	
+	                	for (var i = 0; i < shapes.length; i++)
+	            		{
+	                		var shape = shapes[i].value || {};
+	                		
+	                		if (shape.toBeCroppedImg)
+	                		{
+	                			toCropImgs.push(shape);
+	                		}
+	            		}
+	                	
+	                	if (toCropImgs.length > 0)
+                		{
+	                		function cropImage(index, callback)
+	                		{
+	                			function next()
+	                			{
+	                				if (index < toCropImgs.length - 1)
+	                				{
+		                				cropImage(index + 1, callback);
+	                				}
+		                			else
+	                				{
+		                				callback();
+	                				}
+	                			};
+	                			
+	                			var shape = toCropImgs[index];
+	                			var imgInfo = shape.toBeCroppedImg;
+	                			
+	                			var cell = (function (m, k) { if (m.entries == null)
+	                                m.entries = []; for (var i = 0; i < m.entries.length; i++)
+	                                if (m.entries[i].key.equals != null && m.entries[i].key.equals(k) || m.entries[i].key === k) {
+	                                    return m.entries[i].value;
+	                                } return null; })(me.vertexMap, new com.mxgraph.io.vsdx.ShapePageId(page.Id, shape.Id));
+	                            
+	                			var img = new Image();
+	                			
+	                			img.onload = function()
+	                			{
+	                				var data = imgInfo.iData;
+                                    var type = imgInfo.iType;
+                                    
+	                				try
+		                			{
+                                        //TODO There is still some minor inaccuracy in width/height
+                                        var scaleX = img.width / imgInfo.imgWidth;
+                                        var scaleY = img.height / imgInfo.imgHeight;
+		                				var offsetX = (-imgInfo.imgOffsetX) * scaleX;
+		                				var offsetY = (imgInfo.imgHeight - imgInfo.height + imgInfo.imgOffsetY) * scaleY;
+		                			    var c = document.createElement("canvas");
+		                			    c.width = imgInfo.width * scaleX;
+		                              	c.height = imgInfo.height * scaleY;
+                                        var ctx = c.getContext("2d");
+                                        ctx.fillStyle = "#FFFFFF";
+                                        ctx.fillRect(0, 0, c.width, c.height);
+                                        ctx.drawImage(img, offsetX, offsetY, c.width, c.height, 0, 0, c.width, c.height);
+		                            	var jpgData = c.toDataURL("image/jpeg");
+	                                    data = jpgData.substr(23); //23 is the length of "data:image/jpeg;base64,"
+                                        type = 'jpg';
+		                			}
+	                				catch(e) 
+	                				{
+	                					console.log(e);
+	                				}
+	                				
+	                				cell.style += ';image=data:image/' + type + ',' + data;
+	                			    next();
+	                			};
+	                			
+	                			img.src = 'data:image/' + imgInfo.iType + ';base64,' + imgInfo.iData;
+
+	                			img.onerror = function()
+	                			{
+	                				cell.style += ';image=data:image/' + imgInfo.iType + ',' + imgInfo.iData;
+	                				next();
+	                			}
+	                		};
+	                		
+	                		cropImage(0, callback);
+                		}
+	                	else
+                		{
+	                		callback();
+	                	}
+                	}
+                	catch(e)
+                	{
+                        console.log(e);
+                        callback();
+                	}
+                };
+                
                 /**
                  * Adds a vertex to the graph if 'shape' is a vertex or add the shape to edgeShapeMap if it is an edge.
                  * This method doesn't import sub-shapes of 'shape'.
@@ -9511,6 +9643,13 @@ var com;
                         _this.vertex = vertex || (_this.childShapes != null && !(function (m) { if (m.entries == null)
                             m.entries = []; return m.entries.length == 0; })(_this.childShapes)) || (_this.geomList != null && (!_this.geomList.isNoFill()  || _this.geomList.getGeoCount() > 1));
                         _this.layerMember = _this.getValue(_this.getCellElement$java_lang_String("LayerMember"));
+                        
+                        //We don't have a cell belongs to multiple layers
+                        if (_this.layerMember && _this.layerMember.indexOf('0;') == 0)
+                    	{
+                        	 _this.layerMember =  _this.layerMember.substr(2);
+                    	}
+                        
                         return _this;
                     }
                     VsdxShape.__static_initialize = function () { if (!VsdxShape.__static_initialized) {
@@ -11061,7 +11200,32 @@ var com;
                                     /* put */ (result["aspect"] = "fixed");
                                     var iType = (function (m, k) { return m[k] ? m[k] : null; })(imageData, "iType");
                                     var iData = (function (m, k) { return m[k] ? m[k] : null; })(imageData, "iData");
-                                    /* put */ (result["image"] = "data:image/" + iType + "," + iData);
+                                    
+                                    var imgOffsetX = parseFloat(this.getValue(this.getCellElement$java_lang_String('ImgOffsetX'), "0"));
+                                    var imgOffsetY = parseFloat(this.getValue(this.getCellElement$java_lang_String('ImgOffsetY'), "0"));
+                                    var imgWidth = parseFloat(this.getValue(this.getCellElement$java_lang_String('ImgWidth'), "0"));
+                                    var imgHeight = parseFloat(this.getValue(this.getCellElement$java_lang_String('ImgHeight'), "0"));
+                                    var width = parseFloat(this.getValue(this.getCellElement$java_lang_String('Width'), "0"));
+                                    var height = parseFloat(this.getValue(this.getCellElement$java_lang_String('Height'), "0"));
+                                    
+                                    if (imgOffsetX != 0 || imgOffsetY != 0)
+                                	{
+                                    	this.toBeCroppedImg = {
+                                			imgOffsetX: imgOffsetX, 
+                                			imgOffsetY: imgOffsetY, 
+                                			imgWidth: imgWidth, 
+                                			imgHeight: imgHeight,
+                                			width: width,
+                                			height: height,
+                                			iType: iType,
+                            				iData: iData
+                                    	};
+                                	}
+                                    else
+                                    {
+                                    	/* put */ (result["image"] = "data:image/" + iType + "," + iData);
+                                    }
+                                    
                                     return result;
                                 }
                                 var parsedGeom = this.parseGeom();
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index 4236b70bb..a60c3942b 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -1,142 +1,145 @@
 LucidImporter={};
 (function(){function f(a,b){function d(a,b){var d="",n=0,c=a.t;if(a.lk){var h=a.lk;null!=h.v&&0<h.v.length&&"ext"==h.v[0].tp&&(d+='<a href="'+h.v[0].url+'">',g.push("a"),n++)}if(b)if(h=a.l||{},null==c||0!=q&&q==c.v&&e==h.v)null==c&&(q&&(d+=k(),q=!1),d+='<div style="',g.push("div"),n++);else{q&&(d+=k());q=c.v;e=h.v;"ul"==c.v?(d+="<ul ",g.push("ul")):(d+="<ol ",g.push("ol"));y.push(1);d+='style="margin: 0px; text-align:'+(a.a?a.a.v:"left")+"; list-style-type:";if("hl"==c.v)d+="upper-roman";else switch(h.v){case "auto":d+=
-"disc";break;case "inv":d+="circle";break;case "disc":d+="circle";break;case "trib":d+="square";break;case "square":d+="square";break;case "dash":d+="square";break;case "heart":d+="disc";break;default:d+="decimal"}d+='">'}else q&&!E&&(d+=k(),q=!1),d+='<span style="',g.push("span"),n++;b&&null!=c&&(E=!0,d+="<li>",g.push("li"),n++,d+='<span style="',g.push("span"),n++);a.s&&(d+="font-size:"+Math.round(.6*a.s.v)+"px;");a.c&&(c=a.c.v,null!=c&&("#"!=c.charAt(0)&&(c="#"+c),c=c.substring(0,7),d+="color:"+
+"disc";break;case "inv":d+="circle";break;case "disc":d+="circle";break;case "trib":d+="square";break;case "square":d+="square";break;case "dash":d+="square";break;case "heart":d+="disc";break;default:d+="decimal"}d+='">'}else q&&!Rb&&(d+=k(),q=!1),d+='<span style="',g.push("span"),n++;b&&null!=c&&(Rb=!0,d+="<li>",g.push("li"),n++,d+='<span style="',g.push("span"),n++);a.s&&(d+="font-size:"+Math.round(.6*a.s.v)+"px;");a.c&&(c=a.c.v,null!=c&&("#"!=c.charAt(0)&&(c="#"+c),c=c.substring(0,7),d+="color:"+
 c+";"));if(a.b&&a.b.v||a.fc&&a.fc.v&&0==a.fc.v.indexOf("Bold"))d+="font-weight: bold;";a.i&&a.i.v&&(d+="font-style: italic;");a.u&&a.u.v&&(d+="text-decoration: underline;");q||(d+="text-align: "+(a.a?a.a.v:"center")+";");a.il&&(d+="margin-left: "+Math.round(.6*a.il.v-(q?21:0))+"px;");a.ir&&(d+="margin-right: "+Math.round(.6*a.ir.v)+"px;");a.mt&&(d+="margin-top: "+Math.round(.6*a.mt.v)+"px;");a.mb&&(d+="margin-bottom: "+Math.round(.6*a.mb.v)+"px;");d+='">';y.push(n);return d}function k(a,b,d,k){a=
-a?a.substring(b,d):"";do for(b=y.pop(),d=0;d<b;d++){var n=g.pop();"li"==n&&(E=!1);a+="</"+n+">"}while(k&&0<g.length);return a}for(var n=[],c=-1,f="";-1<(c=a.indexOf("\n",c+1));)n.push(c+1);b.sort(function(a,b){return a.s-b.s});for(var w={},c=[],l=0;l<b.length;l++){var z=b[l];if(null==w[z.s]){for(var A=0;A<n.length;A++)if(n[A]>z.s){w[z.s]=n[A];break}null==w[z.s]&&(w[z.s]=a.length)}null==z.e&&(z.e=w[z.s]);c.push(z)}c.sort(function(a,b){return a.e-b.e});for(var A=l=0,n={},g=[],y=[],q=!1,e,E=!1,z=w=0;l<
-b.length||A<c.length;){var ca=b[l],D=c[A];if(ca&&ca.s<D.e){w=ca.s;D=!1;for(0<w-z&&(f+=d(n,D)+k(a,z,w));null!=ca&&ca.s==w;){if("a"==ca.n||"il"==ca.n||"ir"==ca.n||"mt"==ca.n||"mb"==ca.n||"t"==ca.n)D=!0;n[ca.n]=ca;ca=b[++l]}f+=d(n,D)}else{z=D.e;do delete n[D.n],D=c[++A];while(null!=D&&D.e==z);f+=k(a,w,z);w=z}}f+=k(null,null,null,!0);console.log(f);return f}function g(a){x=!1;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):null==b&&null!=a.t0&&null!=a.t0.t&&(b=a.t0);if(null!=b){if(null!=b.t){b.t=b.t.replace(/</g,"&lt;");b.t=b.t.replace(/>/g,"&gt;");a=b.t;b=b.m;try{for(var d=0;d<b.length;d++)if(0<b[d].s){x=!0;break}if(x)return f(a,b)}catch(ua){console.log(ua)}return a}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 q(a){return null!=a.Action?a.Action:a}function e(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;if(null!=a.Title&&null!=a.Title.m)return a.Title.m}return null}function l(b,n){return(n?"overflow=width;":
-a(b)+d(b)+k(b)+w(b)+A(b)+z(b)+y(b)+E(b))+D(b)+B(b)}function c(a,d,k,n,c){var h="";null!=a&&""!=a&&";"!=a.charAt(a.length-1)&&(h=";");return h+=(c?"overflow=width;":b(mxConstants.STYLE_FONTSIZE,a,d,k,n)+b(mxConstants.STYLE_FONTCOLOR,a,d,k,n)+b(mxConstants.STYLE_FONTSTYLE,a,d,k,n)+b(mxConstants.STYLE_ALIGN,a,d,k,n)+b(mxConstants.STYLE_SPACING_LEFT,a,d,k,n)+b(mxConstants.STYLE_SPACING_RIGHT,a,d,k,n)+b(mxConstants.STYLE_SPACING_TOP,a,d,k,n)+b(mxConstants.STYLE_SPACING_BOTTOM,a,d,k,n))+b(mxConstants.STYLE_SPACING,
-a,d,k,n)+b(mxConstants.STYLE_VERTICAL_ALIGN,a,d,k,n)+b(mxConstants.STYLE_STROKECOLOR,a,d,k,n)+b(mxConstants.STYLE_OPACITY,a,d,k,n)+b(mxConstants.STYLE_ROUNDED,a,d,k,n)+b(mxConstants.STYLE_ROTATION,a,d,k,n)+b(mxConstants.STYLE_FLIPH,a,d,k,n)+b(mxConstants.STYLE_FLIPV,a,d,k,n)+b(mxConstants.STYLE_SHADOW,a,d,k,n)+b(mxConstants.STYLE_FILLCOLOR,a,d,k,n)+b(mxConstants.STYLE_DASHED,a,d,k,n)+b(mxConstants.STYLE_STROKEWIDTH,a,d,k,n)+b(mxConstants.STYLE_IMAGE,a,d,k,n)}function b(b,n,c,f,h){a:{if(null!=n&&null!=
-b){if(n.includes(";"+b+"=")){n=!0;break a}if(n.substring(0,b.length+1)==b+"="){n=!0;break a}}n=!1}if(!n)switch(b){case mxConstants.STYLE_FONTSIZE:return a(c);case mxConstants.STYLE_FONTCOLOR:return d(c);case mxConstants.STYLE_FONTSTYLE:return k(c);case mxConstants.STYLE_ALIGN:return w(c);case mxConstants.STYLE_SPACING_LEFT:return A(c);case mxConstants.STYLE_SPACING_RIGHT:return z(c);case mxConstants.STYLE_SPACING_TOP:return y(c);case mxConstants.STYLE_SPACING_BOTTOM:return E(c);case mxConstants.STYLE_SPACING:return D(c);
-case mxConstants.STYLE_VERTICAL_ALIGN:return B(c);case mxConstants.STYLE_STROKECOLOR:return C(c,f);case mxConstants.STYLE_OPACITY:return G(c,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&null!=c.Rounding&&0<c.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*c.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return b="",null!=c.Rotation&&(c=mxUtils.toDegree(parseFloat(c.Rotation)),n=!0,0!=c&&("UMLSwimLaneBlockV2"==f.Class||0<=f.Class.indexOf("Rotated")&&(0<=f.Class.indexOf("Pool")||0<=f.Class.indexOf("SwimLane")))?
-(c+=90,h.geometry.rotate90(),n=!1):0<=mxUtils.indexOf(Ac,f.Class)?(c-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(Bc,f.Class)&&(c+=180),0!=c&&(b+="rotation="+c+";"),n||(b+="horizontal=0;")),b;case mxConstants.STYLE_FLIPH:return f=c.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=c.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return P(c);case mxConstants.STYLE_FILLCOLOR:return N(c,f);case mxConstants.STYLE_DASHED:return ha(c);case mxConstants.STYLE_STROKEWIDTH:return fa(c);case mxConstants.STYLE_IMAGE:return f=
-"ImageSearchBlock2"==f.Class?"image="+c.URL+";":"UserImage2Block"==f.Class&&null!=c.ImageFillProps&&null!=c.ImageFillProps.url?"image="+c.ImageFillProps.url+";":"",f}return""}function a(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function d(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+
-"="+a+";";b++}return""}function k(a){return n(e(a))}function n(a){if(null!=a){var b=0,d=!1;if(null!=a)for(var k=0;!d&&k<a.length;){var n=a[k];"b"==n.n?null!=n.v&&n.v&&(d=!0,b+=1):"fc"==n.n&&"Bold"==n.v&&(d=!0,b+=1);k++}d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"i"==n.n&&null!=n.v&&n.v&&(d=!0,b+=2),k++;d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"u"==n.n&&null!=n.v&&n.v&&(d=!0,b+=4),k++;if(0<b)return"fontStyle="+b+";"}return""}function w(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=
-a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function A(a){var b=e(a);if(null!=b)for(var d=0;d<b.length;){var k=b[d];if(null!=k.v){if("il"==k.n)return"spacingLeft="+.6*k.v+";";w(a)}d++}return""}function z(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function y(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function E(a){a=e(a);
-if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function D(a){return"number"===typeof a.InsetMargin?"spacing="+Math.max(0,Math.round(.6*parseInt(a.InsetMargin)))+";":""}function B(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":null!=a.Title_VAlign&&"string"===typeof a.Title_VAlign?"verticalAlign="+a.Title_VAlign+";":va(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function C(a,
-b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":va(mxConstants.STYLE_STROKECOLOR,aa(a.LineColor),"#000000")}function G(a,b,d){b="";if("string"===typeof a.LineColor&&7<a.LineColor.length){var k="0x"+a.LineColor.substring(a.LineColor.length-2,a.LineColor.length);d.style.includes("strokeOpacity")||(b+="strokeOpacity="+Math.round(parseInt(k)/2.55)+";")}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||
-(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function P(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function aa(a){return a?a.substring(0,7):null}function S(a,b){return a&&7<a.length?b+"="+Math.round(parseInt("0x"+a.substr(7))/2.55)+";":""}function N(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return va(mxConstants.STYLE_FILLCOLOR,aa(a.FillColor.cs[0].c))+va(mxConstants.STYLE_GRADIENTCOLOR,aa(a.FillColor.cs[1].c))}else return"string"===
-typeof a.FillColor?va(mxConstants.STYLE_FILLCOLOR,aa(a.FillColor),"#FFFFFF"):va(mxConstants.STYLE_FILLCOLOR,"none");return""}function ha(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function fa(a){return va(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(a.LineWidth)),"1")}function ba(a,b,
-d,k){for(var n=b,c=0;null!=k.getAttributeForCell(a,n);)c++,n=b+"_"+c;k.setAttributeForCell(a,n,null!=d?d:"")}function na(a,b,d,k,n,f){var h=q(b);if(null!=h){var w=xb[h.Class];null!=w&&(a.style+=w+";");w=null!=h.Properties?h.Properties:h;if(null!=w){a.value=f?"":g(w);a.style+=c(a.style,w,h,a,x);a.style.includes("strokeColor")||(a.style+=C(w,h));if(null!=w.Link&&0<w.Link.length&&"ext"==w.Link[0].tp)d.setAttributeForCell(a,"link",w.Link[0].url);else if(null!=w.Text){a:{f=e(w.Text);if(null!=f)for(h=0;h<
-f.length;h++)if(f[h].n=null!=f[h].v&&0<f[h].v.length&&"ext"==f[h].v[0].tp){f=f[h].v[0].url;break a}f=null}null!=f&&d.setAttributeForCell(a,"link",f)}f=[];var h=d.convertValueToString(a),l=!1;if(null!=h){for(var z=0;match=Cc.exec(h);){var A=match[0],l=!0;if(2<A.length){var y=A.substring(2,A.length-2);"documentName"==y?y="filename":"date:"==y.substring(0,5)?y="date{"+y.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==y.substring(0,9)&&(y="date{"+y.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,
-"mmm d, yyyy hh:MM TT")+"}");y="%"+y+"%";f.push(h.substring(z,match.index)+(null!=y?y:A));z=match.index+A.length}}l&&(f.push(h.substring(z)),d.setAttributeForCell(a,"label",f.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var ua in w)if(w.hasOwnProperty(ua)&&ua.toString().startsWith("ShapeData_"))try{var E=w[ua],D=mxUtils.trim(E.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");ba(a,D,E.Value,d)}catch(td){window.console&&console.log("Ignored "+ua+":",td)}if(a.edge){a.style=
-null!=w.Rounding?a.style+("rounded=1;arcSize="+w.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=w.Shape)if(null!=w.ElbowPoints)for(a.geometry.points=[],ua=0;ua<w.ElbowPoints.length;ua++)a.geometry.points.push(new mxPoint(Math.round(.6*w.ElbowPoints[ua].x+B),Math.round(.6*w.ElbowPoints[ua].y+S)));else"elbow"==w.Shape?a.style=null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block&&
-(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==w.Shape&&(a.style+="curved=1;"));null!=w.Endpoint1.Style&&(null!=yb[w.Endpoint1.Style]?a.style+="startArrow="+yb[w.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint1.Style));null!=w.Endpoint2.Style&&(null!=yb[w.Endpoint2.Style]?a.style+="endArrow="+yb[w.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint2.Style));S=!1;if(null==w.ElbowPoints&&null!=
-w.Endpoint1.Block&&w.Endpoint1.Block==w.Endpoint2.Block)if(null!=w.ElbowControlPoints)for(a.geometry.points=[],ua=0;ua<w.ElbowControlPoints.length;ua++)n=w.ElbowControlPoints[ua],a.geometry.points.push(new mxPoint(Math.round(.6*n.x+B),Math.round(.6*n.y+B)));else if(null!=k&&null!=n){k=new mxPoint(Math.round(k.geometry.x+k.geometry.width*w.Endpoint1.LinkX),Math.round(k.geometry.y+k.geometry.height*w.Endpoint1.LinkY));n=new mxPoint(Math.round(n.geometry.x+n.geometry.width*w.Endpoint2.LinkX),Math.round(n.geometry.y+
-n.geometry.height*w.Endpoint2.LinkY));var B=k.x==n.x?20:0,S=0;a.geometry.points=[new mxPoint(k.x+B,k.y+S),new mxPoint(n.x+B,n.y+S)];implicitX=k.y==n.y;S=k.x==n.x}pb(a,w.Endpoint1,!0,S);pb(a,w.Endpoint2,!1,S)}}}null!=b.id&&ba(a,"lucidchartObjectId",b.id,d)}function W(a,b){var d=q(a).Properties,d=d.BoundingBox;null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+0),Math.round(.6*d.y+0),
-Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;na(v,a,b);if(null!=v&&0<=v.style.indexOf(";grIcon=")){var k=new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;whiteSpace=wrap;");k.vertex=!0;var n=q(a);null!=n&&(d=null!=n.Properties?n.Properties:n,null!=d&&(k.style+=c(k.style,d,n,k)));v.geometry.x=0;v.geometry.y=0;v.style+="part=1;";k.insert(v);v=k}return v}function ia(a,b,d){var k=2*(parseFloat(a.Location)-.5);isNaN(k)&&
-null!=a.Text&&null!=a.Text.Location&&(k=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var c=g(a),k=new mxGeometry(isNaN(k)?0:k,0,0,0),f="11",w="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var w=n(a.Value.m),l=0;l<a.Value.m.length;l++)"s"==a.Value.m[l].n?f=.6*parseFloat(a.Value.m[l].v):"c"==a.Value.m[l].n&&(w+="fontColor="+a.Value.m[l].v+";");a=new d(c,k,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(w+";fontSize="+f+";"));a.geometry.relative=!0;a.vertex=
-!0;b.insert(a);return b}function va(a,b,d,k){null!=b&&null!=k&&(b=k(b));return null!=b&&b!=d?a+"="+b+";":""}function pb(a,b,d,k,n){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(k?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(n?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function hb(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){var k=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,n=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,c;c=new mxCell("",
-new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;na(c,b,a,k,n,!0);var h=q(b).Properties,l=null!=h?h.TextAreas:b.TextAreas;if(null!=l){for(var m=0;null!=l["t"+m];){var z=l["t"+m];c=ia(z,c);m++}for(m=0;null!=l["m"+m]||1>m;)z=l["m"+m],null!=z&&(c=ia(z,c,b)),m++;null!=l.Text&&(c=ia(l,c,b));l=null!=h?h.TextAreas:b.TextAreas;null!=l.Message&&(c=ia(l.Message,c,b))}null==k&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*
-d.Endpoint1.y)),!0);null==n&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);f.push(a.addCell(c,null,null,k,n))},f=[],w={},l=[],z=[],A=0;if(null!=b.Groups)for(var g in b.Groups){var y=b.Groups[g];y.id=g;if(1==y.Hidden&&null!=y.Members){0>mxUtils.indexOf(z,g)&&z.push(g);for(var e in y.Members)z=qc(e,b.Groups,z)}}if(null!=b.Blocks)for(g in b.Blocks)y=b.Blocks[g],y.id=g,0>mxUtils.indexOf(z,g)&&(e=!1,null!=xb[y.Class]&&"mxCompositeShape"==
-xb[y.Class]&&(w[y.id]=Pb(y,f,a),l.push(y),e=!0),e||(w[y.id]=W(y,a),l.push(y)));else for(A=0;A<b.Objects.length;A++)y=b.Objects[A],null!=y.Action&&"mxCompositeShape"==xb[y.Action.Class]?w[y.id]=Pb(y,f,a):y.IsBlock&&null!=y.Action&&null!=y.Action.Properties&&(w[y.id]=W(y,a)),l.push(y);if(null!=b.Lines)for(g in b.Lines)0>mxUtils.indexOf(z,g)&&(y=b.Lines[g],y.id=g,l.push(y));l.sort(function(a,b){a=q(a);b=q(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:
-b.ZOrder;return null!=d&&null!=k?d-k:0});for(A=0;A<l.length;A++){var y=l[A],ua=w[y.id];null!=ua?f.push(a.addCell(ua)):y.IsLine&&null!=y.Action&&null!=y.Action.Properties?h(y,y.Action.Properties):null!=y.StrokeStyle&&h(y,y)}if(n&&null!=d&&null!=k){a.isGridEnabled()&&(d=a.snap(d),k=a.snap(k));var E=a.getBoundingBoxFromGeometry(f,!0);null!=E&&a.moveCells(f,d-E.x,k-E.y)}c||a.setSelectionCells(f)}finally{a.getModel().endUpdate()}}function Eb(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);
-a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function ib(a,b,d,k,n,c,f,w){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);c=[a];d=d.clone();w.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);k.push(n.addCell(d,null,null,null,null))}function ja(a,b,d,k,n,c,f,w,l){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;l.insert(a);d=new mxCell("",new mxGeometry(d,k,0,0),"strokeColor=none;fillColor=none;");
-d.vertex=!0;l.insert(d);w=[d];n=n.clone();a.insertEdge(n,!0);d.insertEdge(n,!1);w.push(n);c.push(f.addCell(n,null,null,null,null))}function ea(a,b,d,k,n,f){k.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";k.style+=c(k.style,n,f,k);b=g(n);k.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
-a.style+=c(a.style,n,f,a,x);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;k.insert(a)}function la(a,b,d,k,n,f,w,l){n="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";f.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";f.style+=c(f.style,w,l,f);f.value=g(w);f.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*k*b,.7*k*d),n+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
-a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*k*.35,10+(1-d)*k*.35);a.vertex=!0;a.style+=c(a.style,w,l,a,x);f.insert(a)}function Pb(b,n,f){var e=q(b),h=e.Properties,ba=h.BoundingBox,t=Math.round(.6*ba.w),r=Math.round(.6*ba.h),W=Math.round(.6*ba.x+0),ia=Math.round(.6*ba.y+0);null==b.Class||"GCPInputDatabase"!==b.Class&&"GCPInputRecord"!==b.Class&&"GCPInputPayment"!==b.Class&&"GCPInputGateway"!==b.Class&&"GCPInputLocalCompute"!==b.Class&&"GCPInputBeacon"!==b.Class&&"GCPInputStorage"!==b.Class&&
-"GCPInputList"!==b.Class&&"GCPInputStream"!==b.Class&&"GCPInputMobileDevices"!==b.Class&&"GCPInputCircuitBoard"!==b.Class&&"GCPInputLive"!==b.Class&&"GCPInputUsers"!==b.Class&&"GCPInputLaptop"!==b.Class&&"GCPInputApplication"!==b.Class&&"GCPInputLightbulb"!==b.Class&&"GCPInputGame"!==b.Class&&"GCPInputDesktop"!==b.Class&&"GCPInputDesktopAndMobile"!==b.Class&&"GCPInputWebcam"!==b.Class&&"GCPInputSpeaker"!==b.Class&&"GCPInputRetail"!==b.Class&&"GCPInputReport"!==b.Class&&"GCPInputPhone"!==b.Class&&
-"GCPInputBlank"!==b.Class||(r+=20);v=new mxCell("",new mxGeometry(W,ia,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;var Eb=null!=b.Class?b.Class:null!=e?e.Class:null;switch(Eb){case "BraceNoteBlock":case "UI2BraceNoteBlock":var pb=!1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(pb=!0);var hb=null,ca=null;pb?(hb=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),ca=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(hb=new mxCell("",
-new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),ca=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);hb.vertex=!0;v.insert(hb);hb.style+=c(hb.style,h,e,hb);ca.vertex=!0;ca.value=g(h);v.insert(ca);ca.style+=c(ca.style,h,e,ca,x);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var Pb=
-0!=h.Rotation,sd=0<Eb.indexOf("Pool"),Ac=0==Eb.indexOf("BPMN"),rd=null!=h.MainText,xb=0;null!=h.Lanes&&(xb=h.Lanes.length);v.style=(sd?"swimlane;":"fillColor=none;strokeColor=none;pointerEvents=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Pb?"horizontalStack=0;":"");v.style+=c(v.style,h,e,v);rd&&(v.value=g(h.MainText),v.style+=(x?"overflow=width;":a(h.MainText)+d(h.MainText)+k(h.MainText)+w(h.MainText,v)+A(h.MainText)+z(h.MainText)+
-y(h.MainText)+E(h.MainText))+D(h.MainText)+B(h.MainText));for(var yb=0,ob=[],qc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize=25;dropTarget=0;"+(Pb?"horizontal=0;":"")+(Ac?"swimlaneLine=0;fillColor=none;":""),V=0;V<xb;V++){var Rc=parseFloat(h.Lanes[V].p),m=parseInt(h.Lanes[V].tid)||V;ob.push(new mxCell("",new mxGeometry(t*yb,0,t*Rc,r),qc));ob[V].vertex=!0;v.insert(ob[V]);ob[V].value=g(h["Lane_"+m]);var Sc=ob[V],Bc=Sc.style,Cc=c(ob[V].style,h,e,ob[V],x)+(x?"":a(h["Lane_"+
-m])+d(h["Lane_"+m])+k(h["Lane_"+m])+w(h["Lane_"+m],ob[V])+A(h["Lane_"+m])+z(h["Lane_"+m])+y(h["Lane_"+m])+E(h["Lane_"+m]))+D(h["Lane_"+m])+B(h["Lane_"+m]),Tc;var Uc=h["HeaderFill_"+m];Tc=null!=Uc?mxConstants.STYLE_FILLCOLOR+"="+aa(Uc)+";":"";Sc.style=Bc+(Cc+Tc);yb+=Rc}break;case "UMLMultidimensionalSwimlane":var Qb=0,Rb=0;null!=h.Rows&&h.Columns&&(Qb=h.Rows.length,Rb=h.Columns.length);v.style="group";var Dc=.6*h.TitleHeight||25,Ec=.6*h.TitleWidth||25,Fc=new mxCell("",new mxGeometry(0,Dc,t,r-Dc),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");
-Fc.vertex=!0;var Gc=new mxCell("",new mxGeometry(Ec,0,t-Ec,r),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Gc.vertex=!0;v.insert(Fc);v.insert(Gc);for(var ia=0,ud="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;startSize="+Ec+";",V=0;V<Qb;V++){var Vc=.6*parseInt(h.Rows[V].height),m=parseInt(h.Rows[V].id)||V,qb=new mxCell("",new mxGeometry(0,ia,t,Vc),ud),ia=
-ia+Vc;qb.vertex=!0;Fc.insert(qb);qb.value=g(h["Row_"+m]);qb.style+=c(qb.style,h,e,qb,x)+(x?"":a(h["Row_"+m])+d(h["Row_"+m])+k(h["Row_"+m])+w(h["Row_"+m],qb)+A(h["Row_"+m])+z(h["Row_"+m])+y(h["Row_"+m])+E(h["Row_"+m]))+D(h["Row_"+m])+B(h["Row_"+m])}for(var vd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;startSize="+Dc+";",V=W=0;V<Rb;V++){var Sb=.6*parseInt(h.Columns[V].width),m=parseInt(h.Columns[V].id)||V,rb=new mxCell("",new mxGeometry(W,0,Sb,r),vd),W=W+Sb;
-rb.vertex=!0;Gc.insert(rb);rb.value=g(h["Column_"+m]);rb.style+=c(rb.style,h,e,rb,x)+(x?"":a(h["Column_"+m])+d(h["Column_"+m])+k(h["Column_"+m])+w(h["Column_"+m],rb)+A(h["Column_"+m])+z(h["Column_"+m])+y(h["Column_"+m])+E(h["Column_"+m]))+D(h["Column_"+m])+B(h["Column_"+m])}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var sb=null,Tb=null,Ub=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",
-sb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(Tb=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Ub=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"==h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",sb=new mxCell("",new mxGeometry(.04*
-t,.092*r,.92*t,.816*r),""),h.KeyboardShown&&(Tb=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Ub=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));sb.vertex=!0;v.insert(sb);"Dark"==h.Scheme?sb.style+="fillColor=#111111;":"Light"==h.Scheme&&(sb.style+="fillColor=#ffffff;");null!=Tb&&(Tb.vertex=!0,v.insert(Tb));null!=Ub&&(Ub.vertex=
-!0,v.insert(Ub))}v.style+=c(v.style,h,e,v);break;case "AndroidAlertDialog":var Qa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Qa.vertex=!0;v.insert(Qa);var pa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");pa.vertex=!0;v.insert(pa);var Vb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;");Vb.vertex=!0;v.insert(Vb);var sa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");
-sa.vertex=!0;v.insert(sa);var ta=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ta.vertex=!0;v.insert(ta);Qa.value=g(h.DialogTitle);Qa.style+=l(h.DialogTitle,x);Vb.value=g(h.DialogText);Vb.style+=l(h.DialogText,x);sa.value=g(h.Button_0);sa.style+=l(h.Button_0,x);ta.value=g(h.Button_1);ta.style+=l(h.Button_1,x);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",sa.style+="strokeColor=#353535;",ta.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",
-sa.style+="strokeColor=#E2E2E2;",ta.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,h,e,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Qa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Qa.vertex=!0;v.insert(Qa);Qa.value=g(h.DialogTitle);Qa.style+=l(h.DialogTitle,x);pa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");pa.vertex=!0;v.insert(pa);sa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");sa.vertex=
-!0;v.insert(sa);sa.value=g(h.Button_0);sa.style+=l(h.Button_0,x);ta=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=g(h.Button_1);ta.style+=l(h.Button_1,x);var Fb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");Fb.vertex=!0;v.insert(Fb);var Gb=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;");Gb.vertex=!0;v.insert(Gb);var Hb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");
-Hb.vertex=!0;v.insert(Hb);var Wb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Wb.vertex=!0;v.insert(Wb);Wb.value=g(h.Label_1);Wb.style+=l(h.Label_1,x);var Xb=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Xb.vertex=!0;v.insert(Xb);Xb.value=g(h.Label_0);Xb.style+=l(h.Label_0,x);var Ib=null;"AndroidDateDialog"==b.Class&&(Ib=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),Ib.vertex=!0,v.insert(Ib),
-Ib.value=g(h.Label_2),Ib.style+=l(h.Label_2,x));var Ra=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ra.vertex=!0;v.insert(Ra);var Sa=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Sa.vertex=!0;v.insert(Sa);var Wc=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Wc.vertex=!0;v.insert(Wc);var Yb=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Yb.vertex=!0;v.insert(Yb);
-Yb.value=g(h.Label_4);Yb.style+=l(h.Label_4,x);var Jb=null;"AndroidTimeDialog"==b.Class&&(Jb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),Jb.vertex=!0,v.insert(Jb),Jb.value=g(h.Label_Colon),Jb.style+=l(h.Label_Colon,x));var Zb=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Zb.vertex=!0;v.insert(Zb);Zb.value=g(h.Label_3);Zb.style+=l(h.Label_3,x);var $b=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");
-$b.vertex=!0;v.insert($b);$b.value=g(h.Label_5);$b.style+=l(h.Label_5,x);var Xc=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");Xc.vertex=!0;v.insert(Xc);var Yc=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");Yc.vertex=!0;v.insert(Yc);var Zc=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");Zc.vertex=!0;v.insert(Zc);var ac=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");
-ac.vertex=!0;v.insert(ac);ac.value=g(h.Label_7);ac.style+=l(h.Label_7,x);var bc=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");bc.vertex=!0;v.insert(bc);bc.value=g(h.Label_6);bc.style+=l(h.Label_6,x);var cc=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");cc.vertex=!0;v.insert(cc);cc.value=g(h.Label_8);cc.style+=l(h.Label_8,x);var Kb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");Kb.vertex=!0;v.insert(Kb);
-var Lb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");Lb.vertex=!0;v.insert(Lb);var Mb=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Mb.vertex=!0;v.insert(Mb);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",sa.style+="strokeColor=#353535;",ta.style+="strokeColor=#353535;",Fb.style+="strokeColor=none;fillColor=#7E7E7E;",Gb.style+="strokeColor=none;fillColor=#7E7E7E;",Hb.style+="strokeColor=none;fillColor=#7E7E7E;",
-Kb.style+="strokeColor=none;fillColor=#7E7E7E;",Lb.style+="strokeColor=none;fillColor=#7E7E7E;",Mb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",sa.style+="strokeColor=#E2E2E2;",ta.style+="strokeColor=#E2E2E2;",Fb.style+="strokeColor=none;fillColor=#939393;",Gb.style+="strokeColor=none;fillColor=#939393;",Hb.style+="strokeColor=none;fillColor=#939393;",Kb.style+="strokeColor=none;fillColor=#939393;",Lb.style+="strokeColor=none;fillColor=#939393;",
-Mb.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,h,e,v);break;case "AndroidListItems":var Ba=r,kb=0;if(h.ShowHeader){var kb=8,dc=new mxCell("",new mxGeometry(0,0,t,kb),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=g(h.Header);dc.style+=l(h.Header,x);var Ba=Ba-kb,$c=new mxCell("",new mxGeometry(0,kb-2,t,4),"shape=line;strokeColor=#999999;");$c.vertex=!0;v.insert($c)}var Ta=parseInt(h.Items);0<Ta&&(Ba/=Ta);for(var H=[],pa=[],m=0;m<Ta;m++)H[m]=new mxCell("",
-new mxGeometry(0,kb+m*Ba,t,Ba),"strokeColor=none;fillColor=none;"),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["Item_"+m]),H[m].style+=l(h["Item_"+m],x),0<m&&(pa[m]=new mxCell("",new mxGeometry(0,kb+m*Ba-2,t,4),"shape=line;"),pa[m].vertex=!0,v.insert(pa[m]),pa[m].style="Dark"==h.Scheme?pa[m].style+"strokeColor=#ffffff;":pa[m].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);
-break;case "AndroidTabs":var Ua=parseInt(h.Tabs),Ha=t;0<Ua&&(Ha/=Ua);for(var ga=[],pa=[],m=0;m<Ua;m++)ga[m]=new mxCell("",new mxGeometry(m*Ha,0,Ha,r),"strokeColor=none;fillColor=none;"),ga[m].vertex=!0,v.insert(ga[m]),ga[m].value=g(h["Tab_"+m]),ga[m].style+=l(h["Tab_"+m],x),0<m&&(pa[m]=new mxCell("",new mxGeometry(m*Ha-2,.2*r,4,.6*r),"shape=line;direction=north;"),pa[m].vertex=!0,v.insert(pa[m]),pa[m].style="Dark"==h.Scheme?pa[m].style+"strokeColor=#484848;":pa[m].style+"strokeColor=#CCCCCC;");var ad=
-new mxCell("",new mxGeometry(h.Selected*Ha+2,r-3,Ha-4,3),"strokeColor=none;fillColor=#33B5E5;");ad.vertex=!0;v.insert(ad);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,h,e,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(W),Math.round(ia+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var ec=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*
-r)),"strokeColor=none;fillColor=#33B5E5;");ec.vertex=!0;v.insert(ec);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,h,e,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBlock":v.style=
-"Dark"==h.Scheme?h.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":h.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=g(h.Label);v.style+=l(h.Label,x);v.style+=c(v.style,h,e,v,x);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(h.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+=
-"fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var lb=null,lb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");lb.vertex=!0;v.insert(lb);switch(h.HighlightColor){case "Blue":lb.style+="fillColor=#33B5E5;";break;case "Dark Gray":lb.style+="fillColor=#B0B0B0;";break;case "White":lb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Nb=new mxCell("",new mxGeometry(20,5,2,r-10),
-"shape=line;direction=north;");Nb.vertex=!0;v.insert(Nb);switch(h.VlignColor){case "Blue":Nb.style+="strokeColor=#244C5A;";break;case "White":Nb.style+="strokeColor=#ffffff;"}}v.style+=c(v.style,h,e,v);break;case "AndroidButton":v.value=g(h.Label);v.style+=l(h.Label,x)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBox":v.value=
-g(h.Label);v.style+=l(h.Label,x);var fc=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");fc.vertex=!0;v.insert(fc);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";fc.style=h.TextFocused?fc.style+"strokeColor=#33B5E5;":fc.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,h,e,v);break;case "AndroidRadioButton":var zb=null;h.Checked&&(zb=new mxCell("",new mxGeometry(.15*t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=1;"),
-zb.vertex=!0,v.insert(zb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=1;strokeColor=#272727;",h.Checked?(zb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(zb.style+="strokeColor=#999999;"));v.style+=c(v.style,h,e,v);break;case "AndroidCheckBox":var Hc=null;h.Checked&&(Hc=new mxCell("",new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),
-Hc.vertex=!0,v.insert(Hc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";
-v.style+=c(v.style,h,e,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+h.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,h,e,v);break;case "iOSSegmentedControl":Ua=parseInt(h.Tabs);Ha=t;v.style+="strokeColor=none;fillColor=none;";0<Ua&&(Ha/=Ua);ga=[];pa=[];for(m=0;m<Ua;m++)ga[m]=new mxCell("",new mxGeometry(m*Ha,0,Ha,r),"strokeColor="+h.FillColor+";"),ga[m].vertex=!0,v.insert(ga[m]),ga[m].value=g(h["Tab_"+m]),ga[m].style+=l(h["Tab_"+m],x),ga[m].style=
-h.Selected==m?ga[m].style+N(h,e):ga[m].style+"fillColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=c(v.style,h,e,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(W),Math.round(ia+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;ec=new mxCell("",new mxGeometry(0,
-0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+N(h,e));ec.vertex=!0;v.insert(ec);v.style+=c(v.style,h,e,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,h,e,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var T=new mxCell(g(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;");T.vertex=!0;v.insert(T);T.style+=l(h.Text,x);var Da=new mxCell(g(h.Carrier),new mxGeometry(.09*
-t,0,.2*t,r),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=l(h.Carrier,x);v.style+=c(v.style,h,e,v);break;case "iOSSearchBar":v.value=g(h.Search);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v,x)+l(h.Search,x);var Y=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");Y.vertex=!0;v.insert(Y);break;case "iOSNavBar":v.value=g(h.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";
-+l(h.Title,x);v.style+=c(v.style,h,e,v,x);T=new mxCell(g(h.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");T.vertex=!0;v.insert(T);T.style+=l(h.LeftText,x);Da=new mxCell(g(h.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=l(h.RightText,x);Y=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Y.vertex=!0;v.insert(Y);break;case "iOSTabs":Ua=
-parseInt(h.Tabs);Ha=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=c(v.style,h,e,v);0<Ua&&(Ha/=Ua);ga=[];pa=[];for(m=0;m<Ua;m++)ga[m]=new mxCell("",new mxGeometry(m*Ha,0,Ha,r),"strokeColor=none;"),ga[m].vertex=!0,v.insert(ga[m]),ga[m].value=g(h["Tab_"+m]),ga[m].style+=x?"overflow=width;":a(h["Tab_"+m])+d(h["Tab_"+m])+k(h["Tab_"+m])+w(h["Tab_"+m])+A(h["Tab_"+m])+z(h["Tab_"+m])+y(h["Tab_"+m])+E(h["Tab_"+m])+D(h["Tab_"+m]),ga[m].style+="verticalAlign=bottom;",
-ga[m].style=h.Selected==m?ga[m].style+"fillColor=#BBBBBB;":ga[m].style+"fillColor=none;";break;case "iOSDatePicker":var Va=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=g(h.Option11);Va.style+=l(h.Option11,x);var Wa=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=g(h.Option21);Wa.style+=l(h.Option21,x);var Xa=new mxCell("",new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");
-Xa.vertex=!0;v.insert(Xa);Xa.value=g(h.Option31);Xa.style+=l(h.Option31,x);var Ya=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=g(h.Option12);Ya.style+=l(h.Option12,x);var Za=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=g(h.Option22);Za.style+=l(h.Option22,x);var $a=new mxCell("",new mxGeometry(.65*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");
-$a.vertex=!0;v.insert($a);$a.value=g(h.Option32);$a.style+=l(h.Option32,x);var wa=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=g(h.Option13);wa.style+=l(h.Option13,x);var xa=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=g(h.Option23);xa.style+=l(h.Option23,x);var ab=new mxCell("",new mxGeometry(.65*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");
-ab.vertex=!0;v.insert(ab);ab.value=g(h.Option33);ab.style+=l(h.Option33,x);var ya=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ya.vertex=!0;v.insert(ya);ya.value=g(h.Option43);ya.style+=l(h.Option43,x);var za=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.value=g(h.Option14);za.style+=l(h.Option14,x);var bb=new mxCell("",new mxGeometry(.5*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");
-bb.vertex=!0;v.insert(bb);bb.value=g(h.Option24);bb.style+=l(h.Option24,x);var cb=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=g(h.Option34);cb.style+=l(h.Option34,x);var db=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=g(h.Option44);db.style+=l(h.Option44,x);var Aa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");
-Aa.vertex=!0;v.insert(Aa);Aa.value=g(h.Option15);Aa.style+=l(h.Option15,x);var eb=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=g(h.Option25);eb.style+=l(h.Option25,x);var fb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");fb.vertex=!0;v.insert(fb);fb.value=g(h.Option35);fb.style+=l(h.Option35,x);Ra=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=
-!0;v.insert(Ra);Sa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Sa.vertex=!0;v.insert(Sa);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSTimePicker":Va=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=g(h.Option11);Va.style+=l(h.Option11,x);Wa=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=g(h.Option21);Wa.style+=
-l(h.Option21,x);Ya=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=g(h.Option12);Ya.style+=l(h.Option12,x);Za=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=g(h.Option22);Za.style+=l(h.Option22,x);wa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=g(h.Option13);wa.style+=l(h.Option13,
-x);xa=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=g(h.Option23);xa.style+=l(h.Option23,x);ya=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ya.vertex=!0;v.insert(ya);ya.value=g(h.Option33);ya.style+=l(h.Option33,x);za=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.value=g(h.Option14);za.style+=l(h.Option14,x);bb=new mxCell("",
-new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=g(h.Option24);bb.style+=l(h.Option24,x);db=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=g(h.Option34);db.style+=l(h.Option34,x);Aa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.value=g(h.Option15);Aa.style+=l(h.Option15,x);eb=new mxCell("",new mxGeometry(.25*
-t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=g(h.Option25);eb.style+=l(h.Option25,x);Ra=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);Sa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Sa.vertex=!0;v.insert(Sa);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSCountdownPicker":Xa=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;");
-Xa.vertex=!0;v.insert(Xa);Xa.value=g(h.Option31);Xa.style+=l(h.Option31,x);$a=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=g(h.Option32);$a.style+=l(h.Option32,x);wa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=g(h.Option13);wa.style+=l(h.Option13,x);xa=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=
-!0;v.insert(xa);xa.value=g(h.Option23);xa.style+=l(h.Option23,x);ab=new mxCell("",new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=g(h.Option33);ab.style+=l(h.Option33,x);ya=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ya.vertex=!0;v.insert(ya);ya.value=g(h.Option43);ya.style+=l(h.Option43,x);za=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);
-za.value=g(h.Option14);za.style+=l(h.Option14,x);cb=new mxCell("",new mxGeometry(.45*t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=g(h.Option34);cb.style+=l(h.Option34,x);Aa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.value=g(h.Option15);Aa.style+=l(h.Option15,x);fb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");fb.vertex=!0;v.insert(fb);fb.value=
-g(h.Option35);fb.style+=l(h.Option35,x);Ra=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);Sa=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Sa.vertex=!0;v.insert(Sa);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSBasicCell":v.value=g(h.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*h.SeparatorInset+";";
-v.style+=(x?"":a(h.text)+d(h.text)+k(h.text))+B(h.text);v.style+=c(v.style,h,e,v,x);switch(h.AccessoryIndicatorType){case "Disclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);var oa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
-oa.vertex=!0;v.insert(oa);break;case "DetailIndicator":oa=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+
-.6*h.SeparatorInset+";";v.value=g(h.subtext);v.style+=x?"":a(h.subtext)+d(h.subtext)+k(h.subtext);v.style+=c(v.style,h,e,v,x);var qa=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*h.SeparatorInset+";");qa.vertex=!0;v.insert(qa);qa.value=g(h.text);qa.style+=x?"":a(h.text)+d(h.text)+k(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");
-Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);oa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);break;case "DetailIndicator":oa=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=
-!0;v.insert(oa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*h.SeparatorInset+";";v.value=g(h.subtext);v.style+=x?"":a(h.subtext)+d(h.subtext)+k(h.subtext);v.style+=c(v.style,h,e,v,x);qa=null;switch(h.AccessoryIndicatorType){case "Disclosure":Y=
-new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);qa=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);oa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
-oa.vertex=!0;v.insert(oa);qa=new mxCell("",new mxGeometry(.45*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":oa=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);qa=new mxCell("",new mxGeometry(.52*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");
-Y.vertex=!0;v.insert(Y);qa=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:qa=new mxCell("",new mxGeometry(.65*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;")}qa.vertex=!0;v.insert(qa);qa.value=g(h.text);qa.style+=x?"":a(h.text)+d(h.text)+k(h.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=c(v.style,h,e,v);var Na=new mxCell("",
-new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Na.vertex=!0;v.insert(Na);Na.value=g(h.subtext);Na.style+=x?"":a(h.subtext)+d(h.subtext)+k(h.subtext);qa=new mxCell("",new mxGeometry(.25*t,0,.5*t,r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");qa.vertex=!0;v.insert(qa);qa.value=g(h.text);qa.style+=x?"":a(h.text)+d(h.text)+k(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":Y=
-new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);oa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);break;case "DetailIndicator":oa=new mxCell("",new mxGeometry(.87*
-t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");oa.vertex=!0;v.insert(oa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";T=new mxCell("",new mxGeometry(0,0,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");
-T.vertex=!0;v.insert(T);T.value=g(h.text);T.style+=x?"":a(h.text)+d(h.text)+k(h.text);Da=new mxCell("",new mxGeometry(0,.6*r,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=g(h["bottom-text"]);Da.style+=x?"":a(h["bottom-text"])+d(h["bottom-text"])+k(h["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=g(h.text);v.style+=x?"":a(h.text)+d(h.text)+k(h.text);
-v.style+=c(v.style,h,e,v,x);break;case "SMPage":if(h.Group){v.style+="strokeColor=none;fillColor=none;";var p=new mxCell("",new mxGeometry(0,0,.9*t,.9*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=C(h,e)+N(h,e)+G(h,e,p)+P(h)+fa(h);var u=new mxCell("",new mxGeometry(.1*t,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=C(h,e)+N(h,e)+G(h,e,u)+P(h)+fa(h)+l(h,x);h.Future&&(p.style+="dashed=1;",u.style+="dashed=1;")}else h.Future&&(v.style+="dashed=1;"),v.value=g(h.Text),
-v.style+=C(h,e)+N(h,e)+G(h,e,v)+P(h)+fa(h)+l(h,x);v.style+=c(v.style,h,e,v,x);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":p=null;switch(b.Class){case "SMHome":p=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
+a?a.substring(b,d):"";"\n"==a&&(a="");a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;");do for(b=y.pop(),d=0;d<b;d++){var n=g.pop();"li"==n&&(Rb=!1);a+="</"+n+">"}while(k&&0<g.length);return a}for(var n=[],c=-1,f="";-1<(c=a.indexOf("\n",c+1));)n.push(c+1);b.sort(function(a,b){return a.s-b.s});for(var w={},c=[],l=0;l<b.length;l++){var z=b[l];if(null==w[z.s]){for(var A=0;A<n.length;A++)if(n[A]>z.s){w[z.s]=n[A];break}null==w[z.s]&&(w[z.s]=a.length)}null==z.e&&(z.e=w[z.s]);c.push(z)}c.sort(function(a,b){return a.e-
+b.e});for(var A=l=0,n={},g=[],y=[],q=!1,e,Rb=!1,z=w=0;l>=A&&(l<b.length||A<c.length);){var B=b[l],C=c[A];if(B&&C&&B.s<C.e){w=B.s;C=!1;for(0<w-z&&(f+=d(n,C)+k(a,z,w));null!=B&&B.s==w;){if("a"==B.n||"il"==B.n||"ir"==B.n||"mt"==B.n||"mb"==B.n||"t"==B.n)C=!0;n[B.n]=B;B=b[++l]}f+=d(n,C)}else if(C){z=C.e;do delete n[C.n],C=c[++A];while(null!=C&&C.e==z);f+=k(a,w,z);w=z}}return f+=k(null,null,null,!0)}function g(a){x=!1;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):null==b&&null!=a.t0&&null!=a.t0.t&&(b=a.t0);if(null!=b){if(null!=b.t){a=b.t;b=b.m;try{for(var d=0;d<b.length;d++)if(0<b[d].s){x=!0;break}if(x)return f(a,b)}catch(la){console.log(la)}a=a.replace(/</g,"&lt;");return a=a.replace(/>/g,
+"&gt;")}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 q(a){return null!=a.Action?a.Action:a}function e(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;if(null!=a.Title&&null!=a.Title.m)return a.Title.m}return null}
+function l(b,n){return(n?"overflow=width;html=1;":a(b)+d(b)+k(b)+w(b)+z(b)+A(b)+y(b)+B(b))+C(b)+E(b)}function c(a,d,k,n,c){var h="";null!=a&&""!=a&&";"!=a.charAt(a.length-1)&&(h=";");return h+=(c?"overflow=width;html=1;":b(mxConstants.STYLE_FONTSIZE,a,d,k,n)+b(mxConstants.STYLE_FONTCOLOR,a,d,k,n)+b(mxConstants.STYLE_FONTSTYLE,a,d,k,n)+b(mxConstants.STYLE_ALIGN,a,d,k,n)+b(mxConstants.STYLE_SPACING_LEFT,a,d,k,n)+b(mxConstants.STYLE_SPACING_RIGHT,a,d,k,n)+b(mxConstants.STYLE_SPACING_TOP,a,d,k,n)+b(mxConstants.STYLE_SPACING_BOTTOM,
+a,d,k,n))+b(mxConstants.STYLE_SPACING,a,d,k,n)+b(mxConstants.STYLE_VERTICAL_ALIGN,a,d,k,n)+b(mxConstants.STYLE_STROKECOLOR,a,d,k,n)+b(mxConstants.STYLE_OPACITY,a,d,k,n)+b(mxConstants.STYLE_ROUNDED,a,d,k,n)+b(mxConstants.STYLE_ROTATION,a,d,k,n)+b(mxConstants.STYLE_FLIPH,a,d,k,n)+b(mxConstants.STYLE_FLIPV,a,d,k,n)+b(mxConstants.STYLE_SHADOW,a,d,k,n)+b(mxConstants.STYLE_FILLCOLOR,a,d,k,n)+b(mxConstants.STYLE_DASHED,a,d,k,n)+b(mxConstants.STYLE_STROKEWIDTH,a,d,k,n)+b(mxConstants.STYLE_IMAGE,a,d,k,n)}
+function b(b,n,c,f,h){a:{if(null!=n&&null!=b){if(n.includes(";"+b+"=")){n=!0;break a}if(n.substring(0,b.length+1)==b+"="){n=!0;break a}}n=!1}if(!n)switch(b){case mxConstants.STYLE_FONTSIZE:return a(c);case mxConstants.STYLE_FONTCOLOR:return d(c);case mxConstants.STYLE_FONTSTYLE:return k(c);case mxConstants.STYLE_ALIGN:return w(c);case mxConstants.STYLE_SPACING_LEFT:return z(c);case mxConstants.STYLE_SPACING_RIGHT:return A(c);case mxConstants.STYLE_SPACING_TOP:return y(c);case mxConstants.STYLE_SPACING_BOTTOM:return B(c);
+case mxConstants.STYLE_SPACING:return C(c);case mxConstants.STYLE_VERTICAL_ALIGN:return E(c);case mxConstants.STYLE_STROKECOLOR:return D(c,f);case mxConstants.STYLE_OPACITY:return G(c,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&null!=c.Rounding&&0<c.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*c.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return b="",null!=c.Rotation&&(c=mxUtils.toDegree(parseFloat(c.Rotation)),n=!0,0!=c&&("UMLSwimLaneBlockV2"==f.Class||(0<=f.Class.indexOf("Rotated")||
+-90==c||270==c)&&(0<=f.Class.indexOf("Pool")||0<=f.Class.indexOf("SwimLane")))?(c+=90,h.geometry.rotate90(),n=!1):0<=mxUtils.indexOf(Dc,f.Class)?(c-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(Ec,f.Class)&&(c+=180),0!=c&&(b+="rotation="+c+";"),n||(b+="horizontal=0;")),b;case mxConstants.STYLE_FLIPH:return f=c.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=c.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return P(c);case mxConstants.STYLE_FILLCOLOR:return M(c,f);case mxConstants.STYLE_DASHED:return ga(c);
+case mxConstants.STYLE_STROKEWIDTH:return da(c);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+c.URL+";":"UserImage2Block"==f.Class&&null!=c.ImageFillProps&&null!=c.ImageFillProps.url?"image="+c.ImageFillProps.url+";":"",f}return""}function a(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function d(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=
+d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function k(a){return n(e(a))}function n(a){if(null!=a){var b=0,d=!1;if(null!=a)for(var k=0;!d&&k<a.length;){var n=a[k];"b"==n.n?null!=n.v&&n.v&&(d=!0,b+=1):"fc"==n.n&&"Bold"==n.v&&(d=!0,b+=1);k++}d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"i"==n.n&&null!=n.v&&n.v&&(d=!0,b+=2),k++;d=!1;if(null!=a)for(k=0;!d&&k<a.length;)n=a[k],"u"==n.n&&null!=n.v&&n.v&&(d=!0,b+=4),k++;if(0<b)return"fontStyle="+
+b+";"}return""}function w(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function z(a){var b=e(a);if(null!=b)for(var d=0;d<b.length;){var k=b[d];if(null!=k.v){if("il"==k.n)return"spacingLeft="+.6*k.v+";";w(a)}d++}return""}function A(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function y(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==
+d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function B(a){a=e(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"===typeof a.InsetMargin?"spacing="+Math.max(0,Math.round(.6*parseInt(a.InsetMargin)))+";":""}function E(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":null!=a.Title_VAlign&&"string"===typeof a.Title_VAlign?"verticalAlign="+a.Title_VAlign+
+";":va(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function D(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":va(mxConstants.STYLE_STROKECOLOR,Z(a.LineColor),"#000000")}function G(a,b,d){b="";if("string"===typeof a.LineColor&&7<a.LineColor.length){var k="0x"+a.LineColor.substring(a.LineColor.length-2,a.LineColor.length);d.style.includes("strokeOpacity")||(b+="strokeOpacity="+Math.round(parseInt(k)/2.55)+";")}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+
+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function P(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function Z(a){return a?a.substring(0,7):null}function W(a,b){return a&&7<a.length?b+"="+Math.round(parseInt("0x"+a.substr(7))/2.55)+";":""}function M(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return va(mxConstants.STYLE_FILLCOLOR,
+Z(a.FillColor.cs[0].c))+va(mxConstants.STYLE_GRADIENTCOLOR,Z(a.FillColor.cs[1].c))}else return"string"===typeof a.FillColor?va(mxConstants.STYLE_FILLCOLOR,Z(a.FillColor),"#FFFFFF"):va(mxConstants.STYLE_FILLCOLOR,"none");return""}function ga(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 2;":"longdash"==a.StrokeStyle?"dashed=1;dashPattern=16 6;":null!=a.StrokeStyle&&"dashed"==
+a.StrokeStyle.substring(0,6)?"dashed=1;":""}function da(a){return va(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(a.LineWidth)),"1")}function ba(a,b,d,k){for(var n=b,c=0;null!=k.getAttributeForCell(a,n);)c++,n=b+"_"+c;k.setAttributeForCell(a,n,null!=d?d:"")}function ma(a,b,d,k,n,f){var h=q(b);if(null!=h){var w=zb[h.Class];null!=w&&(a.style+=w+";");w=null!=h.Properties?h.Properties:h;if(null!=w){a.value=f?"":g(w);a.style+=c(a.style,w,h,a,x);a.style.includes("strokeColor")||(a.style+=D(w,
+h));if(null!=w.Link&&0<w.Link.length&&"ext"==w.Link[0].tp)d.setAttributeForCell(a,"link",w.Link[0].url);else if(null!=w.Text){a:{f=e(w.Text);if(null!=f)for(h=0;h<f.length;h++)if(f[h].n=null!=f[h].v&&0<f[h].v.length&&"ext"==f[h].v[0].tp){f=f[h].v[0].url;break a}f=null}null!=f&&d.setAttributeForCell(a,"link",f)}f=[];var h=d.convertValueToString(a),l=!1;if(null!=h){for(var z=0;match=Fc.exec(h);){var A=match[0],l=!0;if(2<A.length){var y=A.substring(2,A.length-2);"documentName"==y?y="filename":"date:"==
+y.substring(0,5)?y="date{"+y.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==y.substring(0,9)&&(y="date{"+y.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");y="%"+y+"%";f.push(h.substring(z,match.index)+(null!=y?y:A));z=match.index+A.length}}l&&(f.push(h.substring(z)),d.setAttributeForCell(a,"label",f.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var la in w)if(w.hasOwnProperty(la)&&la.toString().startsWith("ShapeData_"))try{var B=
+w[la],C=mxUtils.trim(B.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");ba(a,C,B.Value,d)}catch(Ad){window.console&&console.log("Ignored "+la+":",Ad)}if(a.edge){a.style=null!=w.Rounding&&"diagonal"!=w.Shape?a.style+("rounded=1;arcSize="+w.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=w.Shape)if(null!=w.ElbowPoints)for(a.geometry.points=[],la=0;la<w.ElbowPoints.length;la++)a.geometry.points.push(new mxPoint(Math.round(.6*w.ElbowPoints[la].x+pb),Math.round(.6*w.ElbowPoints[la].y+
+qb)));else"elbow"==w.Shape?a.style=null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=w.Endpoint1.Block&&null!=w.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==w.Shape&&(a.style+="curved=1;"));null!=w.Endpoint1.Style&&(null!=Ab[w.Endpoint1.Style]?a.style+="startArrow="+Ab[w.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint1.Style));null!=w.Endpoint2.Style&&(null!=
+Ab[w.Endpoint2.Style]?a.style+="endArrow="+Ab[w.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+w.Endpoint2.Style));B=w.ElbowControlPoints||w.Joints;if(null!=B)for(a.geometry.points=[],la=0;la<B.length;la++)C=B[la],a.geometry.points.push(new mxPoint(Math.round(.6*C.x+pb),Math.round(.6*C.y+qb)));la=!1;null==w.ElbowPoints&&null!=w.Endpoint1.Block&&w.Endpoint1.Block==w.Endpoint2.Block&&null==w.ElbowControlPoints&&null!=k&&null!=n&&(k=new mxPoint(Math.round(k.geometry.x+
+k.geometry.width*w.Endpoint1.LinkX),Math.round(k.geometry.y+k.geometry.height*w.Endpoint1.LinkY)),n=new mxPoint(Math.round(n.geometry.x+n.geometry.width*w.Endpoint2.LinkX),Math.round(n.geometry.y+n.geometry.height*w.Endpoint2.LinkY)),pb=k.x==n.x?20:0,qb=0,a.geometry.points=[new mxPoint(k.x+pb,k.y+qb),new mxPoint(n.x+pb,n.y+qb)],implicitX=k.y==n.y,la=k.x==n.x);rb(a,w.Endpoint1,!0,la);rb(a,w.Endpoint2,!1,la)}}}null!=b.id&&ba(a,"lucidchartObjectId",b.id,d)}function U(a,b){var d=q(a).Properties,d=d.BoundingBox;
+null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+pb),Math.round(.6*d.y+qb),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;ma(v,a,b);if(null!=v&&0<=v.style.indexOf(";grIcon=")){var k=new mxCell("",new mxGeometry(v.geometry.x,v.geometry.y,v.geometry.width,v.geometry.height),"html=1;whiteSpace=wrap;");k.vertex=!0;var n=q(a);null!=n&&(d=null!=n.Properties?
+n.Properties:n,null!=d&&(k.style+=c(k.style,d,n,k)));v.geometry.x=0;v.geometry.y=0;v.style+="part=1;";k.insert(v);v=k}return v}function ha(a,b,d){var k=2*(parseFloat(a.Location)-.5);isNaN(k)&&null!=a.Text&&null!=a.Text.Location&&(k=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var c=g(a),k=new mxGeometry(isNaN(k)?0:k,0,0,0),f="11",w="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var w=n(a.Value.m),l=0;l<a.Value.m.length;l++)if("s"==a.Value.m[l].n)f=.6*parseFloat(a.Value.m[l].v);else if("c"==a.Value.m[l].n){var z=
+a.Value.m[l].v;null!=z&&("#"!=z.charAt(0)&&(z="#"+z),z=z.substring(0,7));w+="fontColor="+z+";"}a=new d(c,k,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(w+";fontSize="+f+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function va(a,b,d,k){null!=b&&null!=k&&(b=k(b));return null!=b&&b!=d?a+"="+b+";":""}function rb(a,b,d,k,n){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(k?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(n?"":(d?"exitY":"entryY")+
+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function na(a,b){try{var d=new mxCell("",new mxGeometry,"group;dropTarget=0;");d.vertex=!0;var k=Infinity,n=Infinity,c=-Infinity,f=-Infinity,w=a.Members||a.Action.Properties.Members,l;for(l in w){var z=b[l];null!=z&&(k=Math.min(k,z.geometry.x),n=Math.min(n,z.geometry.y),c=Math.max(c,z.geometry.x+z.geometry.width),f=Math.max(f,z.geometry.y+z.geometry.height));z.parent=d;d.insert(z)}d.geometry.x=k;d.geometry.y=n;d.geometry.width=c-k;d.geometry.height=
+f-n;for(c=0;c<d.children.length;c++){var A=d.children[c].geometry;A.x-=k;A.y-=n}return d}catch(zd){console.log(zd)}}function Gb(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){var k=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,n=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;ma(c,b,a,k,n,!0);var h=q(b).Properties,m=null!=h?h.TextAreas:b.TextAreas;if(null!=m){for(var l=0;null!=
+m["t"+l];){var z=m["t"+l];c=ha(z,c);l++}for(l=0;null!=m["m"+l]||1>l;)z=m["m"+l],null!=z&&(c=ha(z,c,b)),l++;null!=m.Text&&(c=ha(m.Text,c,b));m=null!=h?h.TextAreas:b.TextAreas;null!=m.Message&&(c=ha(m.Message,c,b))}null==k&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==n&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);f.push(a.addCell(c,null,null,
+k,n))},f=[],w={},l=[],z=[],A=0;if(null!=b.Groups)for(var g in b.Groups){var y=b.Groups[g];y.id=g;if(1==y.Hidden&&null!=y.Members){0>mxUtils.indexOf(z,g)&&z.push(g);for(var e in y.Members)z=tc(e,b.Groups,z)}}if(null!=b.Blocks)for(g in b.Blocks)y=b.Blocks[g],y.id=g,0>mxUtils.indexOf(z,g)&&(e=!1,null!=zb[y.Class]&&"mxCompositeShape"==zb[y.Class]&&(w[y.id]=Sb(y,f,a),l.push(y),e=!0),e||(w[y.id]=U(y,a),l.push(y)));else{for(A=0;A<b.Objects.length;A++)y=b.Objects[A],null!=y.Action&&"mxCompositeShape"==zb[y.Action.Class]?
+w[y.id]=Sb(y,f,a):y.IsBlock&&null!=y.Action&&null!=y.Action.Properties&&(w[y.id]=U(y,a)),l.push(y);for(A=0;A<b.Objects.length;A++)if(y=b.Objects[A],y.IsGroup){var B=na(y,w);B&&(w[y.id]=B,l.push(y))}}if(null!=b.Groups)try{for(g in b.Groups)if(y=b.Groups[g],y.id=g,0==y.Hidden&&null!=y.Members&&(B=na(y,w)))w[y.id]=B,l.push(y)}catch(yd){console.log(yd)}if(null!=b.Lines)for(g in b.Lines)0>mxUtils.indexOf(z,g)&&(y=b.Lines[g],y.id=g,l.push(y));l.sort(function(a,b){a=q(a);b=q(b);var d=null!=a.Properties?
+a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=k?d-k:0});for(A=0;A<l.length;A++){var y=l[A],la=w[y.id];null!=la?null==la.parent&&f.push(a.addCell(la)):y.IsLine&&null!=y.Action&&null!=y.Action.Properties?h(y,y.Action.Properties):null!=y.StrokeStyle&&h(y,y)}if(n&&null!=d&&null!=k){a.isGridEnabled()&&(d=a.snap(d),k=a.snap(k));var C=a.getBoundingBoxFromGeometry(f,!0);null!=C&&a.moveCells(f,d-C.x,k-C.y)}c||a.setSelectionCells(f)}finally{a.getModel().endUpdate()}}
+function ib(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function Ba(a,b,d,k,n,c,f,w){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);c=[a];d=d.clone();w.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);k.push(n.addCell(d,null,null,null,null))}function oa(a,b,d,k,n,c,f,w,l){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");
+a.vertex=!0;l.insert(a);d=new mxCell("",new mxGeometry(d,k,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;l.insert(d);w=[d];n=n.clone();a.insertEdge(n,!0);d.insertEdge(n,!1);w.push(n);c.push(f.addCell(n,null,null,null,null))}function ea(a,b,d,k,n,f){k.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";k.style+=c(k.style,n,f,k);b=g(n);k.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+
+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+=c(a.style,n,f,a,x);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;k.insert(a)}function ja(a,b,d,k,n,f,w,l){n="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";f.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";f.style+=c(f.style,
+w,l,f);f.value=g(w);f.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*k*b,.7*k*d),n+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*k*.35,10+(1-d)*k*.35);a.vertex=!0;a.style+=c(a.style,w,l,a,x);f.insert(a)}function Sb(b,n,f){var e=q(b),h=e.Properties,ba=h.BoundingBox,t=Math.round(.6*ba.w),r=Math.round(.6*ba.h),U=Math.round(.6*ba.x+pb),ha=Math.round(.6*ba.y+qb);null==b.Class||"GCPInputDatabase"!==b.Class&&"GCPInputRecord"!==
+b.Class&&"GCPInputPayment"!==b.Class&&"GCPInputGateway"!==b.Class&&"GCPInputLocalCompute"!==b.Class&&"GCPInputBeacon"!==b.Class&&"GCPInputStorage"!==b.Class&&"GCPInputList"!==b.Class&&"GCPInputStream"!==b.Class&&"GCPInputMobileDevices"!==b.Class&&"GCPInputCircuitBoard"!==b.Class&&"GCPInputLive"!==b.Class&&"GCPInputUsers"!==b.Class&&"GCPInputLaptop"!==b.Class&&"GCPInputApplication"!==b.Class&&"GCPInputLightbulb"!==b.Class&&"GCPInputGame"!==b.Class&&"GCPInputDesktop"!==b.Class&&"GCPInputDesktopAndMobile"!==
+b.Class&&"GCPInputWebcam"!==b.Class&&"GCPInputSpeaker"!==b.Class&&"GCPInputRetail"!==b.Class&&"GCPInputReport"!==b.Class&&"GCPInputPhone"!==b.Class&&"GCPInputBlank"!==b.Class||(r+=20);v=new mxCell("",new mxGeometry(U,ha,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;var Gb=null!=b.Class?b.Class:null!=e?e.Class:null;switch(Gb){case "BraceNoteBlock":case "UI2BraceNoteBlock":var rb=!1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(rb=!0);var ib=null,na=null;rb?(ib=new mxCell("",new mxGeometry(t-.125*
+r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(ib=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);ib.vertex=!0;v.insert(ib);ib.style+=c(ib.style,h,e,ib);na.vertex=!0;na.value=g(h);v.insert(na);na.style+=c(na.style,h,e,na,
+x);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var Sb=0!=h.Rotation,Rb=0<Gb.indexOf("Pool"),xd=0==Gb.indexOf("BPMN"),wd=null!=h.MainText,zb=0;null!=h.Lanes&&(zb=h.Lanes.length);v.style=(Rb?"swimlane;":"fillColor=none;strokeColor=none;pointerEvents=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+
+(Sb?"horizontalStack=0;":"");v.style+=c(v.style,h,e,v);wd&&(v.value=g(h.MainText),v.style+=(x?"overflow=width;":a(h.MainText)+d(h.MainText)+k(h.MainText)+w(h.MainText,v)+z(h.MainText)+A(h.MainText)+y(h.MainText)+B(h.MainText))+C(h.MainText)+E(h.MainText));for(var Ab=0,ob=[],tc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;startSize=25;dropTarget=0;"+(Sb?"horizontal=0;":"")+(xd?"swimlaneLine=0;fillColor=none;":""),V=0;V<zb;V++){var Uc=parseFloat(h.Lanes[V].p),m=parseInt(h.Lanes[V].tid)||
+V;ob.push(new mxCell("",new mxGeometry(t*Ab,0,t*Uc,r),tc));ob[V].vertex=!0;v.insert(ob[V]);ob[V].value=g(h["Lane_"+m]);var Vc=ob[V],Dc=Vc.style,Ec=c(ob[V].style,h,e,ob[V],x)+(x?"":a(h["Lane_"+m])+d(h["Lane_"+m])+k(h["Lane_"+m])+w(h["Lane_"+m],ob[V])+z(h["Lane_"+m])+A(h["Lane_"+m])+y(h["Lane_"+m])+B(h["Lane_"+m]))+C(h["Lane_"+m])+E(h["Lane_"+m]),Wc;var Xc=h["HeaderFill_"+m];Wc=null!=Xc?mxConstants.STYLE_FILLCOLOR+"="+Z(Xc)+";":"";var Fc=Ec+Wc,Yc;var Zc=h["BodyFill_"+m];Yc=null!=Zc?"swimlaneFillColor="+
+Z(Zc)+";":"";Vc.style=Dc+(Fc+Yc);Ab+=Uc}break;case "UMLMultidimensionalSwimlane":var Tb=0,Ub=0;null!=h.Rows&&h.Columns&&(Tb=h.Rows.length,Ub=h.Columns.length);v.style="group";var Gc=.6*h.TitleHeight||25,Hc=.6*h.TitleWidth||25,Ic=new mxCell("",new mxGeometry(0,Gc,t,r-Gc),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Ic.vertex=!0;var Jc=new mxCell("",new mxGeometry(Hc,0,t-Hc,r),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");
+Jc.vertex=!0;v.insert(Ic);v.insert(Jc);for(var ha=0,Bd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;startSize="+Hc+";",V=0;V<Tb;V++){var $c=.6*parseInt(h.Rows[V].height),m=parseInt(h.Rows[V].id)||V,sb=new mxCell("",new mxGeometry(0,ha,t,$c),Bd),ha=ha+$c;sb.vertex=!0;Ic.insert(sb);sb.value=g(h["Row_"+m]);sb.style+=c(sb.style,h,e,sb,x)+(x?"":a(h["Row_"+m])+d(h["Row_"+m])+k(h["Row_"+m])+w(h["Row_"+m],sb)+z(h["Row_"+m])+A(h["Row_"+m])+y(h["Row_"+m])+
+B(h["Row_"+m]))+C(h["Row_"+m])+E(h["Row_"+m])}for(var Cd="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;startSize="+Gc+";",V=U=0;V<Ub;V++){var Vb=.6*parseInt(h.Columns[V].width),m=parseInt(h.Columns[V].id)||V,tb=new mxCell("",new mxGeometry(U,0,Vb,r),Cd),U=U+Vb;tb.vertex=!0;Jc.insert(tb);tb.value=g(h["Column_"+m]);tb.style+=c(tb.style,h,e,tb,x)+(x?"":a(h["Column_"+m])+d(h["Column_"+m])+k(h["Column_"+m])+w(h["Column_"+m],tb)+z(h["Column_"+m])+A(h["Column_"+m])+
+y(h["Column_"+m])+B(h["Column_"+m]))+C(h["Column_"+m])+E(h["Column_"+m])}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var ub=null,Wb=null,Xb=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",ub=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(Wb=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||
+(Xb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"==h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",ub=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),h.KeyboardShown&&(Wb=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Xb=new mxCell("",new mxGeometry(.04*
+t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));ub.vertex=!0;v.insert(ub);"Dark"==h.Scheme?ub.style+="fillColor=#111111;":"Light"==h.Scheme&&(ub.style+="fillColor=#ffffff;");null!=Wb&&(Wb.vertex=!0,v.insert(Wb));null!=Xb&&(Xb.vertex=!0,v.insert(Xb))}v.style+=c(v.style,h,e,v);break;case "AndroidAlertDialog":var Ra=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ra.vertex=
+!0;v.insert(Ra);var qa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");qa.vertex=!0;v.insert(qa);var Yb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;");Yb.vertex=!0;v.insert(Yb);var ta=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");ta.vertex=!0;v.insert(ta);var ua=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ua.vertex=!0;v.insert(ua);Ra.value=g(h.DialogTitle);Ra.style+=l(h.DialogTitle,
+x);Yb.value=g(h.DialogText);Yb.style+=l(h.DialogText,x);ta.value=g(h.Button_0);ta.style+=l(h.Button_0,x);ua.value=g(h.Button_1);ua.style+=l(h.Button_1,x);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ta.style+="strokeColor=#353535;",ua.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",ta.style+="strokeColor=#E2E2E2;",ua.style+="strokeColor=#E2E2E2;");v.style+=c(v.style,h,e,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Ra=
+new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Ra.vertex=!0;v.insert(Ra);Ra.value=g(h.DialogTitle);Ra.style+=l(h.DialogTitle,x);qa=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");qa.vertex=!0;v.insert(qa);ta=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=g(h.Button_0);ta.style+=l(h.Button_0,x);ua=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ua.vertex=!0;v.insert(ua);
+ua.value=g(h.Button_1);ua.style+=l(h.Button_1,x);var Hb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");Hb.vertex=!0;v.insert(Hb);var Ib=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;");Ib.vertex=!0;v.insert(Ib);var Jb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");Jb.vertex=!0;v.insert(Jb);var Zb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Zb.vertex=!0;v.insert(Zb);
+Zb.value=g(h.Label_1);Zb.style+=l(h.Label_1,x);var $b=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");$b.vertex=!0;v.insert($b);$b.value=g(h.Label_0);$b.style+=l(h.Label_0,x);var Kb=null;"AndroidDateDialog"==b.Class&&(Kb=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),Kb.vertex=!0,v.insert(Kb),Kb.value=g(h.Label_2),Kb.style+=l(h.Label_2,x));var Sa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");
+Sa.vertex=!0;v.insert(Sa);var Ta=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ta.vertex=!0;v.insert(Ta);var ad=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");ad.vertex=!0;v.insert(ad);var ac=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");ac.vertex=!0;v.insert(ac);ac.value=g(h.Label_4);ac.style+=l(h.Label_4,x);var Lb=null;"AndroidTimeDialog"==b.Class&&(Lb=new mxCell("",new mxGeometry(.3*t,
+65,.1*t,15),"strokeColor=none;fillColor=none;"),Lb.vertex=!0,v.insert(Lb),Lb.value=g(h.Label_Colon),Lb.style+=l(h.Label_Colon,x));var bc=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");bc.vertex=!0;v.insert(bc);bc.value=g(h.Label_3);bc.style+=l(h.Label_3,x);var cc=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");cc.vertex=!0;v.insert(cc);cc.value=g(h.Label_5);cc.style+=l(h.Label_5,x);var bd=new mxCell("",new mxGeometry(.43*t,75,
+.14*t,10),"shape=line;strokeColor=#33B5E5;");bd.vertex=!0;v.insert(bd);var cd=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");cd.vertex=!0;v.insert(cd);var dd=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");dd.vertex=!0;v.insert(dd);var dc=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=g(h.Label_7);dc.style+=l(h.Label_7,x);var ec=new mxCell("",new mxGeometry(.125*
+t,80,.2*t,15),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=g(h.Label_6);ec.style+=l(h.Label_6,x);var fc=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=g(h.Label_8);fc.style+=l(h.Label_8,x);var Mb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");Mb.vertex=!0;v.insert(Mb);var Nb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");Nb.vertex=!0;v.insert(Nb);
+var Ob=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Ob.vertex=!0;v.insert(Ob);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",ta.style+="strokeColor=#353535;",ua.style+="strokeColor=#353535;",Hb.style+="strokeColor=none;fillColor=#7E7E7E;",Ib.style+="strokeColor=none;fillColor=#7E7E7E;",Jb.style+="strokeColor=none;fillColor=#7E7E7E;",Mb.style+="strokeColor=none;fillColor=#7E7E7E;",Nb.style+="strokeColor=none;fillColor=#7E7E7E;",Ob.style+=
+"strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",ta.style+="strokeColor=#E2E2E2;",ua.style+="strokeColor=#E2E2E2;",Hb.style+="strokeColor=none;fillColor=#939393;",Ib.style+="strokeColor=none;fillColor=#939393;",Jb.style+="strokeColor=none;fillColor=#939393;",Mb.style+="strokeColor=none;fillColor=#939393;",Nb.style+="strokeColor=none;fillColor=#939393;",Ob.style+="strokeColor=none;fillColor=#939393;");v.style+=c(v.style,h,e,v);break;case "AndroidListItems":var Ca=
+r,kb=0;if(h.ShowHeader){var kb=8,gc=new mxCell("",new mxGeometry(0,0,t,kb),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=g(h.Header);gc.style+=l(h.Header,x);var Ca=Ca-kb,ed=new mxCell("",new mxGeometry(0,kb-2,t,4),"shape=line;strokeColor=#999999;");ed.vertex=!0;v.insert(ed)}var Ua=parseInt(h.Items);0<Ua&&(Ca/=Ua);for(var H=[],qa=[],m=0;m<Ua;m++)H[m]=new mxCell("",new mxGeometry(0,kb+m*Ca,t,Ca),"strokeColor=none;fillColor=none;"),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["Item_"+
+m]),H[m].style+=l(h["Item_"+m],x),0<m&&(qa[m]=new mxCell("",new mxGeometry(0,kb+m*Ca-2,t,4),"shape=line;"),qa[m].vertex=!0,v.insert(qa[m]),qa[m].style="Dark"==h.Scheme?qa[m].style+"strokeColor=#ffffff;":qa[m].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidTabs":var Va=parseInt(h.Tabs),Ia=t;0<Va&&(Ia/=Va);for(var fa=[],qa=[],m=0;m<Va;m++)fa[m]=new mxCell("",
+new mxGeometry(m*Ia,0,Ia,r),"strokeColor=none;fillColor=none;"),fa[m].vertex=!0,v.insert(fa[m]),fa[m].value=g(h["Tab_"+m]),fa[m].style+=l(h["Tab_"+m],x),0<m&&(qa[m]=new mxCell("",new mxGeometry(m*Ia-2,.2*r,4,.6*r),"shape=line;direction=north;"),qa[m].vertex=!0,v.insert(qa[m]),qa[m].style="Dark"==h.Scheme?qa[m].style+"strokeColor=#484848;":qa[m].style+"strokeColor=#CCCCCC;");var fd=new mxCell("",new mxGeometry(h.Selected*Ia+2,r-3,Ia-4,3),"strokeColor=none;fillColor=#33B5E5;");fd.vertex=!0;v.insert(fd);
+v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=c(v.style,h,e,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(U),Math.round(ha+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var hc=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;fillColor=#33B5E5;");hc.vertex=!0;v.insert(hc);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":
+v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=c(v.style,h,e,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBlock":v.style="Dark"==h.Scheme?h.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":h.ShowBorder?
+v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=g(h.Label);v.style+=l(h.Label,x);v.style+=c(v.style,h,e,v,x);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(h.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var lb=null,lb=h.HighlightTop?new mxCell("",
+new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");lb.vertex=!0;v.insert(lb);switch(h.HighlightColor){case "Blue":lb.style+="fillColor=#33B5E5;";break;case "Dark Gray":lb.style+="fillColor=#B0B0B0;";break;case "White":lb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Pb=new mxCell("",new mxGeometry(20,5,2,r-10),"shape=line;direction=north;");Pb.vertex=!0;v.insert(Pb);switch(h.VlignColor){case "Blue":Pb.style+="strokeColor=#244C5A;";break;case "White":Pb.style+=
+"strokeColor=#ffffff;"}}v.style+=c(v.style,h,e,v);break;case "AndroidButton":v.value=g(h.Label);v.style+=l(h.Label,x)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=c(v.style,h,e,v);break;case "AndroidTextBox":v.value=g(h.Label);v.style+=l(h.Label,x);var ic=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");ic.vertex=!0;
+v.insert(ic);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";ic.style=h.TextFocused?ic.style+"strokeColor=#33B5E5;":ic.style+"strokeColor=#A9A9A9;";v.style+=c(v.style,h,e,v);break;case "AndroidRadioButton":var Bb=null;h.Checked&&(Bb=new mxCell("",new mxGeometry(.15*t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=1;"),Bb.vertex=!0,v.insert(Bb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=1;strokeColor=#272727;",
+h.Checked?(Bb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(Bb.style+="strokeColor=#999999;"));v.style+=c(v.style,h,e,v);break;case "AndroidCheckBox":var Kc=null;h.Checked&&(Kc=new mxCell("",new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),Kc.vertex=!0,v.insert(Kc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":
+v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=c(v.style,h,e,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=c(v.style,h,e,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+
+h.BarPosition+";fillColor=#33b5e5;";v.style+=c(v.style,h,e,v);break;case "iOSSegmentedControl":Va=parseInt(h.Tabs);Ia=t;v.style+="strokeColor=none;fillColor=none;";0<Va&&(Ia/=Va);fa=[];qa=[];for(m=0;m<Va;m++)fa[m]=new mxCell("",new mxGeometry(m*Ia,0,Ia,r),"strokeColor="+h.FillColor+";"),fa[m].vertex=!0,v.insert(fa[m]),fa[m].value=g(h["Tab_"+m]),fa[m].style+=l(h["Tab_"+m],x),fa[m].style=h.Selected==m?fa[m].style+M(h,e):fa[m].style+"fillColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSSlider":v.style+=
+"shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=c(v.style,h,e,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(U),Math.round(ha+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;hc=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+M(h,e));hc.vertex=!0;v.insert(hc);v.style+=c(v.style,h,e,v);break;
+case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=c(v.style,h,e,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var S=new mxCell(g(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;");S.vertex=!0;v.insert(S);S.style+=l(h.Text,x);var Ea=new mxCell(g(h.Carrier),new mxGeometry(.09*t,0,.2*t,r),"strokeColor=none;fillColor=none;");Ea.vertex=!0;v.insert(Ea);Ea.style+=l(h.Carrier,x);v.style+=c(v.style,
+h,e,v);break;case "iOSSearchBar":v.value=g(h.Search);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v,x)+l(h.Search,x);var Y=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");Y.vertex=!0;v.insert(Y);break;case "iOSNavBar":v.value=g(h.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";+l(h.Title,x);v.style+=c(v.style,h,e,v,x);S=new mxCell(g(h.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");
+S.vertex=!0;v.insert(S);S.style+=l(h.LeftText,x);Ea=new mxCell(g(h.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");Ea.vertex=!0;v.insert(Ea);Ea.style+=l(h.RightText,x);Y=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Y.vertex=!0;v.insert(Y);break;case "iOSTabs":Va=parseInt(h.Tabs);Ia=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=c(v.style,h,e,v);0<Va&&(Ia/=
+Va);fa=[];qa=[];for(m=0;m<Va;m++)fa[m]=new mxCell("",new mxGeometry(m*Ia,0,Ia,r),"strokeColor=none;"),fa[m].vertex=!0,v.insert(fa[m]),fa[m].value=g(h["Tab_"+m]),fa[m].style+=x?"overflow=width;html=1;":a(h["Tab_"+m])+d(h["Tab_"+m])+k(h["Tab_"+m])+w(h["Tab_"+m])+z(h["Tab_"+m])+A(h["Tab_"+m])+y(h["Tab_"+m])+B(h["Tab_"+m])+C(h["Tab_"+m]),fa[m].style+="verticalAlign=bottom;",fa[m].style=h.Selected==m?fa[m].style+"fillColor=#BBBBBB;":fa[m].style+"fillColor=none;";break;case "iOSDatePicker":var Wa=new mxCell("",
+new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=g(h.Option11);Wa.style+=l(h.Option11,x);var Xa=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=g(h.Option21);Xa.style+=l(h.Option21,x);var Ya=new mxCell("",new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=g(h.Option31);Ya.style+=l(h.Option31,x);var Za=new mxCell("",new mxGeometry(0,
+.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=g(h.Option12);Za.style+=l(h.Option12,x);var $a=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=g(h.Option22);$a.style+=l(h.Option22,x);var ab=new mxCell("",new mxGeometry(.65*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=g(h.Option32);ab.style+=l(h.Option32,x);var wa=new mxCell("",new mxGeometry(0,
+.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=g(h.Option13);wa.style+=l(h.Option13,x);var xa=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=g(h.Option23);xa.style+=l(h.Option23,x);var bb=new mxCell("",new mxGeometry(.65*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=g(h.Option33);bb.style+=l(h.Option33,x);var ya=new mxCell("",new mxGeometry(.8*
+t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ya.vertex=!0;v.insert(ya);ya.value=g(h.Option43);ya.style+=l(h.Option43,x);var za=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.value=g(h.Option14);za.style+=l(h.Option14,x);var cb=new mxCell("",new mxGeometry(.5*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=g(h.Option24);cb.style+=l(h.Option24,x);var db=new mxCell("",new mxGeometry(.65*
+t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=g(h.Option34);db.style+=l(h.Option34,x);var eb=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=g(h.Option44);eb.style+=l(h.Option44,x);var Aa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.value=g(h.Option15);Aa.style+=l(h.Option15,x);var fb=new mxCell("",new mxGeometry(.5*
+t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");fb.vertex=!0;v.insert(fb);fb.value=g(h.Option25);fb.style+=l(h.Option25,x);var gb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");gb.vertex=!0;v.insert(gb);gb.value=g(h.Option35);gb.style+=l(h.Option35,x);Sa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Sa.vertex=!0;v.insert(Sa);Ta=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ta.vertex=!0;
+v.insert(Ta);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSTimePicker":Wa=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=g(h.Option11);Wa.style+=l(h.Option11,x);Xa=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=g(h.Option21);Xa.style+=l(h.Option21,x);Za=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");
+Za.vertex=!0;v.insert(Za);Za.value=g(h.Option12);Za.style+=l(h.Option12,x);$a=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=g(h.Option22);$a.style+=l(h.Option22,x);wa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=g(h.Option13);wa.style+=l(h.Option13,x);xa=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=
+!0;v.insert(xa);xa.value=g(h.Option23);xa.style+=l(h.Option23,x);ya=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ya.vertex=!0;v.insert(ya);ya.value=g(h.Option33);ya.style+=l(h.Option33,x);za=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.value=g(h.Option14);za.style+=l(h.Option14,x);cb=new mxCell("",new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);
+cb.value=g(h.Option24);cb.style+=l(h.Option24,x);eb=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=g(h.Option34);eb.style+=l(h.Option34,x);Aa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.value=g(h.Option15);Aa.style+=l(h.Option15,x);fb=new mxCell("",new mxGeometry(.25*t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");fb.vertex=!0;v.insert(fb);fb.value=
+g(h.Option25);fb.style+=l(h.Option25,x);Sa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Sa.vertex=!0;v.insert(Sa);Ta=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ta.vertex=!0;v.insert(Ta);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSCountdownPicker":Ya=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=g(h.Option31);Ya.style+=l(h.Option31,x);
+ab=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=g(h.Option32);ab.style+=l(h.Option32,x);wa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=g(h.Option13);wa.style+=l(h.Option13,x);xa=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");xa.vertex=!0;v.insert(xa);xa.value=g(h.Option23);xa.style+=l(h.Option23,x);bb=new mxCell("",
+new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=g(h.Option33);bb.style+=l(h.Option33,x);ya=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ya.vertex=!0;v.insert(ya);ya.value=g(h.Option43);ya.style+=l(h.Option43,x);za=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.value=g(h.Option14);za.style+=l(h.Option14,x);db=new mxCell("",new mxGeometry(.45*
+t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=g(h.Option34);db.style+=l(h.Option34,x);Aa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Aa.vertex=!0;v.insert(Aa);Aa.value=g(h.Option15);Aa.style+=l(h.Option15,x);gb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");gb.vertex=!0;v.insert(gb);gb.value=g(h.Option35);gb.style+=l(h.Option35,x);Sa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),
+"shape=line;strokeColor=#888888;");Sa.vertex=!0;v.insert(Sa);Ta=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ta.vertex=!0;v.insert(Ta);v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);break;case "iOSBasicCell":v.value=g(h.text);v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*h.SeparatorInset+";";v.style+=(x?"":a(h.text)+d(h.text)+k(h.text))+E(h.text);v.style+=c(v.style,h,e,v,x);
+switch(h.AccessoryIndicatorType){case "Disclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);var pa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=!0;v.insert(pa);
+break;case "DetailIndicator":pa=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=!0;v.insert(pa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+
+.6*h.SeparatorInset+";";v.value=g(h.subtext);v.style+=x?"":a(h.subtext)+d(h.subtext)+k(h.subtext);v.style+=c(v.style,h,e,v,x);var ra=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*h.SeparatorInset+";");ra.vertex=!0;v.insert(ra);ra.value=g(h.text);ra.style+=x?"html=1;":a(h.text)+d(h.text)+k(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");
+Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);pa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=!0;v.insert(pa);break;case "DetailIndicator":pa=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=
+!0;v.insert(pa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*h.SeparatorInset+";";v.value=g(h.subtext);v.style+=x?"":a(h.subtext)+d(h.subtext)+k(h.subtext);v.style+=c(v.style,h,e,v,x);ra=null;switch(h.AccessoryIndicatorType){case "Disclosure":Y=
+new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);ra=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);pa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
+pa.vertex=!0;v.insert(pa);ra=new mxCell("",new mxGeometry(.45*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":pa=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=!0;v.insert(pa);ra=new mxCell("",new mxGeometry(.52*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");
+Y.vertex=!0;v.insert(Y);ra=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:ra=new mxCell("",new mxGeometry(.65*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;")}ra.vertex=!0;v.insert(ra);ra.value=g(h.text);ra.style+=x?"html=1;":a(h.text)+d(h.text)+k(h.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=c(v.style,h,e,v);var Oa=
+new mxCell("",new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Oa.vertex=!0;v.insert(Oa);Oa.value=g(h.subtext);Oa.style+=x?"html=1;":a(h.subtext)+d(h.subtext)+k(h.subtext);ra=new mxCell("",new mxGeometry(.25*t,0,.5*t,r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");ra.vertex=!0;v.insert(ra);ra.value=g(h.text);ra.style+=x?"html=1;":a(h.text)+d(h.text)+k(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":Y=
+new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);break;case "DetailDisclosure":Y=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Y.vertex=!0;v.insert(Y);pa=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=!0;v.insert(pa);break;case "DetailIndicator":pa=new mxCell("",new mxGeometry(.87*
+t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");pa.vertex=!0;v.insert(pa);break;case "CheckMark":Y=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Y.vertex=!0,v.insert(Y)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";S=new mxCell("",new mxGeometry(0,0,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");
+S.vertex=!0;v.insert(S);S.value=g(h.text);S.style+=x?"html=1;":a(h.text)+d(h.text)+k(h.text);Ea=new mxCell("",new mxGeometry(0,.6*r,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");Ea.vertex=!0;v.insert(Ea);Ea.value=g(h["bottom-text"]);Ea.style+=x?"html=1;":a(h["bottom-text"])+d(h["bottom-text"])+k(h["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=g(h.text);v.style+=x?"":a(h.text)+d(h.text)+
+k(h.text);v.style+=c(v.style,h,e,v,x);break;case "SMPage":if(h.Group){v.style+="strokeColor=none;fillColor=none;";var p=new mxCell("",new mxGeometry(0,0,.9*t,.9*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=D(h,e)+M(h,e)+G(h,e,p)+P(h)+da(h);var u=new mxCell("",new mxGeometry(.1*t,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=D(h,e)+M(h,e)+G(h,e,u)+P(h)+da(h)+l(h,x);h.Future&&(p.style+="dashed=1;",u.style+="dashed=1;")}else h.Future&&(v.style+="dashed=1;"),v.value=
+g(h.Text),v.style+=D(h,e)+M(h,e)+G(h,e,v)+P(h)+da(h)+l(h,x);v.style+=c(v.style,h,e,v,x);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":p=null;switch(b.Class){case "SMHome":p=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
 break;case "SMPrint":p=new mxCell("",new mxGeometry(.5*t-.4*r,.19*r,.8*r,.62*r),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":p=new mxCell("",new mxGeometry(.5*t-.4*r,.1*r,.8*r,.8*r),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSettings":p=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
 break;case "SMSitemap":p=new mxCell("",new mxGeometry(.5*t-.35*r,.2*r,.7*r,.6*r),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":p=new mxCell("",new mxGeometry(.5*t-.3*r,.25*r,.6*r,.5*r),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMVideo":p=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
-break;case "SMAudio":p=new mxCell("",new mxGeometry(.5*t-.3*r,.2*r,.6*r,.6*r),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":p=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var I=N(h,e),I=""==I?"#ffffff;":I.replace("fillColor=",""),p=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+
+break;case "SMAudio":p=new mxCell("",new mxGeometry(.5*t-.3*r,.2*r,.6*r,.6*r),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":p=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMChart":var I=M(h,e),I=""==I?"#ffffff;":I.replace("fillColor=",""),p=new mxCell("",new mxGeometry(.5*t-.35*r,.15*r,.7*r,.7*r),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+
 I);break;case "SMCloud":p=new mxCell("",new mxGeometry(.5*t-.4*r,.27*r,.8*r,.46*r),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":p=new mxCell("",new mxGeometry(.5*t-.25*r,.15*r,.5*r,.7*r),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMForm":p=new mxCell("",new mxGeometry(.5*t-.4*r,.15*r,.8*r,.7*r),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
 break;case "SMGame":p=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":p=new mxCell("",new mxGeometry(.5*t-.4*r,.2*r,.8*r,.6*r),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}p.vertex=!0;v.insert(p);p.value=g(h.Text);p.style+=l(h,x);v.style+=c(v.style,h,e,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";
 p=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(0,.1*r,.9*t,.9*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "UMLConstraintBlock":var mb=new mxCell("",new mxGeometry(0,0,.25*r,r),"shape=curlyBracket;rounded=1;");mb.vertex=!0;v.insert(mb);var nb=new mxCell("",new mxGeometry(t-.25*r,0,.25*r,r),"shape=curlyBracket;rounded=1;flipH=1;");nb.vertex=
-!0;v.insert(nb);ca=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");ca.vertex=!0;ca.value=g(h);v.insert(ca);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);mb.style+=G(h,e,mb);nb.style+=G(h,e,nb);ca.style+=d(h,ca);mb.style+=c(mb.style,h,e,mb);nb.style+=c(nb.style,h,e,nb);ca.style+=c(ca.style,h,e,ca,x);break;case "UMLTextBlock":v.value=g(h.Text);v.style+="strokeColor=none;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);break;case "BPMNActivity":v.value=
+!0;v.insert(nb);na=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=g(h);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);mb.style+=G(h,e,mb);nb.style+=G(h,e,nb);na.style+=d(h,na);mb.style+=c(mb.style,h,e,mb);nb.style+=c(nb.style,h,e,nb);na.style+=c(na.style,h,e,na,x);break;case "UMLTextBlock":v.value=g(h.Text);v.style+="strokeColor=none;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);break;case "BPMNActivity":v.value=
 g(h.Text);switch(h.bpmnActivityType){case 1:v.style+=l(h.Text,x);break;case 2:v.style+="shape=ext;double=1;"+l(h.Text,x);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+l(h.Text,x);break;case 4:v.style+="shape=ext;strokeWidth=2;"+l(h.Text,x)}if(0!=h.bpmnTaskType){switch(h.bpmnTaskType){case 1:p=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");p.geometry.offset=new mxPoint(4,7);break;case 2:p=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");p.geometry.offset=new mxPoint(4,
 7);break;case 3:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");p.geometry.offset=new mxPoint(4,5);break;case 4:p=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");p.geometry.offset=new mxPoint(4,7);break;case 5:p=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");p.geometry.offset=new mxPoint(4,7);break;case 6:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");p.geometry.offset=new mxPoint(4,
-5);break;case 7:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),p.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Ab=N(h,e),I=C(h,e),I=I.replace("strokeColor","fillColor"),Ab=Ab.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Ab&&(Ab="strokeColor=#ffffff;");p.style+=Ab+I+"part=1;"}else p.style+=N(h,e)+C(h,e)+"part=1;";p.geometry.relative=!0;p.vertex=!0;v.insert(p)}var gc=0;0!=h.bpmnActivityMarker1&&gc++;0!=h.bpmnActivityMarker2&&gc++;
-var Ea=0;1==gc?Ea=-7.5:2==gc&&(Ea=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 2:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 3:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(Ea,
--20);p.style+=N(h,e)+C(h,e);break;case 4:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 5:p=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");p.geometry.offset=new mxPoint(Ea,-17);I=C(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");p.style+=I;break;case 6:p=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),
-p.geometry.offset=new mxPoint(Ea,-18),p.style+=N(h,e)+C(h,e)}p.geometry.relative=!0;p.vertex=!0;v.insert(p)}2==gc&&(Ea=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 2:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 3:p=new mxCell("",new mxGeometry(.5,
-1,15,15),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 4:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");p.geometry.offset=new mxPoint(Ea,-20);p.style+=N(h,e)+C(h,e);break;case 5:p=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");p.geometry.offset=new mxPoint(Ea,-17);I=C(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");
-p.style+=I;break;case 6:p=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),p.geometry.offset=new mxPoint(Ea,-18),p.style+=N(h,e)+C(h,e)}p.geometry.relative=!0;p.vertex=!0;v.insert(p)}v.style+=c(v.style,h,e,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;
+5);break;case 7:p=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),p.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Cb=M(h,e),I=D(h,e),I=I.replace("strokeColor","fillColor"),Cb=Cb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Cb&&(Cb="strokeColor=#ffffff;");p.style+=Cb+I+"part=1;"}else p.style+=M(h,e)+D(h,e)+"part=1;";p.geometry.relative=!0;p.vertex=!0;v.insert(p)}var jc=0;0!=h.bpmnActivityMarker1&&jc++;0!=h.bpmnActivityMarker2&&jc++;
+var Fa=0;1==jc?Fa=-7.5:2==jc&&(Fa=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 2:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 3:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(Fa,
+-20);p.style+=M(h,e)+D(h,e);break;case 4:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 5:p=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");p.geometry.offset=new mxPoint(Fa,-17);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");p.style+=I;break;case 6:p=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),
+p.geometry.offset=new mxPoint(Fa,-18),p.style+=M(h,e)+D(h,e)}p.geometry.relative=!0;p.vertex=!0;v.insert(p)}2==jc&&(Fa=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 2:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 3:p=new mxCell("",new mxGeometry(.5,
+1,15,15),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 4:p=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");p.geometry.offset=new mxPoint(Fa,-20);p.style+=M(h,e)+D(h,e);break;case 5:p=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");p.geometry.offset=new mxPoint(Fa,-17);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");
+p.style+=I;break;case 6:p=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),p.geometry.offset=new mxPoint(Fa,-18),p.style+=M(h,e)+D(h,e)}p.geometry.relative=!0;p.vertex=!0;v.insert(p)}v.style+=c(v.style,h,e,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;
 case 2:v.style+="outline=end;"}else switch(h.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(h.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";
-break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=c(v.style,h,e,v,x);break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=g(h.Text);v.style=0==h.bpmnConversationType?v.style+fa(h):v.style+"strokeWidth=2;";h.bpmnIsSubConversation&&(p=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),p.geometry.offset=new mxPoint(-6,
--17),p.style+=N(h,e)+C(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p));v.style+=c(v.style,h,e,v,x);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;";switch(h.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";
-break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=c(v.style,h,e,v);break;case "BPMNData":v.style+="shape=note;size=14;";switch(h.bpmnDataType){case 1:p=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(-6,-15);p.style+=N(h,e)+C(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);break;case 2:p=new mxCell("",new mxGeometry(0,
-0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");p.geometry.offset=new mxPoint(3,3);p.style+=N(h,e)+C(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";T=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");T.geometry.offset=new mxPoint(0,14);T.geometry.relative=!0;T.vertex=!0;v.insert(T);T.value=g(h.Text);T.style+=l(h,x);break;case 3:p=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),
-p.geometry.offset=new mxPoint(3,3),p.style+=C(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p),I=C(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),p.style+=I,T=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),T.geometry.offset=new mxPoint(0,14),T.geometry.relative=!0,T.vertex=!0,v.insert(T),T.value=g(h.Text),T.style+=l(h,x)}v.style+=c(v.style,h,e,v);break;case "BPMNBlackPool":v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,
+break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=c(v.style,h,e,v,x);break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=g(h.Text);v.style=0==h.bpmnConversationType?v.style+da(h):v.style+"strokeWidth=2;";h.bpmnIsSubConversation&&(p=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),p.geometry.offset=new mxPoint(-6,
+-17),p.style+=M(h,e)+D(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p));v.style+=c(v.style,h,e,v,x);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;";switch(h.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";
+break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=c(v.style,h,e,v);break;case "BPMNData":v.style+="shape=note;size=14;";switch(h.bpmnDataType){case 1:p=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");p.geometry.offset=new mxPoint(-6,-15);p.style+=M(h,e)+D(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);break;case 2:p=new mxCell("",new mxGeometry(0,
+0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");p.geometry.offset=new mxPoint(3,3);p.style+=M(h,e)+D(h,e);p.geometry.relative=!0;p.vertex=!0;v.insert(p);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";S=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;");S.geometry.offset=new mxPoint(0,14);S.geometry.relative=!0;S.vertex=!0;v.insert(S);S.value=g(h.Text);S.style+=l(h,x);break;case 3:p=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),
+p.geometry.offset=new mxPoint(3,3),p.style+=D(h,e),p.geometry.relative=!0,p.vertex=!0,v.insert(p),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),p.style+=I,S=new mxCell("",new mxGeometry(0,0,t,20),"strokeColor=none;fillColor=none;"),S.geometry.offset=new mxPoint(0,14),S.geometry.relative=!0,S.vertex=!0,v.insert(S),S.value=g(h.Text),S.style+=l(h,x)}v.style+=c(v.style,h,e,v);break;case "BPMNBlackPool":v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,
 0,t,r),"fillColor=#000000;strokeColor=none;opacity=30;");p.vertex=!0;v.insert(p);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,.95*t,.95*r),"part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.05*t,.05*r,.95*t,.95*r),"part=1;");u.vertex=!0;v.insert(u);u.value=g(h.Text);u.style+=l(h.Text,x);u.style+=c(u.style,h,e,u,x);break;case "GSDFDDataStoreBlock":v.value=g(h.Text);
-v.style+="shape=partialRectangle;right=0;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");p.vertex=!0;v.insert(p);p.value=g(h.Number);p.style+=l(h.Number,x);p.style+=c(p.style,h,e,p,x);break;case "DefaultTableBlock":try{for(var Qb=h.RowHeights.length,Rb=h.ColWidths.length,rc=[],hc=[],m=0;m<Qb;m++)rc[m]=.6*h.RowHeights[m];for(V=0;V<Rb;V++)hc[V]=.6*h.ColWidths[V];v.style="group;dropTarget=0;";var Ic=h.BandedColor1,Jc=h.BandedColor2,wd=h.BandedRows,bd=h.BandedCols,
-sc=h.HideH,xd=h.HideV,cd=h.TextVAlign,dd=h.FillColor,ed=h.StrokeStyle;delete h.StrokeStyle;for(var yd=S(dd,"fillOpacity"),fd=h.LineColor,zd=S(fd,"strokeOpacity"),ia=0,ic={},m=0;m<Qb;m++){W=0;r=rc[m];for(V=0;V<Rb;V++){var La=m+","+V;if(ic[La])W+=hc[V];else{for(var tc=h["CellFill_"+La],Kc=h["NoBand_"+La],uc=h["CellSize_"+La],gb=h["Cell_"+La],gd=h["Cell_"+La+"_VAlign"],Ad=h["Cell_"+La+"_TRotation"],Bd=h["CellBorderWidthH_"+La],Cd=h["CellBorderColorH_"+La],Dd=h["CellBorderStrokeStyleH_"+La],Ed=h["CellBorderWidthV_"+
-La],Fd=h["CellBorderColorV_"+La],Gd=h["CellBorderStrokeStyleV_"+La],hd=sc?Fd:Cd,id=S(hd,"strokeOpacity"),jd=sc?Ed:Bd,kd=sc?Gd:Dd,tc=wd&&!Kc?0==m%2?Ic:bd&&!Kc?0==V%2?Ic:Jc:Jc:bd&&!Kc?0==V%2?Ic:Jc:tc,Hd=S(tc,"fillOpacity")||yd,t=hc[V],ld=r,Sb=t,Oa=m+1;Oa<m+uc.h;Oa++)if(null!=rc[Oa]){ld+=rc[Oa];ic[Oa+","+V]=!0;for(var Bb=V+1;Bb<V+uc.w;Bb++)ic[Bb+","+V]=!0}for(Oa=V+1;Oa<V+uc.w;Oa++)if(null!=hc[Oa])for(Sb+=hc[Oa],ic[m+","+Oa]=!0,Bb=m+1;Bb<m+uc.h;Bb++)ic[Bb+","+Oa]=!0;var Q=new mxCell("",new mxGeometry(W,
-ia,Sb,ld),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(xd?"left=0;right=0;":"")+(sc?"top=0;bottom=0;":"")+va(mxConstants.STYLE_FILLCOLOR,aa(tc),aa(dd))+va(mxConstants.STYLE_STROKECOLOR,aa(hd),aa(fd))+(null!=jd?va(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(jd)),"1"):"")+(id?id:zd)+Hd+"verticalAlign="+(gd?gd:cd?cd:"middle")+";"+ha({StrokeStyle:kd?kd:ed?ed:"solid"})+(Ad?"horizontal=0;":""));Q.vertex=!0;Q.value=g(gb);Q.style+=c(Q.style,h,e,Q,x)+(x?"":a(gb)+d(gb)+k(gb)+w(gb,
-Q)+A(gb)+z(gb)+y(gb)+E(gb))+D(gb)+B(gb);v.insert(Q);W+=t}}ia+=r}}catch(Id){}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==b.Class?v.value=g(h.Text):"VSMProductionControlBlock"==b.Class&&(v.value=g(h.Resources));v.style+=c(v.style,h,e,v,x);"VSMDedicatedProcessBlock"==b.Class&&(p=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),p.geometry.relative=
-!0,p.geometry.offset=new mxPoint(4,-13),p.vertex=!0,v.insert(p),p.style+=c(p.style,h,e,p));T=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");T.vertex=!0;v.insert(T);T.value=g(h.Title);T.style+=l(h.Title,x);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);T=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");T.vertex=!0;v.insert(T);
-T.value=g(h.Resource);T.style+=l(h.Resource,x);T.style+=c(T.style,h,e,T,x);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);var Ba=r,Ta=parseInt(h.Cells),M=c("part=1;",h,e,v);0<Ta&&(Ba/=Ta);H=[];pa=[];for(m=1;m<=Ta;m++)H[m]=new mxCell("",new mxGeometry(0,(m-1)*
-Ba,t,Ba),M),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["cell_"+m]),H[m].style+=l(h["cell_"+m],x);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);Ba=r;Ta=parseInt(h.Cells);M=c("part=1;fillColor=none;",h,e,v);0<Ta&&(Ba/=Ta);H=[];Na=[];for(m=1;m<=Ta;m++)H[m]=new mxCell("",new mxGeometry(.5*
-t,(m-1)*Ba,.5*t,Ba),"shape=partialRectangle;left=0;"+M),H[m].vertex=!0,v.insert(H[m]),Na[m]=new mxCell("",new mxGeometry(0,(m-1)*Ba,t,Ba),"strokeColor=none;fillColor=none;part=1;"),Na[m].vertex=!0,v.insert(Na[m]),Na[m].value=g(h["cell_"+m]),Na[m].style+=l(h["cell_"+m],x);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=c(v.style,h,e,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;";v.value=g(h.Text);
-v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";M="shape=card;size=18;flipH=1;part=1;";p=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+M);p.vertex=!0;v.insert(p);p.style+=
-c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+M);u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);var F=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+M);F.vertex=!0;v.insert(F);F.value=g(h.Text);F.style+=c(F.style,h,e,F,x);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;";
+v.style+="shape=partialRectangle;right=0;"+l(h.Text,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,.2*t,r),"part=1;");p.vertex=!0;v.insert(p);p.value=g(h.Number);p.style+=l(h.Number,x);p.style+=c(p.style,h,e,p,x);break;case "DefaultTableBlock":try{for(var Tb=h.RowHeights.length,Ub=h.ColWidths.length,uc=[],kc=[],m=0;m<Tb;m++)uc[m]=.6*h.RowHeights[m];for(V=0;V<Ub;V++)kc[V]=.6*h.ColWidths[V];v.style="group;dropTarget=0;";var Lc=h.BandedColor1,Mc=h.BandedColor2,Dd=h.BandedRows,gd=h.BandedCols,
+vc=h.HideH,Ed=h.HideV,hd=h.TextVAlign,id=h.FillColor,jd=h.StrokeStyle;delete h.StrokeStyle;for(var Fd=W(id,"fillOpacity"),kd=h.LineColor,Gd=W(kd,"strokeOpacity"),ha=0,lc={},m=0;m<Tb;m++){U=0;r=uc[m];for(V=0;V<Ub;V++){var Ma=m+","+V;if(lc[Ma])U+=kc[V];else{for(var wc=h["CellFill_"+Ma],Nc=h["NoBand_"+Ma],xc=h["CellSize_"+Ma],hb=h["Cell_"+Ma],ld=h["Cell_"+Ma+"_VAlign"],Hd=h["Cell_"+Ma+"_TRotation"],Id=h["CellBorderWidthH_"+Ma],Jd=h["CellBorderColorH_"+Ma],Kd=h["CellBorderStrokeStyleH_"+Ma],Ld=h["CellBorderWidthV_"+
+Ma],Md=h["CellBorderColorV_"+Ma],Nd=h["CellBorderStrokeStyleV_"+Ma],md=vc?Md:Jd,nd=W(md,"strokeOpacity"),od=vc?Ld:Id,pd=vc?Nd:Kd,wc=Dd&&!Nc?0==m%2?Lc:gd&&!Nc?0==V%2?Lc:Mc:Mc:gd&&!Nc?0==V%2?Lc:Mc:wc,Od=W(wc,"fillOpacity")||Fd,t=kc[V],qd=r,Vb=t,Pa=m+1;Pa<m+xc.h;Pa++)if(null!=uc[Pa]){qd+=uc[Pa];lc[Pa+","+V]=!0;for(var Db=V+1;Db<V+xc.w;Db++)lc[Db+","+V]=!0}for(Pa=V+1;Pa<V+xc.w;Pa++)if(null!=kc[Pa])for(Vb+=kc[Pa],lc[m+","+Pa]=!0,Db=m+1;Db<m+xc.h;Db++)lc[Db+","+Pa]=!0;var Q=new mxCell("",new mxGeometry(U,
+ha,Vb,qd),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Ed?"left=0;right=0;":"")+(vc?"top=0;bottom=0;":"")+va(mxConstants.STYLE_FILLCOLOR,Z(wc),Z(id))+va(mxConstants.STYLE_STROKECOLOR,Z(md),Z(kd))+(null!=od?va(mxConstants.STYLE_STROKEWIDTH,Math.round(.6*parseFloat(od)),"1"):"")+(nd?nd:Gd)+Od+"verticalAlign="+(ld?ld:hd?hd:"middle")+";"+ga({StrokeStyle:pd?pd:jd?jd:"solid"})+(Hd?"horizontal=0;":""));Q.vertex=!0;Q.value=g(hb);Q.style+=c(Q.style,h,e,Q,x)+(x?"":a(hb)+d(hb)+k(hb)+w(hb,
+Q)+z(hb)+A(hb)+y(hb)+B(hb))+C(hb)+E(hb);v.insert(Q);U+=t}}ha+=r}}catch(Pd){}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";"VSMDedicatedProcessBlock"==b.Class?v.value=g(h.Text):"VSMProductionControlBlock"==b.Class&&(v.value=g(h.Resources));v.style+=c(v.style,h,e,v,x);"VSMDedicatedProcessBlock"==b.Class&&(p=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),p.geometry.relative=
+!0,p.geometry.offset=new mxPoint(4,-13),p.vertex=!0,v.insert(p),p.style+=c(p.style,h,e,p));S=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");S.vertex=!0;v.insert(S);S.value=g(h.Title);S.style+=l(h.Title,x);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);S=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");S.vertex=!0;v.insert(S);
+S.value=g(h.Resource);S.style+=l(h.Resource,x);S.style+=c(S.style,h,e,S,x);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);var Ca=r,Ua=parseInt(h.Cells),N=c("part=1;",h,e,v);0<Ua&&(Ca/=Ua);H=[];qa=[];for(m=1;m<=Ua;m++)H[m]=new mxCell("",new mxGeometry(0,(m-1)*
+Ca,t,Ca),N),H[m].vertex=!0,v.insert(H[m]),H[m].value=g(h["cell_"+m]),H[m].style+=l(h["cell_"+m],x);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=c(v.style,h,e,v);Ca=r;Ua=parseInt(h.Cells);N=c("part=1;fillColor=none;",h,e,v);0<Ua&&(Ca/=Ua);H=[];Oa=[];for(m=1;m<=Ua;m++)H[m]=new mxCell("",new mxGeometry(.5*
+t,(m-1)*Ca,.5*t,Ca),"shape=partialRectangle;left=0;"+N),H[m].vertex=!0,v.insert(H[m]),Oa[m]=new mxCell("",new mxGeometry(0,(m-1)*Ca,t,Ca),"strokeColor=none;fillColor=none;part=1;"),Oa[m].vertex=!0,v.insert(Oa[m]),Oa[m].value=g(h["cell_"+m]),Oa[m].style+=l(h["cell_"+m],x);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=c(v.style,h,e,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;";v.value=g(h.Text);
+v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";N="shape=card;size=18;flipH=1;part=1;";p=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);p.vertex=!0;v.insert(p);p.style+=
+c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);var F=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+N);F.vertex=!0;v.insert(F);F.value=g(h.Text);F.style+=c(F.style,h,e,F,x);break;case "AWSRoundedRectangleContainerBlock2":v.style+="strokeColor=none;fillColor=none;";
 h.Spotfleet?(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Beanstalk?
 (p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.EC2?(p=new mxCell("",
 new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Subnet?(p=new mxCell("",new mxGeometry(0,
@@ -145,56 +148,56 @@ p.geometry.offset=new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(
 new mxPoint(0,20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):h.Corporate?(p=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),p.geometry.offset=new mxPoint(0,
 20),p.geometry.relative=!0,p.vertex=!0,v.insert(p),p.value=g(h.Title),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(30,0),u.vertex=!0,v.insert(u)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=g(h.Title),v.style+=c(v.style,h,e,v,x));break;case "AWSElasticComputeCloudBlock2":v.style+=
 "strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=g(h.Title);
-v.style+=c(v.style,h,e,v,x);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";Q=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");Q.vertex=!0;v.insert(Q);var da=[Q];Q.style+=N(h,e);var U=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");U.geometry.relative=!0;U.edge=!0;ib(.5*t,0,U,n,f,da,v,Q);ib(.855*t,.145*
-r,U,n,f,da,v,Q);ib(t,.5*r,U,n,f,da,v,Q);ib(.855*t,.855*r,U,n,f,da,v,Q);ib(.5*t,r,U,n,f,da,v,Q);ib(.145*t,.855*r,U,n,f,da,v,Q);ib(0,.5*r,U,n,f,da,v,Q);ib(.145*t,.145*r,U,n,f,da,v,Q);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";Q=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");Q.vertex=!0;v.insert(Q);da=[Q];
-U=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");U.geometry.relative=!0;U.edge=!0;for(var da=[Q],jc=t/h.NumTopNodes,m=0;m<h.NumTopNodes;m++)ib(.5*jc+m*jc,0,U,n,f,da,v,Q);jc=t/h.NumBottomNodes;for(m=0;m<h.NumBottomNodes;m++)ib(.5*jc+m*jc,r,U,n,f,da,v,Q);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);h.ToggleCharge&&(v.style+="flipV=1;");break;
+v.style+=c(v.style,h,e,v,x);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";Q=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");Q.vertex=!0;v.insert(Q);var ca=[Q];Q.style+=M(h,e);var T=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");T.geometry.relative=!0;T.edge=!0;Ba(.5*t,0,T,n,f,ca,v,Q);Ba(.855*t,.145*
+r,T,n,f,ca,v,Q);Ba(t,.5*r,T,n,f,ca,v,Q);Ba(.855*t,.855*r,T,n,f,ca,v,Q);Ba(.5*t,r,T,n,f,ca,v,Q);Ba(.145*t,.855*r,T,n,f,ca,v,Q);Ba(0,.5*r,T,n,f,ca,v,Q);Ba(.145*t,.145*r,T,n,f,ca,v,Q);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";Q=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");Q.vertex=!0;v.insert(Q);ca=[Q];
+T=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");T.geometry.relative=!0;T.edge=!0;for(var ca=[Q],mc=t/h.NumTopNodes,m=0;m<h.NumTopNodes;m++)Ba(.5*mc+m*mc,0,T,n,f,ca,v,Q);mc=t/h.NumBottomNodes;for(m=0;m<h.NumBottomNodes;m++)Ba(.5*mc+m*mc,r,T,n,f,ca,v,Q);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=g(h.Title);v.style+=c(v.style,h,e,v,x);h.ToggleCharge&&(v.style+="flipV=1;");break;
 case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);"EIMessageChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIDatatypeChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,
 .5,.9*t,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIInvalidMessageChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIDeadLetterChannelBlock"==b.Class?(p=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(.45*-t,0)):"EIGuaranteedDeliveryBlock"==
-b.Class&&(p=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(-10,-7));p.geometry.relative=!0;p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);U=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");U.geometry.relative=!0;U.edge=!0;ja(.15*t,.25*r,.85*t,.25*r,U,n,f,da,v,Q);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
+b.Class&&(p=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),p.geometry.offset=new mxPoint(-10,-7));p.geometry.relative=!0;p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);T=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");T.geometry.relative=!0;T.edge=!0;oa(.15*t,.25*r,.85*t,.25*r,T,n,f,ca,v,Q);break;case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,.07*r,.21*t,.86*r),"fillColor=#FFFF33;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.26*t,.09*r,.2*t,.82*r),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(1,.5,.35*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");F.geometry.relative=!0;F.geometry.offset=new mxPoint(.4*
--t,-10);F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!0);u.insertEdge(K,!1);K.style+=C(h,e);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
-J.geometry.relative=!0;J.edge=!0;u.insertEdge(J,!0);F.insertEdge(J,!1);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var kc=
-h.Messages,Lc=(r-17)/kc,u=[],U=[],m=0;m<kc;m++){var lc=Lc*(m+1)-3;u[m]=new mxCell("",new mxGeometry(t-20,lc,20,20),"part=1;");u[m].vertex=!0;v.insert(u[m]);switch(b.Class){case "EIMessageBlock":u[m].value=g(h["message_"+(m+1)]);u.style+=l(h["message_"+(m+1)],x);break;case "EICommandMessageBlock":u[m].value="C";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":u[m].value="D";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":u[m].value="E",u[m].style+=
-"fontStyle=1;fontSize=11;"}u[m].style+=c(u[m].style,h,e,u[m]);U[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");U[m].geometry.relative=!0;U[m].edge=!0;p.insertEdge(U[m],!1);u[m].insertEdge(U[m],!0);U[m].style+=c(U[m].style,h,e,U[m]);var tb=[];tb.push(new mxPoint(W+8.5,ia+lc+10));U[m].geometry.points=tb;n.push(f.addCell(U[m],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
-v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);U=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");U.geometry.relative=!0;U.edge=!0;ja(0,.5*r,.4*t,.5*r,U,n,f,da,v,Q);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
-v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;ja(.05*t,.5*r,.85*t,.5*r,K,n,f,da,v,Q);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;ja(.05*t,.5*r,.85*t,.15*
-r,J,n,f,da,v,Q);var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");R.geometry.relative=!0;R.edge=!0;ja(.05*t,.5*r,.85*t,.85*r,R,n,f,da,v,Q);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
-K.geometry.relative=!0;K.edge=!0;K.style+=C(h,e);ja(.05*t,.5*r,.95*t,.5*r,K,n,f,da,v,Q);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");J.geometry.relative=!0;J.edge=!0;J.style+=C(h,e);ja(.3*t,.1*r,.3*t,.5*r,J,n,f,da,v,Q);R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
-R.geometry.relative=!0;R.edge=!0;R.style+=C(h,e);ja(.7*t,.1*r,.7*t,.5*r,R,n,f,da,v,Q);var ma=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ma.geometry.relative=!0;ma.edge=!0;ma.style+=C(h,e);ja(.5*t,.5*r,.5*t,.9*r,ma,n,f,da,v,Q);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,
-x);p=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;ja(.45*t,.33*r,.8*t,.33*r,K,n,f,da,v,Q);u=new mxCell("",new mxGeometry(.64*t,.55*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);J=
-new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;ja(.55*t,.67*r,.2*t,.67*r,J,n,f,da,v,Q);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");p.vertex=!0;v.insert(p);p.style+=
+-t,-10);F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!0);u.insertEdge(K,!1);K.style+=D(h,e);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
+J.geometry.relative=!0;J.edge=!0;u.insertEdge(J,!0);F.insertEdge(J,!1);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var nc=
+h.Messages,Oc=(r-17)/nc,u=[],T=[],m=0;m<nc;m++){var oc=Oc*(m+1)-3;u[m]=new mxCell("",new mxGeometry(t-20,oc,20,20),"part=1;");u[m].vertex=!0;v.insert(u[m]);switch(b.Class){case "EIMessageBlock":u[m].value=g(h["message_"+(m+1)]);u.style+=l(h["message_"+(m+1)],x);break;case "EICommandMessageBlock":u[m].value="C";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":u[m].value="D";u[m].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":u[m].value="E",u[m].style+=
+"fontStyle=1;fontSize=11;"}u[m].style+=c(u[m].style,h,e,u[m]);T[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");T[m].geometry.relative=!0;T[m].edge=!0;p.insertEdge(T[m],!1);u[m].insertEdge(T[m],!0);T[m].style+=c(T[m].style,h,e,T[m]);var vb=[];vb.push(new mxPoint(U+8.5,ha+oc+10));T[m].geometry.points=vb;n.push(f.addCell(T[m],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
+v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);T=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");T.geometry.relative=!0;T.edge=!0;oa(0,.5*r,.4*t,.5*r,T,n,f,ca,v,Q);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
+v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.05*t,.5*r,.85*t,.5*r,K,n,f,ca,v,Q);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;oa(.05*t,.5*r,.85*t,.15*
+r,J,n,f,ca,v,Q);var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");R.geometry.relative=!0;R.edge=!0;oa(.05*t,.5*r,.85*t,.85*r,R,n,f,ca,v,Q);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
+K.geometry.relative=!0;K.edge=!0;K.style+=D(h,e);oa(.05*t,.5*r,.95*t,.5*r,K,n,f,ca,v,Q);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");J.geometry.relative=!0;J.edge=!0;J.style+=D(h,e);oa(.3*t,.1*r,.3*t,.5*r,J,n,f,ca,v,Q);R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
+R.geometry.relative=!0;R.edge=!0;R.style+=D(h,e);oa(.7*t,.1*r,.7*t,.5*r,R,n,f,ca,v,Q);var ka=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");ka.geometry.relative=!0;ka.edge=!0;ka.style+=D(h,e);oa(.5*t,.5*r,.5*t,.9*r,ka,n,f,ca,v,Q);break;case "EIRequestReplyBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,
+x);p=new mxCell("",new mxGeometry(.2*t,.21*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.45*t,.33*r,.8*t,.33*r,K,n,f,ca,v,Q);u=new mxCell("",new mxGeometry(.64*t,.55*r,.16*t,.24*r),"part=1;fillColor=#ffffff;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);J=
+new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;oa(.55*t,.67*r,.2*t,.67*r,J,n,f,ca,v,Q);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.1*t,.15*r,.8*t,.7*r),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");p.vertex=!0;v.insert(p);p.style+=
 c(p.style,h,e,p);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.04*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.2*t,.56*r,.2*t,.32*r),"part=1;");u.vertex=!0;v.insert(u);u.value="A";u.style+="fontStyle=1;fontSize=11;";p.style+=c(p.style,h,e,p);K=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!1);u.insertEdge(K,!0);K.style+=c(K.style,h,e,K);tb=[];tb.push(new mxPoint(W+.13*t,ia+.72*r));K.geometry.points=tb;n.push(f.addCell(K,null,null,null,null));F=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");F.vertex=!0;v.insert(F);F.style+=C(h,e)+fa(h);F.style+=c(F.style,h,e,F);O=new mxCell("",new mxGeometry(.76*
-t,.56*r,.2*t,.32*r),"part=1;");O.vertex=!0;v.insert(O);O.style+=C(h,e)+G(h,e,O)+fa(h)+ha(h);O.value="B";O.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";O.style+=c(O.style,h,e,O);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;F.insertEdge(J,!1);O.insertEdge(J,!0);J.style+=c(J.style,h,e,J);var md=[];md.push(new mxPoint(W+.69*t,ia+.72*r));J.geometry.points=md;n.push(f.addCell(J,
+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");K.geometry.relative=!0;K.edge=!0;p.insertEdge(K,!1);u.insertEdge(K,!0);K.style+=c(K.style,h,e,K);vb=[];vb.push(new mxPoint(U+.13*t,ha+.72*r));K.geometry.points=vb;n.push(f.addCell(K,null,null,null,null));F=new mxCell("",new mxGeometry(.6*t,.06*r,.18*t,.28*r),"shape=ellipse;fillColor=#808080;part=1;");F.vertex=!0;v.insert(F);F.style+=D(h,e)+da(h);F.style+=c(F.style,h,e,F);O=new mxCell("",new mxGeometry(.76*
+t,.56*r,.2*t,.32*r),"part=1;");O.vertex=!0;v.insert(O);O.style+=D(h,e)+G(h,e,O)+da(h)+ga(h);O.value="B";O.style+="fontStyle=1;fontSize=11;fillColor=#ffffff;";O.style+=c(O.style,h,e,O);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");J.geometry.relative=!0;J.edge=!0;F.insertEdge(J,!1);O.insertEdge(J,!0);J.style+=c(J.style,h,e,J);var rd=[];rd.push(new mxPoint(U+.69*t,ha+.72*r));J.geometry.points=rd;n.push(f.addCell(J,
 null,null,null,null));R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");R.geometry.relative=!0;R.edge=!0;p.insertEdge(R,!1);F.insertEdge(R,!0);R.style+=c(R.style,h,e,R);n.push(f.addCell(R,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("1",new mxGeometry(.2*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");
 p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);u=new mxCell("2",new mxGeometry(.45*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.geometry.points=
-[new mxPoint(W+.375*t,ia+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");u.insertEdge(J,!1);F.insertEdge(J,!0);J.geometry.points=[new mxPoint(W+.675*t,ia+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
+[new mxPoint(U+.375*t,ha+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");u.insertEdge(J,!1);F.insertEdge(J,!0);J.geometry.points=[new mxPoint(U+.675*t,ha+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.38*t,.42*r,.24*t,.16*r),"part=1;fillColor=#aefe7d;");p.vertex=!0;v.insert(p);p.style+=
-c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(.76*t,.23*r,.24*t,.16*r),"");F.vertex=!0;v.insert(F);F.style=u.style;var O=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");O.vertex=!0;v.insert(O);O.style=u.style;var vc=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");vc.vertex=!0;v.insert(vc);vc.style=u.style;var wc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");
-wc.vertex=!0;v.insert(wc);wc.style=u.style;var xc=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");xc.vertex=!0;v.insert(xc);xc.style=u.style;K=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(J,!1);F.insertEdge(J,!0);J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));
-R=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(R,!1);O.insertEdge(R,!0);R.edge=!0;R.style+=c(R.style,h,e,R);n.push(f.addCell(R,null,null,null,null));ma=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(ma,!1);vc.insertEdge(ma,!0);ma.edge=!0;ma.style+=c(ma.style,h,e,ma);n.push(f.addCell(ma,null,null,null,null));var ub=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(ub,!1);wc.insertEdge(ub,!0);ub.edge=!0;ub.style+=
-c(ub.style,h,e,ub);n.push(f.addCell(ub,null,null,null,null));var vb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(vb,!1);xc.insertEdge(vb,!0);vb.edge=!0;vb.style+=c(vb.style,h,e,vb);n.push(f.addCell(vb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
-K.geometry.relative=!0;K.edge=!0;ja(.05*t,.5*r,.6*t,.25*r,K,n,f,da,v,Q);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;ja(.05*t,.5*r,.6*t,.75*r,J,n,f,da,v,Q);p=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
+c(p.style,h,e,p);u=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");u.vertex=!0;v.insert(u);u.style+=c(u.style,h,e,u);F=new mxCell("",new mxGeometry(.76*t,.23*r,.24*t,.16*r),"");F.vertex=!0;v.insert(F);F.style=u.style;var O=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");O.vertex=!0;v.insert(O);O.style=u.style;var yc=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");yc.vertex=!0;v.insert(yc);yc.style=u.style;var zc=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");
+zc.vertex=!0;v.insert(zc);zc.style=u.style;var Ac=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");Ac.vertex=!0;v.insert(Ac);Ac.style=u.style;K=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(K,!1);u.insertEdge(K,!0);K.edge=!0;K.style+=c(K.style,h,e,K);n.push(f.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(J,!1);F.insertEdge(J,!0);J.edge=!0;J.style+=c(J.style,h,e,J);n.push(f.addCell(J,null,null,null,null));
+R=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(R,!1);O.insertEdge(R,!0);R.edge=!0;R.style+=c(R.style,h,e,R);n.push(f.addCell(R,null,null,null,null));ka=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(ka,!1);yc.insertEdge(ka,!0);ka.edge=!0;ka.style+=c(ka.style,h,e,ka);n.push(f.addCell(ka,null,null,null,null));var wb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(wb,!1);zc.insertEdge(wb,!0);wb.edge=!0;wb.style+=
+c(wb.style,h,e,wb);n.push(f.addCell(wb,null,null,null,null));var xb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");p.insertEdge(xb,!1);Ac.insertEdge(xb,!0);xb.edge=!0;xb.style+=c(xb.style,h,e,xb);n.push(f.addCell(xb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
+K.geometry.relative=!0;K.edge=!0;oa(.05*t,.5*r,.6*t,.25*r,K,n,f,ca,v,Q);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;oa(.05*t,.5*r,.6*t,.75*r,J,n,f,ca,v,Q);p=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);F=new mxCell("",
-new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");R.geometry.relative=!0;R.edge=!0;p.insertEdge(R,!1);F.insertEdge(R,!0);R.style+=c(R.style,h,e,R);R.geometry.points=[new mxPoint(W+8.5,ia+40)];n.push(f.addCell(R,null,null,null,null));O=new mxCell("",new mxGeometry(t-45,r-20,20,20),
-"part=1;");O.vertex=!0;v.insert(O);O.value=g(h.message_0);O.style+=l(h.message_0,x);O.style+=c(O.style,h,e,O,x);ma=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");ma.geometry.relative=!0;ma.edge=!0;p.insertEdge(ma,!1);O.insertEdge(ma,!0);ma.style+=c(ma.style,h,e,ma);ma.geometry.points=[new mxPoint(W+8.5,ia+r-10)];n.push(f.addCell(ma,null,null,null,null));kc=h.HistoryMessages;Lc=(r-75)/kc;u=[];U=[];for(m=0;m<kc;m++)lc=
-Lc*(m+1)+30,u[m]=new mxCell("",new mxGeometry(t-20,lc,20,20),"part=1;"),u[m].vertex=!0,u[m].value=g(h["message_"+(m+1)]),u.style+=l(h["message_"+(m+1)],x),v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m],x),U[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),U[m].geometry.relative=!0,U[m].edge=!0,F.insertEdge(U[m],!1),u[m].insertEdge(U[m],!0),U[m].style+=c(U[m].style,h,e,U[m]),tb=[],tb.push(new mxPoint(W+t-30,ia+lc+
-10)),U[m].geometry.points=tb,n.push(f.addCell(U[m],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");p.vertex=
-!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var u=[],nd=.02*t,Mc=(t-2*nd)/h.LightCount,od=.8*Mc,m=0;m<h.LightCount;m++)u[m]=new mxCell("",new mxGeometry(nd+Mc*m+(Mc-od)/2,.25*r,od,.75*r),"part=1;shape=ellipse;"),u[m].vertex=!0,v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);for(var p=[],pd=t/h.SinkCount,m=0;m<h.SinkCount;m++)p[m]=new mxCell("",new mxGeometry(pd*m,0,pd,r),"part=1;shape=mxgraph.floorplan.sink_2;"),
-p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Fa=.1*t/h.StallCount,p=new mxCell("",new mxGeometry(0,0,Fa,r),"fillColor=#000000;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var Ma=(t-Fa)/h.StallCount,Nc=[],mc=[],nc=[],oc=[],I=C(h,e),I=""==I?"#000000;":I.replace("stokreColor=",""),yc="part=1;fillColor="+I,yc=yc+c(yc,h,e,v),Oc=c("",h,e,v),m=0;m<h.StallCount;m++)Nc[m]=new mxCell("",new mxGeometry((m+
-1)*Ma,0,Fa,r),yc),Nc[m].vertex=!0,v.insert(Nc[m]),nc[m]=new mxCell("",new mxGeometry(Fa+m*Ma+.05*(Ma-Fa),r-.92*(Ma-Fa),.9*(Ma-Fa),.92*(Ma-Fa)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),nc[m].vertex=!0,v.insert(nc[m]),nc[m].style+=Oc,mc[m]=new mxCell("",new mxGeometry(Fa+m*Ma+.2*(Ma-Fa),0,.6*(Ma-Fa),.8*(Ma-Fa)),"shape=mxgraph.floorplan.toilet;part=1;"),mc[m].vertex=!0,v.insert(mc[m]),mc[m].style+=Oc,oc[m]=new mxCell("",new mxGeometry(Fa+m*Ma,.42*r,.15*(Ma-Fa),.12*(Ma-Fa)),"part=1;"),oc[m].vertex=
-!0,v.insert(oc[m]),oc[m].style+=Oc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Pa="edgeStyle=none;endArrow=none;part=1;";Pa.style+=c(Pa.style,h,e,Pa);var I=C(h,e),I=""==I?"#000000;":I.replace("strokeColor=",""),wb="shape=triangle;part=1;fillColor="+I,wb=wb+c(wb,h,e,v),K=new mxCell("",new mxGeometry(0,0,0,0),Pa);K.geometry.relative=!0;K.edge=!0;ja(0,.5*r,.65*t,.5*r,K,n,f,da,v,Q);for(var L=r/h.numLines,J=[],Cb=[],m=0;m<h.numLines;m++)J[m]=new mxCell("",new mxGeometry(0,
-0,0,0),Pa),J[m].geometry.relative=!0,J[m].edge=!0,ja(.65*t,.5*r,.96*t,(m+.5)*L,J[m],n,f,da,v,Q),Cb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),wb),Cb[m].vertex=!0,v.insert(Cb[m]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Pa="edgeStyle=none;endArrow=none;part=1;";Pa.style+=c(Pa.style,h,e,Pa);I=C(h,e);I=""==I?"#000000;":I.replace("strokeColor=","");wb="shape=triangle;part=1;fillColor="+I;wb+=c(wb,h,e,v);L=r/h.numLines;J=[];Cb=[];for(m=0;m<h.numLines;m++)J[m]=
-new mxCell("",new mxGeometry(0,0,0,0),Pa),J[m].geometry.relative=!0,J[m].edge=!0,ja(0,(m+.5)*L,.96*t,(m+.5)*L,J[m],n,f,da,v,Q),Cb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),wb),Cb[m].vertex=!0,v.insert(Cb[m]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);switch(h.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=
+new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");F.vertex=!0;v.insert(F);F.style+=c(F.style,h,e,F);R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");R.geometry.relative=!0;R.edge=!0;p.insertEdge(R,!1);F.insertEdge(R,!0);R.style+=c(R.style,h,e,R);R.geometry.points=[new mxPoint(U+8.5,ha+40)];n.push(f.addCell(R,null,null,null,null));O=new mxCell("",new mxGeometry(t-45,r-20,20,20),
+"part=1;");O.vertex=!0;v.insert(O);O.value=g(h.message_0);O.style+=l(h.message_0,x);O.style+=c(O.style,h,e,O,x);ka=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");ka.geometry.relative=!0;ka.edge=!0;p.insertEdge(ka,!1);O.insertEdge(ka,!0);ka.style+=c(ka.style,h,e,ka);ka.geometry.points=[new mxPoint(U+8.5,ha+r-10)];n.push(f.addCell(ka,null,null,null,null));nc=h.HistoryMessages;Oc=(r-75)/nc;u=[];T=[];for(m=0;m<nc;m++)oc=
+Oc*(m+1)+30,u[m]=new mxCell("",new mxGeometry(t-20,oc,20,20),"part=1;"),u[m].vertex=!0,u[m].value=g(h["message_"+(m+1)]),u.style+=l(h["message_"+(m+1)],x),v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m],x),T[m]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),T[m].geometry.relative=!0,T[m].edge=!0,F.insertEdge(T[m],!1),u[m].insertEdge(T[m],!0),T[m].style+=c(T[m].style,h,e,T[m]),vb=[],vb.push(new mxPoint(U+t-30,ha+oc+
+10)),T[m].geometry.points=vb,n.push(f.addCell(T[m],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=c(v.style,h,e,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);p=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");p.vertex=
+!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var u=[],sd=.02*t,Pc=(t-2*sd)/h.LightCount,td=.8*Pc,m=0;m<h.LightCount;m++)u[m]=new mxCell("",new mxGeometry(sd+Pc*m+(Pc-td)/2,.25*r,td,.75*r),"part=1;shape=ellipse;"),u[m].vertex=!0,v.insert(u[m]),u[m].style+=c(u[m].style,h,e,u[m]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);for(var p=[],ud=t/h.SinkCount,m=0;m<h.SinkCount;m++)p[m]=new mxCell("",new mxGeometry(ud*m,0,ud,r),"part=1;shape=mxgraph.floorplan.sink_2;"),
+p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ga=.1*t/h.StallCount,p=new mxCell("",new mxGeometry(0,0,Ga,r),"fillColor=#000000;part=1;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);for(var Na=(t-Ga)/h.StallCount,Qc=[],pc=[],qc=[],rc=[],I=D(h,e),I=""==I?"#000000;":I.replace("stokreColor=",""),Bc="part=1;fillColor="+I,Bc=Bc+c(Bc,h,e,v),Rc=c("",h,e,v),m=0;m<h.StallCount;m++)Qc[m]=new mxCell("",new mxGeometry((m+
+1)*Na,0,Ga,r),Bc),Qc[m].vertex=!0,v.insert(Qc[m]),qc[m]=new mxCell("",new mxGeometry(Ga+m*Na+.05*(Na-Ga),r-.92*(Na-Ga),.9*(Na-Ga),.92*(Na-Ga)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),qc[m].vertex=!0,v.insert(qc[m]),qc[m].style+=Rc,pc[m]=new mxCell("",new mxGeometry(Ga+m*Na+.2*(Na-Ga),0,.6*(Na-Ga),.8*(Na-Ga)),"shape=mxgraph.floorplan.toilet;part=1;"),pc[m].vertex=!0,v.insert(pc[m]),pc[m].style+=Rc,rc[m]=new mxCell("",new mxGeometry(Ga+m*Na,.42*r,.15*(Na-Ga),.12*(Na-Ga)),"part=1;"),rc[m].vertex=
+!0,v.insert(rc[m]),rc[m].style+=Rc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Qa="edgeStyle=none;endArrow=none;part=1;";Qa.style+=c(Qa.style,h,e,Qa);var I=D(h,e),I=""==I?"#000000;":I.replace("strokeColor=",""),yb="shape=triangle;part=1;fillColor="+I,yb=yb+c(yb,h,e,v),K=new mxCell("",new mxGeometry(0,0,0,0),Qa);K.geometry.relative=!0;K.edge=!0;oa(0,.5*r,.65*t,.5*r,K,n,f,ca,v,Q);for(var L=r/h.numLines,J=[],Eb=[],m=0;m<h.numLines;m++)J[m]=new mxCell("",new mxGeometry(0,
+0,0,0),Qa),J[m].geometry.relative=!0,J[m].edge=!0,oa(.65*t,.5*r,.96*t,(m+.5)*L,J[m],n,f,ca,v,Q),Eb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),yb),Eb[m].vertex=!0,v.insert(Eb[m]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Qa="edgeStyle=none;endArrow=none;part=1;";Qa.style+=c(Qa.style,h,e,Qa);I=D(h,e);I=""==I?"#000000;":I.replace("strokeColor=","");yb="shape=triangle;part=1;fillColor="+I;yb+=c(yb,h,e,v);L=r/h.numLines;J=[];Eb=[];for(m=0;m<h.numLines;m++)J[m]=
+new mxCell("",new mxGeometry(0,0,0,0),Qa),J[m].geometry.relative=!0,J[m].edge=!0,oa(0,(m+.5)*L,.96*t,(m+.5)*L,J[m],n,f,ca,v,Q),Eb[m]=new mxCell("",new mxGeometry(.95*t,(m+.2)*L,.05*t,.6*L),yb),Eb[m].vertex=!0,v.insert(Eb[m]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);switch(h.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=
 c(v.style,h,e,v,x);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);1==h.peakedRoof&&0==h.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==h.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=c(v.style,h,e,v,x);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=g(h.Text);v.style=0==h.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+
-"shape=mxgraph.pid.vessels.tank;";v.style+=c(v.style,h,e,v,x);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,.2*r,t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=M;p.style+=c(p.style,h,e,p);M="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=
-!0,K.style+=M,K.style+=c(K.style,h,e,K),ja(0,0,0,.2*r,K,n,f,da,v,Q),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=M,J.style+=c(J.style,h,e,J),ja(t,.67*r,t,r,J,n,f,da,v,Q)):(p.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=M,K.style+=c(K.style,h,e,K),ja(0,0,0,.33*r,K,n,f,da,v,Q),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=M,J.style+=c(J.style,h,e,J),ja(t,.8*r,t,
-r,J,n,f,da,v,Q));1==h.centerLineType&&(R=new mxCell("",new mxGeometry(0,0,0,0),""),R.geometry.relative=!0,R.edge=!0,R.style+=M,R.style+=c(R.style,h,e,R),ja(.2*t,.5*r,.8*t,.5*r,R,n,f,da,v,Q));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(b.Class){case "PEIndicatorBlock":v.style+=
+"shape=mxgraph.pid.vessels.tank;";v.style+=c(v.style,h,e,v,x);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,.2*r,t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=N;p.style+=c(p.style,h,e,p);N="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=
+!0,K.style+=N,K.style+=c(K.style,h,e,K),oa(0,0,0,.2*r,K,n,f,ca,v,Q),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=c(J.style,h,e,J),oa(t,.67*r,t,r,J,n,f,ca,v,Q)):(p.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=N,K.style+=c(K.style,h,e,K),oa(0,0,0,.33*r,K,n,f,ca,v,Q),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=c(J.style,h,e,J),oa(t,.8*r,t,
+r,J,n,f,ca,v,Q));1==h.centerLineType&&(R=new mxCell("",new mxGeometry(0,0,0,0),""),R.geometry.relative=!0,R.edge=!0,R.style+=N,R.style+=c(R.style,h,e,R),oa(.2*t,.5*r,.8*t,.5*r,R,n,f,ca,v,Q));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;";v.value=g(h.Text);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");p.vertex=!0;v.insert(p);p.style+=c(p.style,h,e,p);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(b.Class){case "PEIndicatorBlock":v.style+=
 "shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=c(v.style,h,e,v);"PEIndicator2Block"==
 b.Class||"PESharedIndicator2Block"==b.Class?(p=new mxCell("",new mxGeometry(0,0,t,.5*t),"part=1;strokeColor=none;fillColor=none;"),p.vertex=!0,v.insert(p),p.value=g(h.TopText),p.style+=l(h.TopText,x),p.style+=c(p.style,h,e,p,x),u=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(p=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),p.vertex=!0,v.insert(p),p.value=g(h.TopText),p.style+=l(h.TopText,x),p.style+=c(p.style,h,e,p,x),
-u=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));u.vertex=!0;v.insert(u);u.value=g(h.BotText);u.style+=l(h.BotText,x);u.style+=c(u.style,h,e,u,x);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var Pc=
-!1;"PEPoweredValveBlock"==b.Class?1!=h.poweredHandOperated&&(Pc=!0):1!=h.handOperated&&(Pc=!0);if(Pc){var h=q(b).Properties,ba=h.BoundingBox,Jd=ba.h;ba.h="PEAngleValveBlock"==b.Class||"PEAngleGlobeValveBlock"==b.Class?.7*ba.h:.6*ba.h;v=new mxCell("",new mxGeometry(Math.round(.6*ba.x+0),Math.round(.6*(ba.y+Jd-ba.h)+0),Math.round(.6*ba.w),Math.round(.6*ba.h)),"");v.vertex=!0;na(v,b,f)}if("PEPoweredValveBlock"==b.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",
-v.style+=c(v.style,h,e,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",p=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35*r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),p.vertex=!0,v.insert(p),p.value=g(h.PoweredText),p.style+=(x?"":"fontSize=6;"+d(h.PoweredText)+k(h.PoweredText)+w(h.PoweredText)+A(h.PoweredText)+z(h.PoweredText)+E(h.PoweredText)+D(h.PoweredText))+B(h.PoweredText),p.style+=c(p.style,h,e,p,x)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";
+u=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));u.vertex=!0;v.insert(u);u.value=g(h.BotText);u.style+=l(h.BotText,x);u.style+=c(u.style,h,e,u,x);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var Sc=
+!1;"PEPoweredValveBlock"==b.Class?1!=h.poweredHandOperated&&(Sc=!0):1!=h.handOperated&&(Sc=!0);if(Sc){var h=q(b).Properties,ba=h.BoundingBox,Qd=ba.h;ba.h="PEAngleValveBlock"==b.Class||"PEAngleGlobeValveBlock"==b.Class?.7*ba.h:.6*ba.h;v=new mxCell("",new mxGeometry(Math.round(.6*ba.x+pb),Math.round(.6*(ba.y+Qd-ba.h)+qb),Math.round(.6*ba.w),Math.round(.6*ba.h)),"");v.vertex=!0;ma(v,b,f)}if("PEPoweredValveBlock"==b.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",
+v.style+=c(v.style,h,e,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",p=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35*r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),p.vertex=!0,v.insert(p),p.value=g(h.PoweredText),p.style+=(x?"":"fontSize=6;"+d(h.PoweredText)+k(h.PoweredText)+w(h.PoweredText)+z(h.PoweredText)+A(h.PoweredText)+B(h.PoweredText)+C(h.PoweredText))+E(h.PoweredText),p.style+=c(p.style,h,e,p,x)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";
 v.value=g(h.Text);switch(b.Class){case "PEGateValveBlock":v.style+="valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==h.handOperated&&(v.style+="actuator=man;")}v.style+=c(v.style,h,e,v,x);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,
 0,20,r-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,110),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(O=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):
 new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),O.geometry.relative=!0,O.geometry.offset=new mxPoint(0,-20),O.vertex=!0,v.insert(O));v.style+=c(v.style,h,e,v);break;case "UI2WindowBlock":v.value=g(h.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(x?"":a(h.Title)+d(h.Title)+k(h.Title));1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
@@ -202,81 +205,81 @@ new mxCell("",new mxGeometry(1,0,20,r-30),"part=1;shape=mxgraph.mockup.navigatio
 O.geometry.relative=!0,O.geometry.offset=new mxPoint(0,-20),O.vertex=!0,v.insert(O));v.style+=c(v.style,h,e,v,x);break;case "UI2DialogBlock":v.value=g(h.Text);v.style+=l(h.Text,x);p=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");p.vertex=!0;v.insert(p);p.value=g(h.Title);p.style+=l(h.Title,x);p.style+=c(p.style,h,e,p,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative=!0;u.geometry.offset=
 new mxPoint(-25,-10);u.vertex=!0;p.insert(u);1==h.vScroll&&(F=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(-20,30),F.vertex=!0,v.insert(F),v.style+="spacingRight=20;");1==h.hScroll&&(O=1==h.vScroll?new mxCell("",
 new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),O.geometry.relative=!0,O.geometry.offset=new mxPoint(0,-20),O.vertex=!0,v.insert(O));v.style+=c(v.style,h,e,v);break;case "UI2AccordionBlock":p=[];L=25;for(m=0;m<=h.Panels-1;m++)p[m]=m<h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"):
-m==h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,r-(h.Panels-h.Selected)*L+(m-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Panel_"+(m+1)]),p[m].style+=l(h["Panel_"+(m+1)],x),0>p[m].style.indexOf(";align=")&&(p[m].style+="align=left;spacingLeft=5;");var ka=C(h,e),ka=ka.replace("strokeColor","fillColor2");""==ka&&(ka="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",
-new mxGeometry(1,0,20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,h.Selected*L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ka,u.style+=c(u.style,h,e,u));1==h.hScroll&&
-(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20-(h.Panels-h.Selected)*L),F.vertex=!0,v.insert(F),F.style+=ka,F.style+=c(F.style,h,e,F));O=1==h.vScroll?new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),
-"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;");O.vertex=!0;v.insert(O);O.value=g(h.Content_1);O.style+=l(h.Content_1,x);!x&&0>O.style.indexOf(";align=")&&(O.style+="align=left;spacingLeft=5;");v.style+=c(v.style,h,e,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var p=[],u=[],L=25,Ia=3,X=(t+Ia)/(h.Tabs+1),ra=new mxCell("",new mxGeometry(0,
-L,t,r-L),"part=1;");ra.vertex=!0;v.insert(ra);ra.style+=c(ra.style,h,e,ra);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(10+m*X,0,X-Ia,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(10+m*X,0,X-Ia,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X-Ia,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=
-l(h["Tab_"+(m+1)],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ka=C(h,e);ka=ka.replace("strokeColor","fillColor2");""==ka&&(ka="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
-u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ka,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=
-ka,F.style+=c(F.style,h,e,F));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";p=[];u=[];L=25;Ia=3;X=(t+Ia)/h.Tabs;ra=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");ra.vertex=!0;v.insert(ra);ra.style+=c(ra.style,h,e,ra);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*X,0,X-Ia,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(m*X,0,X-Ia,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,
-h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X-Ia,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;");ka=C(h,e);ka=ka.replace("strokeColor","fillColor2");""==ka&&(ka="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
-new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ka,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
-F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ka,F.style+=c(F.style,h,e,F));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";p=[];u=[];Ia=3;L=25+Ia;X=80;kb=10;ra=new mxCell("",new mxGeometry(X,0,t-X,r),"part=1;");ra.vertex=!0;v.insert(ra);ra.style+=c(ra.style,h,e,ra);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,kb+m*L,X,L-Ia),""),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]),
-u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x)):(p[m]=new mxCell("",new mxGeometry(0,kb+m*L,X,L-Ia),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X,L-Ia),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x)),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ka=
-C(h,e);ka=ka.replace("strokeColor","fillColor2");""==ka&&(ka="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,0),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=
-ka,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(X,1,t-20-X,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(X,1,t-X,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ka,F.style+=c(F.style,h,e,F));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;
-p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=C(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),
+m==h.Selected-1?new mxCell("",new mxGeometry(0,m*L,t,L),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,r-(h.Panels-h.Selected)*L+(m-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Panel_"+(m+1)]),p[m].style+=l(h["Panel_"+(m+1)],x),0>p[m].style.indexOf(";align=")&&(p[m].style+="align=left;spacingLeft=5;");var ia=D(h,e),ia=ia.replace("strokeColor","fillColor2");""==ia&&(ia="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",
+new mxGeometry(1,0,20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,h.Selected*L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ia,u.style+=c(u.style,h,e,u));1==h.hScroll&&
+(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20-(h.Panels-h.Selected)*L),F.vertex=!0,v.insert(F),F.style+=ia,F.style+=c(F.style,h,e,F));O=1==h.vScroll?new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),
+"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;");O.vertex=!0;v.insert(O);O.value=g(h.Content_1);O.style+=l(h.Content_1,x);!x&&0>O.style.indexOf(";align=")&&(O.style+="align=left;spacingLeft=5;");v.style+=c(v.style,h,e,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var p=[],u=[],L=25,Ja=3,X=(t+Ja)/(h.Tabs+1),sa=new mxCell("",new mxGeometry(0,
+L,t,r-L),"part=1;");sa.vertex=!0;v.insert(sa);sa.style+=c(sa.style,h,e,sa);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(10+m*X,0,X-Ja,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(10+m*X,0,X-Ja,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X-Ja,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=
+l(h["Tab_"+(m+1)],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ia=D(h,e);ia=ia.replace("strokeColor","fillColor2");""==ia&&(ia="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
+u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ia,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=
+ia,F.style+=c(F.style,h,e,F));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";p=[];u=[];L=25;Ja=3;X=(t+Ja)/h.Tabs;sa=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");sa.vertex=!0;v.insert(sa);sa.style+=c(sa.style,h,e,sa);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*X,0,X-Ja,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(m*X,0,X-Ja,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,
+h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X-Ja,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;");ia=D(h,e);ia=ia.replace("strokeColor","fillColor2");""==ia&&(ia="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
+new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,L),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=ia,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
+F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ia,F.style+=c(F.style,h,e,F));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";p=[];u=[];Ja=3;L=25+Ja;X=80;kb=10;sa=new mxCell("",new mxGeometry(X,0,t-X,r),"part=1;");sa.vertex=!0;v.insert(sa);sa.style+=c(sa.style,h,e,sa);for(m=0;m<=h.Tabs-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,kb+m*L,X,L-Ja),""),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]),
+u[m].style+=l(h["Tab_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x)):(p[m]=new mxCell("",new mxGeometry(0,kb+m*L,X,L-Ja),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X,L-Ja),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].value=g(h["Tab_"+(m+1)]),u[m].style+=l(h["Tab_"+(m+1)],x)),0>u[m].style.indexOf(";align=")&&(u[m].style+="align=left;spacingLeft=2;"),u[m].style+=c(u[m].style,h,e,u[m]);ia=
+D(h,e);ia=ia.replace("strokeColor","fillColor2");""==ia&&(ia="fillColor2=#000000;");1==h.vScroll&&(u=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),u.geometry.relative=!0,u.geometry.offset=new mxPoint(-20,0),u.vertex=!0,v.insert(u),v.style+="spacingRight=20;",u.style+=
+ia,u.style+=c(u.style,h,e,u));1==h.hScroll&&(F=1==h.vScroll?new mxCell("",new mxGeometry(X,1,t-20-X,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(X,1,t-X,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),F.geometry.relative=!0,F.geometry.offset=new mxPoint(0,-20),F.vertex=!0,v.insert(F),F.style+=ia,F.style+=c(F.style,h,e,F));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;
+p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),
 u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";X=t/h.Options;p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(m*X,.5*r-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,
-p[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=C(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),
-p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected&&h.Selected==m+1&&(I=C(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";X=t/h.Options;p=[];u=
-[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(m*X,.5*r-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected&&h.Selected==m+1&&(I=C(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),
+p[m],x),null!=h.Selected[m+1]&&1==h.Selected[m+1]&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;p=[];u=[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(0,m*L+.5*L-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),
+p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected&&h.Selected==m+1&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2.5,2.5,5,5),"shape=ellipse;"),u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HorizontalRadioBlock":v.style+="strokeColor=none;fillColor=none;";X=t/h.Options;p=[];u=
+[];for(m=0;m<h.Options;m++)p[m]=new mxCell("",new mxGeometry(m*X,.5*r-5,10,10),"shape=ellipse;labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Option_"+(m+1)]),p[m].style+=l(h["Option_"+(m+1)],x),p[m].style+=c(p[m].style,h,e,p[m],x),null!=h.Selected&&h.Selected==m+1&&(I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),u[m]=new mxCell("",new mxGeometry(2,2,6,6),"shape=ellipse;part=1;"),
 u[m].vertex=!0,p[m].insert(u[m]),u[m].style+=I,u[m].style+=c(u[m].style,h,e,u[m]));break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";"UI2VSliderBlock"==b.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*h.ScrollVal+";";v.style+=c(v.style,h,e,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";p=new mxCell("",new mxGeometry(0,0,.6*t,r),"part=1;");p.vertex=!0;v.insert(p);
-p.value=g(h.Date);p.style+=l(h.Date,x);v.style+=c(v.style,h,e,v);I=C(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");u=new mxCell("",new mxGeometry(.75*t,0,.25*t,r),"part=1;shape=mxgraph.gmdl.calendar;");u.vertex=!0;v.insert(u);u.style+=I;u.style+=c(u.style,h,e,u);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(h.Search)+d(h.Search)+k(h.Search);v.value=g(h.Search);v.style+=c(v.style,h,e,v,x);break;
-case "UI2NumericStepperBlock":I=C(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+I+a(h.Number)+d(h.Number)+k(h.Number);v.value=g(h.Number);v.style+=c(v.style,h,e,v,x);break;case "UI2ButtonBarBlock":v.style+=c(v.style,h,e,v);p=[];u=[];X=t/h.Buttons;for(m=0;m<=h.Buttons-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*X,0,X,r),""),
+p.value=g(h.Date);p.style+=l(h.Date,x);v.style+=c(v.style,h,e,v);I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");u=new mxCell("",new mxGeometry(.75*t,0,.25*t,r),"part=1;shape=mxgraph.gmdl.calendar;");u.vertex=!0;v.insert(u);u.style+=I;u.style+=c(u.style,h,e,u);break;case "UI2SearchBlock":v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(h.Search)+d(h.Search)+k(h.Search);v.value=g(h.Search);v.style+=c(v.style,h,e,v,x);break;
+case "UI2NumericStepperBlock":I=D(h,e);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+I+a(h.Number)+d(h.Number)+k(h.Number);v.value=g(h.Number);v.style+=c(v.style,h,e,v,x);break;case "UI2ButtonBarBlock":v.style+=c(v.style,h,e,v);p=[];u=[];X=t/h.Buttons;for(m=0;m<=h.Buttons-1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(m*X,0,X,r),""),
 u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(m*X,0,X,r),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,X,r),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Button_"+(m+1)]),u[m].style+=l(h["Button_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x);break;case "UI2VerticalButtonBarBlock":v.style+=c(v.style,h,e,v);p=[];u=[];L=r/h.Buttons;for(m=0;m<=h.Buttons-
 1;m++)m==h.Selected-1?(u[m]=new mxCell("",new mxGeometry(0,m*L,t,L),""),u[m].vertex=!0,v.insert(u[m])):(p[m]=new mxCell("",new mxGeometry(0,m*L,t,L),"strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].style+=c(p[m].style,h,e,p[m]),u[m]=new mxCell("",new mxGeometry(0,0,t,L),"fillColor=#000000;fillOpacity=25;"),u[m].vertex=!0,p[m].insert(u[m])),u[m].value=g(h["Button_"+(m+1)]),u[m].style+=l(h["Button_"+(m+1)],x),u[m].style+=c(u[m].style,h,e,u[m],x);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";
 v.style+=c(v.style,h,e,v);p=[];u=[];X=t/h.Links;for(m=0;m<h.Links;m++)0!=m?(u[m]=new mxCell("",new mxGeometry(m*X,0,X,r),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),u[m].style+=c(u[m].style,h,e,u[m])):u[m]=new mxCell("",new mxGeometry(m*X,0,X,r),"fillColor=none;strokeColor=none;"),u[m].vertex=!0,v.insert(u[m]),u[m].value=g(h["Link_"+(m+1)]),u[m].style+=l(h["Link_"+(m+1)],x);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=c(v.style,h,e,v);
 p=[];u=[];X=t/h.Links;for(m=0;m<h.Links;m++)p[m]=new mxCell("",new mxGeometry(m*X,0,X,r),"fillColor=none;strokeColor=none;"),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["Link_"+(m+1)]),p[m].style+=l(h["Link_"+(m+1)],x);for(m=1;m<h.Links;m++)u[m]=new mxCell("",new mxGeometry(m/h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),u[m].geometry.relative=!0,u[m].geometry.offset=new mxPoint(-3,-5),u[m].vertex=!0,v.insert(u[m]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=c(v.style,
 h,e,v);p=[];X=t/(h.Buttons+1);for(m=0;m<=h.Buttons-1;m++)p[m]=m!=h.Selected-1?new mxCell("",new mxGeometry(0,0,X,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,X,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),p[m].geometry.relative=!0,p[m].geometry.offset=new mxPoint(m*X,0),p[m].vertex=!0,v.insert(p[m]),p[m].value=g(h["MenuItem_"+(m+1)]),p[m].style+=l(h["MenuItem_"+(m+1)],x);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+
-l(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(h.Text_prev);v.value=g(h.Text_prev)+" ";for(m=0;m<h.Links;m++)v.value+=g(h["Link_"+(m+1)])+" ";v.value+=g(h.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,h,e,v);for(var H=[],jb=[],Ob=[],L=r/h.Lines,M=null,m=0;m<h.Lines;m++)null!=h["Item_"+(m+1)]&&(null==M&&(M=""+a(h["Item_"+(m+1)])+d(h["Item_"+(m+1)])+k(h["Item_"+(m+1)])),H[m]=
-new mxCell("",new mxGeometry(0,m*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=M,H[m].value=g(h["Item_"+(m+1)])),null!=h.Icons[m+1]&&null!=H[m]&&("dot"==h.Icons[m+1]?(jb[m]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),jb[m].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[m+1]&&(jb[m]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),jb[m].geometry.offset=
-new mxPoint(6.5,-4)),null!=jb[m]&&(jb[m].geometry.relative=!0,jb[m].vertex=!0,H[m].insert(jb[m]),I=C(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),jb[m].style+=I)),null!=h["Shortcut_"+(m+1)]&&(null==M&&(M=""+a(h["Shortcut_"+(m+1)])+d(h["Shortcut_"+(m+1)])+k(h["Shortcut_"+(m+1)])),Ob[m]=new mxCell("",new mxGeometry(.6*t,m*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Ob[m].vertex=!0,v.insert(Ob[m]),Ob[m].style+=M,Ob[m].value=g(h["Shortcut_"+
-(m+1)])),null!=h.Dividers[m+1]&&(H[m]=new mxCell("",new mxGeometry(.05*t,m*r/h.Lines,.9*t,L),"shape=line;strokeWidth=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=C(h,e));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.value=g(h.Tip);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+h.RoundCorners+";"+l(h.Tip,x);v.style+=c(v.style,
+l(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+l(h.Text_prev);v.value=g(h.Text_prev)+" ";for(m=0;m<h.Links;m++)v.value+=g(h["Link_"+(m+1)])+" ";v.value+=g(h.Text_next);break;case "UI2ContextMenuBlock":v.style+=c(v.style,h,e,v);for(var H=[],jb=[],Qb=[],L=r/h.Lines,N=null,m=0;m<h.Lines;m++)null!=h["Item_"+(m+1)]&&(null==N&&(N=""+a(h["Item_"+(m+1)])+d(h["Item_"+(m+1)])+k(h["Item_"+(m+1)])),H[m]=
+new mxCell("",new mxGeometry(0,m*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N,H[m].value=g(h["Item_"+(m+1)])),null!=h.Icons[m+1]&&null!=H[m]&&("dot"==h.Icons[m+1]?(jb[m]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),jb[m].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[m+1]&&(jb[m]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),jb[m].geometry.offset=
+new mxPoint(6.5,-4)),null!=jb[m]&&(jb[m].geometry.relative=!0,jb[m].vertex=!0,H[m].insert(jb[m]),I=D(h,e),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),jb[m].style+=I)),null!=h["Shortcut_"+(m+1)]&&(null==N&&(N=""+a(h["Shortcut_"+(m+1)])+d(h["Shortcut_"+(m+1)])+k(h["Shortcut_"+(m+1)])),Qb[m]=new mxCell("",new mxGeometry(.6*t,m*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Qb[m].vertex=!0,v.insert(Qb[m]),Qb[m].style+=N,Qb[m].value=g(h["Shortcut_"+
+(m+1)])),null!=h.Dividers[m+1]&&(H[m]=new mxCell("",new mxGeometry(.05*t,m*r/h.Lines,.9*t,L),"shape=line;strokeWidth=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=D(h,e));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+";";break;case "UI2TooltipSquareBlock":v.value=g(h.Tip);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+h.RoundCorners+";"+l(h.Tip,x);v.style+=c(v.style,
 h,e,v,x);break;case "UI2CalloutBlock":v.value=g(h.Txt);v.style+="shape=ellipse;"+l(h.Txt,x);v.style+=c(v.style,h,e,v,x);break;case "UI2AlertBlock":v.value=g(h.Txt);v.style+=l(h.Txt,x);v.style+=c(v.style,h,e,v,x);p=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");p.vertex=!0;v.insert(p);p.value=g(h.Title);p.style+=l(h.Title,x);p.style+=c(p.style,h,e,p,x);u=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");u.geometry.relative=
-!0;u.geometry.offset=new mxPoint(-25,-10);u.vertex=!0;p.insert(u);for(var Kd=45*h.Buttons+(10*h.Buttons-1),F=[],m=0;m<h.Buttons;m++)F[m]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),F[m].geometry.relative=!0,F[m].geometry.offset=new mxPoint(.5*-Kd+55*m,-40),F[m].vertex=!0,v.insert(F[m]),F[m].value=g(h["Button_"+(m+1)]),F[m].style+=l(h["Button_"+(m+1)],x),F[m].style+=c(F[m].style,h,e,F[m],x);break;case "UMLClassBlock":if(0==h.Simple){var M=N(h,e),Ga=Math.round(.6*h.TitleHeight),M=M.replace("fillColor",
-"swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.value=g(h.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+Ga+";"+l(h.Title,x);v.style+=c(v.style,h,e,v,x);for(var H=[],Qc=[],Ca=Ga/r,m=0;m<=h.Attributes;m++)0<m&&(Qc[m]=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;"),
-Qc[m].vertex=!0,v.insert(Qc[m])),L=0,m<h.Attributes?(L=h["Text"+(m+1)+"Percent"],Ca+=L):L=1-Ca,H[m]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ga)*L)),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=M+G(h,e,H[m])+a(h["Text"+(m+1)])+d(h["Text"+(m+1)])+k(h["Text"+(m+1)]),H[m].value=g(h["Text"+(m+1)])}else v.value=
-g(h.Title),v.style+=l(h.Title,x),v.style+=c(v.style,h,e,v,x);break;case "ERDEntityBlock":M=N(h,e);Ga=.6*h.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+Ga+";"+l(h.Name,x);v.style+=c(v.style,h,e,v,x);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+N(h,e);H=[];
-Ca=Ga/r;for(m=0;m<h.Fields;m++)L=0,H[m]=new mxCell("",new mxGeometry(0,0,t,.6*h["Field"+(m+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=M+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;opacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=
-g(h["Field"+(m+1)]);break;case "ERDEntityBlock2":M=N(h,e);Ga=.6*h.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+Ga+";"+l(h.Name,x);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+N(h,e);v.style+=c(v.style,h,e,v,x);var H=[],Z=[],Ca=Ga,Ja=30;null!=h.Column1&&(Ja=.6*h.Column1);for(m=0;m<h.Fields;m++)L=0,Z[m]=new mxCell("",
-new mxGeometry(0,Ca,Ja,.6*h["Key"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Z[m].vertex=!0,v.insert(Z[m]),Z[m].style+=M+a(h["Key"+(m+1)])+d(h["Key"+(m+1)])+k(h["Key"+(m+1)]),Z[m].style=1==h.AltRows&&0!=m%2?Z[m].style+"fillColor=#000000;fillOpacity=5;":Z[m].style+("fillColor=none;"+G(h,e,Z[m])),Z[m].value=g(h["Key"+(m+1)]),H[m]=new mxCell("",new mxGeometry(Ja,
-Ca,t-Ja,.6*h["Field"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=M+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),v.style+=c(v.style,h,e,v),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=
-g(h["Field"+(m+1)]),Ca+=.6*h["Key"+(m+1)+"_h"];break;case "ERDEntityBlock3":M=N(h,e);Ga=.6*h.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+Ga+";"+l(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+N(h,e);v.value=g(h.Name);v.style+=c(v.style,h,e,v,x);H=[];Z=[];Ca=Ga;Ja=30;null!=h.Column1&&(Ja=.6*h.Column1);for(m=0;m<h.Fields;m++)L=
-0,Z[m]=new mxCell("",new mxGeometry(0,Ca,Ja,.6*h["Field"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Z[m].vertex=!0,v.insert(Z[m]),Z[m].style+=M+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),Z[m].style=1==h.AltRows&&0!=m%2?Z[m].style+"fillColor=#000000;fillOpacity=5;":Z[m].style+("fillColor=none;"+G(h,e,Z[m])),Z[m].value=g(h["Field"+(m+1)]),
-Z[m].style+=c(Z[m].style,h,e,Z[m],x),H[m]=new mxCell("",new mxGeometry(Ja,Ca,t-Ja,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=M+a(h["Type"+(m+1)])+d(h["Type"+(m+1)])+k(h["Type"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+
-("fillColor=none;"+G(h,e,H[m])),H[m].value=g(h["Type"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),Ca+=.6*h["Field"+(m+1)+"_h"];break;case "ERDEntityBlock4":M=N(h,e);Ga=.6*h.Name_h;M=M.replace("fillColor","swimlaneFillColor");""==M&&(M="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+M+"startSize="+Ga+";"+l(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+N(h,e);v.value=g(h.Name);v.style+=c(v.style,h,e,
-v,x);var H=[],Z=[],Ka=[],Ca=Ga,Ja=30,zc=40;null!=h.Column1&&(Ja=.6*h.Column1);null!=h.Column2&&(zc=.6*h.Column2);for(m=0;m<h.Fields;m++)L=0,Z[m]=new mxCell("",new mxGeometry(0,Ca,Ja,.6*h["Key"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Z[m].vertex=!0,v.insert(Z[m]),Z[m].style+=M+a(h["Key"+(m+1)])+d(h["Key"+(m+1)])+k(h["Key"+(m+1)]),Z[m].style=1==h.AltRows&&
-0!=m%2?Z[m].style+"fillColor=#000000;fillOpacity=5;":Z[m].style+("fillColor=none;"+G(h,e,Z[m])),Z[m].value=g(h["Key"+(m+1)]),Z[m].style+=c(Z[m].style,h,e,Z[m],x),H[m]=new mxCell("",new mxGeometry(Ja,Ca,t-Ja-zc,.6*h["Field"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=M+a(h["Field"+(m+
-1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),Ka[m]=new mxCell("",new mxGeometry(t-zc,Ca,zc,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-Ka[m].vertex=!0,v.insert(Ka[m]),Ka[m].style+=M+a(h["Type"+(m+1)])+d(h["Type"+(m+1)])+k(h["Type"+(m+1)]),Ka[m].style=1==h.AltRows&&0!=m%2?Ka[m].style+"fillColor=#000000;fillOpacity=5;":Ka[m].style+("fillColor=none;"+G(h,e,Ka[m])),Ka[m].value=g(h["Type"+(m+1)]),Ka[m].style+=c(Ka[m].style,h,e,Ka[m],x),Ca+=.6*h["Key"+(m+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":ea("application_system",t,r,v,h,e);break;case "GCPServiceCardAuthorizationBlock":ea("internal_payment_authorization",t,r,v,h,
+!0;u.geometry.offset=new mxPoint(-25,-10);u.vertex=!0;p.insert(u);for(var Rd=45*h.Buttons+(10*h.Buttons-1),F=[],m=0;m<h.Buttons;m++)F[m]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),F[m].geometry.relative=!0,F[m].geometry.offset=new mxPoint(.5*-Rd+55*m,-40),F[m].vertex=!0,v.insert(F[m]),F[m].value=g(h["Button_"+(m+1)]),F[m].style+=l(h["Button_"+(m+1)],x),F[m].style+=c(F[m].style,h,e,F[m],x);break;case "UMLClassBlock":if(0==h.Simple){var N=M(h,e),Ha=Math.round(.6*h.TitleHeight)||25,N=
+N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Title,x);v.style+=c(v.style,h,e,v,x);for(var H=[],Tc=[],Da=Ha/r,m=0;m<=h.Attributes;m++)0<m&&(Tc[m]=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;"),
+Tc[m].vertex=!0,v.insert(Tc[m])),L=0,0==h.Attributes?L=m=1:m<h.Attributes?(L=h["Text"+(m+1)+"Percent"],Da+=L):L=1-Da,H[m]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ha)*L)+(h.ExtraHeightSet&&1==m?.6*h.ExtraHeight:0)),"part=1;html=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+G(h,e,H[m])+a(h["Text"+(m+1)])+
+d(h["Text"+(m+1)])+k(h["Text"+(m+1)]),H[m].value=g(h["Text"+(m+1)])}else v.value=g(h.Title),v.style+=l(h.Title,x),v.style+=c(v.style,h,e,v,x);break;case "ERDEntityBlock":N=M(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Name,x);v.style+=c(v.style,
+h,e,v,x);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,e);H=[];Da=Ha/r;for(m=0;m<h.Fields;m++)L=0,H[m]=new mxCell("",new mxGeometry(0,0,t,.6*h["Field"+(m+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%
+2?H[m].style+"fillColor=#000000;opacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]);break;case "ERDEntityBlock2":N=M(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.value=g(h.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Name,x);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,e);v.style+=c(v.style,h,e,v,x);var H=
+[],aa=[],Da=Ha,Ka=30;null!=h.Column1&&(Ka=.6*h.Column1);for(m=0;m<h.Fields;m++)L=0,aa[m]=new mxCell("",new mxGeometry(0,Da,Ka,.6*h["Key"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;"),aa[m].vertex=!0,v.insert(aa[m]),aa[m].style+=N+a(h["Key"+(m+1)])+d(h["Key"+(m+1)])+k(h["Key"+(m+1)]),aa[m].style=1==h.AltRows&&0!=m%2?aa[m].style+"fillColor=#000000;fillOpacity=5;":
+aa[m].style+("fillColor=none;"+G(h,e,aa[m])),aa[m].value=g(h["Key"+(m+1)]),H[m]=new mxCell("",new mxGeometry(Ka,Da,t-Ka,.6*h["Field"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),v.style+=c(v.style,h,e,v),H[m].style=
+1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]),Da+=.6*h["Key"+(m+1)+"_h"];break;case "ERDEntityBlock3":N=M(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ha+";"+l(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,e);
+v.value=g(h.Name);v.style+=c(v.style,h,e,v,x);H=[];aa=[];Da=Ha;Ka=30;null!=h.Column1&&(Ka=.6*h.Column1);for(m=0;m<h.Fields;m++)L=0,aa[m]=new mxCell("",new mxGeometry(0,Da,Ka,.6*h["Field"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),aa[m].vertex=!0,v.insert(aa[m]),aa[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),aa[m].style=1==h.AltRows&&
+0!=m%2?aa[m].style+"fillColor=#000000;fillOpacity=5;":aa[m].style+("fillColor=none;"+G(h,e,aa[m])),aa[m].value=g(h["Field"+(m+1)]),aa[m].style+=c(aa[m].style,h,e,aa[m],x),H[m]=new mxCell("",new mxGeometry(Ka,Da,t-Ka,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Type"+
+(m+1)])+d(h["Type"+(m+1)])+k(h["Type"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=g(h["Type"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),Da+=.6*h["Field"+(m+1)+"_h"];break;case "ERDEntityBlock4":N=M(h,e);Ha=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+
+Ha+";"+l(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,e);v.value=g(h.Name);v.style+=c(v.style,h,e,v,x);var H=[],aa=[],La=[],Da=Ha,Ka=30,Cc=40;null!=h.Column1&&(Ka=.6*h.Column1);null!=h.Column2&&(Cc=.6*h.Column2);for(m=0;m<h.Fields;m++)L=0,aa[m]=new mxCell("",new mxGeometry(0,Da,Ka,.6*h["Key"+(m+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+aa[m].vertex=!0,v.insert(aa[m]),aa[m].style+=N+a(h["Key"+(m+1)])+d(h["Key"+(m+1)])+k(h["Key"+(m+1)]),aa[m].style=1==h.AltRows&&0!=m%2?aa[m].style+"fillColor=#000000;fillOpacity=5;":aa[m].style+("fillColor=none;"+G(h,e,aa[m])),aa[m].value=g(h["Key"+(m+1)]),aa[m].style+=c(aa[m].style,h,e,aa[m],x),H[m]=new mxCell("",new mxGeometry(Ka,Da,t-Ka-Cc,.6*h["Field"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+H[m].vertex=!0,v.insert(H[m]),H[m].style+=N+a(h["Field"+(m+1)])+d(h["Field"+(m+1)])+k(h["Field"+(m+1)]),H[m].style=1==h.AltRows&&0!=m%2?H[m].style+"fillColor=#000000;fillOpacity=5;":H[m].style+("fillColor=none;"+G(h,e,H[m])),H[m].value=g(h["Field"+(m+1)]),H[m].style+=c(H[m].style,h,e,H[m],x),La[m]=new mxCell("",new mxGeometry(t-Cc,Da,Cc,.6*h["Type"+(m+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+La[m].vertex=!0,v.insert(La[m]),La[m].style+=N+a(h["Type"+(m+1)])+d(h["Type"+(m+1)])+k(h["Type"+(m+1)]),La[m].style=1==h.AltRows&&0!=m%2?La[m].style+"fillColor=#000000;fillOpacity=5;":La[m].style+("fillColor=none;"+G(h,e,La[m])),La[m].value=g(h["Type"+(m+1)]),La[m].style+=c(La[m].style,h,e,La[m],x),Da+=.6*h["Key"+(m+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":ea("application_system",t,r,v,h,e);break;case "GCPServiceCardAuthorizationBlock":ea("internal_payment_authorization",t,r,v,h,
 e);break;case "GCPServiceCardBlankBlock":ea("blank",t,r,v,h,e);break;case "GCPServiceCardReallyBlankBlock":ea("blank",t,r,v,h,e);break;case "GCPServiceCardBucketBlock":ea("bucket",t,r,v,h,e);break;case "GCPServiceCardCDNInterconnectBlock":ea("google_network_edge_cache",t,r,v,h,e);break;case "GCPServiceCardCloudDNSBlock":ea("blank",t,r,v,h,e);break;case "GCPServiceCardClusterBlock":ea("cluster",t,r,v,h,e);break;case "GCPServiceCardDiskSnapshotBlock":ea("persistent_disk_snapshot",t,r,v,h,e);break;case "GCPServiceCardEdgePopBlock":ea("google_network_edge_cache",
 t,r,v,h,e);break;case "GCPServiceCardFrontEndPlatformServicesBlock":ea("frontend_platform_services",t,r,v,h,e);break;case "GCPServiceCardGatewayBlock":ea("gateway",t,r,v,h,e);break;case "GCPServiceCardGoogleNetworkBlock":ea("google_network_edge_cache",t,r,v,h,e);break;case "GCPServiceCardImageServicesBlock":ea("image_services",t,r,v,h,e);break;case "GCPServiceCardLoadBalancerBlock":ea("network_load_balancer",t,r,v,h,e);break;case "GCPServiceCardLocalComputeBlock":ea("dedicated_game_server",t,r,v,
 h,e);break;case "GCPServiceCardLocalStorageBlock":ea("persistent_disk_snapshot",t,r,v,h,e);break;case "GCPServiceCardLogsAPIBlock":ea("logs_api",t,r,v,h,e);break;case "GCPServiceCardMemcacheBlock":ea("memcache",t,r,v,h,e);break;case "GCPServiceCardNATBlock":ea("nat",t,r,v,h,e);break;case "GCPServiceCardPaymentFormBlock":ea("external_payment_form",t,r,v,h,e);break;case "GCPServiceCardPushNotificationsBlock":ea("push_notification_service",t,r,v,h,e);break;case "GCPServiceCardScheduledTasksBlock":ea("scheduled_tasks",
-t,r,v,h,e);break;case "GCPServiceCardServiceDiscoveryBlock":ea("service_discovery",t,r,v,h,e);break;case "GCPServiceCardSquidProxyBlock":ea("squid_proxy",t,r,v,h,e);break;case "GCPServiceCardTaskQueuesBlock":ea("task_queues",t,r,v,h,e);break;case "GCPServiceCardVirtualFileSystemBlock":ea("virtual_file_system",t,r,v,h,e);break;case "GCPServiceCardVPNGatewayBlock":ea("gateway",t,r,v,h,e);break;case "GCPInputDatabase":la("database",1,.9,t,r,v,h,e);break;case "GCPInputRecord":la("record",1,.66,t,r,v,
-h,e);break;case "GCPInputPayment":la("payment",1,.8,t,r,v,h,e);break;case "GCPInputGateway":la("gateway_icon",1,.44,t,r,v,h,e);break;case "GCPInputLocalCompute":la("compute_engine_icon",1,.89,t,r,v,h,e);break;case "GCPInputBeacon":la("beacon",.73,1,t,r,v,h,e);break;case "GCPInputStorage":la("storage",1,.8,t,r,v,h,e);break;case "GCPInputList":la("list",.89,1,t,r,v,h,e);break;case "GCPInputStream":la("stream",1,.82,t,r,v,h,e);break;case "GCPInputMobileDevices":la("mobile_devices",1,.73,t,r,v,h,e);break;
-case "GCPInputCircuitBoard":la("circuit_board",1,.9,t,r,v,h,e);break;case "GCPInputLive":la("live",.74,1,t,r,v,h,e);break;case "GCPInputUsers":la("users",1,.63,t,r,v,h,e);break;case "GCPInputLaptop":la("laptop",1,.66,t,r,v,h,e);break;case "GCPInputApplication":la("application",1,.8,t,r,v,h,e);break;case "GCPInputLightbulb":la("lightbulb",.7,1,t,r,v,h,e);break;case "GCPInputGame":la("game",1,.54,t,r,v,h,e);break;case "GCPInputDesktop":la("desktop",1,.9,t,r,v,h,e);break;case "GCPInputDesktopAndMobile":la("desktop_and_mobile",
-1,.66,t,r,v,h,e);break;case "GCPInputWebcam":la("webcam",.5,1,t,r,v,h,e);break;case "GCPInputSpeaker":la("speaker",.7,1,t,r,v,h,e);break;case "GCPInputRetail":la("retail",1,.89,t,r,v,h,e);break;case "GCPInputReport":la("report",1,1,t,r,v,h,e);break;case "GCPInputPhone":la("phone",.64,1,t,r,v,h,e);break;case "GCPInputBlank":la("transparent",1,1,t,r,v,h,e);break;case "PresentationFrameBlock":0==h.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=l(h.Text),v.value=g(h.Text),v.style+=c(v.style,
-h,e,v,x));break;case "SVGPathBlock2":try{for(var Ld=h.LineWidth,Md=h.LineColor,Nd=h.FillColor,qd=h.DrawData.Data,pc='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',m=0;m<qd.length;m++)var Db=qd[m],Od=Db.a,Pd="prop"==Db.w?Ld:Db.w,Ab="prop"==Db.s?Md:Db.s,I="prop"==Db.f?Nd:Db.f,pc=pc+('<path d="'+Od+'" fill="'+I+'" stroke="'+Ab+'" stroke-width="'+Pd+'"/>');pc+="</svg>";v.style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+
-(window.btoa?btoa(pc):Base64.encode(pc,!0))}catch(Id){}}return v}var x=!1,Ac=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],Bc=["fpDoor"],yb={None:"none;",Arrow:"block;endFill=1;","Hollow Arrow":"block;endFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10;","CFN ERD Many Arrow":"ERmany;startSize=10;","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10;",
-"CFN ERD One Arrow":"ERone;startSize=16;",Generalization:"block;endFill=0;startSize=12;","Big Open Arrow":"open;startSize=10;",Asynch1:"openAsync;flipH=1;startSize=10;",Asynch2:"openAsync;startSize=10;",Aggregation:"diamond;endFill=0;startSize=16;",Composition:"diamond;endFill=1;startSize=16;",BlockEnd:"none;endFill=1;startSize=16;",Measure:"ERone;startSize=10;"},xb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",
-DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",PreparationBlock:"shape=hexagon;perimeter=hexagonPerimeter2",DataBlock:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",
-DataBlockNew:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DatabaseBlock:"shape=cylinder;size=0.1;anchorPointDirection=0;boundedLbl=1;",DirectAccessStorageBlock:"shape=cylinder;direction=south;size=0.1;anchorPointDirection=0;boundedLbl=1;",InternalStorageBlock:"shape=internalStorage;dx=10;dy=10",PaperTapeBlock:"shape=tape;size=0.2",ManualOperationBlockNew:"shape=trapezoid;perimeter=trapezoidPerimeter;anchorPointDirection=0;flipV=1",DelayBlock:"shape=delay",StoredDataBlock:"shape=dataStorage",
-MergeBlock:"triangle;direction=south;anchorPointDirection=0",ConnectorBlock:"ellipse",OrBlock:"shape=mxgraph.flowchart.summing_function",SummingJunctionBlock:"shape=mxgraph.flowchart.or",DisplayBlock:"shape=display",OffPageLinkBlock:"shape=offPageConnector",BraceNoteBlock:"mxCompositeShape",NoteBlock:"shape=partialRectangle;right=0",AdvancedSwimLaneBlock:"mxCompositeShape",AdvancedSwimLaneBlockRotated:"mxCompositeShape",RectangleContainerBlock:"container=1;collapsible=0",DiamondContainerBlock:"shape=rhombus;fillColor=none;container=1",
-RoundedRectangleContainerBlock:"fillColor=none;container=1;rounded=1;absoluteArcSize=1;arcSize=24",CircleContainerBlock:"shape=ellipse;fillColor=none;container=1",PillContainerBlock:"arcSize=50;fillColor=none;container=1",IsoscelesTriangleBlock:"triangle;direction=north;anchorPointDirection=0",RightTriangleBlock:"shape=mxgraph.basic.orthogonal_triangle",PentagonBlock:"shape=mxgraph.basic.pentagon",HexagonBlock:"shape=hexagon;perimeter=hexagonPerimeter2",OctagonBlock:"shape=mxgraph.basic.octagon",
-CrossBlock:"shape=cross;size=0.6",CloudBlock:"ellipse;shape=cloud",HeartBlock:"shape=mxgraph.basic.heart",RightArrowBlock:"shape=singleArrow;arrowWidth=0.5;arrowSize=0.3",DoubleArrowBlock:"shape=doubleArrow;arrowWidth=0.5;arrowSize=0.3",CalloutBlock:"shape=mxgraph.basic.rectangular_callout",ShapeCircleBlock:"ellipse",ShapePolyStarBlock:"shape=mxgraph.basic.star",ShapeDiamondBlock:"rhombus",UI2HotspotBlock:"opacity=50;strokeColor=none",AndroidDevice:"mxCompositeShape",AndroidAlertDialog:"mxCompositeShape",
-AndroidDateDialog:"mxCompositeShape",AndroidTimeDialog:"mxCompositeShape",AndroidListItems:"mxCompositeShape",AndroidTabs:"mxCompositeShape",AndroidProgressBar:"mxCompositeShape",AndroidImageBlock:"mxCompositeShape",AndroidTextBlock:"mxCompositeShape",AndroidActionBar:"mxCompositeShape",AndroidButton:"mxCompositeShape",AndroidTextBox:"mxCompositeShape",AndroidRadioButton:"mxCompositeShape",AndroidCheckBox:"mxCompositeShape",AndroidToggle:"mxCompositeShape",AndroidSlider:"mxCompositeShape",AndroidIconCheck:"shape=mxgraph.ios7.misc.check",
-AndroidIconCancel:"shape=mxgraph.atlassian.x",AndroidIconCollapse:"shape=mxgraph.ios7.misc.up",AndroidIconExpand:"shape=mxgraph.ios7.misc.down",AndroidIconNext:"shape=mxgraph.ios7.misc.right",AndroidIconPrevious:"shape=mxgraph.ios7.misc.left",AndroidIconRefresh:NaN,AndroidIconInformation:"shape=mxgraph.ios7.icons.info",AndroidIconSearch:"shape=mxgraph.ios7.icons.looking_glass",AndroidIconSettings:"shape=mxgraph.ios7.icons.volume;direction=south",AndroidIconTrash:"shape=mxgraph.ios7.icons.trashcan",
-AndroidIconEmail:"shape=mxgraph.mockup.misc.mail2",AndroidIconNew:"shape=mxgraph.ios7.misc.flagged",iOSDeviceiPhoneSE:"shape=mxgraph.ios7.misc.iphone",iOSDeviceiPhone6s:"shape=mxgraph.ios7.misc.iphone",iOSDeviceiPhone6sPlus:"shape=mxgraph.ios7.misc.iphone",iOSDeviceiPadPortrait:"shape=mxgraph.ios7.misc.ipad7inch",iOSDeviceiPadLandscape:"shape=mxgraph.ios7.misc.ipad7inch",iOSDeviceiPadProPortrait:"shape=mxgraph.ios7.misc.ipad7inch",iOSDeviceiPadProLandscape:"shape=mxgraph.ios7.misc.ipad10inch",iOSButton:"fillColor=none;strokeColor=none;",
-iOSSegmentedControl:"mxCompositeShape",iOSStepper:"shape=mxgraph.ios7.misc.adjust",iOSToggle:"shape=mxgraph.ios7ui.onOffButton;buttonState=on;strokeColor2=#aaaaaa;fillColor2=#ffffff",iOSSlider:"mxCompositeShape",iOSProgressBar:"mxCompositeShape",iOSPageControls:"mxCompositeShape",iOSStatusBar:"mxCompositeShape",iOSSearchBar:"mxCompositeShape",iOSNavBar:"mxCompositeShape",iOSTabs:"mxCompositeShape",iOSUniversalKeyboard:"shape=mxgraph.ios.iKeybLett",iOSDatePicker:"mxCompositeShape",iOSTimePicker:"mxCompositeShape",
-iOSCountdownPicker:"mxCompositeShape",iOSBasicCell:"mxCompositeShape",iOSSubtitleCell:"mxCompositeShape",iOSRightDetailCell:"mxCompositeShape",iOSLeftDetailCell:"mxCompositeShape",iOSTableGroupedSectionBreak:"mxCompositeShape",iOSTablePlainHeaderFooter:"mxCompositeShape",MindMapBlock:"",MindMapStadiumBlock:"arcSize=50",MindMapCloud:"shape=cloud",MindMapCircle:"shape=ellipse",MindMapIsoscelesTriangleBlock:"shape=triangle;direction=north",MindMapDiamondBlock:"shape=rhombus",MindMapPentagonBlock:"shape=mxgraph.basic.pentagon",
-MindMapHexagonBlock:"shape=hexagon;perimeter=hexagonPerimeter2",MindMapOctagonBlock:"shape=mxgraph.basic.octagon",MindMapCrossBlock:"shape=mxgraph.basic.cross2;dx=20",ERDEntityBlock:"mxCompositeShape",ERDEntityBlock2:"mxCompositeShape",ERDEntityBlock3:"mxCompositeShape",ERDEntityBlock4:"mxCompositeShape",UMLClassBlock:"mxCompositeShape",UMLActiveClassBlock:"shape=process",UMLMultiplicityBlock:"mxCompositeShape",UMLPackageBlock:"shape=folder;tabPosition=left",UMLConstraintBlock:"mxCompositeShape",
-UMLNoteBlock:"shape=note;size=15",UMLTextBlock:"mxCompositeShape",UMLActorBlock:"shape=umlActor;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;whiteSpace=nowrap",UMLUseCaseBlock:"shape=ellipse",UMLCircleContainerBlock:"shape=ellipse;container=1",UMLRectangleContainerBlock:"container=1",UMLOptionLoopBlock:"shape=mxgraph.sysml.package2;xSize=90;overflow=fill",UMLAlternativeBlock2:"shape=mxgraph.sysml.package2;xSize=90;overflow=fill",UMLStartBlock:"shape=ellipse;fillColor=#000000",
-UMLStateBlock:"rounded=1;arcSize=20",UMLDecisionBlock:"shape=rhombus;",UMLHForkJoinBlock:"fillColor=#000000",UMLVForkJoinBlock:"fillColor=#000000",UMLFlowFinalBlock:"shape=mxgraph.flowchart.or",UMLHistoryStateBlock:"shape=ellipse",UMLEndBlock:"shape=mxgraph.bpmn.shape;outline=end;symbol=terminate;strokeColor=#000000;fillColor=#ffffff",UMLObjectBlock:"",UMLSendSignalBlock:"shape=mxgraph.sysml.sendSigAct",UMLReceiveSignalBlock:"shape=mxgraph.sysml.accEvent;flipH=1",UMLAcceptTimeEventActionBlock:"shape=mxgraph.sysml.timeEvent",
-UMLOffPageLinkBlock:"shape=mxgraph.sysml.sendSigAct;direction=south",UMLMultiLanePoolBlock:"mxCompositeShape",UMLMultiLanePoolRotatedBlock:"mxCompositeShape",UMLMultidimensionalSwimlane:"mxCompositeShape",UMLActivationBlock:"",UMLDeletionBlock:"shape=mxgraph.sysml.x;strokeWidth=4",UMLSeqEntityBlock:"shape=mxgraph.electrical.radio.microphone_1;direction=north",UMLComponentBlock:"shape=component;align=left;spacingLeft=36",UMLNodeBlock:"shape=cube;size=12;flipH=1",UMLComponentInterfaceBlock:"shape=ellipse",
-UMLComponentBoxBlock:"mxCompositeShape",UMLProvidedInterfaceBlock:"shape=lollipop;direction=south",UMLRequiredInterfaceBlock:"shape=requires;direction=north",UMLSwimLaneBlockV2:"mxCompositeShape",UMLEntityBlock:"",UMLWeakEntityBlock:"shape=ext;double=1",UMLAttributeBlock:"shape=ellipse",UMLMultivaluedAttributeBlock:"shape=doubleEllipse",UMLRelationshipBlock:"shape=rhombus",UMLWeakRelationshipBlock:"shape=rhombus;double=1",BPMNActivity:"mxCompositeShape",BPMNEvent:"mxCompositeShape",BPMNChoreography:"mxCompositeShape",
-BPMNConversation:"mxCompositeShape",BPMNGateway:"mxCompositeShape",BPMNData:"mxCompositeShape",BPMNDataStore:"shape=datastore",BPMNAdvancedPoolBlock:"mxCompositeShape",BPMNAdvancedPoolBlockRotated:"mxCompositeShape",BPMNBlackPool:"mxCompositeShape",DFDExternalEntityBlock:"mxCompositeShape",DFDExternalEntityBlock2:"",YDMDFDProcessBlock:"shape=ellipse",YDMDFDDataStoreBlock:"shape=partialRectangle;right=0;left=0",GSDFDProcessBlock:"shape=swimlane;rounded=1;arcSize=10",GSDFDProcessBlock2:"rounded=1;arcSize=10;",
-GSDFDDataStoreBlock:"mxCompositeShape",GSDFDDataStoreBlock2:"shape=partialRectangle;right=0",OrgBlock:"",DefaultTableBlock:"mxCompositeShape",VSMCustomerSupplierBlock:"shape=mxgraph.lean_mapping.outside_sources",VSMDedicatedProcessBlock:"mxCompositeShape",VSMSharedProcessBlock:"mxCompositeShape",VSMWorkcellBlock:"mxCompositeShape",VSMDatacellBlock:"mxCompositeShape",VSMInventoryBlock:"mxCompositeShape",VSMSupermarketBlock:"mxCompositeShape",VSMPhysicalPullBlock:"shape=mxgraph.lean_mapping.physical_pull;direction=south",
+t,r,v,h,e);break;case "GCPServiceCardServiceDiscoveryBlock":ea("service_discovery",t,r,v,h,e);break;case "GCPServiceCardSquidProxyBlock":ea("squid_proxy",t,r,v,h,e);break;case "GCPServiceCardTaskQueuesBlock":ea("task_queues",t,r,v,h,e);break;case "GCPServiceCardVirtualFileSystemBlock":ea("virtual_file_system",t,r,v,h,e);break;case "GCPServiceCardVPNGatewayBlock":ea("gateway",t,r,v,h,e);break;case "GCPInputDatabase":ja("database",1,.9,t,r,v,h,e);break;case "GCPInputRecord":ja("record",1,.66,t,r,v,
+h,e);break;case "GCPInputPayment":ja("payment",1,.8,t,r,v,h,e);break;case "GCPInputGateway":ja("gateway_icon",1,.44,t,r,v,h,e);break;case "GCPInputLocalCompute":ja("compute_engine_icon",1,.89,t,r,v,h,e);break;case "GCPInputBeacon":ja("beacon",.73,1,t,r,v,h,e);break;case "GCPInputStorage":ja("storage",1,.8,t,r,v,h,e);break;case "GCPInputList":ja("list",.89,1,t,r,v,h,e);break;case "GCPInputStream":ja("stream",1,.82,t,r,v,h,e);break;case "GCPInputMobileDevices":ja("mobile_devices",1,.73,t,r,v,h,e);break;
+case "GCPInputCircuitBoard":ja("circuit_board",1,.9,t,r,v,h,e);break;case "GCPInputLive":ja("live",.74,1,t,r,v,h,e);break;case "GCPInputUsers":ja("users",1,.63,t,r,v,h,e);break;case "GCPInputLaptop":ja("laptop",1,.66,t,r,v,h,e);break;case "GCPInputApplication":ja("application",1,.8,t,r,v,h,e);break;case "GCPInputLightbulb":ja("lightbulb",.7,1,t,r,v,h,e);break;case "GCPInputGame":ja("game",1,.54,t,r,v,h,e);break;case "GCPInputDesktop":ja("desktop",1,.9,t,r,v,h,e);break;case "GCPInputDesktopAndMobile":ja("desktop_and_mobile",
+1,.66,t,r,v,h,e);break;case "GCPInputWebcam":ja("webcam",.5,1,t,r,v,h,e);break;case "GCPInputSpeaker":ja("speaker",.7,1,t,r,v,h,e);break;case "GCPInputRetail":ja("retail",1,.89,t,r,v,h,e);break;case "GCPInputReport":ja("report",1,1,t,r,v,h,e);break;case "GCPInputPhone":ja("phone",.64,1,t,r,v,h,e);break;case "GCPInputBlank":ja("transparent",1,1,t,r,v,h,e);break;case "PresentationFrameBlock":0==h.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=l(h.Text),v.value=g(h.Text),v.style+=c(v.style,
+h,e,v,x));break;case "SVGPathBlock2":try{for(var Sd=h.LineWidth,Td=h.LineColor,Ud=h.FillColor,vd=h.DrawData.Data,sc='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',m=0;m<vd.length;m++)var Fb=vd[m],Vd=Fb.a,Wd="prop"==Fb.w?Sd:Fb.w,Cb="prop"==Fb.s?Td:Fb.s,I="prop"==Fb.f?Ud:Fb.f,sc=sc+('<path d="'+Vd+'" fill="'+I+'" stroke="'+Cb+'" stroke-width="'+Wd+'"/>');sc+="</svg>";v.style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+
+(window.btoa?btoa(sc):Base64.encode(sc,!0))}catch(Pd){}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");return v}var pb=0,qb=0,x=!1,Dc=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],Ec=["fpDoor"],Ab={None:"none;",Arrow:"block;endFill=1;","Hollow Arrow":"block;endFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10;","CFN ERD Many Arrow":"ERmany;startSize=10;",
+"CFN ERD Exactly One Arrow":"ERmandOne;startSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10;","CFN ERD One Arrow":"ERone;startSize=16;",Generalization:"block;endFill=0;startSize=12;","Big Open Arrow":"open;startSize=10;",Asynch1:"openAsync;flipH=1;startSize=10;",Asynch2:"openAsync;startSize=10;",Aggregation:"diamond;endFill=0;startSize=16;",Composition:"diamond;endFill=1;startSize=16;",BlockEnd:"none;endFill=1;startSize=16;",Measure:"ERone;startSize=10;"},zb={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",
+DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"",DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",
+PreparationBlock:"shape=hexagon;perimeter=hexagonPerimeter2",DataBlock:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DataBlockNew:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DatabaseBlock:"shape=cylinder;size=0.1;anchorPointDirection=0;boundedLbl=1;",DirectAccessStorageBlock:"shape=cylinder;direction=south;size=0.1;anchorPointDirection=0;boundedLbl=1;",InternalStorageBlock:"shape=internalStorage;dx=10;dy=10",PaperTapeBlock:"shape=tape;size=0.2",
+ManualOperationBlockNew:"shape=trapezoid;perimeter=trapezoidPerimeter;anchorPointDirection=0;flipV=1",DelayBlock:"shape=delay",StoredDataBlock:"shape=dataStorage",MergeBlock:"triangle;direction=south;anchorPointDirection=0",ConnectorBlock:"ellipse",OrBlock:"shape=mxgraph.flowchart.summing_function",SummingJunctionBlock:"shape=mxgraph.flowchart.or",DisplayBlock:"shape=display",OffPageLinkBlock:"shape=offPageConnector",BraceNoteBlock:"mxCompositeShape",NoteBlock:"shape=partialRectangle;right=0",AdvancedSwimLaneBlock:"mxCompositeShape",
+AdvancedSwimLaneBlockRotated:"mxCompositeShape",RectangleContainerBlock:"container=1;collapsible=0",DiamondContainerBlock:"shape=rhombus;fillColor=none;container=1",RoundedRectangleContainerBlock:"fillColor=none;container=1;rounded=1;absoluteArcSize=1;arcSize=24",CircleContainerBlock:"shape=ellipse;fillColor=none;container=1",PillContainerBlock:"arcSize=50;fillColor=none;container=1",IsoscelesTriangleBlock:"triangle;direction=north;anchorPointDirection=0",RightTriangleBlock:"shape=mxgraph.basic.orthogonal_triangle",
+PentagonBlock:"shape=mxgraph.basic.pentagon",HexagonBlock:"shape=hexagon;perimeter=hexagonPerimeter2",OctagonBlock:"shape=mxgraph.basic.octagon",CrossBlock:"shape=cross;size=0.6",CloudBlock:"ellipse;shape=cloud",HeartBlock:"shape=mxgraph.basic.heart",RightArrowBlock:"shape=singleArrow;arrowWidth=0.5;arrowSize=0.3",DoubleArrowBlock:"shape=doubleArrow;arrowWidth=0.5;arrowSize=0.3",CalloutBlock:"shape=mxgraph.basic.rectangular_callout",ShapeCircleBlock:"ellipse",ShapePolyStarBlock:"shape=mxgraph.basic.star",
+ShapeDiamondBlock:"rhombus",UI2HotspotBlock:"opacity=50;strokeColor=none",AndroidDevice:"mxCompositeShape",AndroidAlertDialog:"mxCompositeShape",AndroidDateDialog:"mxCompositeShape",AndroidTimeDialog:"mxCompositeShape",AndroidListItems:"mxCompositeShape",AndroidTabs:"mxCompositeShape",AndroidProgressBar:"mxCompositeShape",AndroidImageBlock:"mxCompositeShape",AndroidTextBlock:"mxCompositeShape",AndroidActionBar:"mxCompositeShape",AndroidButton:"mxCompositeShape",AndroidTextBox:"mxCompositeShape",AndroidRadioButton:"mxCompositeShape",
+AndroidCheckBox:"mxCompositeShape",AndroidToggle:"mxCompositeShape",AndroidSlider:"mxCompositeShape",AndroidIconCheck:"shape=mxgraph.ios7.misc.check",AndroidIconCancel:"shape=mxgraph.atlassian.x",AndroidIconCollapse:"shape=mxgraph.ios7.misc.up",AndroidIconExpand:"shape=mxgraph.ios7.misc.down",AndroidIconNext:"shape=mxgraph.ios7.misc.right",AndroidIconPrevious:"shape=mxgraph.ios7.misc.left",AndroidIconRefresh:NaN,AndroidIconInformation:"shape=mxgraph.ios7.icons.info",AndroidIconSearch:"shape=mxgraph.ios7.icons.looking_glass",
+AndroidIconSettings:"shape=mxgraph.ios7.icons.volume;direction=south",AndroidIconTrash:"shape=mxgraph.ios7.icons.trashcan",AndroidIconEmail:"shape=mxgraph.mockup.misc.mail2",AndroidIconNew:"shape=mxgraph.ios7.misc.flagged",iOSDeviceiPhoneSE:"shape=mxgraph.ios7.misc.iphone",iOSDeviceiPhone6s:"shape=mxgraph.ios7.misc.iphone",iOSDeviceiPhone6sPlus:"shape=mxgraph.ios7.misc.iphone",iOSDeviceiPadPortrait:"shape=mxgraph.ios7.misc.ipad7inch",iOSDeviceiPadLandscape:"shape=mxgraph.ios7.misc.ipad7inch",iOSDeviceiPadProPortrait:"shape=mxgraph.ios7.misc.ipad7inch",
+iOSDeviceiPadProLandscape:"shape=mxgraph.ios7.misc.ipad10inch",iOSButton:"fillColor=none;strokeColor=none;",iOSSegmentedControl:"mxCompositeShape",iOSStepper:"shape=mxgraph.ios7.misc.adjust",iOSToggle:"shape=mxgraph.ios7ui.onOffButton;buttonState=on;strokeColor2=#aaaaaa;fillColor2=#ffffff",iOSSlider:"mxCompositeShape",iOSProgressBar:"mxCompositeShape",iOSPageControls:"mxCompositeShape",iOSStatusBar:"mxCompositeShape",iOSSearchBar:"mxCompositeShape",iOSNavBar:"mxCompositeShape",iOSTabs:"mxCompositeShape",
+iOSUniversalKeyboard:"shape=mxgraph.ios.iKeybLett",iOSDatePicker:"mxCompositeShape",iOSTimePicker:"mxCompositeShape",iOSCountdownPicker:"mxCompositeShape",iOSBasicCell:"mxCompositeShape",iOSSubtitleCell:"mxCompositeShape",iOSRightDetailCell:"mxCompositeShape",iOSLeftDetailCell:"mxCompositeShape",iOSTableGroupedSectionBreak:"mxCompositeShape",iOSTablePlainHeaderFooter:"mxCompositeShape",MindMapBlock:"",MindMapStadiumBlock:"arcSize=50",MindMapCloud:"shape=cloud",MindMapCircle:"shape=ellipse",MindMapIsoscelesTriangleBlock:"shape=triangle;direction=north",
+MindMapDiamondBlock:"shape=rhombus",MindMapPentagonBlock:"shape=mxgraph.basic.pentagon",MindMapHexagonBlock:"shape=hexagon;perimeter=hexagonPerimeter2",MindMapOctagonBlock:"shape=mxgraph.basic.octagon",MindMapCrossBlock:"shape=mxgraph.basic.cross2;dx=20",ERDEntityBlock:"mxCompositeShape",ERDEntityBlock2:"mxCompositeShape",ERDEntityBlock3:"mxCompositeShape",ERDEntityBlock4:"mxCompositeShape",UMLClassBlock:"mxCompositeShape",UMLActiveClassBlock:"shape=process",UMLMultiplicityBlock:"mxCompositeShape",
+UMLPackageBlock:"shape=folder;tabPosition=left",UMLConstraintBlock:"mxCompositeShape",UMLNoteBlock:"shape=note;size=15",UMLTextBlock:"mxCompositeShape",UMLActorBlock:"shape=umlActor;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;whiteSpace=nowrap",UMLUseCaseBlock:"shape=ellipse",UMLCircleContainerBlock:"shape=ellipse;container=1",UMLRectangleContainerBlock:"container=1",UMLOptionLoopBlock:"shape=mxgraph.sysml.package2;xSize=90;overflow=fill",UMLAlternativeBlock2:"shape=mxgraph.sysml.package2;xSize=90;overflow=fill",
+UMLStartBlock:"shape=ellipse;fillColor=#000000",UMLStateBlock:"rounded=1;arcSize=20",UMLDecisionBlock:"shape=rhombus;",UMLHForkJoinBlock:"fillColor=#000000",UMLVForkJoinBlock:"fillColor=#000000",UMLFlowFinalBlock:"shape=mxgraph.flowchart.or",UMLHistoryStateBlock:"shape=ellipse",UMLEndBlock:"shape=mxgraph.bpmn.shape;outline=end;symbol=terminate;strokeColor=#000000;fillColor=#ffffff",UMLObjectBlock:"",UMLSendSignalBlock:"shape=mxgraph.sysml.sendSigAct",UMLReceiveSignalBlock:"shape=mxgraph.sysml.accEvent;flipH=1",
+UMLAcceptTimeEventActionBlock:"shape=mxgraph.sysml.timeEvent",UMLOffPageLinkBlock:"shape=mxgraph.sysml.sendSigAct;direction=south",UMLMultiLanePoolBlock:"mxCompositeShape",UMLMultiLanePoolRotatedBlock:"mxCompositeShape",UMLMultidimensionalSwimlane:"mxCompositeShape",UMLActivationBlock:"",UMLDeletionBlock:"shape=mxgraph.sysml.x;strokeWidth=4",UMLSeqEntityBlock:"shape=mxgraph.electrical.radio.microphone_1;direction=north",UMLComponentBlock:"shape=component;align=left;spacingLeft=36",UMLNodeBlock:"shape=cube;size=12;flipH=1",
+UMLComponentInterfaceBlock:"shape=ellipse",UMLComponentBoxBlock:"mxCompositeShape",UMLProvidedInterfaceBlock:"shape=lollipop;direction=south",UMLRequiredInterfaceBlock:"shape=requires;direction=north",UMLSwimLaneBlockV2:"mxCompositeShape",UMLEntityBlock:"",UMLWeakEntityBlock:"shape=ext;double=1",UMLAttributeBlock:"shape=ellipse",UMLMultivaluedAttributeBlock:"shape=doubleEllipse",UMLRelationshipBlock:"shape=rhombus",UMLWeakRelationshipBlock:"shape=rhombus;double=1",BPMNActivity:"mxCompositeShape",
+BPMNEvent:"mxCompositeShape",BPMNChoreography:"mxCompositeShape",BPMNConversation:"mxCompositeShape",BPMNGateway:"mxCompositeShape",BPMNData:"mxCompositeShape",BPMNDataStore:"shape=datastore",BPMNAdvancedPoolBlock:"mxCompositeShape",BPMNAdvancedPoolBlockRotated:"mxCompositeShape",BPMNBlackPool:"mxCompositeShape",DFDExternalEntityBlock:"mxCompositeShape",DFDExternalEntityBlock2:"",YDMDFDProcessBlock:"shape=ellipse",YDMDFDDataStoreBlock:"shape=partialRectangle;right=0;left=0",GSDFDProcessBlock:"shape=swimlane;rounded=1;arcSize=10",
+GSDFDProcessBlock2:"rounded=1;arcSize=10;",GSDFDDataStoreBlock:"mxCompositeShape",GSDFDDataStoreBlock2:"shape=partialRectangle;right=0",OrgBlock:"",DefaultTableBlock:"mxCompositeShape",VSMCustomerSupplierBlock:"shape=mxgraph.lean_mapping.outside_sources",VSMDedicatedProcessBlock:"mxCompositeShape",VSMSharedProcessBlock:"mxCompositeShape",VSMWorkcellBlock:"mxCompositeShape",VSMDatacellBlock:"mxCompositeShape",VSMInventoryBlock:"mxCompositeShape",VSMSupermarketBlock:"mxCompositeShape",VSMPhysicalPullBlock:"shape=mxgraph.lean_mapping.physical_pull;direction=south",
 VSMFIFOLaneBlock:"mxCompositeShape",VSMSafetyBufferStockBlock:"mxCompositeShape",VSMExternalShipmentAirplaneBlock:"shape=mxgraph.lean_mapping.airplane_7",VSMExternalShipmentForkliftBlock:"shape=mxgraph.lean_mapping.move_by_forklift",VSMExternalShipmentTruckBlock:"shape=mxgraph.lean_mapping.truck_shipment",VSMExternalShipmentBoatBlock:"shape=mxgraph.lean_mapping.boat_shipment",VSMProductionControlBlock:"mxCompositeShape",VSMOtherInformationBlock:"",VSMSequencedPullBallBlock:"shape=mxgraph.lean_mapping.sequenced_pull_ball",
 VSMMRPERPBlock:"shape=mxgraph.lean_mapping.mrp_erp;whiteSpace=wrap",VSMLoadLevelingBlock:"shape=mxgraph.lean_mapping.load_leveling",VSMGoSeeBlock:"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1",VSMGoSeeProductionBlock:"mxCompositeShape",VSMVerbalInfoBlock:"shape=mxgraph.lean_mapping.verbal",VSMKaizenBurstBlock:"shape=mxgraph.lean_mapping.kaizen_lightening_burst",VSMOperatorBlock:"shape=mxgraph.lean_mapping.operator;flipV=1",VSMTimelineBlock:"mxCompositeShape",VSMQualityProblemBlock:"shape=mxgraph.lean_mapping.quality_problem",
 VSMProductionKanbanSingleBlock:"shape=card;size=18;flipH=1;",VSMProductionKanbanBatchBlock:"mxCompositeShape",VSMWithdrawalKanbanBlock:"shape=mxgraph.lean_mapping.withdrawal_kanban",VSMSignalKanbanBlock:"shape=triangle;direction=south;anchorPointDirection=0",VSMKanbanPostBlock:"shape=mxgraph.lean_mapping.kanban_post",VSMShipmentArrow:"shape=singleArrow;arrowWidth=0.5;arrowSize=0.13",VSMPushArrow:"shape=mxgraph.lean_mapping.push_arrow",AWSElasticComputeCloudBlock2:"mxCompositeShape",AWSInstanceBlock2:"strokeColor=none;shape=mxgraph.aws3.instance",
@@ -889,47 +892,47 @@ SMShopping:"shape=mxgraph.sitemap.shopping;strokeColor=#000000;fillColor=#E6E6E6
 SMSettings:"shape=mxgraph.sitemap.settings;strokeColor=#000000;fillColor=#E6E6E6",SMSitemap:"shape=mxgraph.sitemap.sitemap;strokeColor=#000000;fillColor=#E6E6E6",SMSuccess:"shape=mxgraph.sitemap.success;strokeColor=#000000;fillColor=#E6E6E6",SMVideo:"shape=mxgraph.sitemap.video;strokeColor=#000000;fillColor=#E6E6E6",SMAudio:"shape=mxgraph.sitemap.audio;strokeColor=#000000;fillColor=#E6E6E6",SMBlog:"shape=mxgraph.sitemap.blog;strokeColor=#000000;fillColor=#E6E6E6",SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6",
 SMChart:"shape=mxgraph.sitemap.chart;strokeColor=#000000;fillColor=#E6E6E6",SMCloud:"shape=mxgraph.sitemap.cloud;strokeColor=#000000;fillColor=#E6E6E6",SMDocument:"shape=mxgraph.sitemap.document;strokeColor=#000000;fillColor=#E6E6E6",SMDownload:"shape=mxgraph.sitemap.download;strokeColor=#000000;fillColor=#E6E6E6",SMError:"shape=mxgraph.sitemap.error;strokeColor=#000000;fillColor=#E6E6E6",SMForm:"shape=mxgraph.sitemap.form;strokeColor=#000000;fillColor=#E6E6E6",SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",
 SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6",SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",
-SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape"},Cc=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),qc=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a);if(a in b){var k=b[a];k.id=a;if(null!=k.Members)for(var n in k.Members)d=qc(n,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)k.push(a.Pages[b]);
-k.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],k=[];null!=a.state&&"1"==urlParams.dev&&null!=window.console&&console.log(JSON.stringify(JSON.parse(a.state),null,2));null!=a.state?b(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?b(a):k.push(a);a=Eb();for(var n=new mxCodec,c=0;c<k.length;c++){d.push("<diagram");null!=k[c].Properties&&null!=k[c].Properties.Title&&d.push(' name="'+
-mxUtils.htmlEntities(k[c].Properties.Title)+'"');hb(a,k[c],null,null,null,!0);var f=n.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(f))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(f){function g(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
+SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6",SVGPathBlock2:"mxCompositeShape",PresentationFrameBlock:"mxCompositeShape"},Fc=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),tc=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a);if(a in b){var k=b[a];k.id=a;if(null!=k.Members)for(var n in k.Members)d=tc(n,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)k.push(a.Pages[b]);
+k.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],k=[];null!=a.state&&"1"==urlParams.dev&&null!=window.console&&console.log(JSON.stringify(JSON.parse(a.state),null,2));null!=a.state?b(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?b(a):k.push(a);a=ib();for(var n=new mxCodec,c=0;c<k.length;c++){d.push("<diagram");null!=k[c].Properties&&null!=k[c].Properties.Title&&d.push(' name="'+
+mxUtils.htmlEntities(k[c].Properties.Title)+'"');Gb(a,k[c],null,null,null,!0);var f=n.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(f))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(f){function g(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
 "_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>",
 "docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>",
 "docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>",
 "visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>",
 "visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>",
 "visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation.  All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},
-k;for(k in d)if(1<b&&k==C.CONTENT_TYPES_XML){for(var n=mxUtils.parseXml(d[k]),c=n.documentElement,f=c.children,w=null,e=0;e<f.length;e++){var l=f[e];"/visio/pages/page1.xml"==l.getAttribute(C.PART_NAME)&&(w=l)}for(e=2;e<=b;e++)f=w.cloneNode(),f.setAttribute(C.PART_NAME,"/visio/pages/page"+e+".xml"),c.appendChild(f);E(a,k,n,!0)}else a.file(k,d[k])}function q(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function e(a){var b=P[a];null==b&&(b=aa++,P[a]=b);return b}function l(a){var b=
+k;for(k in d)if(1<b&&k==D.CONTENT_TYPES_XML){for(var n=mxUtils.parseXml(d[k]),c=n.documentElement,f=c.children,w=null,e=0;e<f.length;e++){var l=f[e];"/visio/pages/page1.xml"==l.getAttribute(D.PART_NAME)&&(w=l)}for(e=2;e<=b;e++)f=w.cloneNode(),f.setAttribute(D.PART_NAME,"/visio/pages/page"+e+".xml"),c.appendChild(f);B(a,k,n,!0)}else a.file(k,d[k])}function q(a,b,d){return null!=a.createElementNS?a.createElementNS(b,d):a.createElement(d)}function e(a){var b=P[a];null==b&&(b=Z++,P[a]=b);return b}function l(a){var b=
 {};try{var d=a.getGraphBounds().clone(),k=a.view.scale,n=a.view.translate,c=Math.round(d.x/k)-n.x,f=Math.round(d.y/k)-n.y,w=a.pageFormat.width,e=a.pageFormat.height;0>c&&(c+=Math.ceil((n.x-d.x/k)/w)*w);0>f&&(f+=Math.ceil((n.y-d.y/k)/e)*e);var l=Math.max(1,Math.ceil((d.width/k+c)/w)),z=Math.max(1,Math.ceil((d.height/k+f)/e));b.gridEnabled=a.gridEnabled;b.gridSize=a.gridSize;b.guidesEnabled=a.graphHandler.guidesEnabled;b.pageVisible=a.pageVisible;b.pageScale=a.pageScale;b.pageWidth=a.pageFormat.width*
-l;b.pageHeight=a.pageFormat.height*z;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(Eb){}return b}function c(a,d,k,n){return b(a,d/C.CONVERSION_FACTOR,k,n)}function b(a,b,d,k){d=q(d,C.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);k&&d.setAttribute("F",k);return d}function a(a,b,d,k,n){var f=q(n,C.XMLNS,"Row");f.setAttribute("T",a);f.setAttribute("IX",b);f.appendChild(c("X",d,n));f.appendChild(c("Y",k,n));return f}function d(a,d,k){var n=
+l;b.pageHeight=a.pageFormat.height*z;b.backgroundClr=a.background;b.mathEnabled=a.mathEnabled;b.shadowVisible=a.shadowVisible}catch(Gb){}return b}function c(a,d,k,n){return b(a,d/D.CONVERSION_FACTOR,k,n)}function b(a,b,d,k){d=q(d,D.XMLNS,"Cell");d.setAttribute("N",a);d.setAttribute("V",b);k&&d.setAttribute("F",k);return d}function a(a,b,d,k,n){var f=q(n,D.XMLNS,"Row");f.setAttribute("T",a);f.setAttribute("IX",b);f.appendChild(c("X",d,n));f.appendChild(c("Y",k,n));return f}function d(a,d,k){var n=
 a.style[mxConstants.STYLE_FILLCOLOR];if(n&&"none"!=n){if(d.appendChild(b("FillForegnd",n,k)),(n=a.style[mxConstants.STYLE_GRADIENTCOLOR])&&"none"!=n){d.appendChild(b("FillBkgnd",n,k));var n=a.style[mxConstants.STYLE_GRADIENT_DIRECTION],f=28;if(n)switch(n){case mxConstants.DIRECTION_EAST:f=25;break;case mxConstants.DIRECTION_WEST:f=27;break;case mxConstants.DIRECTION_NORTH:f=30}d.appendChild(b("FillPattern",f,k))}}else d.appendChild(b("FillPattern",0,k));(n=a.style[mxConstants.STYLE_STROKECOLOR])&&
 "none"!=n?d.appendChild(b("LineColor",n,k)):d.appendChild(b("LinePattern",0,k));(n=a.style[mxConstants.STYLE_STROKEWIDTH])&&d.appendChild(c("LineWeight",n,k));(f=a.style[mxConstants.STYLE_OPACITY])?n=f:(n=a.style[mxConstants.STYLE_FILL_OPACITY],f=a.style[mxConstants.STYLE_STROKE_OPACITY]);n&&d.appendChild(b("FillForegndTrans",1-parseInt(n)/100,k));f&&d.appendChild(b("LineColorTrans",1-parseInt(f)/100,k));if(1==a.style[mxConstants.STYLE_DASHED]){n=a.style[mxConstants.STYLE_DASH_PATTERN];f=9;if(n)switch(n){case "1 1":f=
 10;break;case "1 2":f=3;break;case "1 4":f=17}d.appendChild(b("LinePattern",f,k))}1==a.style[mxConstants.STYLE_SHADOW]&&(d.appendChild(b("ShdwPattern",1,k)),d.appendChild(b("ShdwForegnd","#000000",k)),d.appendChild(b("ShdwForegndTrans",.6,k)),d.appendChild(b("ShapeShdwType",1,k)),d.appendChild(b("ShapeShdwOffsetX","0.02946278254943948",k)),d.appendChild(b("ShapeShdwOffsetY","-0.02946278254943948",k)),d.appendChild(b("ShapeShdwScaleFactor","1",k)),d.appendChild(b("ShapeShdwBlur","0.05555555555555555",
-k)),d.appendChild(b("ShapeShdwShow",2,k)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,k));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,k));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(c("Rounding",.1*a.cell.geometry.width,k));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,k))}function k(a,d,k,n,f,w){var e=q(n,C.XMLNS,"Shape");e.setAttribute("ID",a);e.setAttribute("NameU","Shape"+a);e.setAttribute("LineStyle","0");e.setAttribute("FillStyle",
-"0");e.setAttribute("TextStyle","0");a=d.width/2;var l=d.height/2;e.appendChild(c("PinX",d.x+a+(w?0:G.shiftX),n));e.appendChild(c("PinY",f-d.y-l-(w?0:G.shiftY),n));e.appendChild(c("Width",d.width,n));e.appendChild(c("Height",d.height,n));e.appendChild(c("LocPinX",a,n));e.appendChild(c("LocPinY",l,n));e.appendChild(b("LayerMember",k+"",n));return e}function n(a,b){var d=C.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function w(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?
-3:9>=a?4:22>=a?5:6}function A(k,f,l,z,A,g){var y=l.view.getState(k,!0);if(null==y||null==y.absolutePoints||null==y.cellBounds)return null;l=q(z,C.XMLNS,"Shape");var E=e(k.id);l.setAttribute("ID",E);l.setAttribute("NameU","Dynamic connector."+E);l.setAttribute("Name","Dynamic connector."+E);l.setAttribute("Type","Shape");l.setAttribute("Master","4");var D=G.state,E=y.absolutePoints,B=y.cellBounds,S=B.width/2,P=B.height/2;l.appendChild(c("PinX",B.x+S,z));l.appendChild(c("PinY",A-B.y-P,z));l.appendChild(c("Width",
-B.width,z));l.appendChild(c("Height",B.height,z));l.appendChild(c("LocPinX",S,z));l.appendChild(c("LocPinY",P,z));G.newEdge(l,y,z);S=function(a,b){var d=a.x,k=a.y,d=d*D.scale-B.x+D.dx+(g?0:G.shiftX),k=(b?0:B.height)-k*D.scale+B.y-D.dy-(g?0:G.shiftY);return{x:d,y:k}};P=S(E[0],!0);l.appendChild(c("BeginX",B.x+P.x,z,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));l.appendChild(c("BeginY",A-B.y+P.y,z,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));P=S(E[E.length-1],!0);l.appendChild(c("EndX",
-B.x+P.x,z,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));l.appendChild(c("EndY",A-B.y+P.y,z,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));l.appendChild(b("BegTrigger","2",z,k.source?"_XFTRIGGER(Sheet."+e(k.source.id)+"!EventXFMod)":null));l.appendChild(b("EndTrigger","2",z,k.target?"_XFTRIGGER(Sheet."+e(k.target.id)+"!EventXFMod)":null));l.appendChild(b("ConFixedCode","6",z));l.appendChild(b("LayerMember",f+"",z));d(y,l,z);f=y.style[mxConstants.STYLE_STARTSIZE];k=n(y.style[mxConstants.STYLE_STARTARROW],
-y.style[mxConstants.STYLE_STARTFILL]);l.appendChild(b("BeginArrow",k,z));l.appendChild(b("BeginArrowSize",w(f),z));f=y.style[mxConstants.STYLE_ENDSIZE];k=n(y.style[mxConstants.STYLE_ENDARROW],y.style[mxConstants.STYLE_ENDFILL]);l.appendChild(b("EndArrow",k,z));l.appendChild(b("EndArrowSize",w(f),z));null!=y.text&&y.text.checkBounds()&&(G.save(),y.text.paint(G),G.restore());y=q(z,C.XMLNS,"Section");y.setAttribute("N","Geometry");y.setAttribute("IX","0");for(k=0;k<E.length;k++)f=S(E[k]),y.appendChild(a(0==
-k?"MoveTo":"LineTo",k+1,f.x,f.y,z));y.appendChild(b("NoFill","1",z));y.appendChild(b("NoLine","0",z));l.appendChild(y);return l}function z(a,b,n,c,f,w,l){var g=a.geometry;if(null!=g){g.relative&&w&&(g=g.clone(),g.x*=w.width,g.y*=w.height,g.relative=0);w=e(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){f=k(w+"10000",g,b,c,f,l);f.setAttribute("Type","Group");l=q(c,C.XMLNS,"Shapes");G.save();G.translate(-g.x,-g.y);w=g.clone();w.x=0;w.y=0;a.setGeometry(w);a.treatAsSingle=!0;w=z(a,b,n,c,g.height,g,!0);
-a.treatAsSingle=!1;a.setGeometry(g);null!=w&&l.appendChild(w);for(var y=0;y<a.getChildCount();y++)w=z(a.children[y],b,n,c,g.height,g,!0),null!=w&&l.appendChild(w);f.appendChild(l);G.restore();return f}return a.vertex?(f=k(w,g,b,c,f,l),a=n.view.getState(a,!0),d(a,f,c),G.newShape(f,a,c),null!=a.text&&a.text.checkBounds()&&(G.save(),a.text.paint(G),G.restore()),null!=a.shape&&a.shape.checkBounds()&&(G.save(),a.shape.paint(G),G.restore()),f.appendChild(G.getShapeGeo()),G.endShape(),f.setAttribute("Type",
-G.getShapeType()),f):A(a,b,n,c,f,l)}return null}function y(a,b){var d=mxUtils.createXmlDocument(),k=q(d,C.XMLNS,"PageContents");k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",C.XMLNS);k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",C.XMLNS_R);var n=q(d,C.XMLNS,"Shapes");k.appendChild(n);var c=a.model,f=a.view.translate,w=a.view.scale,l=a.getGraphBounds();G.shiftX=0;G.shiftY=0;if(l.x/w<f.x||l.y/w<f.y)G.shiftX=Math.ceil((f.x-l.x/w)/a.pageFormat.width)*a.pageFormat.width,G.shiftY=
-Math.ceil((f.y-l.y/w)/a.pageFormat.height)*a.pageFormat.height;G.save();G.translate(-f.x,-f.y);G.scale(1/w);G.newPage();w=a.model.getChildCells(a.model.root);f={};for(l=0;l<w.length;l++)f[w[l].id]=l;for(var A in c.cells)w=c.cells[A],l=null!=w.parent?f[w.parent.id]:null,null!=l&&(w=z(w,l,a,d,b.pageHeight),null!=w&&n.appendChild(w));n=q(d,C.XMLNS,"Connects");k.appendChild(n);for(A in c.cells)w=c.cells[A],w.edge&&(w.source&&(f=q(d,C.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell",
-"BeginX"),f.setAttribute("ToSheet",e(w.source.id)),n.appendChild(f)),w.target&&(f=q(d,C.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell","EndX"),f.setAttribute("ToSheet",e(w.target.id)),n.appendChild(f)));d.appendChild(k);G.restore();return d}function E(a,b,d,k){a.file(b,(k?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d,"\n"))}function D(a,d,k,n){var f=mxUtils.createXmlDocument(),w=mxUtils.createXmlDocument(),l=q(f,C.XMLNS,"Pages");l.setAttributeNS("http://www.w3.org/2000/xmlns/",
-"xmlns",C.XMLNS);l.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",C.XMLNS_R);var e=q(w,C.RELS_XMLNS,"Relationships"),z=1,A;for(A in d){var g="page"+z+".xml",y=q(f,C.XMLNS,"Page");y.setAttribute("ID",z-1);y.setAttribute("NameU",A);y.setAttribute("Name",A);var D=q(f,C.XMLNS,"PageSheet"),B=n[A];D.appendChild(c("PageWidth",B.pageWidth,f));D.appendChild(c("PageHeight",B.pageHeight,f));D.appendChild(b("PageScale",B.pageScale,f));D.appendChild(b("DrawingScale",1,f));B=q(f,C.XMLNS,"Rel");B.setAttributeNS(C.XMLNS_R,
-"r:id","rId"+z);var P=q(f,C.XMLNS,"Section");P.setAttribute("N","Layer");for(var S=k[A],G=0;G<S.length;G++){var x=q(f,C.XMLNS,"Row");x.setAttribute("IX",G+"");P.appendChild(x);x.appendChild(b("Name",S[G].name,f));x.appendChild(b("Color","255",f));x.appendChild(b("Status","0",f));x.appendChild(b("Visible",S[G].visible?"1":"0",f));x.appendChild(b("Print","1",f));x.appendChild(b("Active","0",f));x.appendChild(b("Lock",S[G].locked?"1":"0",f));x.appendChild(b("Snap","1",f));x.appendChild(b("Glue","1",
-f));x.appendChild(b("NameUniv",S[G].name,f));x.appendChild(b("ColorTrans","0",f))}D.appendChild(P);y.appendChild(D);y.appendChild(B);l.appendChild(y);y=q(w,C.RELS_XMLNS,"Relationship");y.setAttribute("Id","rId"+z);y.setAttribute("Type",C.PAGES_TYPE);y.setAttribute("Target",g);e.appendChild(y);E(a,C.VISIO_PAGES+g,d[A]);z++}f.appendChild(l);w.appendChild(e);E(a,C.VISIO_PAGES+"pages.xml",f);E(a,C.VISIO_PAGES+"_rels/pages.xml.rels",w)}function B(a,b){var d=C.VISIO_PAGES_RELS+"page"+b+".xml.rels",k=mxUtils.createXmlDocument(),
-n=q(k,C.RELS_XMLNS,"Relationships"),c=q(k,C.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");n.appendChild(c);var f=G.images;if(0<f.length)for(var w=0;w<f.length;w++)c=q(k,C.RELS_XMLNS,"Relationship"),c.setAttribute("Type",C.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(w+2)),c.setAttribute("Target","../media/"+f[w]),n.appendChild(c);k.appendChild(n);E(a,d,k)}
-var C=this,G=new mxVsdxCanvas2D,P={},aa=1;this.exportCurrentDiagrams=function(){try{if(f.spinner.spin(document.body,mxResources.get("exporting"))){var a=function(a,b){var d=a.model.getChildCells(a.model.root);k[b]=[];for(var n=0;n<d.length;n++)d[n].visible&&k[b].push({name:d[n].value||"Background",visible:d[n].visible,locked:d[n].style&&0<=d[n].style.indexOf("locked=1")})},b=new JSZip;G.init(b);P={};aa=1;var d={},k={},n={},c=null!=f.pages?f.pages.length:1;if(null!=f.pages){for(var w=f.editor.graph.getSelectionCells(),
-e=f.currentPage,z=0;z<f.pages.length;z++){var A=f.pages[z];f.currentPage!=A&&f.selectPage(A,!0);var q=A.getName(),E=f.editor.graph,C=null;null!=E.themes&&"darkTheme"==E.defaultThemeName&&(C=E.stylesheet,E.stylesheet=E.getDefaultStylesheet(),E.refresh());try{var ja=l(E);d[q]=y(E,ja);a(E,q);B(b,z+1);n[q]=ja}finally{null!=C&&(E.stylesheet=C,E.refresh())}}e!=f.currentPage&&f.selectPage(e,!0);f.editor.graph.setSelectionCells(w)}else E=f.editor.graph,ja=l(E),q="Page1",d[q]=y(E,ja),a(E,q),B(b,1),n[q]=ja;
-g(b,c);D(b,d,k,n);a=function(){b.generateAsync({type:"base64"}).then(function(a){f.spinner.stop();var b=f.getBaseFilename();f.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<G.filesLoading?G.onFilesLoaded=a:a()}return!0}catch(ea){return console.log(ea),f.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
+k)),d.appendChild(b("ShapeShdwShow",2,k)));1==a.style[mxConstants.STYLE_FLIPH]&&d.appendChild(b("FlipX",1,k));1==a.style[mxConstants.STYLE_FLIPV]&&d.appendChild(b("FlipY",1,k));1==a.style[mxConstants.STYLE_ROUNDED]&&d.appendChild(c("Rounding",.1*a.cell.geometry.width,k));(a=a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR])&&d.appendChild(b("TextBkgnd",a,k))}function k(a,d,k,n,f,w){var e=q(n,D.XMLNS,"Shape");e.setAttribute("ID",a);e.setAttribute("NameU","Shape"+a);e.setAttribute("LineStyle","0");e.setAttribute("FillStyle",
+"0");e.setAttribute("TextStyle","0");a=d.width/2;var l=d.height/2;e.appendChild(c("PinX",d.x+a+(w?0:G.shiftX),n));e.appendChild(c("PinY",f-d.y-l-(w?0:G.shiftY),n));e.appendChild(c("Width",d.width,n));e.appendChild(c("Height",d.height,n));e.appendChild(c("LocPinX",a,n));e.appendChild(c("LocPinY",l,n));e.appendChild(b("LayerMember",k+"",n));return e}function n(a,b){var d=D.ARROWS_MAP[(null==a?"none":a)+"|"+(null==b?"1":b)];return null!=d?d:1}function w(a){return null==a?2:2>=a?0:3>=a?1:5>=a?2:7>=a?
+3:9>=a?4:22>=a?5:6}function z(k,f,l,z,A,g){var y=l.view.getState(k,!0);if(null==y||null==y.absolutePoints||null==y.cellBounds)return null;l=q(z,D.XMLNS,"Shape");var B=e(k.id);l.setAttribute("ID",B);l.setAttribute("NameU","Dynamic connector."+B);l.setAttribute("Name","Dynamic connector."+B);l.setAttribute("Type","Shape");l.setAttribute("Master","4");var C=G.state,B=y.absolutePoints,E=y.cellBounds,P=E.width/2,W=E.height/2;l.appendChild(c("PinX",E.x+P,z));l.appendChild(c("PinY",A-E.y-W,z));l.appendChild(c("Width",
+E.width,z));l.appendChild(c("Height",E.height,z));l.appendChild(c("LocPinX",P,z));l.appendChild(c("LocPinY",W,z));G.newEdge(l,y,z);P=function(a,b){var d=a.x,k=a.y,d=d*C.scale-E.x+C.dx+(g?0:G.shiftX),k=(b?0:E.height)-k*C.scale+E.y-C.dy-(g?0:G.shiftY);return{x:d,y:k}};W=P(B[0],!0);l.appendChild(c("BeginX",E.x+W.x,z,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));l.appendChild(c("BeginY",A-E.y+W.y,z,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));W=P(B[B.length-1],!0);l.appendChild(c("EndX",
+E.x+W.x,z,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));l.appendChild(c("EndY",A-E.y+W.y,z,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));l.appendChild(b("BegTrigger","2",z,k.source?"_XFTRIGGER(Sheet."+e(k.source.id)+"!EventXFMod)":null));l.appendChild(b("EndTrigger","2",z,k.target?"_XFTRIGGER(Sheet."+e(k.target.id)+"!EventXFMod)":null));l.appendChild(b("ConFixedCode","6",z));l.appendChild(b("LayerMember",f+"",z));d(y,l,z);f=y.style[mxConstants.STYLE_STARTSIZE];k=n(y.style[mxConstants.STYLE_STARTARROW],
+y.style[mxConstants.STYLE_STARTFILL]);l.appendChild(b("BeginArrow",k,z));l.appendChild(b("BeginArrowSize",w(f),z));f=y.style[mxConstants.STYLE_ENDSIZE];k=n(y.style[mxConstants.STYLE_ENDARROW],y.style[mxConstants.STYLE_ENDFILL]);l.appendChild(b("EndArrow",k,z));l.appendChild(b("EndArrowSize",w(f),z));null!=y.text&&y.text.checkBounds()&&(G.save(),y.text.paint(G),G.restore());y=q(z,D.XMLNS,"Section");y.setAttribute("N","Geometry");y.setAttribute("IX","0");for(k=0;k<B.length;k++)f=P(B[k]),y.appendChild(a(0==
+k?"MoveTo":"LineTo",k+1,f.x,f.y,z));y.appendChild(b("NoFill","1",z));y.appendChild(b("NoLine","0",z));l.appendChild(y);return l}function A(a,b,n,c,f,w,l){var g=a.geometry;if(null!=g){g.relative&&w&&(g=g.clone(),g.x*=w.width,g.y*=w.height,g.relative=0);w=e(a.id);if(!a.treatAsSingle&&0<a.getChildCount()){f=k(w+"10000",g,b,c,f,l);f.setAttribute("Type","Group");l=q(c,D.XMLNS,"Shapes");G.save();G.translate(-g.x,-g.y);w=g.clone();w.x=0;w.y=0;a.setGeometry(w);a.treatAsSingle=!0;w=A(a,b,n,c,g.height,g,!0);
+a.treatAsSingle=!1;a.setGeometry(g);null!=w&&l.appendChild(w);for(var y=0;y<a.getChildCount();y++)w=A(a.children[y],b,n,c,g.height,g,!0),null!=w&&l.appendChild(w);f.appendChild(l);G.restore();return f}return a.vertex?(f=k(w,g,b,c,f,l),a=n.view.getState(a,!0),d(a,f,c),G.newShape(f,a,c),null!=a.text&&a.text.checkBounds()&&(G.save(),a.text.paint(G),G.restore()),null!=a.shape&&a.shape.checkBounds()&&(G.save(),a.shape.paint(G),G.restore()),f.appendChild(G.getShapeGeo()),G.endShape(),f.setAttribute("Type",
+G.getShapeType()),f):z(a,b,n,c,f,l)}return null}function y(a,b){var d=mxUtils.createXmlDocument(),k=q(d,D.XMLNS,"PageContents");k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",D.XMLNS);k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var n=q(d,D.XMLNS,"Shapes");k.appendChild(n);var c=a.model,f=a.view.translate,w=a.view.scale,l=a.getGraphBounds();G.shiftX=0;G.shiftY=0;if(l.x/w<f.x||l.y/w<f.y)G.shiftX=Math.ceil((f.x-l.x/w)/a.pageFormat.width)*a.pageFormat.width,G.shiftY=
+Math.ceil((f.y-l.y/w)/a.pageFormat.height)*a.pageFormat.height;G.save();G.translate(-f.x,-f.y);G.scale(1/w);G.newPage();w=a.model.getChildCells(a.model.root);f={};for(l=0;l<w.length;l++)f[w[l].id]=l;for(var z in c.cells)w=c.cells[z],l=null!=w.parent?f[w.parent.id]:null,null!=l&&(w=A(w,l,a,d,b.pageHeight),null!=w&&n.appendChild(w));n=q(d,D.XMLNS,"Connects");k.appendChild(n);for(z in c.cells)w=c.cells[z],w.edge&&(w.source&&(f=q(d,D.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell",
+"BeginX"),f.setAttribute("ToSheet",e(w.source.id)),n.appendChild(f)),w.target&&(f=q(d,D.XMLNS,"Connect"),f.setAttribute("FromSheet",e(w.id)),f.setAttribute("FromCell","EndX"),f.setAttribute("ToSheet",e(w.target.id)),n.appendChild(f)));d.appendChild(k);G.restore();return d}function B(a,b,d,k){a.file(b,(k?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(d,"\n"))}function C(a,d,k,n){var f=mxUtils.createXmlDocument(),w=mxUtils.createXmlDocument(),l=q(f,D.XMLNS,"Pages");l.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns",D.XMLNS);l.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",D.XMLNS_R);var e=q(w,D.RELS_XMLNS,"Relationships"),z=1,A;for(A in d){var g="page"+z+".xml",y=q(f,D.XMLNS,"Page");y.setAttribute("ID",z-1);y.setAttribute("NameU",A);y.setAttribute("Name",A);var C=q(f,D.XMLNS,"PageSheet"),E=n[A];C.appendChild(c("PageWidth",E.pageWidth,f));C.appendChild(c("PageHeight",E.pageHeight,f));C.appendChild(b("PageScale",E.pageScale,f));C.appendChild(b("DrawingScale",1,f));E=q(f,D.XMLNS,"Rel");E.setAttributeNS(D.XMLNS_R,
+"r:id","rId"+z);var P=q(f,D.XMLNS,"Section");P.setAttribute("N","Layer");for(var G=k[A],W=0;W<G.length;W++){var M=q(f,D.XMLNS,"Row");M.setAttribute("IX",W+"");P.appendChild(M);M.appendChild(b("Name",G[W].name,f));M.appendChild(b("Color","255",f));M.appendChild(b("Status","0",f));M.appendChild(b("Visible",G[W].visible?"1":"0",f));M.appendChild(b("Print","1",f));M.appendChild(b("Active","0",f));M.appendChild(b("Lock",G[W].locked?"1":"0",f));M.appendChild(b("Snap","1",f));M.appendChild(b("Glue","1",
+f));M.appendChild(b("NameUniv",G[W].name,f));M.appendChild(b("ColorTrans","0",f))}C.appendChild(P);y.appendChild(C);y.appendChild(E);l.appendChild(y);y=q(w,D.RELS_XMLNS,"Relationship");y.setAttribute("Id","rId"+z);y.setAttribute("Type",D.PAGES_TYPE);y.setAttribute("Target",g);e.appendChild(y);B(a,D.VISIO_PAGES+g,d[A]);z++}f.appendChild(l);w.appendChild(e);B(a,D.VISIO_PAGES+"pages.xml",f);B(a,D.VISIO_PAGES+"_rels/pages.xml.rels",w)}function E(a,b){var d=D.VISIO_PAGES_RELS+"page"+b+".xml.rels",k=mxUtils.createXmlDocument(),
+n=q(k,D.RELS_XMLNS,"Relationships"),c=q(k,D.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");n.appendChild(c);var f=G.images;if(0<f.length)for(var w=0;w<f.length;w++)c=q(k,D.RELS_XMLNS,"Relationship"),c.setAttribute("Type",D.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(w+2)),c.setAttribute("Target","../media/"+f[w]),n.appendChild(c);k.appendChild(n);B(a,d,k)}
+var D=this,G=new mxVsdxCanvas2D,P={},Z=1;this.exportCurrentDiagrams=function(){try{if(f.spinner.spin(document.body,mxResources.get("exporting"))){var a=function(a,b){var d=a.model.getChildCells(a.model.root);k[b]=[];for(var n=0;n<d.length;n++)d[n].visible&&k[b].push({name:d[n].value||"Background",visible:d[n].visible,locked:d[n].style&&0<=d[n].style.indexOf("locked=1")})},b=new JSZip;G.init(b);P={};Z=1;var d={},k={},n={},c=null!=f.pages?f.pages.length:1;if(null!=f.pages){for(var w=f.editor.graph.getSelectionCells(),
+e=f.currentPage,z=0;z<f.pages.length;z++){var A=f.pages[z];f.currentPage!=A&&f.selectPage(A,!0);var q=A.getName(),B=f.editor.graph,D=null;null!=B.themes&&"darkTheme"==B.defaultThemeName&&(D=B.stylesheet,B.stylesheet=B.getDefaultStylesheet(),B.refresh());try{var Ba=l(B);d[q]=y(B,Ba);a(B,q);E(b,z+1);n[q]=Ba}finally{null!=D&&(B.stylesheet=D,B.refresh())}}e!=f.currentPage&&f.selectPage(e,!0);f.editor.graph.setSelectionCells(w)}else B=f.editor.graph,Ba=l(B),q="Page1",d[q]=y(B,Ba),a(B,q),E(b,1),n[q]=Ba;
+g(b,c);C(b,d,k,n);a=function(){b.generateAsync({type:"base64"}).then(function(a){f.spinner.stop();var b=f.getBaseFilename();f.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<G.filesLoading?G.onFilesLoaded=a:a()}return!0}catch(oa){return console.log(oa),f.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
 VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";
 VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";
 VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(f){this.filesLoading=0;this.zip=f};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(f){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,f):this.xmlDoc.createElement(f)};
 mxVsdxCanvas2D.prototype.createGeoSec=function(){null!=this.geoSec&&this.shape.appendChild(this.geoSec);var f=this.createElt("Section");f.setAttribute("N","Geometry");f.setAttribute("IX",this.geoIndex++);this.geoSec=f;this.geoStepIndex=1;this.lastMoveToY=this.lastMoveToX=this.lastY=this.lastX=0};mxVsdxCanvas2D.prototype.newShape=function(f,g,q){this.geoIndex=0;this.shape=f;this.cellState=g;this.xmGeo=g.cell.geometry;this.xmlDoc=q;this.shapeImg=this.geoSec=null;this.shapeType="Shape";this.createGeoSec()};
 mxVsdxCanvas2D.prototype.newEdge=function(f,g,q){this.shape=f;this.cellState=g;this.xmGeo=g.cellBounds;this.xmlDoc=q};mxVsdxCanvas2D.prototype.endShape=function(){null!=this.shapeImg&&this.addForeignData(this.shapeImg.type,this.shapeImg.id)};mxVsdxCanvas2D.prototype.newPage=function(){this.images=[]};mxVsdxCanvas2D.prototype.getShapeType=function(){return this.shapeType};mxVsdxCanvas2D.prototype.getShapeGeo=function(){return this.geoSec};
 mxVsdxCanvas2D.prototype.createCellElemScaled=function(f,g,q){return this.createCellElem(f,g/VsdxExport.prototype.CONVERSION_FACTOR,q)};mxVsdxCanvas2D.prototype.createCellElem=function(f,g,q){var e=this.createElt("Cell");e.setAttribute("N",f);e.setAttribute("V",g);q&&e.setAttribute("F",q);return e};
-mxVsdxCanvas2D.prototype.createRowScaled=function(f,g,q,e,l,c,b,a,d,k,n,w,A,z){return this.createRowRel(f,g,q/VsdxExport.prototype.CONVERSION_FACTOR,e/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,k,n,w,A,z)};
-mxVsdxCanvas2D.prototype.createRowRel=function(f,g,q,e,l,c,b,a,d,k,n,w,A,z){var y=this.createElt("Row");y.setAttribute("T",f);y.setAttribute("IX",g);y.appendChild(this.createCellElem("X",q,d));y.appendChild(this.createCellElem("Y",e,k));null!=l&&y.appendChild(this.createCellElem("A",l,n));null!=c&&y.appendChild(this.createCellElem("B",c,w));null!=b&&y.appendChild(this.createCellElem("C",b,A));null!=a&&y.appendChild(this.createCellElem("D",a,z));return y};
+mxVsdxCanvas2D.prototype.createRowScaled=function(f,g,q,e,l,c,b,a,d,k,n,w,z,A){return this.createRowRel(f,g,q/VsdxExport.prototype.CONVERSION_FACTOR,e/VsdxExport.prototype.CONVERSION_FACTOR,l/VsdxExport.prototype.CONVERSION_FACTOR,c/VsdxExport.prototype.CONVERSION_FACTOR,b/VsdxExport.prototype.CONVERSION_FACTOR,a/VsdxExport.prototype.CONVERSION_FACTOR,d,k,n,w,z,A)};
+mxVsdxCanvas2D.prototype.createRowRel=function(f,g,q,e,l,c,b,a,d,k,n,w,z,A){var y=this.createElt("Row");y.setAttribute("T",f);y.setAttribute("IX",g);y.appendChild(this.createCellElem("X",q,d));y.appendChild(this.createCellElem("Y",e,k));null!=l&&y.appendChild(this.createCellElem("A",l,n));null!=c&&y.appendChild(this.createCellElem("B",c,w));null!=b&&y.appendChild(this.createCellElem("C",b,z));null!=a&&y.appendChild(this.createCellElem("D",a,A));return y};
 mxVsdxCanvas2D.prototype.begin=function(){1<this.geoStepIndex&&this.createGeoSec()};
 mxVsdxCanvas2D.prototype.rect=function(f,g,q,e){1<this.geoStepIndex&&this.createGeoSec();var l=this.state;q*=l.scale;e*=l.scale;var c=this.xmGeo;f=(f-c.x+l.dx)*l.scale;g=(c.height-g+c.y-l.dy)*l.scale;this.geoSec.appendChild(this.createRowScaled("MoveTo",this.geoStepIndex++,f,g));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f+q,g));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f+q,g-e));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,
 f,g-e));this.geoSec.appendChild(this.createRowScaled("LineTo",this.geoStepIndex++,f,g))};mxVsdxCanvas2D.prototype.roundrect=function(f,g,q,e,l,c){this.rect(f,g,q,e);this.shape.appendChild(this.createCellElemScaled("Rounding",l))};
@@ -944,17 +947,17 @@ try{q(f)}catch(b){}e.filesLoading--;if(0==e.filesLoading)e.onFilesLoaded()};img.
 mxVsdxCanvas2D.prototype.image=function(f,g,q,e,l,c,b,a){var d=this,k="image"+(this.images.length+1)+".",n;if(0==l.indexOf("data:"))n=l.indexOf("base64,"),c=l.substring(n+7),n=l.substring(11,n-1),0==n.indexOf("svg")?(n="png",k+=n,this.convertSvg2Png(c,!0,function(a){d.zip.file("visio/media/"+k,a.substring(22),{base64:!0})})):(k+=n,this.zip.file("visio/media/"+k,c,{base64:!0}));else if(window.XMLHttpRequest){l=this.converter.convert(l);this.filesLoading++;n=l.lastIndexOf(".");n=l.substring(n+1);var w=
 !1;0==n.indexOf("svg")&&(n="png",w=!0);k+=n;c=new XMLHttpRequest;c.open("GET",l,!0);c.responseType="arraybuffer";c.onreadystatechange=function(a){if(4==this.readyState&&(200==this.status&&(w?d.convertSvg2Png(this.response,!1,function(a){d.zip.file("visio/media/"+k,a.substring(22),{base64:!0})}):d.zip.file("visio/media/"+k,this.response)),d.filesLoading--,0==d.filesLoading))d.onFilesLoaded()};c.send()}this.images.push(k);this.shapeImg={type:n,id:this.images.length+1};l=this.state;q*=l.scale;e*=l.scale;
 n=this.xmGeo;f=(f-n.x+l.dx)*l.scale;g=(n.height-g+n.y-l.dy)*l.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",f));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",g-e));this.shape.appendChild(this.createCellElemScaled("ImgWidth",q));this.shape.appendChild(this.createCellElemScaled("ImgHeight",e))};
-mxVsdxCanvas2D.prototype.text=function(f,g,q,e,l,c,b,a,d,k,n,w,A){var z=this;if(this.textEnabled&&null!=l){mxUtils.isNode(l)&&(l=mxUtils.getOuterHtml(l));0==q&&0==e&&(e=mxUtils.getSizeForString(l,z.cellState.style.fontSize,z.cellState.style.fontFamily),q=1.2*e.width,e=1.2*e.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=
-l,l=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));k=this.state;n=this.xmGeo;q*=k.scale;e*=k.scale;var y=this.createElt("Section");y.setAttribute("N","Character");var E=this.createElt("Section");E.setAttribute("N","Paragraph");var D=this.createElt("Text"),B=0,C=0,G=0,P=0,aa=0,S=0,N=0,ha=function(b,d,k,n,c){var f=b.fontSize,w=b.fontFamily,l=mxUtils.getSizeForString(c,f,w);a&&l.width>q&&(l=mxUtils.getSizeForString(c,f,w,q));b.blockElem?(aa+=l.width,G=Math.min(Math.max(G,aa),q),aa=0,
-S=Math.max(S,l.height),P+=S+N,N=S,S=0):(aa+=l.width,G=Math.min(Math.max(G,aa),q),S=Math.max(S,l.height),P=Math.max(P,S));l=z.createElt("Row");l.setAttribute("IX",B);b.fontColor&&l.appendChild(z.createCellElem("Color",b.fontColor));f&&l.appendChild(z.createCellElemScaled("Size",.97*f));w&&l.appendChild(z.createCellElem("Font",w));f=0;b.bold&&(f|=17);b.italic&&(f|=34);b.underline&&(f|=4);l.appendChild(z.createCellElem("Style",f));l.appendChild(z.createCellElem("Case","0"));l.appendChild(z.createCellElem("Pos",
-"0"));l.appendChild(z.createCellElem("FontScale","1"));l.appendChild(z.createCellElem("Letterspace","0"));d.appendChild(l);d=z.createElt("Row");d.setAttribute("IX",C);switch(b.align){case "left":f=0;break;case "center":f=1;break;case "right":f=2;break;case "start":f=0;break;case "end":f=2;break;case "justify":f=0;break;default:f=1}d.appendChild(z.createCellElem("HorzAlign",f));k.appendChild(d);k=z.createElt("cp");k.setAttribute("IX",B++);n.appendChild(k);b=z.xmlDoc.createTextNode(c+(b.blockElem?"\n":
-""));n.appendChild(b)},fa=function(a,b){b=b||{};for(var d=0;d<a.length;d++){var k=a[d];if(3==k.nodeType){var n=z.cellState.style.fontStyle,c={fontColor:b.fontColor||z.cellState.style.fontColor,fontSize:b.fontSize||z.cellState.style.fontSize,fontFamily:b.fontFamily||z.cellState.style.fontFamily,align:b.align||z.cellState.style.align,bold:b.bold||n&1,italic:b.italic||n&2,underline:b.underline||n&4},n=!1;d+1<a.length&&"BR"==a[d+1].nodeName.toUpperCase()&&(n=!0,d++);ha(c,y,E,D,(b.OL?b.LiIndex+". ":"")+
-k.textContent+(n?"\n":""))}else if(1==k.nodeType){var n=k.nodeName.toUpperCase(),f=k.childNodes.length,c=window.getComputedStyle(k,null),w="bold"==c.getPropertyValue("font-weight")||b.bold,l="italic"==c.getPropertyValue("font-style")||b.italic,e=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,A=c.getPropertyValue("text-align"),g;g=c.getPropertyValue("color");g=(g=g.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===g.length?"#"+("0"+parseInt(g[1],
-10).toString(16)).slice(-2)+("0"+parseInt(g[2],10).toString(16)).slice(-2)+("0"+parseInt(g[3],10).toString(16)).slice(-2):"";c={bold:w,italic:l,underline:e,align:A,fontColor:g,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==n||"LI"==n,OL:b.OL,LiIndex:b.LiIndex};"UL"==n?(w=z.createElt("Row"),w.setAttribute("IX",C),w.appendChild(z.createCellElem("HorzAlign","0")),w.appendChild(z.createCellElem("Bullet",
-"1")),E.appendChild(w),w=z.createElt("pp"),w.setAttribute("IX",C++),D.appendChild(w)):"OL"==n?c.OL=!0:"LI"==n&&(c.LiIndex=d+1);0<f?(fa(k.childNodes,c),"UL"==n&&(w=z.createElt("Row"),w.setAttribute("IX",C),w.appendChild(z.createCellElem("Bullet","0")),E.appendChild(w),w=z.createElt("pp"),w.setAttribute("IX",C++),D.appendChild(w)),ha(c,y,E,D,"")):ha(c,y,E,D,(b.OL?b.LiIndex+". ":"")+k.textContent)}}};"html"==d&&mxClient.IS_SVG?(l=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:
-1],null!=l&&fa(l.childNodes,{})):ha({fontColor:z.cellState.style.fontColor,fontSize:z.cellState.style.fontSize,fontFamily:z.cellState.style.fontFamily},y,E,D,l);d=l=0;e=Math.max(e,P);q=Math.max(q,G);A=q/2;var ba=e/2,na=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=na*Math.PI/180;switch(c){case "right":0!=na?(f-=A*Math.cos(W),g-=A*Math.sin(W)):l=G/2;break;case "left":0!=na?(f+=A*Math.cos(W),g+=A*Math.sin(W)):l=-G/2}switch(b){case "top":0!=na?(f+=ba*Math.sin(W),g+=ba*Math.cos(W)):
-d=P/2;break;case "bottom":0!=na?(f-=ba*Math.sin(W),g-=ba*Math.cos(W)):d=-P/2}f=(f-n.x+k.dx)*k.scale;g=(n.height-g+n.y-k.dy)*k.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",f));this.shape.appendChild(this.createCellElemScaled("TxtPinY",g));this.shape.appendChild(this.createCellElemScaled("TxtWidth",q));this.shape.appendChild(this.createCellElemScaled("TxtHeight",e));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",A+l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",
-ba+d));w-=na;0!=w&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-w)*Math.PI/180));this.shape.appendChild(y);this.shape.appendChild(E);this.shape.appendChild(D)}};mxVsdxCanvas2D.prototype.rotate=function(f,g,q,e,l){0!=f&&(g=this.state,e+=g.dx,l+=g.dy,e*=g.scale,l*=g.scale,this.shape.appendChild(this.createCellElem("Angle",(360-f)*Math.PI/180)),g.rotation+=f,g.rotationCx=e,g.rotationCy=l)};
+mxVsdxCanvas2D.prototype.text=function(f,g,q,e,l,c,b,a,d,k,n,w,z){var A=this;if(this.textEnabled&&null!=l){mxUtils.isNode(l)&&(l=mxUtils.getOuterHtml(l));0==q&&0==e&&(e=mxUtils.getSizeForString(l,A.cellState.style.fontSize,A.cellState.style.fontFamily),q=1.2*e.width,e=1.2*e.height);"html"==d&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(l=l.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=
+l,l=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));k=this.state;n=this.xmGeo;q*=k.scale;e*=k.scale;var y=this.createElt("Section");y.setAttribute("N","Character");var B=this.createElt("Section");B.setAttribute("N","Paragraph");var C=this.createElt("Text"),E=0,D=0,G=0,P=0,Z=0,W=0,M=0,ga=function(b,d,k,n,c){var f=b.fontSize,w=b.fontFamily,l=mxUtils.getSizeForString(c,f,w);a&&l.width>q&&(l=mxUtils.getSizeForString(c,f,w,q));b.blockElem?(Z+=l.width,G=Math.min(Math.max(G,Z),q),Z=0,W=Math.max(W,
+l.height),P+=W+M,M=W,W=0):(Z+=l.width,G=Math.min(Math.max(G,Z),q),W=Math.max(W,l.height),P=Math.max(P,W));l=A.createElt("Row");l.setAttribute("IX",E);b.fontColor&&l.appendChild(A.createCellElem("Color",b.fontColor));f&&l.appendChild(A.createCellElemScaled("Size",.97*f));w&&l.appendChild(A.createCellElem("Font",w));f=0;b.bold&&(f|=17);b.italic&&(f|=34);b.underline&&(f|=4);l.appendChild(A.createCellElem("Style",f));l.appendChild(A.createCellElem("Case","0"));l.appendChild(A.createCellElem("Pos","0"));
+l.appendChild(A.createCellElem("FontScale","1"));l.appendChild(A.createCellElem("Letterspace","0"));d.appendChild(l);d=A.createElt("Row");d.setAttribute("IX",D);switch(b.align){case "left":f=0;break;case "center":f=1;break;case "right":f=2;break;case "start":f=0;break;case "end":f=2;break;case "justify":f=0;break;default:f=1}d.appendChild(A.createCellElem("HorzAlign",f));k.appendChild(d);k=A.createElt("cp");k.setAttribute("IX",E++);n.appendChild(k);b=A.xmlDoc.createTextNode(c+(b.blockElem?"\n":""));
+n.appendChild(b)},da=function(a,b){b=b||{};for(var d=0;d<a.length;d++){var k=a[d];if(3==k.nodeType){var n=A.cellState.style.fontStyle,c={fontColor:b.fontColor||A.cellState.style.fontColor,fontSize:b.fontSize||A.cellState.style.fontSize,fontFamily:b.fontFamily||A.cellState.style.fontFamily,align:b.align||A.cellState.style.align,bold:b.bold||n&1,italic:b.italic||n&2,underline:b.underline||n&4},n=!1;d+1<a.length&&"BR"==a[d+1].nodeName.toUpperCase()&&(n=!0,d++);ga(c,y,B,C,(b.OL?b.LiIndex+". ":"")+k.textContent+
+(n?"\n":""))}else if(1==k.nodeType){var n=k.nodeName.toUpperCase(),f=k.childNodes.length,c=window.getComputedStyle(k,null),w="bold"==c.getPropertyValue("font-weight")||b.bold,l="italic"==c.getPropertyValue("font-style")||b.italic,e=0<=c.getPropertyValue("text-decoration").indexOf("underline")||b.underline,z=c.getPropertyValue("text-align"),g;g=c.getPropertyValue("color");g=(g=g.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===g.length?"#"+("0"+parseInt(g[1],10).toString(16)).slice(-2)+
+("0"+parseInt(g[2],10).toString(16)).slice(-2)+("0"+parseInt(g[3],10).toString(16)).slice(-2):"";c={bold:w,italic:l,underline:e,align:z,fontColor:g,fontSize:parseFloat(c.getPropertyValue("font-size")),fontFamily:c.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==c.getPropertyValue("display")||"BR"==n||"LI"==n,OL:b.OL,LiIndex:b.LiIndex};"UL"==n?(w=A.createElt("Row"),w.setAttribute("IX",D),w.appendChild(A.createCellElem("HorzAlign","0")),w.appendChild(A.createCellElem("Bullet","1")),
+B.appendChild(w),w=A.createElt("pp"),w.setAttribute("IX",D++),C.appendChild(w)):"OL"==n?c.OL=!0:"LI"==n&&(c.LiIndex=d+1);0<f?(da(k.childNodes,c),"UL"==n&&(w=A.createElt("Row"),w.setAttribute("IX",D),w.appendChild(A.createCellElem("Bullet","0")),B.appendChild(w),w=A.createElt("pp"),w.setAttribute("IX",D++),C.appendChild(w)),ga(c,y,B,C,"")):ga(c,y,B,C,(b.OL?b.LiIndex+". ":"")+k.textContent)}}};"html"==d&&mxClient.IS_SVG?(l=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=
+l&&da(l.childNodes,{})):ga({fontColor:A.cellState.style.fontColor,fontSize:A.cellState.style.fontSize,fontFamily:A.cellState.style.fontFamily},y,B,C,l);d=l=0;e=Math.max(e,P);q=Math.max(q,G);z=q/2;var ba=e/2,ma=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),U=ma*Math.PI/180;switch(c){case "right":0!=ma?(f-=z*Math.cos(U),g-=z*Math.sin(U)):l=G/2;break;case "left":0!=ma?(f+=z*Math.cos(U),g+=z*Math.sin(U)):l=-G/2}switch(b){case "top":0!=ma?(f+=ba*Math.sin(U),g+=ba*Math.cos(U)):d=P/2;break;
+case "bottom":0!=ma?(f-=ba*Math.sin(U),g-=ba*Math.cos(U)):d=-P/2}f=(f-n.x+k.dx)*k.scale;g=(n.height-g+n.y-k.dy)*k.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",f));this.shape.appendChild(this.createCellElemScaled("TxtPinY",g));this.shape.appendChild(this.createCellElemScaled("TxtWidth",q));this.shape.appendChild(this.createCellElemScaled("TxtHeight",e));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",z+l));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",
+ba+d));w-=ma;0!=w&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-w)*Math.PI/180));this.shape.appendChild(y);this.shape.appendChild(B);this.shape.appendChild(C)}};mxVsdxCanvas2D.prototype.rotate=function(f,g,q,e,l){0!=f&&(g=this.state,e+=g.dx,l+=g.dy,e*=g.scale,l*=g.scale,this.shape.appendChild(this.createCellElem("Angle",(360-f)*Math.PI/180)),g.rotation+=f,g.rotationCx=e,g.rotationCy=l)};
 mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(f,g){this.pos=0;this.buffer=f;this.is_with_alpha=!!g;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}
 BmpDecoder.prototype.parseHeader=function(){var f=this.buffer;this.fileSize=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.reserved=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.offset=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.headerSize=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.width=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];
 this.pos+=4;this.height=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.planes=f[this.pos+1]<<8|f[this.pos];this.pos+=2;this.bitPP=f[this.pos+1]<<8|f[this.pos];this.pos+=2;this.compress=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.rawSize=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.hr=f[this.pos+3]<<24|f[this.pos+2]<<16|f[this.pos+1]<<8|f[this.pos];this.pos+=4;this.vr=f[this.pos+3]<<24|f[this.pos+
@@ -970,48 +973,50 @@ BmpDecoder.prototype.bit32=function(){for(var f=this.height-1;0<=f;f--)for(var g
 (function(f){(function(g){(function(g){var e=function(){function l(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layersMap={};this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c}l.vsdxPlaceholder_$LI$=function(){null==l.vsdxPlaceholder&&(l.vsdxPlaceholder=window.atob?atob("dmlzaW8="):
 Base64.decode("dmlzaW8=",!0));return l.vsdxPlaceholder};l.parsererrorNS_$LI$=function(){if(null==l.parsererrorNS&&(l.parsererrorNS="",window.DOMParser)){var c=new DOMParser;try{l.parsererrorNS=c.parseFromString("<","text/xml").getElementsByTagName("parsererror")[0].namespaceURI}catch(b){}}return l.parsererrorNS};l.parseXml=function(c){try{var b=mxUtils.parseXml(c);return 0<b.getElementsByTagNameNS(l.parsererrorNS,"parsererror").length?null:b}catch(a){return null}};l.decodeUTF16LE=function(c){for(var b=
 "",a=0;a<c.length;a+=2)b+=String.fromCharCode(c.charCodeAt(a)|c.charCodeAt(a+1)<<8);return b};l.prototype.scaleGraph=function(c,b){if(1!==b){var a=c.getModel(),d;for(d in a.cells){var k=a.cells[d],n=a.getGeometry(k);if(null!=n&&(this.scaleRect(n,b),this.scaleRect(n.alternateBounds,b),a.isEdge(k)&&(this.scalePoint(n.sourcePoint,b),this.scalePoint(n.targetPoint,b),this.scalePoint(n.offset,b),k=n.points,null!=k)))for(n=0;n<k.length;n++)this.scalePoint(k[n],b)}}};l.prototype.decodeVsdx=function(c,b,a,
-d){var k=this,n={},w={},e=function(){for(var a=l.vsdxPlaceholder+"/document.xml",d=n[a]?n[a]:null,c=d.firstChild;null!=c&&1!=c.nodeType;)c=c.nextSibling;if(null!=c&&1==c.nodeType)k.importNodes(d,c,a,n);else return null;k.vsdxModel=new f.mxgraph.io.vsdx.mxVsdxModel(d,n,w);for(var a=k.vsdxModel.getPages(),e=k.RESPONSE_HEADER,z=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=z[a].getValue();var b=A.createMxGraph();b.getModel().beginUpdate();A.importPage(a,b,b.getDefaultParent());
-A.scaleGraph(b,a.getPageScale()/a.getDrawingScale());b.getModel().endUpdate();e=e.concat(k.RESPONSE_DIAGRAM_START);e=e.concat(k.processPage(b,a));e=e.concat(k.RESPONSE_DIAGRAM_END)},A=k,d=0;d<z.length;d++)a(d);e=e.concat(k.RESPONSE_END);b&&b(e)},z=0,g=0,q=function(){if(g==z)try{e()}catch(D){console.log(D),null!=d?d():b("")}};JSZip.loadAsync(c).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,c=d.toLowerCase(),f=c.length;c.indexOf(".xml")==f-4||c.indexOf(".xml.rels")==
-f-9?(z++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=l.parseXml(a);null==b&&0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5)&&(b=l.parseXml(l.decodeUTF16LE(a)));null!=b&&(b.vsdxFileName=d,n[d]=b)}g++;q()})):0===c.indexOf(l.vsdxPlaceholder+"/media")&&(z++,function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData;
-b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var n=new XMLHttpRequest;n.open("POST",EMF_CONVERT_URL);n.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(n);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=new FileReader;a.readAsDataURL(n.response);a.onloadend=function(){var b=a.result.indexOf(",")+1;w[d]=a.result.substr(b);g++;q()}}catch(ba){console.log(ba),g++,q()}else g++,q()});n.send(b)}):
-(g++,q()):function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");w[d]=a.substr(23);g++;q()}):b.async("base64").then(function(a){w[d]=a;g++;q()}))})},function(a){null!=d&&d(a)})};l.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);
-c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};l.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style","default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var k=mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":""),d=d+('<diagram name="'+k+'" id="'+k.replace(/\s/g,"_")+'">');return d+=Graph.compress(a)};l.prototype.scalePoint=function(c,b){null!=c&&(c.x*=
-b,c.y*=b);return c};l.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};l.prototype.importNodes=function(c,b,a,d){var k=a.lastIndexOf("/"),n=a,f=a;if(-1!==k&&(n=a.substring(0,k),f=a.substring(k+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,n+"/_rels/"+f+".rels"),null!=a)){var l=a.getElementsByTagName("Relationship");a={};for(k=0;k<l.length;k++){var f=l.item(k),e=f.getAttribute("Id"),f=f.getAttribute("Target");a[e]=f}b=b.getElementsByTagName("Rel");
-for(k=0;k<b.length;k++)if(l=b.item(k),f=function(a,b){return a[b]?a[b]:null}(a,l.getAttribute("r:id")),f=n+"/"+f,null!=f&&(e=d[f]?d[f]:null,null!=e)){l=l.parentNode;for(e=e.firstChild;null!=e&&1!=e.nodeType;)e=e.nextSibling;if(null!=e&&1==e.nodeType)for(e=e.firstChild;null!=e;){if(null!=e&&1==e.nodeType){var g=l.appendChild(c.importNode(e,!0));this.importNodes(c,g,f,d)}e=e.nextSibling}}}};l.prototype.importPage=function(c,b,a){var d=c.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),
-c.getPageName());var k=new mxCell(d.getPageName());b.addCell(k,b.getModel().getRoot(),0,null,null);this.importPage(d,b,b.getDefaultParent())}d=c.getLayers();this.layersMap[0]=b.getDefaultParent();for(k=0;k<d.length;k++){var n=d[k];if(0==k)var f=b.getDefaultParent();else f=new mxCell,b.addCell(f,b.model.root,k);f.setVisible(1==n.Visible);1==n.Lock&&f.setStyle("locked=1;");f.setValue(n.Name);this.layersMap[k]=f}n=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<
-a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getShapes()));d=c.getPageDimensions().y;for(k=c.getId();n.hasNext();){var f=n.next(),f=f.getValue(),l=this.layersMap[f.layerMember];this.addShape(b,f,l?l:a,k,d)}for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getConnects()));c.hasNext();)f=c.next(),a=this.addConnectedEdge(b,f.getValue(),k,
-d),null!=a&&function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries.splice(d,1)[0]}(this.edgeShapeMap,a);for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.edgeShapeMap));c.hasNext();)a=c.next(),a.getKey().getPageNumber()===k&&this.addUnconnectedEdge(b,
-function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,a.getKey()),a.getValue(),d);this.sanitiseGraph(b);return d};l.prototype.addShape=function(c,b,a,d,k){b.parentHeight=k;var n=f.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=n&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||
-function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var w=b.getId();if(b.isVertex())return n=null,n=b.isGroup()?this.addGroup(c,b,a,d,k):this.addVertex(c,b,a,d,k),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,
-value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,w),b),b=b.getHyperlink(),b.extLink?c.setLinkForCell(n,b.extLink):b.pageLink&&c.setLinkForCell(n,"data:page/id,"+b.pageLink),n;b.setShapeIndex(c.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=
-d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,w),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,
-w),a)}return null};l.prototype.addGroup=function(c,b,a,d,k){var n=b.getDimensions(),w=b.getMaster(),l=b.getStyleFromShape(),e=b.getGeomList();e.isNoFill()&&(l[mxConstants.STYLE_FILLCOLOR]="none",l[mxConstants.STYLE_GRADIENTCOLOR]="none");e.isNoLine()&&(l[mxConstants.STYLE_STROKECOLOR]="none");l.html="1";l[mxConstants.STYLE_WHITE_SPACE]="wrap";var g=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"="),l=null,q=b.getChildShapes(),l=null!=q&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(q),
-e=b.isDisplacedLabel()||b.isRotatedLabel()||l,l=b.getOriginPoint(k,!0);if(e)l=c.insertVertex(a,null,null,Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);else var D=b.getTextLabel(),l=c.insertVertex(a,null,D,Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);for(a=function(a){var b=0;return{next:function(){return b<
-a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(q));a.hasNext();)g=a.next().getValue(),q=g.getId(),g.isVertex()?(D=f.mxgraph.io.vsdx.VsdxShape.getType(g.getShape()),null!=D&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(D,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(D,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===
-b}(D,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&g.isVertex()&&(g.propagateRotation(b.getRotation()),g.isGroup()?this.addGroup(c,g,l,d,n.y):this.addVertex(c,g,l,d,n.y)),null==w&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,
-new f.mxgraph.io.vsdx.ShapePageId(d,q),g)):null==w?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),g),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=
-a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),l)):this.addUnconnectedEdge(c,l,g,k);e&&b.createLabelSubShape(c,l);c=b.getRotation();if(0!==c)for(n=l.getGeometry(),k=n.width/2,n=n.height/2,w=0;w<l.getChildCount();w++)e=l.getChildAt(w),f.mxgraph.online.Utils.rotatedGeometry(e.getGeometry(),
-c,k,n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(d,b.getId()),l);return l};l.rotatedEdgePoint=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var n=c.x-a,f=c.y-d;c.x=Math.round(n*
-k-f*b+a);c.y=Math.round(f*k+n*b+d)};l.prototype.addVertex=function(c,b,a,d,k){var n="",w=b.isDisplacedLabel()||b.isRotatedLabel();w||(n=b.getTextLabel());var l=b.getDimensions(),e=b.getStyleFromShape();e.html="1";var g=e.hasOwnProperty(mxConstants.STYLE_SHAPE)||e.hasOwnProperty("stencil");e.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&g||(e[mxConstants.STYLE_FILLCOLOR]="none");g||(e[mxConstants.STYLE_STROKECOLOR]="none");e.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&g||(e[mxConstants.STYLE_GRADIENTCOLOR]=
-"none");e[mxConstants.STYLE_WHITE_SPACE]="wrap";k=b.getOriginPoint(k,!0);return g||null!=n?(e=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(e,"="),g=null,g=w?c.insertVertex(a,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),e):c.insertVertex(a,null,n,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),e),
-function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(d,b.getId()),g),b.setLabelOffset(g,e),w&&b.createLabelSubShape(c,g),g):null};l.calculateAbsolutePoint=function(c){for(var b=0,a=0;null!=c;){var d=c.geometry;
-null!=d&&(b+=d.x,a+=d.y);c=c.parent}return new mxPoint(b,a)};l.prototype.addConnectedEdge=function(c,b,a,d){var k=b.getFromSheet(),k=new f.mxgraph.io.vsdx.ShapePageId(a,k),n=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap,k);if(null==n)return null;var w=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
-a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(a,n.getId()));if(null!=w){var e=c.getModel().getGeometry(w);null!=e&&(d=e.height)}var g=n.getStartXY(d),y=n.getEndXY(d),e=n.getRoutingPoints(d,g,n.getRotation());this.rotateChildEdge(c.getModel(),w,g,y,e);var q=null,D=b.getSourceToSheet(),D=null!=D?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
-a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,D)):null,B=!0;if(null==D)D=c.insertVertex(w,null,null,Math.floor(Math.round(100*g.x)/100),Math.floor(Math.round(100*g.y)/100),0,0);else if(D.style&&-1==D.style.indexOf(";rotation="))var q=l.calculateAbsolutePoint(D),C=l.calculateAbsolutePoint(w),G=D.geometry,q=new mxPoint((C.x+g.x-q.x)/G.width,(C.y+g.y-q.y)/G.height);else B=!1;g=null;b=
-b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,b)):null;C=!0;null==b?b=c.insertVertex(w,null,null,Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=l.calculateAbsolutePoint(b),g=l.calculateAbsolutePoint(w),
-G=b.geometry,g=new mxPoint((g.x+y.x-a.x)/G.width,(g.y+y.y-a.y)/G.height)):C=!1;y=n.getStyleFromEdgeShape(d);G=n.getRotation();0!==G?(a=c.insertEdge(w,null,null,D,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"=")),B=n.createLabelSubShape(c,a),null!=B&&(B.setStyle(B.getStyle()+";rotation="+(60<G&&240>G?(G+180)%360:G)),B=B.getGeometry(),B.x=0,B.y=0,B.relative=!0,B.offset=new mxPoint(-B.width/2,-B.height/2))):(a=c.insertEdge(w,null,n.getTextLabel(),D,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,
-"=")),G=n.getLblEdgeOffset(c.getView(),e),a.getGeometry().offset=G,null!=q&&c.setConnectionConstraint(a,D,!0,new mxConnectionConstraint(q,!1)),B&&e.shift(),null!=g&&c.setConnectionConstraint(a,b,!1,new mxConnectionConstraint(g,!1)),C&&e.pop());B=c.getModel().getGeometry(a);if(D.parent!=b.parent&&null!=w&&1!=w.id&&1==D.parent.id){b=q=0;do g=w.geometry,null!=g&&(q+=g.x,b+=g.y),w=w.parent;while(null!=w);a.parent=D.parent;for(w=0;w<e.length;w++)e[w].x+=q,e[w].y+=b}B.points=e;y.hasOwnProperty("curved")&&
-function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(y,"curved"),"1")&&(B=c.getModel().getGeometry(a),c=n.getControlPoints(d),B.points=c);return k};l.prototype.addUnconnectedEdge=function(c,b,a,d){if(null!=b){var k=c.getModel().getGeometry(b);null!=k&&(d=k.height)}var n=a.getStartXY(d),w=a.getEndXY(d),l=a.getStyleFromEdgeShape(d),e=a.getRoutingPoints(d,n,a.getRotation()),g=a.getRotation();if(0!==g){0===a.getShapeIndex()?k=c.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,
-"=")):(k=c.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex()));var q=a.createLabelSubShape(c,k);null!=q&&(q.setStyle(q.getStyle()+";rotation="+(60<g&&240>g?(g+180)%360:g)),g=q.getGeometry(),g.x=0,g.y=0,g.relative=!0,g.offset=new mxPoint(-g.width/2,-g.height/2))}else 0===a.getShapeIndex()?k=c.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,a.getTextLabel(),
-null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex())),g=a.getLblEdgeOffset(c.getView(),e),k.getGeometry().offset=g;this.rotateChildEdge(c.getModel(),b,n,w,e);b=c.getModel().getGeometry(k);e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);l.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(l,"curved"),"1")&&(b=c.getModel().getGeometry(k),c=a.getControlPoints(d),
-b.points=c);return k};l.prototype.rotateChildEdge=function(c,b,a,d,k){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="),-1<b))for(c=parseFloat(c.substring(b+9,c.indexOf(";",b))),b=n.width/2,n=n.height/2,l.rotatedEdgePoint(a,c,b,n),l.rotatedEdgePoint(d,c,b,n),a=0;a<k.length;a++)l.rotatedEdgePoint(k[a],c,b,n)}};l.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};l.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),
-d=a.getChildCount(b),k=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<k.push(f)}for(n=0;n<k.length;n++)a.remove(k[n]);0<d&&(d=a.getChildCount(b));k=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==k.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return l}();g.mxVsdxCodec=e;e.__class="com.mxgraph.io.mxVsdxCodec"})(g.io||
-(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
+d){var k=this,n={},w={},e=function(){var a;function d(){a=a.concat(k.RESPONSE_END);b&&b(a)}for(var c=l.vsdxPlaceholder+"/document.xml",e=n[c]?n[c]:null,z=e.firstChild;null!=z&&1!=z.nodeType;)z=z.nextSibling;if(null!=z&&1==z.nodeType)k.importNodes(e,z,c,n);else return null;k.vsdxModel=new f.mxgraph.io.vsdx.mxVsdxModel(e,n,w);c=k.vsdxModel.getPages();a=k.RESPONSE_HEADER;var A=function(a){null==a.entries&&(a.entries=[]);return a.entries}(c),g=function(b,d){var n=A[b].getValue(),c=y.createMxGraph();c.getModel().beginUpdate();
+y.importPage(n,c,c.getDefaultParent(),!0);y.scaleGraph(c,n.getPageScale()/n.getDrawingScale());c.getModel().endUpdate();y.postImportPage(n,c,function(){y.sanitiseGraph(c);a=a.concat(k.RESPONSE_DIAGRAM_START);a=a.concat(k.processPage(c,n));a=a.concat(k.RESPONSE_DIAGRAM_END);b<A.length-1?g(b+1,d):d()})},y=k;0<A.length?g(0,d):d()},A=0,g=0,q=function(){if(g==A)try{e()}catch(C){console.log(C),null!=d?d():b("")}};JSZip.loadAsync(c).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,
+b){var d=b.name,c=d.toLowerCase(),f=c.length;c.indexOf(".xml")==f-4||c.indexOf(".xml.rels")==f-9?(A++,b.async("string").then(function(a){if(0!==a.length){65279==a.charCodeAt(0)&&(a=a.substring(1));var b=l.parseXml(a);null==b&&0===a.charCodeAt(1)&&0===a.charCodeAt(3)&&0===a.charCodeAt(5)&&(b=l.parseXml(l.decodeUTF16LE(a)));null!=b&&(b.vsdxFileName=d,n[d]=b)}g++;q()})):0===c.indexOf(l.vsdxPlaceholder+"/media")&&(A++,function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".emf")?
+JSZip.support.blob&&window.EMF_CONVERT_URL?b.async("blob").then(function(a){var b=new FormData;b.append("img",a,c);b.append("inputformat","emf");b.append("outputformat","png");var n=new XMLHttpRequest;n.open("POST",EMF_CONVERT_URL);n.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(n);n.onreadystatechange=mxUtils.bind(this,function(){if(4==n.readyState)if(200<=n.status&&299>=n.status)try{var a=new FileReader;a.readAsDataURL(n.response);a.onloadend=function(){var b=a.result.indexOf(",")+
+1;w[d]=a.result.substr(b);g++;q()}}catch(ba){console.log(ba),g++,q()}else g++,q()});n.send(b)}):(g++,q()):function(a,b){var d=a.length-b.length,k=a.indexOf(b,d);return-1!==k&&k===d}(c,".bmp")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){a=new BmpDecoder(a);var b=document.createElement("canvas");b.width=a.width;b.height=a.height;b.getContext("2d").putImageData(a.imageData,0,0);a=b.toDataURL("image/jpeg");w[d]=a.substr(23);g++;q()}):b.async("base64").then(function(a){w[d]=a;g++;
+q()}))})},function(a){null!=d&&d(a)})};l.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};l.prototype.processPage=function(c,b){var a=(new mxCodec).encode(c.getModel());a.setAttribute("style","default-style2");var a=mxUtils.getXml(a),d="";if(null!=b)var k=mxUtils.htmlEntities(b.getPageName())+(b.isBackground()?" (Background)":""),d=d+('<diagram name="'+k+
+'" id="'+k.replace(/\s/g,"_")+'">');return d+=Graph.compress(a)};l.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c};l.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};l.prototype.importNodes=function(c,b,a,d){var k=a.lastIndexOf("/"),n=a,f=a;if(-1!==k&&(n=a.substring(0,k),f=a.substring(k+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,n+"/_rels/"+f+".rels"),null!=a)){var l=a.getElementsByTagName("Relationship");a={};for(k=0;k<l.length;k++){var f=
+l.item(k),e=f.getAttribute("Id"),f=f.getAttribute("Target");a[e]=f}b=b.getElementsByTagName("Rel");for(k=0;k<b.length;k++)if(l=b.item(k),f=function(a,b){return a[b]?a[b]:null}(a,l.getAttribute("r:id")),f=n+"/"+f,null!=f&&(e=d[f]?d[f]:null,null!=e)){l=l.parentNode;for(e=e.firstChild;null!=e&&1!=e.nodeType;)e=e.nextSibling;if(null!=e&&1==e.nodeType)for(e=e.firstChild;null!=e;){if(null!=e&&1==e.nodeType){var g=l.appendChild(c.importNode(e,!0));this.importNodes(c,g,f,d)}e=e.nextSibling}}}};l.prototype.importPage=
+function(c,b,a,d){var k=c.getBackPage();if(null!=k){b.getModel().setValue(b.getDefaultParent(),c.getPageName());var n=new mxCell(k.getPageName());b.addCell(n,b.getModel().getRoot(),0,null,null);this.importPage(k,b,b.getDefaultParent())}k=c.getLayers();this.layersMap[0]=b.getDefaultParent();for(n=0;n<k.length;n++){var f=k[n];if(0==n)var l=b.getDefaultParent();else l=new mxCell,b.addCell(l,b.model.root,n);l.setVisible(1==f.Visible);1==f.Lock&&l.setStyle("locked=1;");l.setValue(f.Name);this.layersMap[n]=
+l}f=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(c.getShapes()));k=c.getPageDimensions().y;for(n=c.getId();f.hasNext();){var l=f.next(),l=l.getValue(),e=this.layersMap[l.layerMember];this.addShape(b,l,e?e:a,n,k)}for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=
+[]);return a.entries}(c.getConnects()));c.hasNext();)l=c.next(),a=this.addConnectedEdge(b,l.getValue(),n,k),null!=a&&function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries.splice(d,1)[0]}(this.edgeShapeMap,a);for(c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(this.edgeShapeMap));c.hasNext();)a=
+c.next(),a.getKey().getPageNumber()===n&&this.addUnconnectedEdge(b,function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,a.getKey()),a.getValue(),k);d||this.sanitiseGraph(b);return k};l.prototype.postImportPage=function(c,b,a){try{var d=this,k=[],n=c.getShapes().entries||[];for(b=0;b<n.length;b++){var w=n[b].value||{};w.toBeCroppedImg&&
+k.push(w)}if(0<k.length){var l=function(a,b){function n(){a<k.length-1?l(a+1,b):b()}var w=k[a],e=w.toBeCroppedImg,z=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(d.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(c.Id,w.Id)),A=new Image;A.onload=function(){var a=e.iData,b=e.iType;try{var d=A.width/e.imgWidth,k=A.height/e.imgHeight,c=-e.imgOffsetX*
+d,f=(e.imgHeight-e.height+e.imgOffsetY)*k,w=document.createElement("canvas");w.width=e.width*d;w.height=e.height*k;var l=w.getContext("2d");l.fillStyle="#FFFFFF";l.fillRect(0,0,w.width,w.height);l.drawImage(A,c,f,w.width,w.height,0,0,w.width,w.height);a=w.toDataURL("image/jpeg").substr(23);b="jpg"}catch(U){console.log(U)}z.style+=";image=data:image/"+b+","+a;n()};A.src="data:image/"+e.iType+";base64,"+e.iData;A.onerror=function(){z.style+=";image=data:image/"+e.iType+","+e.iData;n()}};l(0,a)}else a()}catch(A){console.log(A),
+a()}};l.prototype.addShape=function(c,b,a,d,k){b.parentHeight=k;var n=f.mxgraph.io.vsdx.VsdxShape.getType(b.getShape());if(null!=n&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(n,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var w=b.getId();if(b.isVertex())return n=null,n=b.isGroup()?this.addGroup(c,
+b,a,d,k):this.addVertex(c,b,a,d,k),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,w),b),b=b.getHyperlink(),b.extLink?c.setLinkForCell(n,b.extLink):b.pageLink&&c.setLinkForCell(n,"data:page/id,"+
+b.pageLink),n;b.setShapeIndex(c.getModel().getChildCount(a));(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,w),b);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=
+a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,w),a)}return null};l.prototype.addGroup=function(c,b,a,d,k){var n=b.getDimensions(),w=b.getMaster(),l=b.getStyleFromShape(),e=b.getGeomList();e.isNoFill()&&(l[mxConstants.STYLE_FILLCOLOR]="none",l[mxConstants.STYLE_GRADIENTCOLOR]="none");
+e.isNoLine()&&(l[mxConstants.STYLE_STROKECOLOR]="none");l.html="1";l[mxConstants.STYLE_WHITE_SPACE]="wrap";var g=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"="),l=null,q=b.getChildShapes(),l=null!=q&&0<function(a){null==a.entries&&(a.entries=[]);return a.entries.length}(q),e=b.isDisplacedLabel()||b.isRotatedLabel()||l,l=b.getOriginPoint(k,!0);if(e)l=c.insertVertex(a,null,null,Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*
+n.y)/100),g);else var C=b.getTextLabel(),l=c.insertVertex(a,null,C,Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),g);for(a=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){null==a.entries&&(a.entries=[]);return a.entries}(q));a.hasNext();)g=a.next().getValue(),q=g.getId(),g.isVertex()?(C=f.mxgraph.io.vsdx.VsdxShape.getType(g.getShape()),
+null!=C&&(function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(a,b){return a&&a.equals?a.equals(b):a===b}(C,f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&g.isVertex()&&(g.propagateRotation(b.getRotation()),g.isGroup()?this.addGroup(c,g,l,d,n.y):this.addVertex(c,g,l,d,n.y)),null==w&&function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<
+a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),g)):null==w?(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,
+value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),g),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(d,q),
+l)):this.addUnconnectedEdge(c,l,g,k);e&&b.createLabelSubShape(c,l);c=b.getRotation();if(0!==c)for(n=l.getGeometry(),k=n.width/2,n=n.height/2,w=0;w<l.getChildCount();w++)e=l.getChildAt(w),f.mxgraph.online.Utils.rotatedGeometry(e.getGeometry(),c,k,n);(function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
+getValue:function(){return this.value}})})(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(d,b.getId()),l);return l};l.rotatedEdgePoint=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var n=c.x-a,f=c.y-d;c.x=Math.round(n*k-f*b+a);c.y=Math.round(f*k+n*b+d)};l.prototype.addVertex=function(c,b,a,d,k){var n="",w=b.isDisplacedLabel()||b.isRotatedLabel();w||(n=b.getTextLabel());var l=b.getDimensions(),e=b.getStyleFromShape();e.html="1";var g=e.hasOwnProperty(mxConstants.STYLE_SHAPE)||
+e.hasOwnProperty("stencil");e.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&g||(e[mxConstants.STYLE_FILLCOLOR]="none");g||(e[mxConstants.STYLE_STROKECOLOR]="none");e.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&g||(e[mxConstants.STYLE_GRADIENTCOLOR]="none");e[mxConstants.STYLE_WHITE_SPACE]="wrap";k=b.getOriginPoint(k,!0);return g||null!=n?(e=f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(e,"="),g=null,g=w?c.insertVertex(a,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/
+100),Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),e):c.insertVertex(a,null,n,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*l.x)/100),Math.floor(Math.round(100*l.y)/100),e),function(a,b,d){null==a.entries&&(a.entries=[]);for(var k=0;k<a.entries.length;k++)if(null!=a.entries[k].key.equals&&a.entries[k].key.equals(b)||a.entries[k].key===b){a.entries[k].value=d;return}a.entries.push({key:b,value:d,getKey:function(){return this.key},
+getValue:function(){return this.value}})}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(d,b.getId()),g),b.setLabelOffset(g,e),w&&b.createLabelSubShape(c,g),g):null};l.calculateAbsolutePoint=function(c){for(var b=0,a=0;null!=c;){var d=c.geometry;null!=d&&(b+=d.x,a+=d.y);c=c.parent}return new mxPoint(b,a)};l.prototype.addConnectedEdge=function(c,b,a,d){var k=b.getFromSheet(),k=new f.mxgraph.io.vsdx.ShapePageId(a,k),n=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
+a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.edgeShapeMap,k);if(null==n)return null;var w=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.parentsMap,new f.mxgraph.io.vsdx.ShapePageId(a,n.getId()));if(null!=w){var e=c.getModel().getGeometry(w);null!=e&&(d=e.height)}var g=
+n.getStartXY(d),y=n.getEndXY(d),e=n.getRoutingPoints(d,g,n.getRotation());this.rotateChildEdge(c.getModel(),w,g,y,e);var q=null,C=b.getSourceToSheet(),C=null!=C?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,C)):null,E=!0;if(null==C)C=c.insertVertex(w,null,null,Math.floor(Math.round(100*g.x)/100),
+Math.floor(Math.round(100*g.y)/100),0,0);else if(C.style&&-1==C.style.indexOf(";rotation="))var q=l.calculateAbsolutePoint(C),D=l.calculateAbsolutePoint(w),G=C.geometry,q=new mxPoint((D.x+g.x-q.x)/G.width,(D.y+g.y-q.y)/G.height);else E=!1;g=null;b=b.getTargetToSheet();b=null!=b?function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.ShapePageId(a,
+b)):null;D=!0;null==b?b=c.insertVertex(w,null,null,Math.floor(Math.round(100*y.x)/100),Math.floor(Math.round(100*y.y)/100),0,0):b.style&&-1==b.style.indexOf(";rotation=")?(a=l.calculateAbsolutePoint(b),g=l.calculateAbsolutePoint(w),G=b.geometry,g=new mxPoint((g.x+y.x-a.x)/G.width,(g.y+y.y-a.y)/G.height)):D=!1;y=n.getStyleFromEdgeShape(d);G=n.getRotation();0!==G?(a=c.insertEdge(w,null,null,C,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"=")),E=n.createLabelSubShape(c,a),null!=E&&(E.setStyle(E.getStyle()+
+";rotation="+(60<G&&240>G?(G+180)%360:G)),E=E.getGeometry(),E.x=0,E.y=0,E.relative=!0,E.offset=new mxPoint(-E.width/2,-E.height/2))):(a=c.insertEdge(w,null,n.getTextLabel(),C,b,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(y,"=")),G=n.getLblEdgeOffset(c.getView(),e),a.getGeometry().offset=G,null!=q&&c.setConnectionConstraint(a,C,!0,new mxConnectionConstraint(q,!1)),E&&e.shift(),null!=g&&c.setConnectionConstraint(a,b,!1,new mxConnectionConstraint(g,!1)),D&&e.pop());E=c.getModel().getGeometry(a);if(C.parent!=
+b.parent&&null!=w&&1!=w.id&&1==C.parent.id){b=q=0;do g=w.geometry,null!=g&&(q+=g.x,b+=g.y),w=w.parent;while(null!=w);a.parent=C.parent;for(w=0;w<e.length;w++)e[w].x+=q,e[w].y+=b}E.points=e;y.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(y,"curved"),"1")&&(E=c.getModel().getGeometry(a),c=n.getControlPoints(d),E.points=c);return k};l.prototype.addUnconnectedEdge=function(c,b,a,d){if(null!=b){var k=c.getModel().getGeometry(b);null!=
+k&&(d=k.height)}var n=a.getStartXY(d),w=a.getEndXY(d),l=a.getStyleFromEdgeShape(d),e=a.getRoutingPoints(d,n,a.getRotation()),g=a.getRotation();if(0!==g){0===a.getShapeIndex()?k=c.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex()));var q=a.createLabelSubShape(c,k);null!=q&&(q.setStyle(q.getStyle()+";rotation="+(60<g&&240>g?(g+180)%
+360:g)),g=q.getGeometry(),g.x=0,g.y=0,g.relative=!0,g.offset=new mxPoint(-g.width/2,-g.height/2))}else 0===a.getShapeIndex()?k=c.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex())),g=a.getLblEdgeOffset(c.getView(),e),k.getGeometry().offset=g;this.rotateChildEdge(c.getModel(),b,n,w,e);b=c.getModel().getGeometry(k);
+e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);l.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(l,"curved"),"1")&&(b=c.getModel().getGeometry(k),c=a.getControlPoints(d),b.points=c);return k};l.prototype.rotateChildEdge=function(c,b,a,d,k){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="),-1<b))for(c=parseFloat(c.substring(b+9,c.indexOf(";",b))),b=n.width/
+2,n=n.height/2,l.rotatedEdgePoint(a,c,b,n),l.rotatedEdgePoint(d,c,b,n),a=0;a<k.length;a++)l.rotatedEdgePoint(k[a],c,b,n)}};l.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};l.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),d=a.getChildCount(b),k=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<k.push(f)}for(n=0;n<k.length;n++)a.remove(k[n]);0<d&&(d=a.getChildCount(b));k=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==
+d||!a.isVertex(b)||null!=a.getValue(b)&&0!==k.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return l}();g.mxVsdxCodec=e;e.__class="com.mxgraph.io.mxVsdxCodec"})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){var e=function(l){function c(b){var a=l.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(c,l);c.prototype.decodeVssx=function(b,a,d,k){var n=this,c="<mxlibrary>[";this.decodeVsdx(b,function(b){c=c.concat(b);var d=n.vsdxModel.getMasterShapes(),w=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=
-[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(n.vsdxModel.getPages())).next();if(null!=d){var e={str:"",toString:function(){return this.str}},g=0===b.length?"":",",A=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=A[a];var b=q.createMxGraph(),k=1;if(null!=a.pageSheet){var n=k=1,c=a.pageSheet.DrawingScale;null!=c&&(k=parseFloat(c.getAttribute("V"))||1);c=a.pageSheet.PageScale;null!=c&&(n=parseFloat(c.getAttribute("V"))||
-1);k=n/k}n=!1;for(c=0;null!=a.firstLevelShapes&&c<a.firstLevelShapes.length;c++){var z=a.firstLevelShapes[c].getShape(),y=new f.mxgraph.io.vsdx.VsdxShape(w,z,!w.isEdge(z),d,null,q.vsdxModel),z=null;if(y.isVertex()){q.edgeShapeMap.entries=[];q.parentsMap.entries=[];for(var z=q.addShape(b,y,b.getDefaultParent(),0,1169),y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(q.edgeShapeMap),E=0;E<y.length;E++){var D=y[E],B=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
-a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(q.parentsMap,D.getKey());q.addUnconnectedEdge(b,B,D.getValue(),1169)}}else z=q.addUnconnectedEdge(b,null,y,1169);n|=null!=z}if(n){q.scaleGraph(b,k);k=q.normalizeGraph(b);q.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";e.str=e.str.concat(g);e.str=e.str.concat('{"xml":"');b=l.prototype.processPage.call(q,b,null);e.str=e.str.concat(b);e.str=e.str.concat('","w":');
-e.str=e.str.concat(k.width);e.str=e.str.concat(',"h":');e.str=e.str.concat(k.height);e.str=e.str.concat(',"title":');a=a.getName();null==a&&(a="");a=mxUtils.htmlEntities(JSON.stringify(a));e.str=e.str.concat(a);e.str=e.str.concat("}");g=","}};for(var q=n,G=0;G<A.length;G++)b(G);c=c.concat(e)}c=c.concat("]</mxlibrary>");if(a)try{a(c)}catch(P){null!=k?k(P):a("")}},d)};c.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,
+[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(n.vsdxModel.getPages())).next();if(null!=d){var e={str:"",toString:function(){return this.str}},g=0===b.length?"":",",z=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=z[a];var b=q.createMxGraph(),k=1;if(null!=a.pageSheet){var n=k=1,c=a.pageSheet.DrawingScale;null!=c&&(k=parseFloat(c.getAttribute("V"))||1);c=a.pageSheet.PageScale;null!=c&&(n=parseFloat(c.getAttribute("V"))||
+1);k=n/k}n=!1;for(c=0;null!=a.firstLevelShapes&&c<a.firstLevelShapes.length;c++){var A=a.firstLevelShapes[c].getShape(),y=new f.mxgraph.io.vsdx.VsdxShape(w,A,!w.isEdge(A),d,null,q.vsdxModel),A=null;if(y.isVertex()){q.edgeShapeMap.entries=[];q.parentsMap.entries=[];for(var A=q.addShape(b,y,b.getDefaultParent(),0,1169),y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(q.edgeShapeMap),C=0;C<y.length;C++){var B=y[C],E=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
+a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b)return a.entries[d].value;return null}(q.parentsMap,B.getKey());q.addUnconnectedEdge(b,E,B.getValue(),1169)}}else A=q.addUnconnectedEdge(b,null,y,1169);n|=null!=A}if(n){q.scaleGraph(b,k);k=q.normalizeGraph(b);q.sanitiseGraph(b);if(0===b.getModel().getChildCount(b.getDefaultParent()))return"continue";e.str=e.str.concat(g);e.str=e.str.concat('{"xml":"');b=l.prototype.processPage.call(q,b,null);e.str=e.str.concat(b);e.str=e.str.concat('","w":');
+e.str=e.str.concat(k.width);e.str=e.str.concat(',"h":');e.str=e.str.concat(k.height);e.str=e.str.concat(',"title":');a=a.getName();null==a&&(a="");a=mxUtils.htmlEntities(JSON.stringify(a));e.str=e.str.concat(a);e.str=e.str.concat("}");g=","}};for(var q=n,G=0;G<z.length;G++)b(G);c=c.concat(e)}c=c.concat("]</mxlibrary>");if(a)try{a(c)}catch(P){null!=k?k(P):a("")}},d)};c.prototype.normalizeGeo=function(b){var a=b.getGeometry();a.x=0;a.y=0;var d=a.sourcePoint;if(b.isEdge()&&null!=d){this.transPoint(a.targetPoint,
 d);this.transPoint(a.offset,d);b=a.points;if(null!=b)for(var k=0;k<b.length;k++)this.transPoint(b[k],d);this.transPoint(d,d)}return a};c.prototype.normalizeGraph=function(b){function a(a){null!=a&&(null==d?(d=a.x,k=a.y,n=a.x+(a.width||0),c=a.y+(a.height||0)):(d=Math.min(a.x,d),k=Math.min(a.y,k),n=Math.max(a.x+(a.width||0),n),c=Math.max(a.y+(a.height||0),c)))}var d,k,n,c,f;for(f in b.model.cells){var e=b.model.cells[f],l=e.geometry;if(null!=l&&1==e.parent.id)if(e.vertex)a(l);else for(a(l.sourcePoint),
 a(l.targetPoint),e=l.points,l=0;null!=e&&l<e.length;l++)a(e[l])}var g={x:d,y:k};for(f in b.model.cells)if(e=b.model.cells[f],l=e.geometry,null!=l&&1==e.parent.id&&(l.x-=d,l.y-=k,e.isEdge()))for(this.transPoint(l.sourcePoint,g),this.transPoint(l.targetPoint,g),this.transPoint(l.offset,g),e=l.points,l=0;null!=e&&l<e.length;l++)this.transPoint(e[l],g);return{width:n-d,height:c-k}};c.prototype.transPoint=function(b,a){null!=b&&(b.x-=a.x,b.y-=a.y)};c.prototype.processPage=function(b,a){var d=b.getModel(),
 k="",n="",c;for(c in d.cells){var e=d.cells[c];if(b.getDefaultParent()===d.getParent(e)){var k=k.concat(n),k=k.concat('{"xml":"'),g=this.createMxGraph();g.addCell(e);this.sanitiseGraph(g);if(0===g.getModel().getChildCount(g.getDefaultParent()))return"continue";n=this.normalizeGeo(e);g=l.prototype.processPage.call(this,g,null);k=k.concat(g);k=k.concat('","w":');k=k.concat(n.width);k=k.concat(',"h":');k=k.concat(n.height);k=k.concat(',"title":"');n=d.getStyle(e);e="";if(null!=n&&(g=n.indexOf(f.mxgraph.io.vsdx.mxVsdxConstants.VSDX_ID),
@@ -1019,11 +1024,11 @@ k="",n="",c;for(c in d.cells){var e=d.cells[c];if(b.getDefaultParent()===d.getPa
 g.mxVssxCodec=e;e.__class="com.mxgraph.io.mxVssxCodec"})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a,b,k){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=k}b.prototype.getX=function(){return this.x};b.prototype.getY=function(){return this.y};b.prototype.getA=function(){return this.a};b.prototype.getB=function(){return this.b};b.prototype.getC=function(){return this.c};b.prototype.getD=function(){return this.d};b.prototype.getFormulaA=
 function(){return this.formulaA};b.prototype.getFormulaE=function(){return this.formulaE};b.prototype.getIndex=function(){return this.index};return b}();f.Row=c;c.__class="com.mxgraph.io.vsdx.geometry.Row"})(f.geometry||(f.geometry={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
-(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(k){}return null};b.getRowObj=function(a,d){var k=a.getAttribute("T"),n=b.getIndex(a),c;c=(c=a.getAttribute("Del"))&&c.equals?c.equals("1"):"1"===c;if(!c){var e=null;n<=d.length&&(e=d[n-1]);var l=c=null,g=null,
-q=null,D=null,B=null,C=null,G=null;null!=e&&(c=e.x,l=e.y,g=e.getA(),q=e.getB(),D=e.getC(),B=e.getD(),G=e.getFormulaA(),C=e.getFormulaE());for(var e=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),P=0;P<e.length;P++){var aa=e[P],S=aa.getAttribute("N"),N=aa.getAttribute("V");switch(S){case "X":c=b.getDoubleVal(N);break;case "Y":l=b.getDoubleVal(N);break;case "A":g=b.getDoubleVal(N);G=aa.getAttribute("V");break;case "B":q=b.getDoubleVal(N);break;case "C":D=b.getDoubleVal(N);break;case "D":B=
-b.getDoubleVal(N);break;case "E":C=N}}switch(k){case "MoveTo":return new f.mxgraph.io.vsdx.geometry.MoveTo(n,c,l);case "LineTo":return new f.mxgraph.io.vsdx.geometry.LineTo(n,c,l);case "ArcTo":return new f.mxgraph.io.vsdx.geometry.ArcTo(n,c,l,g);case "Ellipse":return new f.mxgraph.io.vsdx.geometry.Ellipse(n,c,l,g,q,D,B);case "EllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.EllipticalArcTo(n,c,l,g,q,D,B);case "InfiniteLine":return new f.mxgraph.io.vsdx.geometry.InfiniteLine(n,c,l,g,q);case "NURBSTo":return new f.mxgraph.io.vsdx.geometry.NURBSTo(n,
-c,l,g,q,D,B,C);case "PolylineTo":return new f.mxgraph.io.vsdx.geometry.PolylineTo(n,c,l,G);case "RelCubBezTo":return new f.mxgraph.io.vsdx.geometry.RelCubBezTo(n,c,l,g,q,D,B);case "RelEllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(n,c,l,g,q,D,B);case "RelLineTo":return new f.mxgraph.io.vsdx.geometry.RelLineTo(n,c,l);case "RelMoveTo":return new f.mxgraph.io.vsdx.geometry.RelMoveTo(n,c,l);case "RelQuadBezTo":return new f.mxgraph.io.vsdx.geometry.RelQuadBezTo(n,c,l,g,q);case "SplineKnot":return new f.mxgraph.io.vsdx.geometry.SplineKnot(n,
-c,l,g);case "SplineStart":return new f.mxgraph.io.vsdx.geometry.SplineStart(n,c,l,g,q,D,B)}}return new f.mxgraph.io.vsdx.geometry.DelRow(n)};return b}();e.RowFactory=c;c.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
+(function(f){(function(g){(function(g){(function(e){(function(l){var c=function(){function b(){}b.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(d){return 1}};b.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(k){}return null};b.getRowObj=function(a,d){var k=a.getAttribute("T"),n=b.getIndex(a),c;c=(c=a.getAttribute("Del"))&&c.equals?c.equals("1"):"1"===c;if(!c){var l=null;n<=d.length&&(l=d[n-1]);var e=c=null,g=null,
+q=null,C=null,E=null,D=null,G=null;null!=l&&(c=l.x,e=l.y,g=l.getA(),q=l.getB(),C=l.getC(),E=l.getD(),G=l.getFormulaA(),D=l.getFormulaE());for(var l=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),P=0;P<l.length;P++){var Z=l[P],W=Z.getAttribute("N"),M=Z.getAttribute("V");switch(W){case "X":c=b.getDoubleVal(M);break;case "Y":e=b.getDoubleVal(M);break;case "A":g=b.getDoubleVal(M);G=Z.getAttribute("V");break;case "B":q=b.getDoubleVal(M);break;case "C":C=b.getDoubleVal(M);break;case "D":E=b.getDoubleVal(M);
+break;case "E":D=M}}switch(k){case "MoveTo":return new f.mxgraph.io.vsdx.geometry.MoveTo(n,c,e);case "LineTo":return new f.mxgraph.io.vsdx.geometry.LineTo(n,c,e);case "ArcTo":return new f.mxgraph.io.vsdx.geometry.ArcTo(n,c,e,g);case "Ellipse":return new f.mxgraph.io.vsdx.geometry.Ellipse(n,c,e,g,q,C,E);case "EllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.EllipticalArcTo(n,c,e,g,q,C,E);case "InfiniteLine":return new f.mxgraph.io.vsdx.geometry.InfiniteLine(n,c,e,g,q);case "NURBSTo":return new f.mxgraph.io.vsdx.geometry.NURBSTo(n,
+c,e,g,q,C,E,D);case "PolylineTo":return new f.mxgraph.io.vsdx.geometry.PolylineTo(n,c,e,G);case "RelCubBezTo":return new f.mxgraph.io.vsdx.geometry.RelCubBezTo(n,c,e,g,q,C,E);case "RelEllipticalArcTo":return new f.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(n,c,e,g,q,C,E);case "RelLineTo":return new f.mxgraph.io.vsdx.geometry.RelLineTo(n,c,e);case "RelMoveTo":return new f.mxgraph.io.vsdx.geometry.RelMoveTo(n,c,e);case "RelQuadBezTo":return new f.mxgraph.io.vsdx.geometry.RelQuadBezTo(n,c,e,g,q);case "SplineKnot":return new f.mxgraph.io.vsdx.geometry.SplineKnot(n,
+c,e,g);case "SplineStart":return new f.mxgraph.io.vsdx.geometry.SplineStart(n,c,e,g,q,C,E)}}return new f.mxgraph.io.vsdx.geometry.DelRow(n)};return b}();l.RowFactory=c;c.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){var l=function(){function c(){this.colorElementMap={};this.fontElementMap={}}c.__static_initialize=function(){c.__static_initialized||(c.__static_initialized=!0,c.__static_initializer_0())};c.defaultColors_$LI$=function(){c.__static_initialize();null==c.defaultColors&&(c.defaultColors={});return c.defaultColors};c.__static_initializer_0=function(){c.defaultColors_$LI$()["0"]="#000000";c.defaultColors_$LI$()["1"]="#FFFFFF";c.defaultColors_$LI$()["2"]=
 "#FF0000";c.defaultColors_$LI$()["3"]="#00FF00";c.defaultColors_$LI$()["4"]="#0000FF";c.defaultColors_$LI$()["5"]="#FFFF00";c.defaultColors_$LI$()["6"]="#FF00FF";c.defaultColors_$LI$()["7"]="#00FFFF";c.defaultColors_$LI$()["8"]="#800000";c.defaultColors_$LI$()["9"]="#008000";c.defaultColors_$LI$()["10"]="#000080";c.defaultColors_$LI$()["11"]="#808000";c.defaultColors_$LI$()["12"]="#800080";c.defaultColors_$LI$()["13"]="#008080";c.defaultColors_$LI$()["14"]="#C0C0C0";c.defaultColors_$LI$()["15"]="#E6E6E6";
 c.defaultColors_$LI$()["16"]="#CDCDCD";c.defaultColors_$LI$()["17"]="#B3B3B3";c.defaultColors_$LI$()["18"]="#9A9A9A";c.defaultColors_$LI$()["19"]="#808080";c.defaultColors_$LI$()["20"]="#666666";c.defaultColors_$LI$()["21"]="#4D4D4D";c.defaultColors_$LI$()["22"]="#333333";c.defaultColors_$LI$()["23"]="#1A1A1A"};c.prototype.initialise=function(b,a){if(null!=b){var d=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.COLORS);if(0<d.length)for(var k=d.item(0).getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.COLOR_ENTRY),
@@ -1050,8 +1055,8 @@ c.prototype.isNoLine=function(){return this.noLine};c.prototype.isNoShow=functio
 (function(f){(function(g){(function(g){(function(e){var l=function(){function c(b){this.geomList=[];this.parentGeomList=null;this.sortNeeded=!1;if(null!=b){this.parentGeomList=b.geomList;var a=this.geomList;a.push.apply(a,b.geomList)}}c.prototype.addGeometry=function(b){b=new f.mxgraph.io.vsdx.mxVsdxGeometry(b,this.parentGeomList);b.getIndex()<this.geomList.length?this.geomList[b.getIndex()]=b:(0<this.geomList.push(b),this.sortNeeded=!0)};c.prototype.sort=function(){this.sortNeeded&&(function(b,a){a.compare?
 b.sort(function(b,k){return a.compare(b,k)}):b.sort(a)}(this.geomList,new c.mxVsdxGeometryList$0(this)),this.sortNeeded=!1)};c.prototype.isNoShow=function(){for(var b=0;b<this.geomList.length;b++)if(!this.geomList[b].isNoShow())return!1;return!0};c.prototype.isNoFill=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&!a.isNoFill())return!1}return!0};c.prototype.isNoLine=function(){for(var b=0;b<this.geomList.length;b++){var a=this.geomList[b];if(!a.isNoShow()&&
 !a.isNoLine())return!1}return!0};c.prototype.hasGeom=function(){return 0!=this.geomList.length};c.prototype.getGeoCount=function(){for(var b=0,a=0;a<this.geomList.length;a++)this.geomList[a].isNoShow()||b++;return b};c.prototype.rotatedPoint=function(b,a,d){var k=b.y*a+b.x*d;b.x=b.x*a-b.y*d;b.y=k};c.prototype.getRoutingPoints=function(b,a,d){this.sort();b=[];0<b.push(a.clone());for(var k=0,n=0,c=0;c<this.geomList.length;c++){var e=this.geomList[c];if(!e.isNoShow())for(var e=e.getRows(),l=0;l<e.length;l++){var g=
-e[l];if(0==l&&null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.MoveTo)k=null!=g.x?g.x:0,n=null!=g.y?g.y:0;else if(null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.LineTo){var q=null!=g.x?g.x:0,g=null!=g.y?g.y:0,D=new mxPoint(q,g);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(D,Math.cos(d),Math.sin(d)));q=(D.x-k)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q+=a.x;g=(D.y-n)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;g+=a.y;q=Math.round(100*q)/100;g=Math.round(100*g)/100;D.x=
-q;D.y=g;0<b.push(D)}}}return b};c.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},k=d.str.length,n;n=this.processGeo(b,a,d,-1,!0);n=this.processGeo(b,a,d,n,!1);if(d.str.length===k)return"";this.closePath(d,n);d.str=d.str.concat("</foreground></shape>");return d.str};c.prototype.processGeo=function(b,a,d,k,n){var c=b.getRounding(),e="";0<c&&(e=' rounded="1" arcSize="'+c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+
+e[l];if(0==l&&null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.MoveTo)k=null!=g.x?g.x:0,n=null!=g.y?g.y:0;else if(null!=g&&g instanceof f.mxgraph.io.vsdx.geometry.LineTo){var q=null!=g.x?g.x:0,g=null!=g.y?g.y:0,C=new mxPoint(q,g);0!==d&&(d=(360-d)*Math.PI/180,this.rotatedPoint(C,Math.cos(d),Math.sin(d)));q=(C.x-k)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q+=a.x;g=(C.y-n)*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$()*-1;g+=a.y;q=Math.round(100*q)/100;g=Math.round(100*g)/100;C.x=
+q;C.y=g;0<b.push(C)}}}return b};c.prototype.getShapeXML=function(b){var a=new mxPoint(0,0),d={str:'<shape strokewidth="inherit"><foreground>',toString:function(){return this.str}},k=d.str.length,n;n=this.processGeo(b,a,d,-1,!0);n=this.processGeo(b,a,d,n,!1);if(d.str.length===k)return"";this.closePath(d,n);d.str=d.str.concat("</foreground></shape>");return d.str};c.prototype.processGeo=function(b,a,d,k,n){var c=b.getRounding(),e="";0<c&&(e=' rounded="1" arcSize="'+c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor+
 '" ');for(c=0;c<this.geomList.length;c++){var l=this.geomList[c];if(n!==l.isNoFill()){var g=l.getPathXML(a,b);0!==g.length&&(l=this.getGeoStyle(l),-1===k?d.str=d.str.concat("<path"+e+">"):k!==l&&(this.closePath(d,k),d.str=d.str.concat("<path"+e+">")),d.str=d.str.concat(g),k=l)}}return k};c.prototype.getGeoStyle=function(b){var a=0;b.isNoLine()||b.isNoFill()?b.isNoFill()?b.isNoLine()||(a=3):a=2:a=1;return a};c.prototype.closePath=function(b,a){b.str=b.str.concat("</path>");1===a?b.str=b.str.concat("<fillstroke/>"):
 2===a?b.str=b.str.concat("<fill/>"):3===a&&(b.str=b.str.concat("<stroke/>"))};return c}();e.mxVsdxGeometryList=l;l.__class="com.mxgraph.io.vsdx.mxVsdxGeometryList";(function(c){var b=function(){function a(a){this.__parent=a}a.prototype.compare=function(a,b){return a.getIndex()-b.getIndex()};return a}();c.mxVsdxGeometryList$0=b;b.__interfaces=["java.util.Comparator"]})(l=e.mxVsdxGeometryList||(e.mxVsdxGeometryList={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com=
 {}));
@@ -1138,7 +1143,7 @@ this.connLineStyles)};return c}();l.__static_initialized=!1;e.mxVsdxTheme=l;l.__
 b.firstChild;null!=b;b=b.nextSibling)null!=b&&1==b.nodeType&&0<a.push(b);return a};c.getDirectFirstChildElement=function(b){for(b=b.firstChild;null!=b;b=b.nextSibling)if(null!=b&&1==b.nodeType)return b;return null};c.getIntAttr$org_w3c_dom_Element$java_lang_String$int=function(b,a,d){try{var k=b.getAttribute(a);if(null!=k)return parseInt(k)}catch(n){}return d};c.getIntAttr=function(b,a,d){if((null==b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||"number"!==typeof d&&null!==d){if((null==
 b||1!=b.nodeType)&&null!==b||"string"!==typeof a&&null!==a||void 0!==d)throw Error("invalid overload");return f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(b,a)}return f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,d)};c.getIntAttr$org_w3c_dom_Element$java_lang_String=function(b,a){return c.getIntAttr$org_w3c_dom_Element$java_lang_String$int(b,a,0)};c.getStyleString=function(b,a){for(var d="",k=function(a){var b=0;return{next:function(){return b<
 a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){return Object.keys(a).map(function(b){return a[b]})}(b)),c=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(Object.keys(b));c.hasNext();){var f=c.next(),e=k.next();if(!function(a,b){return a&&a.equals?a.equals(b):a===b}(f,mxConstants.STYLE_SHAPE)||!function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(b[f]?b[f]:null,"image")&&!function(a,b,d){void 0===
-d&&(d=0);return a.substr(d,b.length)===b}(b[f]?b[f]:null,"rounded="))try{d=d+f+a}catch(z){console.error("mxVsdxUtils.getStyleString,"+z+",style.length="+d.length+",key.length="+f.length+",asig.length="+a.length)}d=d+e+";"}return d};c.surroundByTags=function(b,a){return"<"+a+">"+b+"</"+a+">"};c.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&amp;").replace(RegExp('"',"g"),"&quot;").replace(RegExp("'","g"),"&prime;").replace(RegExp("<","g"),"&lt;").replace(RegExp(">","g"),"&gt;")};c.toInitialCapital=
+d&&(d=0);return a.substr(d,b.length)===b}(b[f]?b[f]:null,"rounded="))try{d=d+f+a}catch(A){console.error("mxVsdxUtils.getStyleString,"+A+",style.length="+d.length+",key.length="+f.length+",asig.length="+a.length)}d=d+e+";"}return d};c.surroundByTags=function(b,a){return"<"+a+">"+b+"</"+a+">"};c.htmlEntities=function(b){return b.replace(RegExp("&","g"),"&amp;").replace(RegExp('"',"g"),"&quot;").replace(RegExp("'","g"),"&prime;").replace(RegExp("<","g"),"&lt;").replace(RegExp(">","g"),"&gt;")};c.toInitialCapital=
 function(b){b=b.split(" ");for(var a="",d=0;d<b.length;d++)var k=b[d],c=k.substring(0,1),k=k.substring(1),c=c.toUpperCase(),a=a+(c+k);return a.substring(0,a.length)};c.toSmallCaps=function(b,a){var d="",k=d;if(a&&a.equals?a.equals(k):a===k)d=b;else for(var k=b.split(""),c=0;c<k.length;c++){var f=k[c];(null==f.charCodeAt?f:f.charCodeAt(0))>=(null=="a".charCodeAt?"a":97)&&(null==f.charCodeAt?f:f.charCodeAt(0))<=(null=="z".charCodeAt?"z":122)?(f=(new String(f)).toString(),f=f.toUpperCase(),d+='<font style="font-size:'+
 parseFloat(a)/1.28+'px">'+f+"</font>"):d+=f}return d};c.getStyleMap=function(b,a){for(var d={},k=b.split(";"),c=0;c<k.length;c++){var f=k[c],e=f.indexOf(a),l=f.substring(0,e),f=f.substring(e+1);d[l]=f}return d};c.isInsideTriangle=function(b,a,d,k,c,f,e,l){c-=d;f-=k;e-=d;l-=k;k=c*l-e*f;d=(b*(f-l)+a*(e-c)+c*l-e*f)/k;e=(b*l-a*e)/k;b=(a*c-b*f)/k;return 0<d&&1>d&&0<e&&1>e&&0<b&&1>b?!0:!1};return c}();l.screenCoordinatesPerCm=40;l.CENTIMETERS_PER_INCHES=2.54;e.mxVsdxUtils=l;l.__class="com.mxgraph.io.vsdx.mxVsdxUtils"})(g.vsdx||
 (g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
@@ -1160,16 +1165,16 @@ c;c.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(e.theme||(e.theme={})
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=k}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,k){0>k&&(k+=1);1<k&&--k;return k<1/6?
 a+6*(b-a)*k:.5>k?b:k<2/3?a+(b-a)*(2/3-k)*6:a};b.prototype.toRgb=function(){var a,b,k;k=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=k=a;else{var c=.5>a?a*(1+b):a+b-a*b,e=2*a-c;a=this.hue2rgb(e,c,k+1/3);b=this.hue2rgb(e,c,k);k=this.hue2rgb(e,c,k-1/3)}return new f.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*k|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*=
 a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();e.HSLColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
-(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.h=a;this.s=b;this.v=k}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,k=Math.floor(a),c=a-k,a=this.v*(1-b),e=this.v*(1-c*b),b=this.v*(1-(1-c)*b),k=(k|0)%6;return new f.mxgraph.io.vsdx.theme.Color(255*[this.v,e,a,a,b,this.v][k]|0,255*[b,this.v,this.v,e,a,a][k]|0,255*[a,a,b,this.v,this.v,e][k]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=
+(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,c){this.h=a;this.s=b;this.v=c}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,c=Math.floor(a),n=a-c,a=this.v*(1-b),e=this.v*(1-n*b),b=this.v*(1-(1-n)*b),c=(c|0)%6;return new f.mxgraph.io.vsdx.theme.Color(255*[this.v,e,a,a,b,this.v][c]|0,255*[b,this.v,this.v,e,a,a][c]|0,255*[a,a,b,this.v,this.v,e][c]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=
 1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();e.HSVColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx=
 {}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=
 this.isBevelJoin=this.isRoundJoin=!1;this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.lineWidth=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(a,"w");var d=a.getAttribute("cap");if(null!=d)switch(d){case "rnd":this.lineCap=b.LineCapType.ROUND;break;case "sq":this.lineCap=b.LineCapType.SQUARE;break;case "flat":this.lineCap=b.LineCapType.FLAT}d=
-a.getAttribute("cmpd");if(null!=d)switch(d){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}for(var d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),k=0;k<d.length;k++){var c=d[k];switch(c.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=
-f.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(c);break;case "a:prstDash":c=c.getAttribute("val");this.isLineDashed=!0;switch(c){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "lgDash":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":0<this.lineDashPattern.push(8);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);
-break;case "lgDashDot":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":0<this.lineDashPattern.push(12),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;for(var c=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(c,"a:ds"),
-e=0;e<c.length;e++){var l=c[e],g=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(l,"d"),l=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(l,"sp");0<this.lineDashPattern.push(g/1E4);0<this.lineDashPattern.push(l/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=
-this.getLineEndType(c);this.headEndWidth=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,"w");this.headEndLen=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(c),this.tailEndWidth=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,"w"),this.tailEndLen=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(c,"len")}}}else if(void 0===
+a.getAttribute("cmpd");if(null!=d)switch(d){case "sng":this.lineComp=b.CompoundLineType.SINGLE;break;case "dbl":this.lineComp=b.CompoundLineType.DOUBLE;break;case "thickThin":this.lineComp=b.CompoundLineType.THICK_THIN_DOUBLE;break;case "thinThick":this.lineComp=b.CompoundLineType.THIN_THICK_DOUBLE;break;case "tri":this.lineComp=b.CompoundLineType.THIN_THICK_THIN_TRIPLE}for(var d=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a),c=0;c<d.length;c++){var n=d[c];switch(n.nodeName){case "a:noFill":case "a:solidFill":case "a:gradFill":case "a:pattFill":this.fillStyle=
+f.mxgraph.io.vsdx.theme.FillStyleFactory.getFillStyle(n);break;case "a:prstDash":n=n.getAttribute("val");this.isLineDashed=!0;switch(n){case "solid":this.isLineDashed=!1;break;case "sysDot":case "dot":0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "lgDash":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);break;case "sysDashDot":case "dashDot":0<this.lineDashPattern.push(8);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);
+break;case "lgDashDot":0<this.lineDashPattern.push(12);0<this.lineDashPattern.push(4);0<this.lineDashPattern.push(1);0<this.lineDashPattern.push(4);break;case "sysDashDotDot":case "lgDashDotDot":0<this.lineDashPattern.push(12),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4),0<this.lineDashPattern.push(1),0<this.lineDashPattern.push(4)}break;case "a:custDash":this.isLineDashed=!0;for(var n=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(n,"a:ds"),
+e=0;e<n.length;e++){var l=n[e],g=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(l,"d"),l=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(l,"sp");0<this.lineDashPattern.push(g/1E4);0<this.lineDashPattern.push(l/1E4)}break;case "a:round":this.isRoundJoin=!0;break;case "a:bevel":this.isBevelJoin=!0;break;case "a:miter":f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"lim");this.isMiterJoin=!0;break;case "a:headEnd":this.headEndType=
+this.getLineEndType(n);this.headEndWidth=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"w");this.headEndLen=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"len");break;case "a:tailEnd":this.tailEndType=this.getLineEndType(n),this.tailEndWidth=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"w"),this.tailEndLen=f.mxgraph.io.vsdx.mxVsdxUtils.getIntAttr$org_w3c_dom_Element$java_lang_String(n,"len")}}}else if(void 0===
 a)Array.prototype.slice.call(arguments),this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0,this.isLineDashed=!1,this.lineDashPattern=[],this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1,this.lineWidth=0,this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null,this.headEndLen=this.headEndWidth=0,this.tailEndType=null,this.tailEndLen=this.tailEndWidth=0;else throw Error("invalid overload");
 }b.prototype.getLineEndType=function(a){var d=null;switch(a.getAttribute("type")){case "none":d=b.LineEndType.NONE;break;case "triangle":d=b.LineEndType.TRIANGLE;break;case "stealth":d=b.LineEndType.STEALTH;break;case "diamond":d=b.LineEndType.DIAMOND;break;case "oval":d=b.LineEndType.OVAL;break;case "arrow":d=b.LineEndType.ARROW}return d};b.prototype.getLineColor=function(a,b){return null!=this.fillStyle?this.fillStyle.applyStyle(a,b):b.getDefaultLineClr()};b.prototype.isDashed=function(){return this.isLineDashed};
 b.prototype.getLineDashPattern=function(){return this.lineDashPattern};b.prototype.getStartSize=function(){return 4};b.prototype.getEndSize=function(){return 4};b.prototype.getStart=function(){return 0};b.prototype.getEnd=function(){return 0};b.prototype.getLineWidth=function(){return this.lineWidth};return b}();e.LineStyle=c;c.__class="com.mxgraph.io.vsdx.theme.LineStyle";(function(b){(function(a){a[a.ROUND=0]="ROUND";a[a.SQUARE=1]="SQUARE";a[a.FLAT=2]="FLAT"})(b.LineCapType||(b.LineCapType={}));
@@ -1189,43 +1194,43 @@ function(a){this.blueOff=a;this.hasEffects=!0};b.prototype.setBlueMod=function(a
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getOoxmlColor=function(a){var b=null;switch(a.nodeName){case "a:scrgbClr":b=new f.mxgraph.io.vsdx.theme.ScrgbClr(parseInt(a.getAttribute("r")),parseInt(a.getAttribute("g")),parseInt(a.getAttribute("b")));break;case "a:srgbClr":b=new f.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"));break;case "a:hslClr":b=new f.mxgraph.io.vsdx.theme.HslClr(parseInt(a.getAttribute("hue")),parseInt(a.getAttribute("sat")),
 parseInt(a.getAttribute("lum")));break;case "a:sysClr":b=new f.mxgraph.io.vsdx.theme.SysClr(a.getAttribute("val"),a.getAttribute("lastClr"));break;case "a:schemeClr":b=new f.mxgraph.io.vsdx.theme.SchemeClr(a.getAttribute("val"));break;case "a:prstClr":b=new f.mxgraph.io.vsdx.theme.SrgbClr(a.getAttribute("val"))}a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(var c=0;c<a.length;c++){var n=a[c],e=parseInt(n.getAttribute("val"))/1E3|0;switch(n.nodeName){case "a:tint":b.setTint(e);break;
 case "a:shade":b.setShade(e);break;case "a:satMod":b.setSatMod(e);break;case "a:lumMod":b.setLumMod(e);break;case "a:hueMod":b.setHueMod(e)}}return b};return b}();e.OoxmlColorFactory=c;c.__class="com.mxgraph.io.vsdx.theme.OoxmlColorFactory"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
-(function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a,b,c,n,f,e,g,l,q,D){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=c;this.quickStyleFontColor=n;this.quickStyleFontMatrix=f;this.quickStyleLineColor=
-e;this.quickStyleLineMatrix=g;this.quickStyleShadowColor=l;this.quickStyleType=q;this.quickStyleVariation=D}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};
+(function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a,b,c,n,f,e,l,g,q,C){this.quickStyleVariation=this.quickStyleType=this.quickStyleShadowColor=this.quickStyleLineColor=this.quickStyleFontMatrix=this.quickStyleFontColor=this.quickStyleFillMatrix=this.quickStyleFillColor=this.quickStyleEffectsMatrix=0;this.quickStyleEffectsMatrix=a;this.quickStyleFillColor=b;this.quickStyleFillMatrix=c;this.quickStyleFontColor=n;this.quickStyleFontMatrix=f;this.quickStyleLineColor=
+e;this.quickStyleLineMatrix=l;this.quickStyleShadowColor=g;this.quickStyleType=q;this.quickStyleVariation=C}b.prototype.getQuickStyleEffectsMatrix=function(){return this.quickStyleEffectsMatrix};b.prototype.getQuickStyleFillColor=function(){return this.quickStyleFillColor};b.prototype.getQuickStyleFillMatrix=function(){return this.quickStyleFillMatrix};b.prototype.getQuickStyleFontColor=function(){return this.quickStyleFontColor};b.prototype.getQuickStyleFontMatrix=function(){return this.quickStyleFontMatrix};
 b.prototype.getQuickStyleLineColor=function(){return this.quickStyleLineColor};b.prototype.getQuickStyleLineMatrix=function(){return this.quickStyleLineMatrix};b.prototype.getQuickStyleShadowColor=function(){return this.quickStyleShadowColor};b.prototype.getQuickStyleType=function(){return this.quickStyleType};b.prototype.getQuickStyleVariation=function(){return this.quickStyleVariation};b.prototype.setQuickStyleEffectsMatrix=function(a){this.quickStyleEffectsMatrix=a};b.prototype.setQuickStyleFillColor=
 function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=function(a){this.quickStyleFillMatrix=a};b.prototype.setQuickStyleFontColor=function(a){this.quickStyleFontColor=a};b.prototype.setQuickStyleFontMatrix=function(a){this.quickStyleFontMatrix=a};b.prototype.setQuickStyleLineColor=function(a){this.quickStyleLineColor=a};b.prototype.setQuickStyleLineMatrix=function(a){this.quickStyleLineMatrix=a};b.prototype.setQuickStyleShadowColor=function(a){this.quickStyleShadowColor=a};b.prototype.setQuickStyleType=
 function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();f.QuickStyleVals=c;c.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return b}();f.SolidFillStyle=c;c.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";c.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(f){(function(f){var e=function(){function f(){}f.MAX_AREA_$LI$=function(){null==f.MAX_AREA&&(f.MAX_AREA=1E8);return f.MAX_AREA};return f}();e.MAX_REQUEST_SIZE=52428800;e.IMAGE_DOMAIN="http://img.diagramly.com/";f.Constants=e;e.__class="com.mxgraph.online.Constants"})(f.online||(f.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
-(function(f){(function(f){(function(f){var e=function(){function f(){}f.getRotatedPoint=function(c,b,a,d){var k=c.x-d.x;c=c.y-d.y;return new mxPoint(k*b-c*a+d.x,c*b+k*a+d.y)};f.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var f=c.getCenterX()-a,e=c.getCenterY()-d;c.x=Math.round(f*k-e*b+a-c.width/2);c.y=Math.round(e*k+f*b+d-c.height/2)};return f}();e.CHARSET_FOR_URL_ENCODING="ISO-8859-1";f.Utils=e;e.__class="com.mxgraph.online.Utils"})(f.online||(f.online={}))})(f.mxgraph||
+(function(f){(function(f){(function(f){var e=function(){function f(){}f.getRotatedPoint=function(c,b,a,d){var k=c.x-d.x;c=c.y-d.y;return new mxPoint(k*b-c*a+d.x,c*b+k*a+d.y)};f.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var n=c.getCenterX()-a,f=c.getCenterY()-d;c.x=Math.round(n*k-f*b+a-c.width/2);c.y=Math.round(f*k+n*b+d-c.height/2)};return f}();e.CHARSET_FOR_URL_ENCODING="ISO-8859-1";f.Utils=e;e.__class="com.mxgraph.online.Utils"})(f.online||(f.online={}))})(f.mxgraph||
 (f.mxgraph={}))})(com||(com={}));
-(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e){a=b.call(this,a,c,f)||this;a.a=e;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),c=b.getWidth(),k=Math.floor(Math.round(b.getLastX()*c)/100),e=Math.floor(Math.round(b.getLastY()*d)/100),g=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.a*
-f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=Math.abs(g-k),e=Math.abs(l-e),k=e=.5*q+(k*k+e*e)/(8*q),B=Math.abs(e),e=Math.round(100*e/c*100)/100,k=Math.round(100*k/d*100)/100,g=Math.round(100*g/c*100)/100,l=Math.round(100*l/d*100)/100,q=Math.round(100*q)/100,e=Math.abs(e),k=Math.abs(k),d=0>q?"1":"0",q=B<Math.abs(q)?"1":"0";b.setLastX(g);b.setLastY(l);return'<arc rx="'+(new String(e)).toString()+'" ry="'+(new String(k)).toString()+'" x="'+(new String(g)).toString()+'" y="'+(new String(l)).toString()+
+(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,n,f){a=b.call(this,a,c,n)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),c=b.getWidth(),k=Math.floor(Math.round(b.getLastX()*c)/100),e=Math.floor(Math.round(b.getLastY()*d)/100),g=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.a*
+f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=Math.abs(g-k),e=Math.abs(l-e),k=e=.5*q+(k*k+e*e)/(8*q),E=Math.abs(e),e=Math.round(100*e/c*100)/100,k=Math.round(100*k/d*100)/100,g=Math.round(100*g/c*100)/100,l=Math.round(100*l/d*100)/100,q=Math.round(100*q)/100,e=Math.abs(e),k=Math.abs(k),d=0>q?"1":"0",q=E<Math.abs(q)?"1":"0";b.setLastX(g);b.setLastY(l);return'<arc rx="'+(new String(e)).toString()+'" ry="'+(new String(k)).toString()+'" x="'+(new String(g)).toString()+'" y="'+(new String(l)).toString()+
 '" x-axis-rotation="0" large-arc-flag="'+q+'" sweep-flag="'+d+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.ArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){return b.call(this,a,null,null)||this}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.DelRow=c;c.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
-(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
-l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),B=this.d*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=Math.abs(g-k),l=Math.abs(l-e),l=Math.sqrt(g*g+l*l),q=Math.abs(q-k),B=Math.abs(d-B-e),k=100*k/c,B=Math.round(100*Math.sqrt(q*q+B*B)/d/2*100)/100,c=Math.round(100*l/c/2*100)/100,q=Math.round(100*(k-2*c))/100,k=Math.round(100*(k+2*c))/100,d=Math.round(100*e/d*100)/100;return'<move x="'+(new String(q)).toString()+
-'" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(q)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.Ellipse=
+(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,n,f,e,g,l){a=b.call(this,a,c,n)||this;a.a=f;a.b=e;a.c=g;a.d=l;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
+l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=d-l,q=this.c*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),E=this.d*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=Math.abs(g-k),l=Math.abs(l-e),l=Math.sqrt(g*g+l*l),q=Math.abs(q-k),E=Math.abs(d-E-e),k=100*k/c,E=Math.round(100*Math.sqrt(q*q+E*E)/d/2*100)/100,c=Math.round(100*l/c/2*100)/100,q=Math.round(100*(k-2*c))/100,k=Math.round(100*(k+2*c))/100,d=Math.round(100*e/d*100)/100;return'<move x="'+(new String(q)).toString()+
+'" y="'+(new String(d)).toString()+'"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(c)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(q)).toString()+'" y="'+(new String(d)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.Ellipse=
 c;c.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),c=b.getWidth(),k=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=d-e,g=this.a*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
-l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.c,B=this.d,k=100*k/c,e=100*e/d,C=b.getLastX()*c/100,G=b.getLastY()*d/100,P=k*c/100,aa=e*d/100,S=d-l,N=-q,q=Math.sqrt(C*C+G*G)*Math.cos(Math.atan2(G,C)-N),l=Math.sqrt(C*C+G*G)*Math.sin(Math.atan2(G,C)-N),ha=Math.sqrt(P*P+aa*aa)*Math.cos(Math.atan2(aa,P)-N),fa=Math.sqrt(P*P+aa*aa)*Math.sin(Math.atan2(aa,P)-N),ba=Math.sqrt(g*g+S*S)*Math.cos(Math.atan2(S,g)-N),na=Math.sqrt(g*g+S*S)*Math.sin(Math.atan2(S,g)-N),W=((q-ha)*(q+ha)*(fa-na)-
-(ha-ba)*(ha+ba)*(l-fa)+B*B*(l-fa)*(fa-na)*(l-na))/(2*((q-ha)*(fa-na)-(ha-ba)*(l-fa))),ia=((q-ha)*(ha-ba)*(q-ba)/(B*B)+(ha-ba)*(l-fa)*(l+fa)-(q-ha)*(fa-na)*(fa+na))/(2*((ha-ba)*(l-fa)-(q-ha)*(fa-na))),va=q-W,pb=l-ia,va=Math.sqrt(va*va+pb*pb*B*B),B=va/B,N=180*N/Math.PI,k=Math.round(100*k)/100,e=Math.round(100*e)/100,va=Math.round(100*va/c*100)/100,B=Math.round(100*B/d*100)/100,N=Math.round(100*N)/100,d=0<(P-C)*(S-G)-(aa-G)*(g-C)?"0":"1",c="0";f.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(W,ia,q,l,
-ha,fa,ba,na)&&this.isReflexAngle(W,ia,q,l,ha,fa,ba,na)&&(c="1");b.setLastX(k);b.setLastY(e);return'<arc rx="'+(new String(va)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(e)).toString()+'" x-axis-rotation="'+(new String(N)).toString()+'" large-arc-flag="'+c+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,f,e,g,l,q){c-=a;f-=b;g-=b;e=l-a;q-=b;b=a=0;c=180*(Math.atan2(f,c)-Math.atan2(b,a))/Math.PI;e=180*(Math.atan2(g,
-e)-Math.atan2(b,a))/Math.PI;a=180*(Math.atan2(q,l)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;e=(e-a)%360;180<c?c-=360:-180>c&&(c+=360);180<e?e-=360:-180>e&&(e+=360);return(0<c&&0>e||0>c&&0<e)&&180<Math.abs(c-e)?!0:!1};return a}(f.mxgraph.io.vsdx.geometry.Row);e.EllipticalArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
+l=this.b*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),q=this.c,E=this.d,k=100*k/c,e=100*e/d,D=b.getLastX()*c/100,G=b.getLastY()*d/100,P=k*c/100,Z=e*d/100,W=d-l,M=-q,q=Math.sqrt(D*D+G*G)*Math.cos(Math.atan2(G,D)-M),l=Math.sqrt(D*D+G*G)*Math.sin(Math.atan2(G,D)-M),ga=Math.sqrt(P*P+Z*Z)*Math.cos(Math.atan2(Z,P)-M),da=Math.sqrt(P*P+Z*Z)*Math.sin(Math.atan2(Z,P)-M),ba=Math.sqrt(g*g+W*W)*Math.cos(Math.atan2(W,g)-M),ma=Math.sqrt(g*g+W*W)*Math.sin(Math.atan2(W,g)-M),U=((q-ga)*(q+ga)*(da-ma)-(ga-
+ba)*(ga+ba)*(l-da)+E*E*(l-da)*(da-ma)*(l-ma))/(2*((q-ga)*(da-ma)-(ga-ba)*(l-da))),ha=((q-ga)*(ga-ba)*(q-ba)/(E*E)+(ga-ba)*(l-da)*(l+da)-(q-ga)*(da-ma)*(da+ma))/(2*((ga-ba)*(l-da)-(q-ga)*(da-ma))),va=q-U,rb=l-ha,va=Math.sqrt(va*va+rb*rb*E*E),E=va/E,M=180*M/Math.PI,k=Math.round(100*k)/100,e=Math.round(100*e)/100,va=Math.round(100*va/c*100)/100,E=Math.round(100*E/d*100)/100,M=Math.round(100*M)/100,d=0<(P-D)*(W-G)-(Z-G)*(g-D)?"0":"1",c="0";f.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(U,ha,q,l,ga,da,
+ba,ma)&&this.isReflexAngle(U,ha,q,l,ga,da,ba,ma)&&(c="1");b.setLastX(k);b.setLastY(e);return'<arc rx="'+(new String(va)).toString()+'" ry="'+(new String(E)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(e)).toString()+'" x-axis-rotation="'+(new String(M)).toString()+'" large-arc-flag="'+c+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,f,e,g,l,q){c-=a;f-=b;g-=b;e=l-a;q-=b;b=a=0;c=180*(Math.atan2(f,c)-Math.atan2(b,a))/Math.PI;e=180*(Math.atan2(g,e)-Math.atan2(b,
+a))/Math.PI;a=180*(Math.atan2(q,l)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;e=(e-a)%360;180<c?c-=360:-180>c&&(c+=360);180<e?e-=360:-180>e&&(e+=360);return(0<c&&0>e||0>c&&0<e)&&180<Math.abs(c-e)?!0:!1};return a}(f.mxgraph.io.vsdx.geometry.Row);e.EllipticalArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;return a}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.InfiniteLine=c;c.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f){return b.call(this,a,c,f)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,c=a.y,k=b.getHeight(),e=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/e*100)/100;c=Math.round(100*(100-100*c/k))/100;a.x=d;a.y=c;b.setLastX(d);b.setLastY(c);return'<line x="'+
 (new String(d)).toString()+'" y="'+(new String(c)).toString()+'"/>'};return a}(f.mxgraph.io.vsdx.geometry.Row);e.LineTo=c;c.__class="com.mxgraph.io.vsdx.geometry.LineTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f){return b.call(this,a,c,f)||this}__extends(a,b);a.prototype.handle=function(a,b){var d=a.x,c=a.y,k=b.getHeight(),e=b.getWidth();null!=this.x&&null!=this.y&&(d=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),c=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$());d=Math.round(100*d/e*100)/100;c=Math.round(100*(100-100*c/k))/100;a.x=d;a.y=c;b.setLastX(d);b.setLastY(c);b.setLastMoveX(d);
 b.setLastMoveY(c);return'<move x="'+(new String(d)).toString()+'" y="'+(new String(c)).toString()+'"/>'};return a}(f.mxgraph.io.vsdx.geometry.Row);e.MoveTo=c;c.__class="com.mxgraph.io.vsdx.geometry.MoveTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
-(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q,E){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;a.formulaE=E;return a}__extends(a,b);a.prototype.handle=function(b,c){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=c.getHeight(),k=c.getWidth(),e=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.formulaE.split("NURBS(").join(""),l=l.split(")").join(""),
-l=new a.Nurbs(this,l,k,d);if(2<=l.getSize()){var q=l.getX(0),D=l.getY(0),B=l.getX(1),C=l.getY(1),e=Math.round(100*e/k*100)/100,g=Math.round(100*(100-100*g/d))/100,q=Math.round(100*q)/100,D=Math.round(100*D)/100,B=Math.round(100*B)/100,C=Math.round(100*C)/100;c.setLastX(e);c.setLastY(g);if(3===l.getDegree()&&l.isOrderedByThree(this.getA())){d=[];k=[];q=[];B=l.getSize();for(D=0;D<B-1;D+=3)0<d.push(new mxPoint(l.getX(D),l.getY(D))),0<k.push(new mxPoint(l.getX(D+1),l.getY(D+1))),D<B-2?0<q.push(new mxPoint(l.getX(D+
-2),l.getY(D+2))):0<q.push(new mxPoint(e,g));e="";for(D=0;D<d.length;D++)e+='<curve x1="'+d[D].x+'" y1="'+d[D].y+'" x2="'+k[D].x+'" y2="'+k[D].y+'" x3="'+q[D].x+'" y3="'+q[D].y+'"/>\n';return e}return'<curve x1="'+(new String(q)).toString()+'" y1="'+(new String(D)).toString()+'" x2="'+(new String(B)).toString()+'" y2="'+(new String(C)).toString()+'" x3="'+(new String(e)).toString()+'" y3="'+(new String(g)).toString()+'"/>'}}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.NURBSTo=c;c.__class=
+(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q,B){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;a.formulaE=B;return a}__extends(a,b);a.prototype.handle=function(b,c){if(null!=this.x&&null!=this.y&&null!=this.formulaE){var d=c.getHeight(),k=c.getWidth(),e=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),l=this.formulaE.split("NURBS(").join(""),l=l.split(")").join(""),
+l=new a.Nurbs(this,l,k,d);if(2<=l.getSize()){var q=l.getX(0),C=l.getY(0),E=l.getX(1),D=l.getY(1),e=Math.round(100*e/k*100)/100,g=Math.round(100*(100-100*g/d))/100,q=Math.round(100*q)/100,C=Math.round(100*C)/100,E=Math.round(100*E)/100,D=Math.round(100*D)/100;c.setLastX(e);c.setLastY(g);if(3===l.getDegree()&&l.isOrderedByThree(this.getA())){d=[];k=[];q=[];E=l.getSize();for(C=0;C<E-1;C+=3)0<d.push(new mxPoint(l.getX(C),l.getY(C))),0<k.push(new mxPoint(l.getX(C+1),l.getY(C+1))),C<E-2?0<q.push(new mxPoint(l.getX(C+
+2),l.getY(C+2))):0<q.push(new mxPoint(e,g));e="";for(C=0;C<d.length;C++)e+='<curve x1="'+d[C].x+'" y1="'+d[C].y+'" x2="'+k[C].x+'" y2="'+k[C].y+'" x3="'+q[C].x+'" y3="'+q[C].y+'"/>\n';return e}return'<curve x1="'+(new String(q)).toString()+'" y1="'+(new String(C)).toString()+'" x2="'+(new String(E)).toString()+'" y2="'+(new String(D)).toString()+'" x3="'+(new String(e)).toString()+'" y3="'+(new String(g)).toString()+'"/>'}}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.NURBSTo=c;c.__class=
 "com.mxgraph.io.vsdx.geometry.NURBSTo";(function(b){var a=function(){function a(a,b,d,c){this.__parent=a;this.nurbsValues=[];a=b.split(/\s*,\s*/).slice(0);for(b=0;b<a.length;b++)3<b&&0===b%4?0<this.nurbsValues.push(100*parseFloat(a[b])):3<b&&1===b%4?0<this.nurbsValues.push(100-100*parseFloat(a[b])):0<this.nurbsValues.push(parseFloat(a[b]))}a.prototype.isOrderedByThree=function(a){for(var b=0;b+2<this.getSize();b+=3){var d=Math.round(100*this.getKnot(b))/100,c=Math.round(100*this.getKnot(b+1))/100,
 k=Math.round(100*this.getKnot(b+2))/100;if(d!==c||d!==k||c!==k)return!1}b=Math.round(10*this.getKnot(this.getSize()-2))/10;d=Math.round(10*this.getKnot(this.getSize()-1))/10;a=Math.round(10*a)/10;return b!==d||b!==a||d!==a?!1:!0};a.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};a.prototype.getKnotLast=function(){return this.nurbsValues[0]};a.prototype.getDegree=function(){return this.nurbsValues[1]};a.prototype.getXType=function(){return this.nurbsValues[2]};a.prototype.getYType=
 function(){return this.nurbsValues[3]};a.prototype.getX=function(a){return this.nurbsValues[4*(a+1)]};a.prototype.getY=function(a){return this.nurbsValues[4*(a+1)+1]};a.prototype.getKnot=function(a){return this.nurbsValues[4*(a+1)+2]};a.prototype.getWeight=function(a){return this.nurbsValues[4*(a+1)+3]};return a}();b.Nurbs=a;a.__class="com.mxgraph.io.vsdx.geometry.NURBSTo.Nurbs"})(c=e.NURBSTo||(e.NURBSTo={}))})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph=
 {}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e){a=b.call(this,a,c,f)||this;a.formulaA=e;return a}__extends(a,b);a.prototype.handle=function(a,b){var d="";if(null!=this.x&&null!=this.y&&null!=this.formulaA){var c=b.getHeight(),k=b.getWidth(),e=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),e=Math.round(100*e/k*100)/100,g=Math.round(100*(100-100*g/c))/100,l=this.formulaA.replace(RegExp("\\s",
-"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),q;q=l&&l.equals?l.equals("inh"):"inh"===l;if(q)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});l=l.split(",").slice(0).slice(0);q=parseFloat(l.splice(0,1));parseFloat(l.splice(0,1));for(var B,C;0<l.length;)B=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
-C=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===q&&(B=100*B/k),1===q&&(C=100*C/c),C=100-C,B=Math.round(100*B)/100,C=Math.round(100*C)/100,b.setLastX(B),b.setLastY(C),d+='<line x="'+(new String(B)).toString()+'" y="'+(new String(C)).toString()+'"/>';d+='<line x="'+(new String(e)).toString()+'" y="'+(new String(g)).toString()+'"/>';b.getLastMoveX()===e&&b.getLastMoveY()===g&&(d+="<close/>")}return d};return a}(f.mxgraph.io.vsdx.geometry.Row);e.PolylineTo=c;c.__class=
+"g"),"").toLowerCase().replace(RegExp("polyline\\(","g"),"").replace(RegExp("\\)","g"),""),q;q=l&&l.equals?l.equals("inh"):"inh"===l;if(q)throw Object.defineProperty(Error(),"__classes",{configurable:!0,value:["java.lang.Throwable","java.lang.Object","java.lang.RuntimeException","java.lang.IllegalArgumentException","java.lang.Exception"]});l=l.split(",").slice(0).slice(0);q=parseFloat(l.splice(0,1));parseFloat(l.splice(0,1));for(var E,D;0<l.length;)E=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
+D=parseFloat(l.splice(0,1))*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),1===q&&(E=100*E/k),1===q&&(D=100*D/c),D=100-D,E=Math.round(100*E)/100,D=Math.round(100*D)/100,b.setLastX(E),b.setLastY(D),d+='<line x="'+(new String(E)).toString()+'" y="'+(new String(D)).toString()+'"/>';d+='<line x="'+(new String(e)).toString()+'" y="'+(new String(g)).toString()+'"/>';b.getLastMoveX()===e&&b.getLastMoveY()===g&&(d+="<close/>")}return d};return a}(f.mxgraph.io.vsdx.geometry.Row);e.PolylineTo=c;c.__class=
 "com.mxgraph.io.vsdx.geometry.PolylineTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,q){a=b.call(this,a,c,f)||this;a.a=e;a.b=g;a.c=l;a.d=q;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=100*this.x,c=100-100*this.y,k=100*this.a,f=100-100*this.b,e=100*this.c,g=100-100*this.d,d=Math.round(100*d)/100,c=Math.round(100*c)/100,k=Math.round(100*k)/100,f=Math.round(100*f)/100,e=Math.round(100*
 e)/100,g=Math.round(100*g)/100;b.setLastX(d);b.setLastY(c);return'<curve x1="'+(new String(k)).toString()+'" y1="'+(new String(f)).toString()+'" x2="'+(new String(e)).toString()+'" y2="'+(new String(g)).toString()+'" x3="'+(new String(d)).toString()+'" y3="'+(new String(c)).toString()+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.RelCubBezTo=c;c.__class="com.mxgraph.io.vsdx.geometry.RelCubBezTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph=
@@ -1296,15 +1301,15 @@ a,c)};return a}(f.mxgraph.io.vsdx.geometry.EllipticalArcTo);e.RelEllipticalArcTo
 b){return a[b]?a[b]:null}(d.cellElements,f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(a,b){return a[b]?a[b]:null}(d.cellElements,f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(b,c);b.UNICODE_LINE_SEP_$LI$=function(){null==b.UNICODE_LINE_SEP&&(b.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",
 b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};b.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};b.prototype.getQuickStyleVals=function(){return this.quickStyleVals};b.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new f.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);
 this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){c.prototype.parseShapeElem.call(this,a,d);var k=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(k,"ForeignData")){var e=a.ownerDocument.vsdxFileName,g=a.getAttribute("ForeignType"),k=a.getAttribute("CompressionType")||"";if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Bitmap"))k=k.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"MetaFile"))k="png";else if(function(a,b){return a&&
-a.equals?a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))k="png";else return;g=a.firstChild;if(null!=g){if(null!=g&&1==g.nodeType){var l=g;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var g=e.lastIndexOf("/"),q="",y="";try{q=e.substring(0,g),y=e.substring(g,e.length)}catch(E){return}g=d.getRelationship(l,q+"/_rels"+y+".rels");if(null!=g){e=g.getAttribute("Target")||
-"";l=g.getAttribute("Type");g=e.lastIndexOf("/");try{e=e.substring(g+1,e.length)}catch(E){return}null!=l&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(l,"image")&&(this.imageData={},(g=d.getMedia(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+e))?(this.imageData.iData=g,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(e.toLowerCase(),".bmp")&&(k="jpg"),this.imageData.iType=k):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}g=
+a.equals?a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))k="png";else return;g=a.firstChild;if(null!=g){if(null!=g&&1==g.nodeType){var l=g;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(l.nodeName.toLowerCase(),"rel")&&(l=l.getAttribute("r:id"),null!=l&&0!==l.length)){var g=e.lastIndexOf("/"),q="",y="";try{q=e.substring(0,g),y=e.substring(g,e.length)}catch(B){return}g=d.getRelationship(l,q+"/_rels"+y+".rels");if(null!=g){e=g.getAttribute("Target")||
+"";l=g.getAttribute("Type");g=e.lastIndexOf("/");try{e=e.substring(g+1,e.length)}catch(B){return}null!=l&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(l,"image")&&(this.imageData={},(g=d.getMedia(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+e))?(this.imageData.iData=g,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(e.toLowerCase(),".bmp")&&(k="jpg"),this.imageData.iType=k):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}g=
 g.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(k,f.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var k=0;k<a.length;k++){var d=a[k],e=d.getAttribute("IX")||
-"";if(0!==e.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[e]="";else{for(var g=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",q="",y=0;y<g.length;y++){var E=g[y],d=E.getAttribute("N"),E=E.getAttribute("V")||E.textContent||"";switch(d){case "Value":l=E;break;case "Format":q=E}}if(0!==l.length){try{if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(q,"{{"))var q=q.replace(/m/g,
-"@").replace(/M/g,"m").replace(/@/g,"M"),D=isNaN(l)?new Date(l):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(l))),l=Graph.prototype.formatDate(D,q.replace(RegExp("\\{|\\}","g"),""))}catch(B){}this.fields[e]=l}}}}else c.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?
+"";if(0!==e.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[e]="";else{for(var g=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",q="",y=0;y<g.length;y++){var B=g[y],d=B.getAttribute("N"),B=B.getAttribute("V")||B.textContent||"";switch(d){case "Value":l=B;break;case "Format":q=B}}if(0!==l.length){try{if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(q,"{{"))var q=q.replace(/m/g,
+"@").replace(/M/g,"m").replace(/@/g,"M"),C=isNaN(l)?new Date(l):new Date(b.VSDX_START_TIME+Math.floor(864E5*parseFloat(l))),l=Graph.prototype.formatDate(C,q.replace(RegExp("\\{|\\}","g"),""))}catch(E){}this.fields[e]=l}}}}else c.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?
 this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var b=
 null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square":"disc")+'">'));return b};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical();
-c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",c="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",e="font-family:"+this.getTextFont(this.cp)+";",g="direction:"+this.getRtlText(this.cp)+";",l="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),y=";opacity:"+this.getTextOpacity(this.cp),E=this.getTextPos(this.cp),
-D=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(D,"1")?a=a.toUpperCase():function(a,b){return a&&a.equals?a.equals(b):a===b}(D,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(E,"1")?a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(E,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
+c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",c="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",e="font-family:"+this.getTextFont(this.cp)+";",g="direction:"+this.getRtlText(this.cp)+";",l="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),y=";opacity:"+this.getTextOpacity(this.cp),B=this.getTextPos(this.cp),
+C=this.getTextCase(this.cp);(function(a,b){return a&&a.equals?a.equals(b):a===b})(C,"1")?a=a.toUpperCase():function(a,b){return a&&a.equals?a.equals(b):a===b}(C,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(a,b){return a&&a.equals?a.equals(b):a===b})(B,"1")?a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(a,b){return a&&a.equals?a.equals(b):a===b}(B,"2")&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
 "b"):a;a=this.isItalic(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"i"):a;a=this.isUnderline(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?f.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return""+('<font style="'+c+e+b+g+l+q+y+'">'+a+"</font>")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals?
 a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};b.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};b.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),c=a.substring(d),d=a.substring(0,
 d),e=' style="'+f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+e+c}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b=
@@ -1318,26 +1323,26 @@ g));d.shapeName=e;b=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.SHA
 b)return a.entries[d].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(e=0;e<b.length;e++)g=b[e].getValue(),g.setRootShape(d),null==g.theme&&g.setThemeAndVariant(l,a);d.quickStyleVals=new f.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"),
 "1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleShadowColor"),
 "1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=d.masterShape?(d.masterShape.processGeomList(null),d.processGeomList(d.masterShape.getGeomList()),0===d.width&&(d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===d.height&&(d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
-0))):d.processGeomList(null);d.vertex=k||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());d.layerMember=d.getValue(d.getCellElement$java_lang_String("LayerMember"));return d}__extends(b,c);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&
-(b.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
-b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
-1,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
-a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
-4,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
-a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
-13,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&
-a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},
-getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&
-(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,
-value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),25,"ERmandOne");(function(a,b,c){null==a.entries&&(a.entries=
-[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,
-value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),29,"ERzeroToMany");(function(a,b,c){null==a.entries&&
-(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,
-value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),7,mxConstants.ARROW_OPEN);(function(a,b,c){null==
-a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=
-c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),11,"diamond");(function(a,
-b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
-b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
+0))):d.processGeomList(null);d.vertex=k||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());d.layerMember=d.getValue(d.getCellElement$java_lang_String("LayerMember"));d.layerMember&&0==d.layerMember.indexOf("0;")&&(d.layerMember=d.layerMember.substr(2));return d}__extends(b,c);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};
+b.OFFSET_ARRAY_$LI$=function(){b.__static_initialize();null==b.OFFSET_ARRAY&&(b.OFFSET_ARRAY=["Organizational unit","Domain 3D"].slice(0).slice(0));return b.OFFSET_ARRAY};b.arrowSizes_$LI$=function(){b.__static_initialize();null==b.arrowSizes&&(b.arrowSizes=[2,3,5,7,9,22,45]);return b.arrowSizes};b.arrowTypes_$LI$=function(){b.__static_initialize();return b.arrowTypes};b.__static_initializer_0=function(){b.arrowTypes={};(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
+a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),0,mxConstants.NONE);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},
+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),1,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),2,"blockThin");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
+a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),3,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},
+getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),4,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),5,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=
+0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),10,mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,
+value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),13,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),14,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);
+(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),17,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
+a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),20,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_OVAL);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
+22,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),23,"dash");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
+a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),24,"ERone");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
+25,"ERmandOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),27,"ERmany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
+b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),28,"ERoneToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
+29,"ERzeroToMany");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),30,"ERzeroToOne");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
+a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),6,mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
+7,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),8,mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
+a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),9,"openAsync");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
+11,"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),12,mxConstants.ARROW_OPEN);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||
+a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),15,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),
 16,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),18,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_BLOCK);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
 a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),19,b.ARROW_NO_FILL_MARKER+mxConstants.ARROW_CLASSIC);(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,
 value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),21,b.ARROW_NO_FILL_MARKER+"diamond");(function(a,b,c){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===b){a.entries[d].value=c;return}a.entries.push({key:b,value:c,getKey:function(){return this.key},getValue:function(){return this.value}})})(b.arrowTypes_$LI$(),26,"ERmandOne");(function(a,b,c){null==
@@ -1387,14 +1392,15 @@ function(){return this.shape.hasAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.MAST
 b.prototype.getMaster=function(){return this.master};b.prototype.getNameU=function(){var a=this.shape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)||"",b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getNameU());return a};b.prototype.getName=function(){var a=this.shape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME),b;(b=null==a)||(b=(b=a)&&b.equals?b.equals(""):""===b);b&&null!=this.masterShape&&(a=this.masterShape.getName());return a};
 b.prototype.getMasterName=function(){return this.shapeName};b.prototype.setLabelOffset=function(a,b){var c="",d="";this.shape.hasAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(c=this.shape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));null!=this.getMaster()&&null!=this.getMaster().getMasterElement()&&this.getMaster().getMasterElement().hasAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U)&&(d=this.getMaster().getMasterElement().getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.NAME_U));
 if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,"Organizational unit")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(d,"Organizational unit")){var e=this.shape.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0),c=null,c="0.0",d=null,d="-0.4";null!=e&&(c=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),c=c.hasAttribute("F")?c.getAttribute("F"):c.textContent,d=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),
-d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent);e=a.getGeometry();c=c.split("Width/2+").join("");c=c.split("DL").join("");d=d.split("Height*").join("");(function(a,b){return a&&a.equals?a.equals(b):a===b})(c,"Inh")&&(c="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Inh")&&(d="-0.4");-1!=d.indexOf("txtHeight")&&(d="-0.4");for(var g=b.split(";"),l="",q=0;q<g.length;q++){var E=g[q],E=E.trim();(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b})(E,"tabHeight=")&&
-(l=E.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(l,"")&&(l="20");g=parseFloat(l);c=parseFloat(c);d=parseFloat(d);l=e.height;c=.1*e.width+100*c;c=new mxPoint(c,l-l*d-g/2);a.getGeometry().offset=c}else if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,"Domain 3D")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(d,"Domain 3D")){e=this.shape.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);c=null;
+d=d.hasAttribute("F")?d.getAttribute("F"):d.textContent);e=a.getGeometry();c=c.split("Width/2+").join("");c=c.split("DL").join("");d=d.split("Height*").join("");(function(a,b){return a&&a.equals?a.equals(b):a===b})(c,"Inh")&&(c="0.0");(function(a,b){return a&&a.equals?a.equals(b):a===b})(d,"Inh")&&(d="-0.4");-1!=d.indexOf("txtHeight")&&(d="-0.4");for(var g=b.split(";"),l="",q=0;q<g.length;q++){var B=g[q],B=B.trim();(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b})(B,"tabHeight=")&&
+(l=B.split("tabHeight=").join(""))}(function(a,b){return a&&a.equals?a.equals(b):a===b})(l,"")&&(l="20");g=parseFloat(l);c=parseFloat(c);d=parseFloat(d);l=e.height;c=.1*e.width+100*c;c=new mxPoint(c,l-l*d-g/2);a.getGeometry().offset=c}else if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c,"Domain 3D")||function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(d,"Domain 3D")){e=this.shape.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);c=null;
 c="0.0";d=null;d="-0.4";null!=e&&(c=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),c=c.getAttribute("F")||"",d=e.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),d=d.getAttribute("F")||"");e=a.getGeometry();c=c.split("Width/2+").join("");c=c.split("DL").join("");d=d.split("Height*").join("");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(c,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(c,""))c="0.0";if(function(a,b){return a&&a.equals?a.equals(b):
 a===b}(d,"Inh")||function(a,b){return a&&a.equals?a.equals(b):a===b}(d,""))d="-0.4";-1!=d.indexOf("txtHeight")&&(d="-0.4");c=parseFloat(c);d=parseFloat(d);l=e.height;c=.1*e.width+100*c;c=new mxPoint(c,l-l*d);a.getGeometry().offset=c}};b.prototype.getForm=function(){var a={};if(this.isVertex())try{var c=b.getType(this.getShape());this.styleDebug("shape type = "+c);if(null!=this.imageData||function(a,b){return a&&a.equals?a.equals(b):a===b}(f.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,c)&&null!=this.masterShape&&
-null!=this.masterShape.imageData){var e=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var g=function(a,b){return a[b]?a[b]:null}(e,"iType"),l=function(a,b){return a[b]?a[b]:null}(e,"iData");a.image="data:image/"+g+","+l;return a}var q=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(q,""))return this.styleDebug("No geom found"),a;var z=Graph.compress(q);a[mxConstants.STYLE_SHAPE]="stencil("+z+")"}catch(y){console.error(y.message,
-y)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+this.shapeName);
-if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a;a=
-(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),c=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,
+null!=this.masterShape.imageData){var e=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var g=function(a,b){return a[b]?a[b]:null}(e,"iType"),l=function(a,b){return a[b]?a[b]:null}(e,"iData"),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),y=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),B=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
+"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),E=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=q||0!=A?this.toBeCroppedImg={imgOffsetX:q,imgOffsetY:A,imgWidth:y,imgHeight:B,width:C,height:E,iType:g,iData:l}:a.image="data:image/"+g+","+l;return a}var D=this.parseGeom();if(function(a,b){return a&&a.equals?a.equals(b):a===b}(D,""))return this.styleDebug("No geom found"),a;var G=Graph.compress(D);a[mxConstants.STYLE_SHAPE]="stencil("+
+G+")"}catch(P){console.error(P.message,P)}else return this.getEdgeStyle();return a};b.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Off-page reference")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"Lined/Shaded process")?!0:!1};b.prototype.isExternal_process=function(){var a;a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};b.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
+this.shapeName);if(null!=a&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"0")&&!function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"")){if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};b.prototype.isSubproces=function(){var a;
+a=(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};b.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};b.prototype.getChildShapes=function(){return this.childShapes};b.prototype.setChildShapes=function(a){this.childShapes=a};b.prototype.isDisplacedLabel=function(){var a=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),c=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,
 "F",""),e=this.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===c||function(a,b){return a&&a.equals?a.equals(b):
 a===b}(c.toLowerCase(),"inh"))c=this.masterShape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,"F","");if(""===e||function(a,b){return a&&a.equals?a.equals(b):a===b}(e.toLowerCase(),"inh"))e=this.masterShape.getAttribute(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","")}return function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"width*0.5")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(b.toLowerCase(),"height*0.5")&&function(a,b){return a&&a.equals?a.equals(b):
 a===b}(c.toLowerCase(),"width*1")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(e.toLowerCase(),"height*1")||!(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(a.toLowerCase(),"width*")&&function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(b.toLowerCase(),"height*")&&function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(c.toLowerCase(),"width*")&&function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(e.toLowerCase(),"height*")||function(a,
@@ -1413,32 +1419,32 @@ this.getQuickStyleVals()))}else e=parseInt(c)}catch(w){}a=function(a,b){null==a.
 1));return a};b.prototype.getCellElement$java_lang_String=function(a){var b=c.prototype.getCellElement$java_lang_String.call(this,a);return null==b&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String(a):b};b.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String=function(a,b,f){var d=c.prototype.getCellElement$java_lang_String$java_lang_String$java_lang_String.call(this,a,b,f);return null==d&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,
 b,f):d};b.prototype.getCellElement=function(a,b,c){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof c&&null!==c){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==c)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,c)};b.prototype.createLabelSubShape=function(a,b){var c=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
 this.getWidth()),d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),e=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),c/2),g=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),d/2),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),
-e),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),g),E=this.getValueAsDouble(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),D=this.getTextLabel();if(null!=D&&0!==D.length){var B=mxUtils.clone(this.getStyleMap())||{};B[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;B[mxConstants.STYLE_STROKECOLOR]=mxConstants.NONE;B[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;B.hasOwnProperty("align")||(B.align="center");
-B.hasOwnProperty("verticalAlign")||(B.verticalAlign="middle");B.hasOwnProperty("whiteSpace")||(B.whiteSpace="wrap");delete B.shape;delete B.image;this.isVerticalLabel()&&(E+=Math.PI+.01,B.horizontal="0");var C=this.getRotation();0!==E&&(E=360-180*E/Math.PI,E=Math.round((E+C)%360*100)/100,0!==E&&(B.rotation=""+E));B="text;"+f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(B,"=");g=b.getGeometry().height-(q+d-g);e=l-e;0<C&&(l=new mxGeometry(e,g,c,d),e=b.getGeometry(),f.mxgraph.online.Utils.rotatedGeometry(l,
-C,e.width/2,e.height/2),e=l.x,g=l.y);return a.insertVertex(b,null,D,Math.round(100*e)/100,Math.round(100*g)/100,Math.round(100*c)/100,Math.round(100*d)/100,B+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var c=new mxCellState;c.absolutePoints=b;a.updateEdgeBounds(c);var c=a.getPoint(c),d=b[0],e=b[b.length-1],g=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),
-this.getHeight()),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),E=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),D=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),0),B=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),
-0),e=(this.getHeight()-(d.y-e.y))/2+d.y-c.y-(B-E+l/2),c=D-q+g/2+(d.x-c.x);return 1E11<Math.abs(c)?null:new mxPoint(Math.floor(Math.round(100*c)/100),Math.floor(Math.round(100*e)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(f.mxgraph.io.vsdx.Shape);g.__static_initialized=!1;g.ARROW_NO_FILL_MARKER="0";g.maxDp=2;g.USE_SHAPE_MATCH=!1;g.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';
+e),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),g),B=this.getValueAsDouble(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel();if(null!=C&&0!==C.length){var E=mxUtils.clone(this.getStyleMap())||{};E[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;E[mxConstants.STYLE_STROKECOLOR]=mxConstants.NONE;E[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;E.hasOwnProperty("align")||(E.align="center");
+E.hasOwnProperty("verticalAlign")||(E.verticalAlign="middle");E.hasOwnProperty("whiteSpace")||(E.whiteSpace="wrap");delete E.shape;delete E.image;this.isVerticalLabel()&&(B+=Math.PI+.01,E.horizontal="0");var D=this.getRotation();0!==B&&(B=360-180*B/Math.PI,B=Math.round((B+D)%360*100)/100,0!==B&&(E.rotation=""+B));E="text;"+f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(E,"=");g=b.getGeometry().height-(q+d-g);e=l-e;0<D&&(l=new mxGeometry(e,g,c,d),e=b.getGeometry(),f.mxgraph.online.Utils.rotatedGeometry(l,
+D,e.width/2,e.height/2),e=l.x,g=l.y);return a.insertVertex(b,null,C,Math.round(100*e)/100,Math.round(100*g)/100,Math.round(100*c)/100,Math.round(100*d)/100,E+";html=1;")}return null};b.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var c=new mxCellState;c.absolutePoints=b;a.updateEdgeBounds(c);var c=a.getPoint(c),d=b[0],e=b[b.length-1],g=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),l=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),
+this.getHeight()),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),B=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),C=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),0),E=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(f.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),
+0),e=(this.getHeight()-(d.y-e.y))/2+d.y-c.y-(E-B+l/2),c=C-q+g/2+(d.x-c.x);return 1E11<Math.abs(c)?null:new mxPoint(Math.floor(Math.round(100*c)/100),Math.floor(Math.round(100*e)/100))}return null};b.prototype.getShapeIndex=function(){return this.shapeIndex};b.prototype.setShapeIndex=function(a){this.shapeIndex=a};return b}(f.mxgraph.io.vsdx.Shape);g.__static_initialized=!1;g.ARROW_NO_FILL_MARKER="0";g.maxDp=2;g.USE_SHAPE_MATCH=!1;g.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';
 e.VsdxShape=g;g.__class="com.mxgraph.io.vsdx.VsdxShape"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
 (function(f){(function(g){(function(g){var e=function(){function e(){}e.__static_initialize=function(){e.__static_initialized||(e.__static_initialized=!0,e.__static_initializer_0())};e.CA_$LI$=function(){e.__static_initialize();null==e.CA&&(e.CA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""));return e.CA};e.IA_$LI$=function(){e.__static_initialize();if(null==e.IA){for(var c=256,b=[];0<c--;)b.push(0);e.IA=b}return e.IA};e.__static_initializer_0=function(){for(var c=e.IA_$LI$(),
-b=0;b<c.length;b++)c[b]=-1;c=0;for(b=e.CA_$LI$().length;c<b;c++)e.IA_$LI$()[e.CA_$LI$()[c].charCodeAt(0)]=c;e.IA_$LI$()[61]=0};e.encodeToChar=function(c,b,a){var d=null!=c?c.length-b:0;if(0===d)return[];for(var f=3*(d/3|0),g=((d-1)/3|0)+1<<2,g=g+(a?((g-1)/76|0)<<1:0),l=Array(g),q=b,z=0,y=0;q<f+b;){var E=(c[q++]&255)<<16|(c[q++]&255)<<8|c[q++]&255;l[z++]=e.CA_$LI$()[E>>>18&63];l[z++]=e.CA_$LI$()[E>>>12&63];l[z++]=e.CA_$LI$()[E>>>6&63];l[z++]=e.CA_$LI$()[E&63];a&&19===++y&&z<g-2&&(l[z++]="\r",l[z++]=
-"\n",y=0)}a=d-f;0<a&&(E=(c[f+b]&255)<<10|(2===a?(c[d+b-1]&255)<<2:0),l[g-4]=e.CA_$LI$()[E>>12],l[g-3]=e.CA_$LI$()[E>>>6&63],l[g-2]=2===a?e.CA_$LI$()[E&63]:"=",l[g-1]="=");return l};e.decode$char_A=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>e.IA_$LI$()[c[d].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c[--d].charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b=
+b=0;b<c.length;b++)c[b]=-1;c=0;for(b=e.CA_$LI$().length;c<b;c++)e.IA_$LI$()[e.CA_$LI$()[c].charCodeAt(0)]=c;e.IA_$LI$()[61]=0};e.encodeToChar=function(c,b,a){var d=null!=c?c.length-b:0;if(0===d)return[];for(var f=3*(d/3|0),g=((d-1)/3|0)+1<<2,g=g+(a?((g-1)/76|0)<<1:0),l=Array(g),q=b,A=0,y=0;q<f+b;){var B=(c[q++]&255)<<16|(c[q++]&255)<<8|c[q++]&255;l[A++]=e.CA_$LI$()[B>>>18&63];l[A++]=e.CA_$LI$()[B>>>12&63];l[A++]=e.CA_$LI$()[B>>>6&63];l[A++]=e.CA_$LI$()[B&63];a&&19===++y&&A<g-2&&(l[A++]="\r",l[A++]=
+"\n",y=0)}a=d-f;0<a&&(B=(c[f+b]&255)<<10|(2===a?(c[d+b-1]&255)<<2:0),l[g-4]=e.CA_$LI$()[B>>12],l[g-3]=e.CA_$LI$()[B>>>6&63],l[g-2]=2===a?e.CA_$LI$()[B&63]:"=",l[g-1]="=");return l};e.decode$char_A=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>e.IA_$LI$()[c[d].charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c[--d].charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b=
 [];0<a--;)b.push(0);return b}(b),g=f=0;g<b;){for(var l=d=0;4>l;l++){var q=e.IA_$LI$()[c[f++].charCodeAt(0)];0<=q?d|=q<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decode=function(c){if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"string"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decode$char_A(c);if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"number"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decode$byte_A(c);if("string"===
 typeof c||null===c)return f.mxgraph.online.mxBase64.decode$java_lang_String(c);throw Error("invalid overload");};e.decodeFast$char_A=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[c[a].charCodeAt(0)];)a++;for(;0<d&&0>e.IA_$LI$()[c[d].charCodeAt(0)];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d])?61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c[d-1])?2:1:0,g=d-a+1,l=76<b?(13==function(a){return null==a.charCodeAt?a:
-a.charCodeAt(0)}(c[76])?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),q=0,z=0,y=3*(g/3|0);q<y;){var E=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18|e.IA_$LI$()[c[a++].charCodeAt(0)]<<12|e.IA_$LI$()[c[a++].charCodeAt(0)]<<6|e.IA_$LI$()[c[a++].charCodeAt(0)];b[q++]=E>>16|0;b[q++]=E>>8|0;b[q++]=E|0;0<l&&19===++z&&(a+=2,z=0)}if(q<g){for(l=E=0;a<=d-f;l++)E|=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=E>>c|0}return b};e.decodeFast=function(c){if(null!=
+a.charCodeAt(0)}(c[76])?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),q=0,A=0,y=3*(g/3|0);q<y;){var B=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18|e.IA_$LI$()[c[a++].charCodeAt(0)]<<12|e.IA_$LI$()[c[a++].charCodeAt(0)]<<6|e.IA_$LI$()[c[a++].charCodeAt(0)];b[q++]=B>>16|0;b[q++]=B>>8|0;b[q++]=B|0;0<l&&19===++A&&(a+=2,A=0)}if(q<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c[a++].charCodeAt(0)]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=B>>c|0}return b};e.decodeFast=function(c){if(null!=
 c&&c instanceof Array&&(0==c.length||null==c[0]||"string"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decodeFast$char_A(c);if(null!=c&&c instanceof Array&&(0==c.length||null==c[0]||"number"===typeof c[0])||null===c)return f.mxgraph.online.mxBase64.decodeFast$byte_A(c);if("string"===typeof c||null===c)return f.mxgraph.online.mxBase64.decodeFast$java_lang_String(c);throw Error("invalid overload");};e.encodeToByte=function(c,b){var a=null!=c?c.length:0;if(0===a)return[];for(var d=3*(a/
-3|0),f=((a-1)/3|0)+1<<2,g=f+=b?((f-1)/76|0)<<1:0,l=[];0<g--;)l.push(0);for(var q=0,z=0,y=0;q<d;)g=(c[q++]&255)<<16|(c[q++]&255)<<8|c[q++]&255,l[z++]=e.CA_$LI$()[g>>>18&63].charCodeAt(0),l[z++]=e.CA_$LI$()[g>>>12&63].charCodeAt(0),l[z++]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[z++]=e.CA_$LI$()[g&63].charCodeAt(0),b&&19===++y&&z<f-2&&(l[z++]=13,l[z++]=10,y=0);q=a-d;0<q&&(g=(c[d]&255)<<10|(2===q?(c[a-1]&255)<<2:0),l[f-4]=e.CA_$LI$()[g>>12].charCodeAt(0),l[f-3]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[f-2]=
+3|0),f=((a-1)/3|0)+1<<2,g=f+=b?((f-1)/76|0)<<1:0,l=[];0<g--;)l.push(0);for(var q=0,A=0,y=0;q<d;)g=(c[q++]&255)<<16|(c[q++]&255)<<8|c[q++]&255,l[A++]=e.CA_$LI$()[g>>>18&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g>>>12&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[A++]=e.CA_$LI$()[g&63].charCodeAt(0),b&&19===++y&&A<f-2&&(l[A++]=13,l[A++]=10,y=0);q=a-d;0<q&&(g=(c[d]&255)<<10|(2===q?(c[a-1]&255)<<2:0),l[f-4]=e.CA_$LI$()[g>>12].charCodeAt(0),l[f-3]=e.CA_$LI$()[g>>>6&63].charCodeAt(0),l[f-2]=
 2===q?e.CA_$LI$()[g&63].charCodeAt(0):61,l[f-1]=61);return l};e.decode$byte_A=function(c){for(var b=c.length,a=0,d=0;d<b;d++)0>e.IA_$LI$()[c[d]&255]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c[--d]&255];)61==c[d]&&f++;d=b=(6*(b-a)>>3)-f;for(a=[];0<d--;)a.push(0);for(var g=f=0;g<b;){for(var l=d=0;4>l;l++){var q=e.IA_$LI$()[c[f++]&255];0<=q?d|=q<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decodeFast$byte_A=function(c){var b=c.length;if(0===
-b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[c[a]&255];)a++;for(;0<d&&0>e.IA_$LI$()[c[d]&255];)d--;for(var f=61==c[d]?61==c[d-1]?2:1:0,g=d-a+1,l=76<b?(13==c[76]?g/78|0:0)<<1:0,q=g=(6*(g-l)>>3)-f,b=[];0<q--;)b.push(0);for(var z=q=0,y=3*(g/3|0);q<y;){var E=e.IA_$LI$()[c[a++]]<<18|e.IA_$LI$()[c[a++]]<<12|e.IA_$LI$()[c[a++]]<<6|e.IA_$LI$()[c[a++]];b[q++]=E>>16|0;b[q++]=E>>8|0;b[q++]=E|0;0<l&&19===++z&&(a+=2,z=0)}if(q<g){for(l=E=0;a<=d-f;l++)E|=e.IA_$LI$()[c[a++]]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=E>>
+b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[c[a]&255];)a++;for(;0<d&&0>e.IA_$LI$()[c[d]&255];)d--;for(var f=61==c[d]?61==c[d-1]?2:1:0,g=d-a+1,l=76<b?(13==c[76]?g/78|0:0)<<1:0,q=g=(6*(g-l)>>3)-f,b=[];0<q--;)b.push(0);for(var A=q=0,y=3*(g/3|0);q<y;){var B=e.IA_$LI$()[c[a++]]<<18|e.IA_$LI$()[c[a++]]<<12|e.IA_$LI$()[c[a++]]<<6|e.IA_$LI$()[c[a++]];b[q++]=B>>16|0;b[q++]=B>>8|0;b[q++]=B|0;0<l&&19===++A&&(a+=2,A=0)}if(q<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c[a++]]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=B>>
 c|0}return b};e.encodeToString=function(c,b,a){return e.encodeToChar(c,b,a).join("")};e.decode$java_lang_String=function(c){var b=null!=c?c.length:0;if(0===b)return[];for(var a=0,d=0;d<b;d++)0>e.IA_$LI$()[c.charAt(d).charCodeAt(0)]&&a++;if(0!==(b-a)%4)return null;for(var f=0,d=b;1<d&&0>=e.IA_$LI$()[c.charAt(--d).charCodeAt(0)];)61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&&f++;for(var b=(6*(b-a)>>3)-f,a=function(a){for(var b=[];0<a--;)b.push(0);return b}(b),g=f=0;g<b;){for(var l=
 d=0;4>l;l++){var q=e.IA_$LI$()[c.charAt(f++).charCodeAt(0)];0<=q?d|=q<<18-6*l:l--}a[g++]=d>>16|0;g<b&&(a[g++]=d>>8|0,g<b&&(a[g++]=d|0))}return a};e.decodeFast$java_lang_String=function(c){var b=c.length;if(0===b)return[];for(var a=0,d=b-1;a<d&&0>e.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(a))&255];)a++;for(;0<d&&0>e.IA_$LI$()[function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))&255];)d--;for(var f=61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d))?
-61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d-1))?2:1:0,g=d-a+1,l=76<b?(13==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(76))?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),q=0,z=0,y=3*(g/3|0);q<y;){var E=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<12|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<6|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)];b[q++]=E>>16|0;b[q++]=E>>8|0;b[q++]=
-E|0;0<l&&19===++z&&(a+=2,z=0)}if(q<g){for(l=E=0;a<=d-f;l++)E|=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=E>>c|0}return b};return e}();e.__static_initialized=!1;g.mxBase64=e;e.__class="com.mxgraph.online.mxBase64"})(g.online||(g.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();
+61==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(d-1))?2:1:0,g=d-a+1,l=76<b?(13==function(a){return null==a.charCodeAt?a:a.charCodeAt(0)}(c.charAt(76))?g/78|0:0)<<1:0,g=(6*(g-l)>>3)-f,b=function(a){for(var b=[];0<a--;)b.push(0);return b}(g),q=0,A=0,y=3*(g/3|0);q<y;){var B=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<12|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<6|e.IA_$LI$()[c.charAt(a++).charCodeAt(0)];b[q++]=B>>16|0;b[q++]=B>>8|0;b[q++]=
+B|0;0<l&&19===++A&&(a+=2,A=0)}if(q<g){for(l=B=0;a<=d-f;l++)B|=e.IA_$LI$()[c.charAt(a++).charCodeAt(0)]<<18-6*l;for(c=16;q<g;c-=8)b[q++]=B>>c|0}return b};return e}();e.__static_initialized=!1;g.mxBase64=e;e.__class="com.mxgraph.online.mxBase64"})(g.online||(g.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));com.mxgraph.online.mxBase64.IA_$LI$();com.mxgraph.online.mxBase64.CA_$LI$();com.mxgraph.online.mxBase64.__static_initialize();com.mxgraph.io.vsdx.VsdxShape.__com_mxgraph_io_vsdx_VsdxShape_LOGGER_$LI$();
 com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.arrowSizes_$LI$();com.mxgraph.io.vsdx.VsdxShape.OFFSET_ARRAY_$LI$();com.mxgraph.io.vsdx.VsdxShape.__static_initialize();com.mxgraph.io.vsdx.Shape.UNICODE_LINE_SEP_$LI$();com.mxgraph.io.vsdx.Style.lineDashPatterns_$LI$();com.mxgraph.io.vsdx.Style.styleTypes_$LI$();com.mxgraph.io.vsdx.Style.__static_initialize();com.mxgraph.online.Constants.MAX_AREA_$LI$();com.mxgraph.io.vsdx.theme.Color.NONE_$LI$();com.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();
 com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();
 EditorUi.prototype.doImportVisio=function(f,g,q,e){e=e||f.name;null!=e&&/(\.vs(x|sx?))($|\?)/i.test(e)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(f,g,null,q):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(f,g,null,q)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y\:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x\:Static\s+(.+)\.(.+)\}$/;
-mxGraphMlCodec.prototype.decode=function(f,g,q){try{var e=mxUtils.parseXml(f),l=this.getDirectChildNamedElements(e.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(e.documentElement);f='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(e=0;e<l.length;e++){var c=l[e],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(c,b,b.getDefaultParent()),e=0;e<this.edges.length;e++)for(var d=this.edges[e],k=d.edges,n=d.parent,w=d.dx,A=d.dy,
-z=0;z<k.length;z++)this.importEdge(k[z],b,n,w,A)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var y=b.getModel().cells,E;for(E in y){var D=y[E];if(D.edge&&0<D.getChildCount())for(e=0;e<D.getChildCount();e++){var B=D.children[e].geometry;if(B.adjustIt){var C=b.view.getState(D),G=C.absolutePoints,P=G[0],aa=G[G.length-1],S=B.x,N=B.y,w=aa.x-P.x,A=aa.y-P.y,ha=P.x+S*w,fa=P.y+S*A,ba=Math.sqrt(w*w+A*A),w=w/ba,A=A/ba,ha=ha-N*A,fa=fa+N*w,na=b.view.getRelativePoint(C,ha,fa);B.x=
-na.x;B.y=na.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}f+=this.processPage(b,e+1)}g&&g(f+"</mxfile>")}catch(W){q&&q(W)}};
+mxGraphMlCodec.prototype.decode=function(f,g,q){try{var e=mxUtils.parseXml(f),l=this.getDirectChildNamedElements(e.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(e.documentElement);f='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(e=0;e<l.length;e++){var c=l[e],b=this.createMxGraph(),a=b.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(c,b,b.getDefaultParent()),e=0;e<this.edges.length;e++)for(var d=this.edges[e],k=d.edges,n=d.parent,w=d.dx,z=d.dy,
+A=0;A<k.length;A++)this.importEdge(k[A],b,n,w,z)}catch(U){throw console.log(U),U;}finally{a.endUpdate()}a.beginUpdate();try{var y=b.getModel().cells,B;for(B in y){var C=y[B];if(C.edge&&0<C.getChildCount())for(e=0;e<C.getChildCount();e++){var E=C.children[e].geometry;if(E.adjustIt){var D=b.view.getState(C),G=D.absolutePoints,P=G[0],Z=G[G.length-1],W=E.x,M=E.y,w=Z.x-P.x,z=Z.y-P.y,ga=P.x+W*w,da=P.y+W*z,ba=Math.sqrt(w*w+z*z),w=w/ba,z=z/ba,ga=ga-M*z,da=da+M*w,ma=b.view.getRelativePoint(D,ga,da);E.x=ma.x;
+E.y=ma.y}}}}catch(U){throw console.log(U),U;}finally{a.endUpdate()}f+=this.processPage(b,e+1)}g&&g(f+"</mxfile>")}catch(U){q&&q(U)}};
 mxGraphMlCodec.prototype.initializeKeys=function(f){var g=this.getDirectChildNamedElements(f,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]=
 {};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var q,e=0;e<g.length;e++){var l=this.dataElem2Obj(g[e]),c=l[mxGraphMlConstants.ID],b=l[mxGraphMlConstants.KEY_FOR],a=l[mxGraphMlConstants.KEY_NAME],d=l[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(q=c);a=a?a:d;switch(b){case mxGraphMlConstants.NODE:this.nodesKeys[a]=
 {key:c,keyObj:l};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:c,keyObj:l};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:c,keyObj:l};break;case mxGraphMlConstants.ALL:l={key:c,keyObj:l},this.nodesKeys[a]=l,this.edgesKeys[a]=l,this.portsKeys[a]=l}}f=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA);for(e=0;e<f.length;e++)if(f[e].getAttribute(mxGraphMlConstants.KEY)==q)for(b=this.getDirectChildNamedElements(f[e],mxGraphMlConstants.Y_SHARED_DATA),g=0;g<b.length;g++)for(a=
@@ -1452,20 +1458,20 @@ break;case "bpmnOutline":b=mxGraphMlShapesMap.bpmnOutline[c.toLowerCase()];break
 mxGraphMlCodec.prototype.importGraph=function(f,g,q){for(var e=this.getDirectChildNamedElements(f,mxGraphMlConstants.NODE),l=q,c=0,b=0;l&&l.geometry;)c+=l.geometry.x,b+=l.geometry.y,l=l.parent;for(l=0;l<e.length;l++)this.importNode(e[l],g,q,c,b);this.edges.push({edges:this.getDirectChildNamedElements(f,mxGraphMlConstants.EDGE),parent:q,dx:c,dy:b})};
 mxGraphMlCodec.prototype.importPort=function(f,g){for(var q=f.getAttribute(mxGraphMlConstants.PORT_NAME),e={},l=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),c=0;c<l.length;c++){var b=l[c];b.getAttribute(mxGraphMlConstants.KEY);b=this.dataElem2Obj(b);b.key==this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER].key&&this.mapObject(b,{"y:FreeNodePortLocationModelParameter.Ratio":function(a,b){var c=a.split(",");b.pos={x:c[0],y:c[1]}}},e)}g[q]=e};
 mxGraphMlCodec.prototype.styleMap2Str=function(f){var g="",q="",e;for(e in f)q+=g+e+"="+f[e],g=";";return q};
-mxGraphMlCodec.prototype.importNode=function(f,g,q,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);g.addCell(a,q);q={graphMlID:b};for(var d=null,k=null,n=null,w=null,A=0;A<c.length;A++){var z=this.dataElem2Obj(c[A]);if(z.key)if(z.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,z,e,l);else if(z.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)n=
-z;else if(z.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)d=z,z["yjs:StringTemplateNodeStyle"]?k=z["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,z,q);else if(z.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)w=z;else if(z.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var y=d=null;for(y in z)if("key"!=y&&"#text"!=y){if("y:ProxyAutoBoundsNode"==y){if(y=z[y]["y:Realizers"])for(var E in y)if("active"!=E&&"#text"!=E){d=y[E][y.active];z={};z[E]=d;break}}else d=
-z[y];break}d&&(d[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,d[mxGraphMlConstants.GEOMETRY],e,l),d[mxGraphMlConstants.NODE_LABEL]&&(w=d[mxGraphMlConstants.NODE_LABEL]));d=z;this.addNodeStyle(a,z,q)}}l=this.getDirectChildNamedElements(f,mxGraphMlConstants.PORT);e={};for(A=0;A<l.length;A++)this.importPort(l[A],e);k&&this.handleTemplates(k,n,a,q);this.handleFixedRatio(a,q);this.handleCompoundShape(a,q,d,null);0==q.strokeWidth&&(q.strokeColor="none");a.style=this.styleMap2Str(q);f=this.getDirectChildNamedElements(f,
-mxGraphMlConstants.GRAPH);for(A=0;A<f.length;A++)this.importGraph(f[A],g,a,e);w&&this.addLabels(a,w,q,g);this.nodesMap[b]={node:a,ports:e}};
+mxGraphMlCodec.prototype.importNode=function(f,g,q,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=new mxCell;a.vertex=!0;a.geometry=new mxGeometry(0,0,30,30);g.addCell(a,q);q={graphMlID:b};for(var d=null,k=null,n=null,w=null,z=0;z<c.length;z++){var A=this.dataElem2Obj(c[z]);if(A.key)if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY].key)this.addNodeGeo(a,A,e,l);else if(A.key==this.nodesKeys[mxGraphMlConstants.USER_TAGS].key)n=
+A;else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_STYLE].key)d=A,A["yjs:StringTemplateNodeStyle"]?k=A["yjs:StringTemplateNodeStyle"]["#text"]:this.addNodeStyle(a,A,q);else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_LABELS].key)w=A;else if(A.key==this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS].key){var y=d=null;for(y in A)if("key"!=y&&"#text"!=y){if("y:ProxyAutoBoundsNode"==y){if(y=A[y]["y:Realizers"])for(var B in y)if("active"!=B&&"#text"!=B){d=y[B][y.active];A={};A[B]=d;break}}else d=
+A[y];break}d&&(d[mxGraphMlConstants.GEOMETRY]&&this.addNodeGeo(a,d[mxGraphMlConstants.GEOMETRY],e,l),d[mxGraphMlConstants.NODE_LABEL]&&(w=d[mxGraphMlConstants.NODE_LABEL]));d=A;this.addNodeStyle(a,A,q)}}l=this.getDirectChildNamedElements(f,mxGraphMlConstants.PORT);e={};for(z=0;z<l.length;z++)this.importPort(l[z],e);k&&this.handleTemplates(k,n,a,q);this.handleFixedRatio(a,q);this.handleCompoundShape(a,q,d,null);0==q.strokeWidth&&(q.strokeColor="none");a.style=this.styleMap2Str(q);f=this.getDirectChildNamedElements(f,
+mxGraphMlConstants.GRAPH);for(z=0;z<f.length;z++)this.importGraph(f[z],g,a,e);w&&this.addLabels(a,w,q,g);this.nodesMap[b]={node:a,ports:e}};
 mxGraphMlCodec.prototype.addNodeStyle=function(f,g,q){f=function(a,b){if("line"!=a){b.dashed=1;var c;switch(a){case "DashDot":c="3 1 1 1";break;case "Dot":c="1 1";break;case "DashDotDot":c="3 1 1 1 1 1";break;case "Dash":c="3 1";break;case "dotted":c="1 3";break;case "dashed":c="5 2";break;default:c=a.replace(/0/g,"1")}c&&(0>c.indexOf(" ")&&(c=c+" "+c),b.dashPattern=c)}};f={shape:{key:"shape",mod:"shape"},"y:Shape.type":{key:"shape",mod:"shape"},configuration:{key:"shape",mod:"shape"},type:{key:"shape",
 mod:"shape"},assetName:{key:"shape",mod:"shape"},activityType:{key:"shape",mod:"shape"},fill:{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"},"fill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"y:Fill":{color:{key:"fillColor",mod:"color"},transparent:function(a,b){"true"==a&&(b.fillColor="none")}},"y:BorderStyle":{color:{key:"strokeColor",mod:"color"},width:"strokeWidth",hasColor:function(a,b){"false"==a&&(b.strokeColor="none")},
 type:f},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:f,"dashStyle.yjs:DashStyle.dashes":f,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"}};var e=mxUtils.clone(f);e.defaults={fillColor:"#CCCCCC",strokeColor:"#6881B3"};var l=mxUtils.clone(f);l.defaults={shape:"ext;rounded=1",fillColor:"#FFFFFF",strokeColor:"#000090"};var c=mxUtils.clone(f);c.defaults={shape:"rhombus;fillColor=#FFFFFF;strokeColor=#FFCD28"};
 var b=mxUtils.clone(f);b.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(f);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var d=mxUtils.clone(f);d.defaults={shape:"js:bpmnDataObject"};var k=mxUtils.clone(f);k.defaults={shape:"datastore"};var n=mxUtils.clone(f);n.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var w=
-mxUtils.clone(f);w.defaults={shape:"js:BpmnChoreography"};var A=mxUtils.clone(f);A.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};A.inset="strokeWidth";A.radius="arcSize";A.drawShadow={key:"shadow",mod:"bool"};A.color={key:"fillColor",mod:"color",addGradient:"north"};A["color.yjs:Color.value"]=A.color;var z=mxUtils.clone(f);z.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};z.drawShadow={key:"shadow",mod:"bool"};var y=mxUtils.clone(f);y.defaults={shape:"swimlane",
-startSize:20,strokeWidth:4,spacingLeft:10};y.isCollapsible={key:"collapsible",mod:"bool"};y.borderColor={key:"strokeColor",mod:"color"};y.folderFrontColor={key:"fillColor",mod:"color"};var E=mxUtils.clone(f);E.defaults={shape:"swimlane",startSize:20,spacingLeft:10};E["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};
-var D=mxUtils.clone(f);D.defaults={shape:"js:table"};var B=mxUtils.clone(f);B.defaults={shape:"image"};B.image=function(a,b){b.image=a};var C=mxUtils.clone(f);C.defaults={shape:"image"};C["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(a,b){b.image="data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a))};var G=mxUtils.clone(f);G.defaults={shape:"swimlane",startSize:20};G["y:Shape.type"]=function(a,b){"roundrectangle"==a&&(b.rounded=1,b.arcSize=5)};var P=mxUtils.clone(f);P.defaults={shape:"js:table2"};
-var aa=mxUtils.clone(f);aa.defaults={gradientDirection:"east"};aa["y:Fill"].color2={key:"gradientColor",mod:"color"};aa["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},
-"com.yworks.sbgn.style.radius":{key:"arcSize",mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(g,{"yjs:ShapeNodeStyle":f,"demostyle:FlowchartNodeStyle":f,"demostyle:AssetNodeStyle":e,"bpmn:ActivityNodeStyle":l,"bpmn:GatewayNodeStyle":c,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":d,"bpmn:DataStoreNodeStyle":k,"bpmn:GroupNodeStyle":n,"bpmn:ChoreographyNodeStyle":w,"yjs:BevelNodeStyle":A,"yjs:ShinyPlateNodeStyle":z,"demostyle:DemoGroupStyle":y,
-"yjs:CollapsibleNodeStyleDecorator":E,"bpmn:PoolNodeStyle":D,"yjs:TableNodeStyle":D,"demotablestyle:DemoTableStyle":D,"yjs:ImageNodeStyle":B,"y:ShapeNode":f,"y:GenericNode":aa,"y:GenericGroupNode":aa,"y:TableNode":P,"y:SVGNode":C,"y:GroupNode":G},q)};
+mxUtils.clone(f);w.defaults={shape:"js:BpmnChoreography"};var z=mxUtils.clone(f);z.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};z.inset="strokeWidth";z.radius="arcSize";z.drawShadow={key:"shadow",mod:"bool"};z.color={key:"fillColor",mod:"color",addGradient:"north"};z["color.yjs:Color.value"]=z.color;var A=mxUtils.clone(f);A.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};A.drawShadow={key:"shadow",mod:"bool"};var y=mxUtils.clone(f);y.defaults={shape:"swimlane",
+startSize:20,strokeWidth:4,spacingLeft:10};y.isCollapsible={key:"collapsible",mod:"bool"};y.borderColor={key:"strokeColor",mod:"color"};y.folderFrontColor={key:"fillColor",mod:"color"};var B=mxUtils.clone(f);B.defaults={shape:"swimlane",startSize:20,spacingLeft:10};B["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};
+var C=mxUtils.clone(f);C.defaults={shape:"js:table"};var E=mxUtils.clone(f);E.defaults={shape:"image"};E.image=function(a,b){b.image=a};var D=mxUtils.clone(f);D.defaults={shape:"image"};D["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(a,b){b.image="data:image/svg+xml,"+(window.btoa?btoa(a):Base64.encode(a))};var G=mxUtils.clone(f);G.defaults={shape:"swimlane",startSize:20};G["y:Shape.type"]=function(a,b){"roundrectangle"==a&&(b.rounded=1,b.arcSize=5)};var P=mxUtils.clone(f);P.defaults={shape:"js:table2"};
+var Z=mxUtils.clone(f);Z.defaults={gradientDirection:"east"};Z["y:Fill"].color2={key:"gradientColor",mod:"color"};Z["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",
+mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(g,{"yjs:ShapeNodeStyle":f,"demostyle:FlowchartNodeStyle":f,"demostyle:AssetNodeStyle":e,"bpmn:ActivityNodeStyle":l,"bpmn:GatewayNodeStyle":c,"bpmn:ConversationNodeStyle":b,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":d,"bpmn:DataStoreNodeStyle":k,"bpmn:GroupNodeStyle":n,"bpmn:ChoreographyNodeStyle":w,"yjs:BevelNodeStyle":z,"yjs:ShinyPlateNodeStyle":A,"demostyle:DemoGroupStyle":y,"yjs:CollapsibleNodeStyleDecorator":B,
+"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":E,"y:ShapeNode":f,"y:GenericNode":Z,"y:GenericGroupNode":Z,"y:TableNode":P,"y:SVGNode":D,"y:GroupNode":G},q)};
 mxGraphMlCodec.prototype.handleTemplates=function(f,g,q,e){if(f){for(var l=q.geometry.width,c=q.geometry.height,b='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+l+" "+c+'"><g>',a,d=[],k=/\{TemplateBinding\s+([^}]+)\}/g;null!=(a=k.exec(f));){var n="";switch(a[1]){case "width":n=l;break;case "height":n=c}d.push({match:a[0],repl:n})}if(g&&g["y:Json"])for(c=JSON.parse(g["y:Json"]["#text"]),k=/\{Binding\s+([^}]+)\}/g;null!=(a=k.exec(f));)if(n=a[1].split(","),
 l=c[n[0]]){if(1<n.length&&n[1].indexOf("Converter=")){var w=mxGraphMlConverters[n[1].substr(11)];w&&(arguments=[l],n[2]&&arguments.push(n[2].substr(11)),l=w.apply(null,arguments))}d.push({match:a[0],repl:mxUtils.htmlEntities(l)})}for(a=0;a<d.length;a++)f=f.replace(d[a].match,d[a].repl);d=[];for(c=/\<text.+data-content="([^"]+).+\<\/text\>/g;null!=(a=c.exec(f));)l=a[0].substr(0,a[0].length-7)+a[1]+"</text>",d.push({match:a[0],repl:l});for(a=0;a<d.length;a++)f=f.replace(d[a].match,d[a].repl);b=b+f+
 "</g></svg>";e.shape="image";e.image="data:image/svg+xml,"+(window.btoa?btoa(b):Base64.encode(b))}};
@@ -1479,27 +1485,27 @@ new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),b.geo
 new mxPoint(q,-20);var d=new mxCell("",new mxGeometry(.5,.5,8,1),"shape=rect;part=1;");d.geometry.offset=new mxPoint(-4,-1);d.geometry.relative=!0;d.vertex=!0;b.insert(d);break;case "bpmn_marker_loop":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_parallel":b=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_sequential":b=new mxCell("",
 new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");b.geometry.offset=new mxPoint(q,-20);break;case "bpmn_marker_ad_hoc":b=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;fillColor=#000000");b.geometry.offset=new mxPoint(q,-17);break;case "bpmn_marker_compensation":b=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),b.geometry.offset=new mxPoint(q,-18)}b.geometry.relative=!0;b.vertex=!0;f.insert(b);
 q+=20}break;case "js:table":g.shape="swimlane;collapsible=0;swimlaneLine=0";e=q["yjs:TableNodeStyle"]||q["demotablestyle:DemoTableStyle"];!e&&q["bpmn:PoolNodeStyle"]&&(e=q["bpmn:PoolNodeStyle"]["yjs:TableNodeStyle"]);this.mapObject(e,{"backgroundStyle.demotablestyle:TableBackgroundStyle":{"insetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableBackgroundFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},"tableBackgroundStroke.yjs:Stroke":{fill:{key:"strokeColor",
-mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},g);g.swimlaneFillColor=g.fillColor;e=e.table["y:Table"];var k=a=0,n={x:0};q=0;(c=e.Insets)?(c=c.split(","),"0"!=c[0]?(g.startSize=c[0],n.x=parseFloat(c[0]),g.horizontal="0"):"0"!=c[1]&&(g.startSize=c[1],q=parseFloat(c[1]),k+=q)):g.startSize="0";var w={},A={Insets:function(a,b){b.startSize=a.split(",")[0]},
+mod:"color"},thickness:"strokeWidth"}},"backgroundStyle.yjs:ShapeNodeStyle.fill":{key:"fillColor",mod:"color"},"backgroundStyle.yjs:ShapeNodeStyle.fill.yjs:SolidColorFill.color":{key:"fillColor",mod:"color"}},g);g.swimlaneFillColor=g.fillColor;e=e.table["y:Table"];var k=a=0,n={x:0};q=0;(c=e.Insets)?(c=c.split(","),"0"!=c[0]?(g.startSize=c[0],n.x=parseFloat(c[0]),g.horizontal="0"):"0"!=c[1]&&(g.startSize=c[1],q=parseFloat(c[1]),k+=q)):g.startSize="0";var w={},z={Insets:function(a,b){b.startSize=a.split(",")[0]},
 "Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",
-mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(e.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":A},w);b={};d={Insets:function(a,b){b.startSize=a.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",
+mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"height"};this.mapObject(e.RowDefaults,{defaults:{shape:"swimlane;collapsible=0;horizontal=0",startSize:"0"},"y:StripeDefaults":z},w);b={};d={Insets:function(a,b){b.startSize=a.split(",")[1]},"Style.bpmn:AlternatingLeafStripeStyle":{"evenLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"evenFill",mod:"color"},backgroundFill:{key:"evenLaneFill",mod:"color"}},"oddLeafDescriptor.bpmn:StripeDescriptor":{insetFill:{key:"oddFill",
 mod:"color"},backgroundFill:{key:"oddLaneFill",mod:"color"}}},"Style.yjs:NodeStyleStripeStyleAdapter":{"demotablestyle:DemoStripeStyle":{"stripeInsetFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"fillColor",mod:"color"},"tableLineFill.yjs:SolidColorFill.color.yjs:Color.value":{key:"strokeColor",mod:"color"}},"yjs:ShapeNodeStyle":{fill:{key:"swimlaneFillColor",mod:"color"}}},Size:"width"};this.mapObject(e.ColumnDefaults,{defaults:{shape:"swimlane;collapsible=0",startSize:"0",fillColor:"none"},
-"y:StripeDefaults":d},b);var c=f.geometry,a=e.Rows["y:Row"],k=k+parseFloat(b.startSize),z=n.x,y=n.x;n.lx=n.x;if(a)for(a instanceof Array||(a=[a]),c=0;c<a.length;c++)n.x=y,n.lx=y,k=this.addRow(a[c],f,c&1,k,n,A,w),z=Math.max(n.x,z);e=e.Columns["y:Column"];a=z;if(e)for(e instanceof Array||(e=[e]),c=0;c<e.length;c++)a=this.addColumn(e[c],f,c&1,a,q,d,b);break;case "js:table2":g.shape="swimlane;collapsible=0;swimlaneLine=0";e={};this.mapObject(q,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",
+"y:StripeDefaults":d},b);var c=f.geometry,a=e.Rows["y:Row"],k=k+parseFloat(b.startSize),A=n.x,y=n.x;n.lx=n.x;if(a)for(a instanceof Array||(a=[a]),c=0;c<a.length;c++)n.x=y,n.lx=y,k=this.addRow(a[c],f,c&1,k,n,z,w),A=Math.max(n.x,A);e=e.Columns["y:Column"];a=A;if(e)for(e instanceof Array||(e=[e]),c=0;c<e.length;c++)a=this.addColumn(e[c],f,c&1,a,q,d,b);break;case "js:table2":g.shape="swimlane;collapsible=0;swimlaneLine=0";e={};this.mapObject(q,{"y:TableNode":{"y:StyleProperties.y:Property":{"yed.table.section.color":{key:"secColor",
 mod:"color"},"yed.table.header.height":"headerH","yed.table.header.color.main":{key:"headerColor",mod:"color"},"yed.table.header.color.alternating":{key:"headerColorAlt",mod:"color"},"yed.table.lane.color.main":{key:"laneColor",mod:"color"},"yed.table.lane.color.alternating":{key:"laneColorAlt",mod:"color"},"yed.table.lane.style":"laneStyle","com.yworks.bpmn.type":"isHorz",POOL_LANE_COLOR_ALTERNATING:{key:"laneColorAlt",mod:"color"},POOL_LANE_COLOR_MAIN:{key:"laneColor",mod:"color"},POOL_LANE_STYLE:"laneStyle",
-POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},e);g.swimlaneFillColor=g.fillColor;A=b=0;"pool_type_lane_and_column"==e.isHorz||"pool_type_empty"==e.isHorz||"pool_type_lane"==e.isHorz?A=parseFloat(e.tblHWidth):b=parseFloat(e.tblHHeight);
-g.startSize=b?b:A;try{a=q["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];d=q["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];k="lane.style.rows"==e.laneStyle||"lane_style_rows"==e.laneStyle;a instanceof Array||(a=[a]);d instanceof Array||(d=[d]);n=parseFloat(e.rowHWidth);for(c=0;c<a.length;c++)a[c]["y:Insets"]&&(n=Math.max(n,parseFloat(a[c]["y:Insets"].left)+parseFloat(a[c]["y:Insets"].right)));w=parseFloat(e.colHHeight);for(c=0;c<d.length;c++)d[c]["y:Insets"]&&(w=Math.max(w,parseFloat(d[c]["y:Insets"].top)+
-parseFloat(d[c]["y:Insets"].bottom)));k?(this.addTbl2Rows(f,a,b,A,n,w,k,e),this.addTbl2Cols(f,d,b,A,n,w,k,e)):(this.addTbl2Cols(f,d,b,A,n,w,k,e),this.addTbl2Rows(f,a,b,A,n,w,k,e))}catch(E){}break;case "js:relationship_big_entity":g.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(f=q["y:GenericNode"]["y:Fill"])g.fillColor=f.color2,g.swimlaneFillColor=f.color;break;case "js:relationship_attribute":g.shape="1"==g["double"]?"doubleEllipse":"ellipse"}0<l.indexOf("Shadow")&&(g.shadow=
+POOL_HEADER_COLOR_MAIN:{key:"headerColor",mod:"color"},POOL_HEADER_COLOR_ALTERNATING:{key:"headerColorAlt",mod:"color"},POOL_TABLE_SECTION_COLOR:{key:"secColor",mod:"color"}},"y:Table":{"y:DefaultColumnInsets.top":"colHHeight","y:DefaultRowInsets.left":"rowHWidth","y:Insets":{top:"tblHHeight",left:"tblHWidth"}}}},e);g.swimlaneFillColor=g.fillColor;z=b=0;"pool_type_lane_and_column"==e.isHorz||"pool_type_empty"==e.isHorz||"pool_type_lane"==e.isHorz?z=parseFloat(e.tblHWidth):b=parseFloat(e.tblHHeight);
+g.startSize=b?b:z;try{a=q["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];d=q["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];k="lane.style.rows"==e.laneStyle||"lane_style_rows"==e.laneStyle;a instanceof Array||(a=[a]);d instanceof Array||(d=[d]);n=parseFloat(e.rowHWidth);for(c=0;c<a.length;c++)a[c]["y:Insets"]&&(n=Math.max(n,parseFloat(a[c]["y:Insets"].left)+parseFloat(a[c]["y:Insets"].right)));w=parseFloat(e.colHHeight);for(c=0;c<d.length;c++)d[c]["y:Insets"]&&(w=Math.max(w,parseFloat(d[c]["y:Insets"].top)+
+parseFloat(d[c]["y:Insets"].bottom)));k?(this.addTbl2Rows(f,a,b,z,n,w,k,e),this.addTbl2Cols(f,d,b,z,n,w,k,e)):(this.addTbl2Cols(f,d,b,z,n,w,k,e),this.addTbl2Rows(f,a,b,z,n,w,k,e))}catch(B){}break;case "js:relationship_big_entity":g.shape="swimlane;startSize=30;rounded=1;arcSize=5;collapsible=0";if(f=q["y:GenericNode"]["y:Fill"])g.fillColor=f.color2,g.swimlaneFillColor=f.color;break;case "js:relationship_attribute":g.shape="1"==g["double"]?"doubleEllipse":"ellipse"}0<l.indexOf("Shadow")&&(g.shadow=
 "1")}};
-mxGraphMlCodec.prototype.addTbl2Rows=function(f,g,q,e,l,c,b,a){q+=c;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var A={shape:"swimlane;collapsible=0;horizontal=0",startSize:l,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(A.startSize)&&(A.fillColor="none",A.swimlaneLine="0");if(b){var z=n?a.headerColorAlt:a.headerColor;A.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;A.fillColor=z?z:A.swimlaneFillColor}n=parseFloat(g[k].height);z=d&&0==k?c:0;
-w.geometry=new mxGeometry(e,q-z,f.geometry.width-e,n+z);q+=n;w.style=this.styleMap2Str(A);f.insert(w)}};
-mxGraphMlCodec.prototype.addTbl2Cols=function(f,g,q,e,l,c,b,a){e=l+e;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var A={shape:"swimlane;collapsible=0",startSize:c,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(A.startSize)&&(A.fillColor="none");if(!b){var z=n?a.headerColorAlt:a.headerColor;A.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;A.fillColor=z?z:A.swimlaneFillColor}n=parseFloat(g[k].width);z=d&&0==k?l:0;w.geometry=new mxGeometry(e-z,
-q,n+z,f.geometry.height-q);e+=n;w.style=this.styleMap2Str(A);f.insert(w)}};
+mxGraphMlCodec.prototype.addTbl2Rows=function(f,g,q,e,l,c,b,a){q+=c;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var z={shape:"swimlane;collapsible=0;horizontal=0",startSize:l,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(z.startSize)&&(z.fillColor="none",z.swimlaneLine="0");if(b){var A=n?a.headerColorAlt:a.headerColor;z.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;z.fillColor=A?A:z.swimlaneFillColor}n=parseFloat(g[k].height);A=d&&0==k?c:0;
+w.geometry=new mxGeometry(e,q-A,f.geometry.width-e,n+A);q+=n;w.style=this.styleMap2Str(z);f.insert(w)}};
+mxGraphMlCodec.prototype.addTbl2Cols=function(f,g,q,e,l,c,b,a){e=l+e;for(var d=null!=a.isHorz,k=0;k<g.length;k++){var n=k&1,w=new mxCell;w.vertex=!0;var z={shape:"swimlane;collapsible=0",startSize:c,fillColor:a.secColor||"none",swimlaneLine:d?"0":"1"};0==parseFloat(z.startSize)&&(z.fillColor="none");if(!b){var A=n?a.headerColorAlt:a.headerColor;z.swimlaneFillColor=n?a.laneColorAlt:a.laneColor;z.fillColor=A?A:z.swimlaneFillColor}n=parseFloat(g[k].width);A=d&&0==k?l:0;w.geometry=new mxGeometry(e-A,
+q,n+A,f.geometry.height-q);e+=n;w.style=this.styleMap2Str(z);f.insert(w)}};
 mxGraphMlCodec.prototype.addRow=function(f,g,q,e,l,c,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(f,c,d);q?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));q=parseFloat(d.height);a.geometry=new mxGeometry(l.lx,e,g.geometry.width-l.lx,q);var k=f.Labels;k&&this.addLabels(a,k,d);a.style=this.styleMap2Str(d);g.insert(a);f=f["y:Row"];l.lx=0;d.startSize&&
 (l.lx=parseFloat(d.startSize),l.x+=l.lx);g=d=l.x;var k=l.lx,n=0;if(f){f instanceof Array||(f=[f]);for(var w=0;w<f.length;w++)l.x=d,l.lx=k,n=this.addRow(f[w],a,w&1,n,l,c,b),g=Math.max(l.x,g)}l.x=g;q=Math.max(q,n);a.geometry.height=q;return e+q};
 mxGraphMlCodec.prototype.addColumn=function(f,g,q,e,l,c,b){var a=new mxCell;a.vertex=!0;var d=mxUtils.clone(b);this.mapObject(f,c,d);q?(d.oddFill&&(d.fillColor=d.oddFill),d.oddLaneFill&&(d.swimlaneFillColor=d.oddLaneFill)):(d.evenFill&&(d.fillColor=d.evenFill),d.evenLaneFill&&(d.swimlaneFillColor=d.evenLaneFill));q=parseFloat(d.width);a.geometry=new mxGeometry(e,l,q,g.geometry.height-l);var k=f.Labels;k&&this.addLabels(a,k,d);a.style=this.styleMap2Str(d);g.insert(a);f=f["y:Column"];g=0;if(f)for(f instanceof
 Array||(f=[f]),d=0;d<f.length;d++)g=this.addColumn(f[d],a,d&1,g,l,c,b);q=Math.max(q,g);a.geometry.width=q;return e+q};mxGraphMlCodec.prototype.handleFixedRatio=function(f,g){var q=g.shape,e=f.geometry;if(q&&e)if(0<q.indexOf(";aspect=fixed"))q=Math.min(e.height,e.width),q==e.height&&(e.x+=(e.width-q)/2),e.height=q,e.width=q;else if(0<q.indexOf(";rotation=90")||0<q.indexOf(";rotation=-90")){var q=e.height,l=e.width;e.height=l;e.width=q;q=(q-l)/2;e.x-=q;e.y+=q}};
 mxGraphMlCodec.prototype.addNodeGeo=function(f,g,q,e){var l=g[mxGraphMlConstants.RECT],c=0,b=0,a=30,d=30;l?(c=l[mxGraphMlConstants.X],b=l[mxGraphMlConstants.Y],a=l[mxGraphMlConstants.WIDTH],d=l[mxGraphMlConstants.HEIGHT]):(c=g[mxGraphMlConstants.X_L]||c,b=g[mxGraphMlConstants.Y_L]||b,a=g[mxGraphMlConstants.WIDTH_L]||a,d=g[mxGraphMlConstants.HEIGHT_L]||d);f=f.geometry;f.x=parseFloat(c)-q;f.y=parseFloat(b)-e;f.width=parseFloat(a);f.height=parseFloat(d)};
 mxGraphMlCodec.prototype.importEdge=function(f,g,q,e,l){var c=this.getDirectChildNamedElements(f,mxGraphMlConstants.DATA),b=f.getAttribute(mxGraphMlConstants.ID),a=f.getAttribute(mxGraphMlConstants.EDGE_SOURCE),d=f.getAttribute(mxGraphMlConstants.EDGE_TARGET),k=f.getAttribute(mxGraphMlConstants.EDGE_SOURCE_PORT);f=f.getAttribute(mxGraphMlConstants.EDGE_TARGET_PORT);a=this.nodesMap[a];d=this.nodesMap[d];q=g.insertEdge(q,null,"",a.node,d.node,"graphMLId="+b);for(var b={graphMlID:b},n=0;n<c.length;n++){var w=
-this.dataElem2Obj(c[n]),A=w["y:PolyLineEdge"]||w["y:GenericEdge"]||w["y:ArcEdge"]||w["y:BezierEdge"]||w["y:QuadCurveEdge"]||w["y:SplineEdge"];w.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(q,w,e,l):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(q,w,b):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(q,w,b,g):A&&(this.addEdgeStyle(q,w,b),w=this.addEdgePath(q,A["y:Path"],b,e,l),A["y:EdgeLabel"]&&this.addLabels(q,A["y:EdgeLabel"],
+this.dataElem2Obj(c[n]),z=w["y:PolyLineEdge"]||w["y:GenericEdge"]||w["y:ArcEdge"]||w["y:BezierEdge"]||w["y:QuadCurveEdge"]||w["y:SplineEdge"];w.key==this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY].key?this.addEdgeGeo(q,w,e,l):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_STYLE].key?this.addEdgeStyle(q,w,b):w.key==this.edgesKeys[mxGraphMlConstants.EDGE_LABELS].key?this.addLabels(q,w,b,g):z&&(this.addEdgeStyle(q,w,b),w=this.addEdgePath(q,z["y:Path"],b,e,l),z["y:EdgeLabel"]&&this.addLabels(q,z["y:EdgeLabel"],
 b,g,w),null!=b.shape&&0==b.shape.indexOf("link")&&(b.width=b.strokeWidth,b.strokeWidth=1))}a.ports&&k&&(g=a.ports[k],g.pos&&(b.exitX=g.pos.x,b.exitY=g.pos.y));d.ports&&f&&(g=d.ports[f],g.pos&&(b.entryX=g.pos.x,b.entryY=g.pos.y));q.style=this.styleMap2Str(b);return q};
 mxGraphMlCodec.prototype.addEdgeGeo=function(f,g,q,e){if(g=g[mxGraphMlConstants.Y_BEND]){for(var l=[],c=0;c<g.length;c++){var b=g[c][mxGraphMlConstants.LOCATION];b&&(b=b.split(","),l.push(new mxPoint(parseFloat(b[0])-q,parseFloat(b[1])-e)))}f.geometry.points=l}};
 mxGraphMlCodec.prototype.addEdgePath=function(f,g,q,e,l){var c=[];if(g){var b=parseFloat(g.sx),a=parseFloat(g.sy),d=parseFloat(g.tx),k=parseFloat(g.ty),n=f.source.geometry;0!=b||0!=a?(q.exitX=(b+n.width/2)/n.width,q.exitY=(a+n.height/2)/n.height,c.push(new mxPoint(n.x+q.exitX*n.width-e,n.y+q.exitY*n.height-l))):c.push(new mxPoint(n.x+n.width/2-e,n.y+n.height/2-l));b=f.target.geometry;0!=d||0!=k?(q.entryX=(d+b.width/2)/b.width,q.entryY=(k+b.height/2)/b.height,q=new mxPoint(b.x+q.entryX*b.width-e,b.y+
@@ -1508,16 +1514,16 @@ mxGraphMlCodec.prototype.addEdgeStyle=function(f,g,q){f=function(a,b){b.dashed=1
 "1"},c={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var c=null;switch(a){case "dashed":c="3 1";break;case "dotted":c="1 1";break;case "dashed_dotted":c="3 2 1 2"}c&&(b.dashPattern=c)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";l(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";e(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",
 mod:"bool"}}},b=mxUtils.clone(c);b.defaults.curved="1";this.mapObject(g,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:f,"dashStyle.yjs:DashStyle.dashes":f,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",
 mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:e,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:l,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":c,"y:GenericEdge":c,"y:ArcEdge":b,"y:BezierEdge":b,"y:QuadCurveEdge":b,"y:SplineEdge":b},q)};
-mxGraphMlCodec.prototype.addLabels=function(f,g,q,e,l){q=f.getChildCount();var c=g[mxGraphMlConstants.Y_LABEL]||g;g=[];var b=[],a=[];if(c){c instanceof Array||(c=[c]);for(var d=0;d<c.length;d++){var k=c[d],n={},w=k[mxGraphMlConstants.TEXT]||k;w&&(w=w["#text"]);var A=k[mxGraphMlConstants.LAYOUTPARAMETER]||k||{},z=function(a,b){a&&(a=a.toUpperCase());var c=b.fontStyle||0;switch(a){case "ITALIC":c|=2;break;case "BOLD":c|=1;break;case "UNDERLINE":c|=4}b.fontStyle=c};this.mapObject(k,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",
+mxGraphMlCodec.prototype.addLabels=function(f,g,q,e,l){q=f.getChildCount();var c=g[mxGraphMlConstants.Y_LABEL]||g;g=[];var b=[],a=[];if(c){c instanceof Array||(c=[c]);for(var d=0;d<c.length;d++){var k=c[d],n={},w=k[mxGraphMlConstants.TEXT]||k;w&&(w=w["#text"]);var z=k[mxGraphMlConstants.LAYOUTPARAMETER]||k||{},A=function(a,b){a&&(a=a.toUpperCase());var c=b.fontStyle||0;switch(a){case "ITALIC":c|=2;break;case "BOLD":c|=1;break;case "UNDERLINE":c|=4}b.fontStyle=c};this.mapObject(k,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",
 mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(a,b){a&&(b.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
-fontSize:"fontSize",fontStyle:z,fontWeight:z,textDecoration:z}},"Style.y:VoidLabelStyle":function(a,b){b.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:z,underlinedText:function(a,b){var c=b.fontStyle||0;"true"==a&&(c|=4);b.fontStyle=c},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},n);n.VoidLbl||"0"==n.hasText||(g.push(w),b.push(n),a.push(A))}}for(d=
-0;d<g.length;d++)if(g[d]&&(!a[d]||!a[d]["bpmn:ParticipantParameter"])){g[d]=mxUtils.htmlEntities(g[d],!1).replace(/\n/g,"<br/>");A=f.geometry;n=new mxCell(g[d],new mxGeometry(0,0,A.width,A.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[d]));n.vertex=!0;f.insert(n,q);c=n.geometry;if(a[d]["y:RatioAnchoredLabelModelParameter"])A=mxUtils.getSizeForString(g[d],b[d].fontSize,b[d].fontFamily),(k=a[d]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(k=k.split(","),c.x=parseFloat(k[0]),c.y=parseFloat(k[1]),
-c.width=A.width,c.height=A.height,n.style+=";spacingTop=-4;"):n.style+=";align=center;";else if(a[d]["y:InteriorLabelModel"]){switch(a[d]["y:InteriorLabelModel"]){case "Center":n.style+=";verticalAlign=middle;";break;case "North":c.height=1;break;case "West":c.width=A.height,c.height=A.width,c.y=A.height/2-A.width/2,c.x=-c.y,n.style+=";rotation=-90"}n.style+=";align=center;"}else if(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"])switch(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"].Position){case "North":c.height=
-1;break;case "West":c.width=A.height,c.height=A.width,c.y=A.height/2-A.width/2,c.x=-c.y,n.style+=";rotation=-90;"}else if(a[d]["bpmn:PoolHeaderLabelModel"]){switch(a[d]["bpmn:PoolHeaderLabelModel"]){case "NORTH":c.height=1;break;case "WEST":c.width=A.height,c.height=A.width,c.y=A.height/2-A.width/2,c.x=-c.y,n.style+=";rotation=-90;"}n.style+=";align=center;"}else if(a[d]["y:InteriorStretchLabelModelParameter"])n.style+=";align=center;";else if(a[d]["y:ExteriorLabelModel"])switch(a[d]["y:ExteriorLabelModel"]){case "East":n.style+=
-";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":n.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":n.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":n.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[d]["y:FreeEdgeLabelModelParameter"]){c.relative=!0;c.adjustIt=!0;var A=
-a[d]["y:FreeEdgeLabelModelParameter"],k=A.Ratio,z=A.Distance,y=A.Angle;k&&(c.x=parseFloat(k));z&&(c.y=parseFloat(z));y&&(n.style+=";rotation="+parseFloat(y)*(180/Math.PI));n.style+=";verticalAlign=middle;"}else if(a[d]["y:EdgePathLabelModelParameter"]){c.relative=!0;A=a[d]["y:EdgePathLabelModelParameter"];w=A.SideOfEdge;k=A.SegmentRatio;c.x=k?2*parseFloat(k)-1:0;if(w)switch(w){case "RightOfEdge":c.y=-15;break;case "LeftOfEdge":c.y=15}n.style+=";verticalAlign=middle;"}else if(A=parseFloat(a[d].x),
-k=parseFloat(a[d].y),a[d].width&&(c.width=parseFloat(a[d].width)),a[d].height&&(c.height=parseFloat(a[d].height)),f.edge)if(c.relative=!0,c.x=0,c.y=0,n=f.source.geometry.getCenterX()-f.target.geometry.getCenterX(),w=f.source.geometry.getCenterY()-f.target.geometry.getCenterY(),e&&l&&a[d]["y:ModelParameter"]&&a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){var A=a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"],y=parseFloat(A.angle),z=parseFloat(A.distance),E=A.position,k=parseFloat(A.ratio),
-A=parseFloat(A.segment),D=new mxCellState;D.absolutePoints=l;e.view.updateEdgeBounds(D);var B="left"==E?1:-1;if(-1==A&&6.283185307179586==y)c.offset=new mxPoint(1>Math.abs(k)?D.segments[0]*k:k,B*z);else{-1==A&&(A=0);for(var C=y=0;C<A;C++)y+=D.segments[C];y+=D.segments[A]*k;c.x=y/D.length*2-1;c.y=(("center"==E?0:z)+c.height/2*B*(Math.abs(n)>Math.abs(w)?1:-1))*B}}else isNaN(A)||isNaN(k)||(c.offset=new mxPoint(A+n/2+(0<n?-c.width:c.width),k));else c.x=A||0,c.y=k||0;b[d].rotation&&270==b[d].rotation&&
+fontSize:"fontSize",fontStyle:A,fontWeight:A,textDecoration:A}},"Style.y:VoidLabelStyle":function(a,b){b.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:A,underlinedText:function(a,b){var c=b.fontStyle||0;"true"==a&&(c|=4);b.fontStyle=c},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},n);n.VoidLbl||"0"==n.hasText||(g.push(w),b.push(n),a.push(z))}}for(d=
+0;d<g.length;d++)if(g[d]&&(!a[d]||!a[d]["bpmn:ParticipantParameter"])){g[d]=mxUtils.htmlEntities(g[d],!1).replace(/\n/g,"<br/>");z=f.geometry;n=new mxCell(g[d],new mxGeometry(0,0,z.width,z.height),"text;html=1;spacing=0;"+this.styleMap2Str(b[d]));n.vertex=!0;f.insert(n,q);c=n.geometry;if(a[d]["y:RatioAnchoredLabelModelParameter"])z=mxUtils.getSizeForString(g[d],b[d].fontSize,b[d].fontFamily),(k=a[d]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(k=k.split(","),c.x=parseFloat(k[0]),c.y=parseFloat(k[1]),
+c.width=z.width,c.height=z.height,n.style+=";spacingTop=-4;"):n.style+=";align=center;";else if(a[d]["y:InteriorLabelModel"]){switch(a[d]["y:InteriorLabelModel"]){case "Center":n.style+=";verticalAlign=middle;";break;case "North":c.height=1;break;case "West":c.width=z.height,c.height=z.width,c.y=z.height/2-z.width/2,c.x=-c.y,n.style+=";rotation=-90"}n.style+=";align=center;"}else if(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"])switch(a[d]["y:StretchStripeLabelModel"]||a[d]["y:StripeLabelModelParameter"].Position){case "North":c.height=
+1;break;case "West":c.width=z.height,c.height=z.width,c.y=z.height/2-z.width/2,c.x=-c.y,n.style+=";rotation=-90;"}else if(a[d]["bpmn:PoolHeaderLabelModel"]){switch(a[d]["bpmn:PoolHeaderLabelModel"]){case "NORTH":c.height=1;break;case "WEST":c.width=z.height,c.height=z.width,c.y=z.height/2-z.width/2,c.x=-c.y,n.style+=";rotation=-90;"}n.style+=";align=center;"}else if(a[d]["y:InteriorStretchLabelModelParameter"])n.style+=";align=center;";else if(a[d]["y:ExteriorLabelModel"])switch(a[d]["y:ExteriorLabelModel"]){case "East":n.style+=
+";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":n.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":n.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":n.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[d]["y:FreeEdgeLabelModelParameter"]){c.relative=!0;c.adjustIt=!0;var z=
+a[d]["y:FreeEdgeLabelModelParameter"],k=z.Ratio,A=z.Distance,y=z.Angle;k&&(c.x=parseFloat(k));A&&(c.y=parseFloat(A));y&&(n.style+=";rotation="+parseFloat(y)*(180/Math.PI));n.style+=";verticalAlign=middle;"}else if(a[d]["y:EdgePathLabelModelParameter"]){c.relative=!0;z=a[d]["y:EdgePathLabelModelParameter"];w=z.SideOfEdge;k=z.SegmentRatio;c.x=k?2*parseFloat(k)-1:0;if(w)switch(w){case "RightOfEdge":c.y=-15;break;case "LeftOfEdge":c.y=15}n.style+=";verticalAlign=middle;"}else if(z=parseFloat(a[d].x),
+k=parseFloat(a[d].y),a[d].width&&(c.width=parseFloat(a[d].width)),a[d].height&&(c.height=parseFloat(a[d].height)),f.edge)if(c.relative=!0,c.x=0,c.y=0,n=f.source.geometry.getCenterX()-f.target.geometry.getCenterX(),w=f.source.geometry.getCenterY()-f.target.geometry.getCenterY(),e&&l&&a[d]["y:ModelParameter"]&&a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){var z=a[d]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"],y=parseFloat(z.angle),A=parseFloat(z.distance),B=z.position,k=parseFloat(z.ratio),
+z=parseFloat(z.segment),C=new mxCellState;C.absolutePoints=l;e.view.updateEdgeBounds(C);var E="left"==B?1:-1;if(-1==z&&6.283185307179586==y)c.offset=new mxPoint(1>Math.abs(k)?C.segments[0]*k:k,E*A);else{-1==z&&(z=0);for(var D=y=0;D<z;D++)y+=C.segments[D];y+=C.segments[z]*k;c.x=y/C.length*2-1;c.y=(("center"==B?0:A)+c.height/2*E*(Math.abs(n)>Math.abs(w)?1:-1))*E}}else isNaN(z)||isNaN(k)||(c.offset=new mxPoint(z+n/2+(0<n?-c.width:c.width),k));else c.x=z||0,c.y=k||0;b[d].rotation&&270==b[d].rotation&&
 (c.x-=c.height/2)}return{lblTxts:g,lblStyles:b}};mxGraphMlCodec.prototype.processPage=function(f,g){var q=(new mxCodec).encode(f.getModel());q.setAttribute("style","default-style2");q=mxUtils.getXml(q);q='<diagram name="Page '+g+'">'+Graph.compress(q);return q+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(f,g){for(var q=[],e=f.firstChild;null!=e;e=e.nextSibling)null!=e&&1==e.nodeType&&g==e.nodeName&&0<q.push(e);return q};
 mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(f,g){for(var q=f.firstChild;null!=q;q=q.nextSibling)if(null!=q&&1==q.nodeType&&g==q.nodeName)return q;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(f){var g=[];for(f=f.firstChild;null!=f;f=f.nextSibling)null!=f&&1==f.nodeType&&0<g.push(f);return g};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(f){for(f=f.firstChild;null!=f;f=f.nextSibling)if(null!=f&&1==f.nodeType)return f;return null};
 var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(f,g){if("string"===typeof f){for(var q=f;20<q.length&&-1<q.indexOf(" ");)q=q.substring(0,q.lastIndexOf(" "));return"true"===g?q:f.substring(q.length)}return""},"orgchartconverters.borderconverter":function(f,g){return"boolean"===typeof f?f?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(f,g){return"string"===typeof f?"string"===typeof g?"#"+f+g:"#"+f:f},"orgchartconverters.intermediateconverter":function(f,
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index 64ae1ae4e..25a23ecb2 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -1922,76 +1922,79 @@ Graph.prototype.initLayoutManager = function()
 {
 	this.layoutManager = new mxLayoutManager(this);
 	
-	this.layoutManager.getLayout = function(cell, eventName)
+	this.layoutManager.hasLayout = function(cell, eventName)
 	{
 		return this.graph.getCellStyle(cell)['childLayout'] != null;
 	};
 	
 	this.layoutManager.getLayout = function(cell, eventName)
 	{
-		var style = this.graph.getCellStyle(cell);
-
-		if (style['childLayout'] == 'stackLayout')
-		{
-			var stackLayout = new mxStackLayout(this.graph, true);
-			stackLayout.resizeParentMax = mxUtils.getValue(style, 'resizeParentMax', '1') == '1';
-			stackLayout.horizontal = mxUtils.getValue(style, 'horizontalStack', '1') == '1';
-			stackLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';
-			stackLayout.resizeLast = mxUtils.getValue(style, 'resizeLast', '0') == '1';
-			stackLayout.spacing = style['stackSpacing'] || stackLayout.spacing;
-			stackLayout.border = style['stackBorder'] || stackLayout.border;
-			stackLayout.marginLeft = style['marginLeft'] || 0;
-			stackLayout.marginRight = style['marginRight'] || 0;
-			stackLayout.marginTop = style['marginTop'] || 0;
-			stackLayout.marginBottom = style['marginBottom'] || 0;
-			stackLayout.fill = true;
-			
-			return stackLayout;
-		}
-		else if (style['childLayout'] == 'treeLayout')
-		{
-			var treeLayout = new mxCompactTreeLayout(this.graph);
-			treeLayout.horizontal = mxUtils.getValue(style, 'horizontalTree', '1') == '1';
-			treeLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';
-			treeLayout.groupPadding = mxUtils.getValue(style, 'parentPadding', 20);
-			treeLayout.levelDistance = mxUtils.getValue(style, 'treeLevelDistance', 30);
-			treeLayout.maintainParentLocation = true;
-			treeLayout.edgeRouting = false;
-			treeLayout.resetEdges = false;
-			
-			return treeLayout;
-		}
-		else if (style['childLayout'] == 'flowLayout')
-		{
-			var flowLayout = new mxHierarchicalLayout(this.graph, mxUtils.getValue(style,
-				'flowOrientation', mxConstants.DIRECTION_EAST));
-			flowLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';
-			flowLayout.parentBorder = mxUtils.getValue(style, 'parentPadding', 20);
-			flowLayout.maintainParentLocation = true;
-			
-			// Special undocumented styles for changing the hierarchical
-			flowLayout.intraCellSpacing = mxUtils.getValue(style, 'intraCellSpacing',
-				mxHierarchicalLayout.prototype.intraCellSpacing);
-			flowLayout.interRankCellSpacing = mxUtils.getValue(style, 'interRankCellSpacing',
-				mxHierarchicalLayout.prototype.interRankCellSpacing);
-			flowLayout.interHierarchySpacing = mxUtils.getValue(style, 'interHierarchySpacing',
-				mxHierarchicalLayout.prototype.interHierarchySpacing);
-			flowLayout.parallelEdgeSpacing = mxUtils.getValue(style, 'parallelEdgeSpacing',
-				mxHierarchicalLayout.prototype.parallelEdgeSpacing);
-			
-			return flowLayout;
-		}
-		else if (style['childLayout'] == 'circleLayout')
-		{
-			return new mxCircleLayout(this.graph);
-		}
-		else if (style['childLayout'] == 'organicLayout')
+		if (eventName == mxEvent.END_UPDATE)
 		{
-			return new mxFastOrganicLayout(this.graph);
-		}
-		else if (style['childLayout'] == 'tableLayout')
-		{
-			return new TableLayout(this.graph);
+			var style = this.graph.getCellStyle(cell);
+	
+			if (style['childLayout'] == 'stackLayout')
+			{
+				var stackLayout = new mxStackLayout(this.graph, true);
+				stackLayout.resizeParentMax = mxUtils.getValue(style, 'resizeParentMax', '1') == '1';
+				stackLayout.horizontal = mxUtils.getValue(style, 'horizontalStack', '1') == '1';
+				stackLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';
+				stackLayout.resizeLast = mxUtils.getValue(style, 'resizeLast', '0') == '1';
+				stackLayout.spacing = style['stackSpacing'] || stackLayout.spacing;
+				stackLayout.border = style['stackBorder'] || stackLayout.border;
+				stackLayout.marginLeft = style['marginLeft'] || 0;
+				stackLayout.marginRight = style['marginRight'] || 0;
+				stackLayout.marginTop = style['marginTop'] || 0;
+				stackLayout.marginBottom = style['marginBottom'] || 0;
+				stackLayout.fill = true;
+				
+				return stackLayout;
+			}
+			else if (style['childLayout'] == 'treeLayout')
+			{
+				var treeLayout = new mxCompactTreeLayout(this.graph);
+				treeLayout.horizontal = mxUtils.getValue(style, 'horizontalTree', '1') == '1';
+				treeLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';
+				treeLayout.groupPadding = mxUtils.getValue(style, 'parentPadding', 20);
+				treeLayout.levelDistance = mxUtils.getValue(style, 'treeLevelDistance', 30);
+				treeLayout.maintainParentLocation = true;
+				treeLayout.edgeRouting = false;
+				treeLayout.resetEdges = false;
+				
+				return treeLayout;
+			}
+			else if (style['childLayout'] == 'flowLayout')
+			{
+				var flowLayout = new mxHierarchicalLayout(this.graph, mxUtils.getValue(style,
+					'flowOrientation', mxConstants.DIRECTION_EAST));
+				flowLayout.resizeParent = mxUtils.getValue(style, 'resizeParent', '1') == '1';
+				flowLayout.parentBorder = mxUtils.getValue(style, 'parentPadding', 20);
+				flowLayout.maintainParentLocation = true;
+				
+				// Special undocumented styles for changing the hierarchical
+				flowLayout.intraCellSpacing = mxUtils.getValue(style, 'intraCellSpacing',
+					mxHierarchicalLayout.prototype.intraCellSpacing);
+				flowLayout.interRankCellSpacing = mxUtils.getValue(style, 'interRankCellSpacing',
+					mxHierarchicalLayout.prototype.interRankCellSpacing);
+				flowLayout.interHierarchySpacing = mxUtils.getValue(style, 'interHierarchySpacing',
+					mxHierarchicalLayout.prototype.interHierarchySpacing);
+				flowLayout.parallelEdgeSpacing = mxUtils.getValue(style, 'parallelEdgeSpacing',
+					mxHierarchicalLayout.prototype.parallelEdgeSpacing);
+				
+				return flowLayout;
+			}
+			else if (style['childLayout'] == 'circleLayout')
+			{
+				return new mxCircleLayout(this.graph);
+			}
+			else if (style['childLayout'] == 'organicLayout')
+			{
+				return new mxFastOrganicLayout(this.graph);
+			}
+			else if (style['childLayout'] == 'tableLayout')
+			{
+				return new TableLayout(this.graph);
+			}
 		}
 		
 		return null;
@@ -4437,7 +4440,7 @@ Graph.prototype.updateTableRowHeight = function(row, dy)
 /**
  * Updates column width and row height.
  */
-Graph.prototype.setTableColumnWidth = function(col, width)
+Graph.prototype.updateTableColumnWidth = function(col, dx)
 {
 	var model = this.getModel();
 	var row = model.getParent(col);
@@ -4448,15 +4451,6 @@ Graph.prototype.setTableColumnWidth = function(col, width)
 	model.beginUpdate();
 	try
 	{
-		var geo = this.getCellGeometry(col);
-		var dx = 0;
-	
-		// Gets delta
-		if (geo != null)
-		{
-			dx = width - geo.width;
-		}
-
 		// Sets width of child cell
 		for (var i = 0; i < model.getChildCount(table); i++)
 		{
@@ -4473,12 +4467,12 @@ Graph.prototype.setTableColumnWidth = function(col, width)
 					if (geo != null)
 					{
 						geo = geo.clone();
-						geo.width = width;
+						geo.width += dx;
 						model.setGeometry(cell, geo);
 					}
 				}
 				
-				// Shifts and resizes neighbor child cell
+				// Shifts and resizes neighbor column
 				if (index < model.getChildCount(row) - 1)
 				{
 					cell = model.getChildAt(row, index + 1);
@@ -4556,7 +4550,6 @@ TableLayout.prototype.getLayout = function(parent, vertical)
  */
 TableLayout.prototype.execute = function(parent)
 {
-	// FIXME: Invoked twice
 	if (parent != null)
 	{
 		var offset = this.graph.getActualStartSize(parent);
@@ -5774,11 +5767,71 @@ if (typeof mxVertexHandler != 'undefined')
 			return codec.encode(model);
 		};
 		
+		/**
+		 * Overridden to flatten cell hierarchy for selecting next and previous.
+		 */
+		var graphSelectCell = Graph.prototype.selectCell;
+		Graph.prototype.selectCell = function(isNext, isParent, isChild)
+		{
+			if (isParent || isChild)
+			{
+				graphSelectCell.apply(this, arguments);
+			}
+			else
+			{
+				var cell = this.getSelectionCell();
+				var index = null;
+				var cells = [];
+				
+				// LATER: Reverse traverse order for !isNext
+				var flatten = mxUtils.bind(this, function(temp)
+				{
+					if (this.view.getState(temp) != null &&
+						(this.model.isVertex(temp) ||
+						this.model.isEdge(temp)))
+					{
+						cells.push(temp);
+						
+						if (temp == cell)
+						{
+							index = cells.length - 1;
+						}
+						else if ((isNext && cell == null && cells.length > 0) ||
+							(index != null && ((isNext && cells.length > index)) ||
+							(!isNext && index > 0)))
+						{
+							return;
+						}
+					}
+		
+					for (var i = 0; i < this.model.getChildCount(temp); i++)
+					{
+						flatten(this.model.getChildAt(temp, i));
+					}
+				});
+				
+				flatten(this.model.root);
+				
+				if (cells.length > 0)
+				{
+					if (index != null)
+					{
+						index = mxUtils.mod(index + ((isNext) ? 1 : -1), cells.length)
+					}
+					else
+					{
+						index = 0;
+					}
+					
+					this.setSelectionCell(cells[index]);
+				}
+			}
+		};
+	
 		/**
 		 * Overrides cloning cells in moveCells.
 		 */
 		var graphMoveCells = Graph.prototype.moveCells;
-		
 		Graph.prototype.moveCells = function(cells, dx, dy, clone, target, evt, mapping)
 		{
 			mapping = (mapping != null) ? mapping : new Object();
@@ -5792,7 +5845,42 @@ if (typeof mxVertexHandler != 'undefined')
 			
 			return result;
 		};
+				
+		/**
+		 * Overriddes to delete label for table cells.
+		 */
+		var graphRemoveCells = Graph.prototype.removeCells;
+		Graph.prototype.removeCells = function(cells, includeEdges)
+		{
+			var result = [];
+			
+			this.model.beginUpdate();
+			try
+			{
+				// Clears labels on table cells
+				for (var i = 0; i < cells.length; i++)
+				{
+					if (this.isTableCell(cells[i]) ||
+						this.isTableRow(cells[i]))
+					{
+						this.labelChanged(cells[i], '');
+					}
+					else
+					{
+						result.push(cells[i]);
+					}
+				}
+				
+				result = graphRemoveCells.apply(this, [result, includeEdges]);
+			}
+			finally
+			{
+				this.model.endUpdate();
+			}
 
+			return result;
+		};
+		
 		/**
 		 * Updates cells IDs for custom links in the given cells.
 		 */
@@ -6572,12 +6660,13 @@ if (typeof mxVertexHandler != 'undefined')
 			// Creates a new edge label with a predefined text
 			var label = new mxCell();
 			label.value = 'Text';
-			label.style = 'text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];'
 			label.geometry = new mxGeometry(0, 0, 0, 0);
 			label.vertex = true;
+			var style = 'html=1;align=center;verticalAlign=middle;resizable=0;points=[];';
 
 			if (state != null && this.model.isEdge(state.cell))
 			{
+				label.style = 'edgeLabel;' + style;
 				label.geometry.relative = true;
 				label.connectable = false;
 		    
@@ -6596,6 +6685,7 @@ if (typeof mxVertexHandler != 'undefined')
 			else
 			{
 				var tr = this.view.translate;
+				label.style = 'text;' + style;
 				label.geometry.width = 40;
 				label.geometry.height = 20;
 				label.geometry.x = Math.round(x / this.view.scale) -
@@ -8879,7 +8969,6 @@ if (typeof mxVertexHandler != 'undefined')
 			return shape;
 		};
 		
-		
 		/**
 		 * Creates the shape used to draw the selection border.
 		 */
@@ -8900,12 +8989,12 @@ if (typeof mxVertexHandler != 'undefined')
 		var vertexHandlerGetSelectionStrokeWidth = mxVertexHandler.prototype.getSelectionStrokeWidth;
 		mxVertexHandler.prototype.getSelectionStrokeWidth = function(bounds)
 		{
+			// LATER: Use strokewidth 1 when active
 			return this.graph.cellEditor.getEditingCell() == this.state.cell ||
-				(this.graph.isCellResizable(this.state.cell) &&
 				(!this.graph.isTable(this.state.cell) ||
 				!this.graph.isCellSelected(this.state.cell)) &&
 				!this.graph.isTableRow(this.state.cell) &&
-				!this.graph.isTableCell(this.state.cell)) ?
+				!this.graph.isTableCell(this.state.cell) ?
 				vertexHandlerGetSelectionStrokeWidth.apply(this, arguments) : 2;
 		};
 
@@ -9112,8 +9201,7 @@ if (typeof mxVertexHandler != 'undefined')
 							
 							handle.execute = function()
 							{
-								var geo = this.graph.model.getGeometry(this.state.cell);
-								this.graph.setTableColumnWidth(this.state.cell, geo.width + dx);
+								this.graph.updateTableColumnWidth(this.state.cell, dx);
 								dx = 0;
 							};
 							
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index c0ff76c61..879aab43e 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2006,8 +2006,8 @@ x.style.color=.5>.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]?"#FFF":"#000
 this.rgb[1]=b;var e=null===c?this.rgb[2]:this.rgb[2]=c,f=Math.min(Math.min(a,b),e);c=Math.max(Math.max(a,b),e);var g=c-f;0===g?a=[null,0,c]:(a=a===f?3+(e-b)/g:b===f?5+(a-e)/g:1+(b-a)/g,a=[6===a?0:a,g/c,c]);null!==a[0]&&(this.hsv[0]=a[0]);0!==a[2]&&(this.hsv[1]=a[1]);this.hsv[2]=a[2];this.exportColor(d)};this.fromString=function(a,b){var c=a.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);return c?(6===c[1].length?this.fromRGB(parseInt(c[1].substr(0,2),16)/255,parseInt(c[1].substr(2,2),16)/255,parseInt(c[1].substr(4,
 2),16)/255,b):this.fromRGB(parseInt(c[1].charAt(0)+c[1].charAt(0),16)/255,parseInt(c[1].charAt(1)+c[1].charAt(1),16)/255,parseInt(c[1].charAt(2)+c[1].charAt(2),16)/255,b),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var r=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=jscolor.fetchElement(this.valueElement),x=jscolor.fetchElement(this.styleElement),
 y=!1,B=!1,A=1,z=2,C=4,v=8;u&&(q=function(){r.fromString(u.value,A);p()},jscolor.addEvent(u,"keyup",q),jscolor.addEvent(u,"input",q),jscolor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,color:x.style.color});switch(t){case 0:jscolor.requireImage("hs.png");break;case 1:jscolor.requireImage("hv.png")}this.importColor()}};jscolor.install();
-Editor=function(a,b,e,d,m){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=m?m:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(a,d){var b=null!=d?d.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+Editor=function(a,b,e,c,k){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=c||this.createGraph(b,e);this.editable=null!=k?k:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(a,c){var b=null!=c?c.getProperty("edit"):null;null!=b&&b.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
 (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
 Editor.moveImage=mxClient.IS_SVG?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI4cHgiIGhlaWdodD0iMjhweCI+PGc+PC9nPjxnPjxnPjxnPjxwYXRoIHRyYW5zZm9ybT0idHJhbnNsYXRlKDIuNCwyLjQpc2NhbGUoMC44KXJvdGF0ZSg0NSwxMiwxMikiIHN0cm9rZT0iIzI5YjZmMiIgZmlsbD0iIzI5YjZmMiIgZD0iTTE1LDNsMi4zLDIuM2wtMi44OSwyLjg3bDEuNDIsMS40MkwxOC43LDYuN0wyMSw5VjNIMTV6IE0zLDlsMi4zLTIuM2wyLjg3LDIuODlsMS40Mi0xLjQyTDYuNyw1LjNMOSwzSDNWOXogTTksMjEgbC0yLjMtMi4zbDIuODktMi44N2wtMS40Mi0xLjQyTDUuMywxNy4zTDMsMTV2Nkg5eiBNMjEsMTVsLTIuMywyLjNsLTIuODctMi44OWwtMS40MiwxLjQybDIuODksMi44N0wxNSwyMWg2VjE1eiIvPjwvZz48L2c+PC9nPjwvc3ZnPgo=":IMAGE_PATH+
 "/move.png";
@@ -2032,7 +2032,7 @@ Editor.fullscreenLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAA
 Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.popupsAllowed=!0;mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;
 Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};Editor.prototype.setAutosave=function(a){this.autosave=a;this.fireEvent(new mxEventObject("autosaveChanged"))};
 Editor.prototype.getEditBlankUrl=function(a){return this.editBlankUrl+a};
-Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var d=null,m=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==d&&(mxEvent.removeListener(window,"message",m),d.postMessage(a,"*"))});mxEvent.addListener(window,"message",m);d=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
+Editor.prototype.editAsNew=function(a,b){var e=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var c=null,k=mxUtils.bind(this,function(b){"ready"==b.data&&b.source==c&&(mxEvent.removeListener(window,"message",k),c.postMessage(a,"*"))});mxEvent.addListener(window,"message",k);c=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+
 "client=1"),null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){var e=new Graph(null,b,null,null,a);e.transparentBackground=!1;this.chromeless||(e.isBlankLink=function(a){return!this.isExternalProtocol(a)});return e};
 Editor.prototype.resetGraph=function(){this.graph.gridEnabled=!this.isChromelessView()||"1"==urlParams.grid;this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=null;this.graph.pageScale=mxGraph.prototype.pageScale;
 this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
@@ -2045,14 +2045,14 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
 this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
 a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
 Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(d,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var m=[],u=0;u<
-e.length;u++)null!=a.view.getState(e[u])&&m.push(e[u]);a.setSelectionCells(m)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(c,b){var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<e.length){a.getModel();for(var k=[],u=0;u<
+e.length;u++)null!=a.view.getState(e[u])&&k.push(e[u]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
 OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,m,k,q,u,y,B,c){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;d+=f;var g=e,p=d,l=mxUtils.getDocumentSize();null!=window.innerHeight&&(l.height=window.innerHeight);var n=l.height,x=Math.max(1,Math.round((l.width-e-64)/2)),A=Math.max(1,Math.round((n-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,n-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";x+=l.x;A+=l.y;m&&document.body.appendChild(this.bg);var t=a.createDiv(y?"geTransDialog":
-"geDialog");m=this.getPosition(x,A,e,d);x=m.x;A=m.y;t.style.width=e+"px";t.style.height=d+"px";t.style.left=x+"px";t.style.top=A+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");if(k&&(k=document.createElement("img"),k.setAttribute("src",Dialog.prototype.closeImage),k.setAttribute("title",mxResources.get("close")),k.className="geDialogClose",k.style.top=A+14+"px",k.style.left=x+e+38-f+"px",k.style.zIndex=
-this.zIndex,mxEvent.addListener(k,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(k),this.dialogImg=k,!c)){var G=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){G=!0}),null,mxUtils.bind(this,function(c){G&&(a.hideDialog(!0),G=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var c=B();null!=c&&(g=e=c.w,p=d=c.h)}c=mxUtils.getDocumentSize();n=c.height;this.bg.style.height=n+"px";x=Math.max(1,Math.round((c.width-e-64)/2));A=Math.max(1,
-Math.round((n-d-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;d=Math.min(p,n-64);c=this.getPosition(x,A,e,d);x=c.x;A=c.y;t.style.left=x+"px";t.style.top=A+"px";t.style.width=e+"px";t.style.height=d+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=x+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
+function Dialog(a,b,e,c,k,m,q,u,z,B,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,p=c,l=mxUtils.getDocumentSize();null!=window.innerHeight&&(l.height=window.innerHeight);var n=l.height,x=Math.max(1,Math.round((l.width-e-64)/2)),A=Math.max(1,Math.round((n-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,n-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=n+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));l=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=l.x+"px";this.bg.style.top=l.y+"px";x+=l.x;A+=l.y;k&&document.body.appendChild(this.bg);var t=a.createDiv(z?"geTransDialog":
+"geDialog");k=this.getPosition(x,A,e,c);x=k.x;A=k.y;t.style.width=e+"px";t.style.height=c+"px";t.style.left=x+"px";t.style.top=A+"px";t.style.zIndex=this.zIndex;t.appendChild(b);document.body.appendChild(t);!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=A+14+"px",m.style.left=x+e+38-f+"px",m.style.zIndex=
+this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!d)){var G=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){G=!0}),null,mxUtils.bind(this,function(d){G&&(a.hideDialog(!0),G=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=B){var d=B();null!=d&&(g=e=d.w,p=c=d.h)}d=mxUtils.getDocumentSize();n=d.height;this.bg.style.height=n+"px";x=Math.max(1,Math.round((d.width-e-64)/2));A=Math.max(1,
+Math.round((n-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(p,n-64);d=this.getPosition(x,A,e,c);x=d.x;A=d.y;t.style.left=x+"px";t.style.top=A+"px";t.style.width=e+"px";t.style.height=c+"px";!u&&b.clientHeight>t.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=A+14+"px",this.dialogImg.style.left=x+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=
 t;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
 Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
 "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2062,140 +2062,140 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
 "/locked.png";
 Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
 "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,e,d,m,k,q,u,y,B,c){y=null!=y?y:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=k&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=B&&(B=mxUtils.button(B,function(){null!=c&&c()}),B.className="geBtn",e.appendChild(B));var p=mxUtils.button(d,function(){y&&a.hideDialog();null!=m&&m()});
-p.className="geBtn";e.appendChild(p);null!=q&&(d=mxUtils.button(q,function(){y&&a.hideDialog();null!=u&&u()}),d.className="geBtn gePrimaryBtn",e.appendChild(d));this.init=function(){p.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var d=u.checked||B.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(d){var t=u.checked?1:parseInt(c.value);isNaN(t)||(p=mxUtils.getScaleForPageCount(t,e,g))}e.getGraphBounds();var k=t=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*b);g.height=Math.ceil(g.height*b);p*=b;!d&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*g.width,k-=b.y*g.height):
-d=!0;d=PrintDialog.createPrintPreview(e,p,g,0,t,k,d);d.open();a&&PrintDialog.printPreview(d)}var e=a.editor.graph,d,m,k=document.createElement("table");k.style.width="100%";k.style.height="100%";var q=document.createElement("tbody");d=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(u);var y=document.createElement("span");mxUtils.write(y," "+mxResources.get("fitPage"));
-m.appendChild(y);mxEvent.addListener(y,"click",function(a){u.checked=!u.checked;B.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){B.checked=!u.checked});d.appendChild(m);q.appendChild(d);d=d.cloneNode(!1);var B=document.createElement("input");B.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(B);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("posterPrint")+":");m.appendChild(y);mxEvent.addListener(y,
-"click",function(a){B.checked=!B.checked;u.checked=!B.checked;mxEvent.consume(a)});d.appendChild(m);var c=document.createElement("input");c.setAttribute("value","1");c.setAttribute("type","number");c.setAttribute("min","1");c.setAttribute("size","4");c.setAttribute("disabled","disabled");c.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(c);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);q.appendChild(d);mxEvent.addListener(B,"change",
-function(){B.checked?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled");u.checked=!B.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";m.appendChild(f);d.appendChild(m);q.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
-m.style.paddingTop="20px";m.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});y.className="geBtn";a.editor.cancelFirst&&m.appendChild(y);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";m.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";m.appendChild(g);a.editor.cancelFirst||
-m.appendChild(y);d.appendChild(m);q.appendChild(d);k.appendChild(q);this.container=k};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
-PrintDialog.createPrintPreview=function(a,b,e,d,m,k,q){b=new mxPrintPreview(a,b,e,d,m,k);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+var ErrorDialog=function(a,b,e,c,k,m,q,u,z,B,d){z=null!=z?z:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=B&&(B=mxUtils.button(B,function(){null!=d&&d()}),B.className="geBtn",e.appendChild(B));var p=mxUtils.button(c,function(){z&&a.hideDialog();null!=k&&k()});
+p.className="geBtn";e.appendChild(p);null!=q&&(c=mxUtils.button(q,function(){z&&a.hideDialog();null!=u&&u()}),c.className="geBtn gePrimaryBtn",e.appendChild(c));this.init=function(){p.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var c=u.checked||B.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,p=1/e.pageScale;if(c){var t=u.checked?1:parseInt(d.value);isNaN(t)||(p=mxUtils.getScaleForPageCount(t,e,g))}e.getGraphBounds();var m=t=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*b);g.height=Math.ceil(g.height*b);p*=b;!c&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*g.width,m-=b.y*g.height):
+c=!0;c=PrintDialog.createPrintPreview(e,p,g,0,t,m,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var q=document.createElement("tbody");c=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(u);var z=document.createElement("span");mxUtils.write(z," "+mxResources.get("fitPage"));
+k.appendChild(z);mxEvent.addListener(z,"click",function(a){u.checked=!u.checked;B.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){B.checked=!u.checked});c.appendChild(k);q.appendChild(c);c=c.cloneNode(!1);var B=document.createElement("input");B.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(B);z=document.createElement("span");mxUtils.write(z," "+mxResources.get("posterPrint")+":");k.appendChild(z);mxEvent.addListener(z,
+"click",function(a){B.checked=!B.checked;u.checked=!B.checked;mxEvent.consume(a)});c.appendChild(k);var d=document.createElement("input");d.setAttribute("value","1");d.setAttribute("type","number");d.setAttribute("min","1");d.setAttribute("size","4");d.setAttribute("disabled","disabled");d.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);q.appendChild(c);mxEvent.addListener(B,"change",
+function(){B.checked?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled");u.checked=!B.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);q.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+k.style.paddingTop="20px";k.setAttribute("align","right");z=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});z.className="geBtn";a.editor.cancelFirst&&k.appendChild(z);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst||
+k.appendChild(z);c.appendChild(k);q.appendChild(c);m.appendChild(q);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
+PrintDialog.createPrintPreview=function(a,b,e,c,k,m,q){b=new mxPrintPreview(a,b,e,c,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=q;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
 PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==c||c==mxConstants.NONE?(B.style.backgroundColor="",B.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(B.style.backgroundColor=c,B.style.backgroundImage="")}function e(){null==p?(g.removeAttribute("title"),g.style.fontSize="",g.innerHTML=mxResources.get("change")+"..."):(g.setAttribute("title",p.src),g.style.fontSize="11px",g.innerHTML=p.src.substring(0,42)+"...")}var d=a.editor.graph,m,k,q=document.createElement("table");q.style.width=
-"100%";q.style.height="100%";var u=document.createElement("tbody");m=document.createElement("tr");k=document.createElement("td");k.style.verticalAlign="top";k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("paperSize")+":");m.appendChild(k);k=document.createElement("td");k.style.verticalAlign="top";k.style.fontSize="10pt";var y=PageSetupDialog.addPageFormatPanel(k,"pagesetupdialog",d.pageFormat);m.appendChild(k);u.appendChild(m);m=document.createElement("tr");k=document.createElement("td");
-mxUtils.write(k,mxResources.get("background")+":");m.appendChild(k);k=document.createElement("td");k.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var B=document.createElement("button");B.style.width="18px";B.style.height="18px";B.style.marginRight="20px";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";var c=d.background;b();mxEvent.addListener(B,"click",function(d){a.pickColor(c||"none",function(a){c=a;b()});mxEvent.consume(d)});
-k.appendChild(B);mxUtils.write(k,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=d.getGridSize();k.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?d.getGridSize():a)});m.appendChild(k);u.appendChild(m);m=document.createElement("tr");k=document.createElement("td");mxUtils.write(k,mxResources.get("image")+
-":");m.appendChild(k);k=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var p=d.backgroundImage;mxEvent.addListener(g,"click",function(c){a.showBackgroundImageDialog(function(a){p=a;e()});mxEvent.consume(c)});e();k.appendChild(g);m.appendChild(k);u.appendChild(m);m=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="16px";k.setAttribute("align","right");var l=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&k.appendChild(l);var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==f.value&&d.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,c,p,y.get());b.ignoreColor=d.background==c;b.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=p?p.src:null);d.pageFormat.width==b.previousFormat.width&&d.pageFormat.height==b.previousFormat.height&&
-b.ignoreColor&&b.ignoreImage||d.model.execute(b)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||k.appendChild(l);m.appendChild(k);u.appendChild(m);q.appendChild(u);this.container=q};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function m(a,d,b){if(b||f!=document.activeElement&&g!=document.activeElement){a=!1;for(d=0;d<l.length;d++)b=l[d],t?"custom"==b.key&&(u.value=b.key,t=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(u.value=b.key,k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(u.value=b.key,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(y.style.display="",c.style.display="none"):(f.value=e.width/100,g.value=e.height/100,k.setAttribute("checked","checked"),
-u.value="custom",y.style.display="none",c.style.display="")}}b="format-"+b;var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var y=document.createElement("div");y.style.marginLeft="4px";y.style.width="210px";
-y.style.height="24px";k.style.marginRight="6px";y.appendChild(k);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));y.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";y.appendChild(q);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));y.appendChild(B);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";c.appendChild(g);mxUtils.write(c," in");y.style.display="none";c.style.display="none";for(var p={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var x=l[n];p[x.key]=x;var A=document.createElement("option");A.setAttribute("value",x.key);mxUtils.write(A,x.title);u.appendChild(A)}var t=!1;m();a.appendChild(u);mxUtils.br(a);
-a.appendChild(y);a.appendChild(c);var G=e,z=function(a,b){var l=p[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,c.style.display="none",y.style.display=""):(y.style.display="none",c.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&q.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));b&&t||l.width==G.width&&l.height==G.height||(G=l,null!=d&&d(G))};mxEvent.addListener(b,"click",function(a){k.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){q.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(q,"change",z);mxEvent.addListener(k,"change",z);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
-z(a,!0)});z();return{set:function(a){e=a;m(null,null,!0)},get:function(){return G},widthInput:f,heightInput:g}};
+var PageSetupDialog=function(a){function b(){null==d||d==mxConstants.NONE?(B.style.backgroundColor="",B.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(B.style.backgroundColor=d,B.style.backgroundImage="")}function e(){null==p?(g.removeAttribute("title"),g.style.fontSize="",g.innerHTML=mxResources.get("change")+"..."):(g.setAttribute("title",p.src),g.style.fontSize="11px",g.innerHTML=p.src.substring(0,42)+"...")}var c=a.editor.graph,k,m,q=document.createElement("table");q.style.width=
+"100%";q.style.height="100%";var u=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var z=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");
+mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var B=document.createElement("button");B.style.width="18px";B.style.height="18px";B.style.marginRight="20px";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";var d=c.background;b();mxEvent.addListener(B,"click",function(c){a.pickColor(d||"none",function(a){d=a;b()});mxEvent.consume(c)});
+m.appendChild(B);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
+":");k.appendChild(m);m=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var p=c.backgroundImage;mxEvent.addListener(g,"click",function(d){a.showBackgroundImageDialog(function(a){p=a;e()});mxEvent.consume(d)});e();m.appendChild(g);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var l=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&m.appendChild(l);var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,d,p,z.get());b.ignoreColor=c.background==d;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=p?p.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&&
+b.ignoreColor&&b.ignoreImage||c.model.execute(b)});n.className="geBtn gePrimaryBtn";m.appendChild(n);a.editor.cancelFirst||m.appendChild(l);k.appendChild(m);u.appendChild(k);q.appendChild(u);this.container=q};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,c,b){if(b||f!=document.activeElement&&g!=document.activeElement){a=!1;for(c=0;c<l.length;c++)b=l[c],t?"custom"==b.key&&(u.value=b.key,t=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
+e.height==b.format.height?(u.value=b.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(u.value=b.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(z.style.display="",d.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"),
+u.value="custom",z.style.display="none",d.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var z=document.createElement("div");z.style.marginLeft="4px";z.style.width="210px";
+z.style.height="24px";m.style.marginRight="6px";z.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));z.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";z.appendChild(q);var B=document.createElement("span");B.style.width="100px";mxUtils.write(B,mxResources.get("landscape"));z.appendChild(B);var d=document.createElement("div");d.style.marginLeft="4px";d.style.width="210px";d.style.height="24px";var f=document.createElement("input");
+f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");z.style.display="none";d.style.display="none";for(var p={},l=PageSetupDialog.getFormats(),n=0;n<l.length;n++){var x=l[n];p[x.key]=x;var A=document.createElement("option");A.setAttribute("value",x.key);mxUtils.write(A,x.title);u.appendChild(A)}var t=!1;k();a.appendChild(u);mxUtils.br(a);
+a.appendChild(z);a.appendChild(d);var G=e,y=function(a,b){var l=p[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",z.style.display=""):(z.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&q.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));b&&t||l.width==G.width&&l.height==G.height||(G=l,null!=c&&c(G))};mxEvent.addListener(b,"click",function(a){m.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(B,"click",function(a){q.checked=!0;y(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",y);mxEvent.addListener(f,"click",y);mxEvent.addListener(g,"blur",y);mxEvent.addListener(g,"click",y);mxEvent.addListener(q,"change",y);mxEvent.addListener(m,"change",y);mxEvent.addListener(u,"change",function(a){t="custom"==u.value;
+y(a,!0)});y();return{set:function(a){e=a;k(null,null,!0)},get:function(){return G},widthInput:f,heightInput:g}};
 PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
 format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
 {key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,1600,900)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1920,1200)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1600,1200)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,d,m,k,q,u,y,B,c,f){y=null!=y?y:!0;var g,p,l=document.createElement("table"),n=document.createElement("tbody");l.style.marginTop="8px";g=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace="nowrap";p.style.fontSize="10pt";p.style.width=c?"80px":"120px";mxUtils.write(p,(m||mxResources.get("filename"))+":");g.appendChild(p);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width=null!=f?f+
-"px":"180px";var A=mxUtils.button(e,function(){if(null==k||k(x.value))y&&a.hideDialog(),d(x.value)});A.className="geBtn gePrimaryBtn";this.init=function(){if(null!=m||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=l.parentNode;if(null!=a){var c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.style.backgroundColor="",c=null);a.stopPropagation();a.preventDefault()});
-mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=x,c.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.style.backgroundColor="",c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),A.click());a.stopPropagation();a.preventDefault()}))}}};p=document.createElement("td");
-p.style.whiteSpace="nowrap";p.appendChild(x);g.appendChild(p);if(null!=m||null==q)n.appendChild(g),null!=c&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="74px",p.appendChild(g),x.style.width=null!=f?f-40+"px":"140px"),p.appendChild(FilenameDialog.createTypeHint(a,x,c)));null!=q&&(g=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(q),g.appendChild(p),n.appendChild(g));g=
-document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=B&&B()});c.className="geBtn";a.editor.cancelFirst&&p.appendChild(c);null!=u&&(f=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(u)}),f.className="geBtn",p.appendChild(f));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&A.click()});
-p.appendChild(A);a.editor.cancelFirst||p.appendChild(c);g.appendChild(p);n.appendChild(g);l.appendChild(n);this.container=l};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,e){var d=document.createElement("img");d.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(d,70);var m=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){d.setAttribute("src",
-mxClient.imageBasePath+"/warning.png");d.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",m);mxEvent.addListener(b,"change",m);mxEvent.addListener(d,"click",function(b){var e=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
-mxEvent.consume(b)});m();return d};
-FilenameDialog.createFileTypes=function(a,b,e){var d=document.createElement("select");for(a=0;a<e.length;a++){var m=document.createElement("option");m.setAttribute("value",a);mxUtils.write(m,mxResources.get(e[a].description)+" (."+e[a].extension+")");d.appendChild(m)}mxEvent.addListener(d,"change",function(a){a=e[d.value].extension;var k=b.value.lastIndexOf(".");0<k?(a=e[d.value].extension,b.value=b.value.substring(0,k+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
-a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var k=b.value.lastIndexOf(".");a=0;if(0<k)for(var k=b.value.toLowerCase().substring(k+1),m=0;m<e.length;m++)if(k==e[m].extension){a=m;break}d.value=a};mxEvent.addListener(b,"change",a);a();return d};
-(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var b=a.container.firstChild;null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.nextSibling;null!=b&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
-mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),b.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,b),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(c){a.dblClick(c)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c))}),
-mxUtils.bind(this,function(c){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(c)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(c))}),mxUtils.bind(this,function(c){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(c))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
-null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,d=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,b=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",c="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(c=unescape(encodeURIComponent(this.createSvgGrid(b))),c=window.btoa?btoa(c):Base64.encode(c,!0),c="url(data:image/svg+xml;base64,"+c+")",f=a.gridSize*this.scale*this.gridSteps):
-c="url("+this.gridImage+")";var g=b=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),b=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-b,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}b=a.view.canvas;null!=b.ownerSVGElement&&(b=b.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=c,a.view.backgroundPageShape.node.style.backgroundColor=
-d,a.container.className="geDiagramContainer geDiagramBackdrop",b.style.backgroundImage="none",b.style.backgroundColor=""):(a.container.className="geDiagramContainer",b.style.backgroundPosition=f,b.style.backgroundColor=d,b.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var b=this.gridSteps*d,c=[],f=1;f<this.gridSteps;f++){var g=f*d;c.push("M 0 "+g+" L "+b+" "+g+" M "+g+" 0 L "+g+" "+b)}return'<svg width="'+
-b+'" height="'+b+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+b+'" height="'+b+'" patternUnits="userSpaceOnUse"><path d="'+c.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+b+" 0 L 0 0 0 "+b+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(d,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
-this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+d,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+b,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,d,b){var c=this.view.scale,f=this.view.translate,g=this.pageFormat,e=c*this.pageScale,l=this.view.getBackgroundPageBounds();d=l.width;b=l.height;var n=
-new mxRectangle(c*f.x,c*f.y,g.width*e,g.height*e),x=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(b/n.height)-1:0,A=a?Math.ceil(d/n.width)-1:0,t=l.x+d,k=l.y+b;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?x:A,d=0;d<=c;d++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(d+1)*n.height)),
-new mxPoint(Math.round(t),Math.round(l.y+(d+1)*n.height))]:[new mxPoint(Math.round(l.x+(d+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(d+1)*n.width),Math.round(k))];null!=a[d]?(a[d].points=b,a[d].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[d]=b)}for(d=c;d<a.length;d++)a[d].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
-var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,d,e){for(var c=0;c<d.length;c++)if(this.graph.getModel().isVertex(d[c])){var f=this.graph.getCellGeometry(d[c]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(d,b){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),d=0<a.width?a.x/this.scale-this.translate.x:0,b=0<a.height?a.y/this.scale-this.translate.y:0,c=this.graph.pageFormat,f=this.graph.pageScale,g=c.width*f,c=c.height*f,f=Math.floor(Math.min(0,d)/g),e=Math.floor(Math.min(0,
-b)/c);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+e*c),this.scale*(Math.ceil(Math.max(1,d+a.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,b+a.height/this.scale)/c)-e)*c)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var m=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,d,b,c,f,g){var e=m.apply(this,arguments);null==g||g||mxEvent.addListener(e,"mousedown",function(a){mxEvent.consume(a)});return e};var k=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var d=k.apply(this,arguments),b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),f=b.getParent(d);
-if(null==c||c!=d&&c!=f)for(;!(this.graph.isCellSelected(d)||this.graph.isCellSelected(f)||this.graph.isContainer(f)&&!this.graph.isPart(d))&&b.isVertex(f);)d=f,f=this.graph.getModel().getParent(d);return d};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,d){var b=q.apply(this,arguments);if(!b)for(var c=this.graph.getModel(),f=c.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&c.isVertex(f)){b=!0;break}f=c.getParent(f)}return b};mxGraphHandler.prototype.selectDelayed=
-function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var d=a.getCell();null==d&&(d=this.cell);var b=this.graph.view.getState(d);if(!(null!=b&&a.isSource(b.control)||this.graph.isToggleEvent(a.getEvent())))for(var b=this.graph.getModel(),c=b.getParent(d);!this.graph.isCellSelected(c)&&b.isVertex(c);)d=c,c=b.getParent(d);this.graph.selectCellForEvent(d,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var d=this.graph.getModel(),b=d.getParent(a);d.isVertex(b)&&
-!this.graph.isContainer(b);)this.graph.isCellSelected(b)&&(a=b),b=d.getParent(b);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;d.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
-this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!d.standalone){this.createDivs();this.createUi();this.refresh();var m=mxUtils.bind(this,function(a){null==a&&(a=window.event);return d.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=
-m,this.menubarContainer.onmousedown=m,this.toolbarContainer.onselectstart=m,this.toolbarContainer.onmousedown=m,this.diagramContainer.onselectstart=m,this.diagramContainer.onmousedown=m,this.sidebarContainer.onselectstart=m,this.sidebarContainer.onmousedown=m,this.formatContainer.onselectstart=m,this.formatContainer.onmousedown=m,this.footerContainer.onselectstart=m,this.footerContainer.onmousedown=m,null!=this.tabContainer&&(this.tabContainer.onselectstart=m));!this.editor.chromeless||this.editor.editable?
-(b=function(a){if(null!=a){var c=mxEvent.getSource(a);if("A"==c.nodeName)for(;null!=c;){if("geHint"==c.className)return!0;c=c.parentNode}}return m(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position=
-"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var k=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
-function(a,c){return k||q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||d.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(k=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";k=!1});mxEvent.addListener(document,"keyup",
-this.keyupHandler);var u=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||k||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var y=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return y.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var B=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return k||B.apply(this,arguments)};var c=!1,f=null,g=null,p=null,l=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;
-e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var l=0;l<p.length;l++)this.toolbar.container.appendChild(p[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}c=d.cellEditor.isContentEditing();f=a;g=e;p=b}}),n=this,x=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){x.apply(this,arguments);l();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=
-c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=n.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var A=
-d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){try{A.apply(this,arguments),l()}catch(N){n.handleError(N)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(L){}var t=d.fireMouseEvent;d.fireMouseEvent=function(a,c,d){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=
-mxUtils.bind(this,function(a,c,d){this.menus.createPopupMenu(a,c,d)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var G="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var c=d.view.getState(a);if(null!=c){var b=
-a.clone();b.style="";var f=d.getCellStyle(b);a=[];var b=[],g;for(g in c.style)f[g]!=c.style[g]&&(a.push(c.style[g]),b.push(g));for(var e=d.getModel().getStyle(c.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var n=l[e],v=n.indexOf("=");if(0<=v){g=n.substring(0,v);var p=n.substring(v+1);null!=f[g]&&"none"==p&&(a.push(p),b.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[c.cell]))}}catch(T){this.handleError(T)}};
-this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),v=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
-["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<v.length;a++)for(b=0;b<v[a].length;b++)G.push(v[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(G,z[a])&&G.push(z[a]);var I=function(a,c){var b=d.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=G.slice();for(var p=0;p<n.length;p++){var t=n[p],A=t.indexOf("=");if(0<=A){var x=t.substring(0,A),k=mxUtils.indexOf(e,
-x);0<=k&&e.splice(k,1);for(var m=0;m<v.length;m++){var I=v[m];if(0<=mxUtils.indexOf(I,x))for(var H=0;H<I.length;H++){var u=mxUtils.indexOf(e,I[H]);0<=u&&e.splice(u,1)}}}}}for(var L=b.isEdge(g),C=L?d.currentEdgeStyle:d.currentVertexStyle,q=b.getStyle(g),p=0;p<e.length;p++){var x=e[p],E=C[x];null==E||"shape"==x&&!L||L&&!(0>mxUtils.indexOf(z,x))||(q=mxUtils.setStyle(q,x,E))}b.setStyle(g,q)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){I(c.getProperty("cells"))});d.addListener("textInserted",
-function(a,c){I(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var d=[c.getProperty("cell")];c.getProperty("terminalInserted")&&d.push(c.getProperty("terminal"));I(d)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),l=c.getProperty("values"),
-e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(E,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(z,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(G,b[e])&&(null==l[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(G,b[e])){if(f||n)null==l[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null==
-l[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||
-"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
-null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
-mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||"Helvetica",c=String(d.currentVertexStyle.fontSize||"12"),b=d.getView().getState(d.getSelectionCell());
-null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,c=b.style[mxConstants.STYLE_FONTSIZE]||c,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(c)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(a,c){var b=c.getProperty("cells"),f=c.getProperty("parent");d.getModel().isLayer(f)&&!d.isCellVisible(f)&&null!=b&&0<b.length&&d.getModel().setVisible(f,!0)});this.gestureHandler=
+var FilenameDialog=function(a,b,e,c,k,m,q,u,z,B,d,f){z=null!=z?z:!0;var g,p,l=document.createElement("table"),n=document.createElement("tbody");l.style.marginTop="8px";g=document.createElement("tr");p=document.createElement("td");p.style.whiteSpace="nowrap";p.style.fontSize="10pt";p.style.width=d?"80px":"120px";mxUtils.write(p,(k||mxResources.get("filename"))+":");g.appendChild(p);var x=document.createElement("input");x.setAttribute("value",b||"");x.style.marginLeft="4px";x.style.width=null!=f?f+
+"px":"180px";var A=mxUtils.button(e,function(){if(null==m||m(x.value))z&&a.hideDialog(),c(x.value)});A.className="geBtn gePrimaryBtn";this.init=function(){if(null!=k||null==q)if(x.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=l.parentNode;if(null!=a){var d=null;mxEvent.addListener(a,"dragleave",function(a){null!=d&&(d.style.backgroundColor="",d=null);a.stopPropagation();a.preventDefault()});
+mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=x,d.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=d&&(d.style.backgroundColor="",d=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(x.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),A.click());a.stopPropagation();a.preventDefault()}))}}};p=document.createElement("td");
+p.style.whiteSpace="nowrap";p.appendChild(x);g.appendChild(p);if(null!=k||null==q)n.appendChild(g),null!=d&&(null!=a.editor.diagramFileTypes&&(g=FilenameDialog.createFileTypes(a,x,a.editor.diagramFileTypes),g.style.marginLeft="6px",g.style.width="74px",p.appendChild(g),x.style.width=null!=f?f-40+"px":"140px"),p.appendChild(FilenameDialog.createTypeHint(a,x,d)));null!=q&&(g=document.createElement("tr"),p=document.createElement("td"),p.colSpan=2,p.appendChild(q),g.appendChild(p),n.appendChild(g));g=
+document.createElement("tr");p=document.createElement("td");p.colSpan=2;p.style.paddingTop="20px";p.style.whiteSpace="nowrap";p.setAttribute("align","right");d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=B&&B()});d.className="geBtn";a.editor.cancelFirst&&p.appendChild(d);null!=u&&(f=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(u)}),f.className="geBtn",p.appendChild(f));mxEvent.addListener(x,"keypress",function(a){13==a.keyCode&&A.click()});
+p.appendChild(A);a.editor.cancelFirst||p.appendChild(d);g.appendChild(p);n.appendChild(g);l.appendChild(n);this.container=l};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,e){var c=document.createElement("img");c.style.cssText="vertical-align:top;height:16px;width:16px;margin-left:4px;background-repeat:no-repeat;background-position:center bottom;cursor:pointer;";mxUtils.setOpacity(c,70);var k=function(){c.setAttribute("src",Editor.helpImage);c.setAttribute("title",mxResources.get("help"));for(var a=0;a<e.length;a++)if(0<e[a].ext.length&&b.value.toLowerCase().substring(b.value.length-e[a].ext.length-1)=="."+e[a].ext){c.setAttribute("src",
+mxClient.imageBasePath+"/warning.png");c.setAttribute("title",mxResources.get(e[a].title));break}};mxEvent.addListener(b,"keyup",k);mxEvent.addListener(b,"change",k);mxEvent.addListener(c,"click",function(b){var e=c.getAttribute("title");c.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=e&&a.showError(null,e,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);
+mxEvent.consume(b)});k();return c};
+FilenameDialog.createFileTypes=function(a,b,e){var c=document.createElement("select");for(a=0;a<e.length;a++){var k=document.createElement("option");k.setAttribute("value",a);mxUtils.write(k,mxResources.get(e[a].description)+" (."+e[a].extension+")");c.appendChild(k)}mxEvent.addListener(c,"change",function(a){a=e[c.value].extension;var m=b.value.lastIndexOf(".");0<m?(a=e[c.value].extension,b.value=b.value.substring(0,m+1)+a):b.value=b.value+"."+a;"createEvent"in document?(a=document.createEvent("HTMLEvents"),
+a.initEvent("change",!1,!0),b.dispatchEvent(a)):b.fireEvent("onchange")});a=function(a){var m=b.value.lastIndexOf(".");a=0;if(0<m)for(var m=b.value.toLowerCase().substring(m+1),k=0;k<e.length;k++)if(m==e[k].extension){a=k;break}c.value=a};mxEvent.addListener(b,"change",a);a();return c};
+(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var b=a.container.firstChild;null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.nextSibling;null!=b&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
+mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(a.container),b.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,b),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(d){a.dblClick(d)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(d))}),
+mxUtils.bind(this,function(d){null!=a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();a.isMouseDown&&!mxEvent.isConsumed(d)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d))}),mxUtils.bind(this,function(d){a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=c,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,b=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",d="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(d=unescape(encodeURIComponent(this.createSvgGrid(b))),d=window.btoa?btoa(d):Base64.encode(d,!0),d="url(data:image/svg+xml;base64,"+d+")",f=a.gridSize*this.scale*this.gridSteps):
+d="url("+this.gridImage+")";var g=b=0;null!=a.view.backgroundPageShape&&(g=this.getBackgroundPageBounds(),b=1+g.x,g=1+g.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-b,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-g,f))+"px"}b=a.view.canvas;null!=b.ownerSVGElement&&(b=b.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=d,a.view.backgroundPageShape.node.style.backgroundColor=
+c,a.container.className="geDiagramContainer geDiagramBackdrop",b.style.backgroundImage="none",b.style.backgroundColor=""):(a.container.className="geDiagramContainer",b.style.backgroundPosition=f,b.style.backgroundColor=c,b.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var b=this.gridSteps*c,d=[],f=1;f<this.gridSteps;f++){var g=f*c;d.push("M 0 "+g+" L "+b+" "+g+" M "+g+" 0 L "+g+" "+b)}return'<svg width="'+
+b+'" height="'+b+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+b+'" height="'+b+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+b+" 0 L 0 0 0 "+b+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
+this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+c,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+b,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,c,b){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,e=d*this.pageScale,l=this.view.getBackgroundPageBounds();c=l.width;b=l.height;var n=
+new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),x=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(b/n.height)-1:0,A=a?Math.ceil(c/n.width)-1:0,t=l.x+c,m=l.y+b;null==this.horizontalPageBreaks&&0<x&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<A&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?x:A,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(l.x),Math.round(l.y+(c+1)*n.height)),
+new mxPoint(Math.round(t),Math.round(l.y+(c+1)*n.height))]:[new mxPoint(Math.round(l.x+(c+1)*n.width),Math.round(l.y)),new mxPoint(Math.round(l.x+(c+1)*n.width),Math.round(m))];null!=a[c]?(a[c].points=b,a[c].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[c]=b)}for(c=d;c<a.length;c++)a[c].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var d=0;d<c.length;d++)if(this.graph.getModel().isVertex(c[d])){var f=this.graph.getCellGeometry(c[d]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,b){return this.isConnecting()?
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,b=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,f=this.graph.pageScale,g=d.width*f,d=d.height*f,f=Math.floor(Math.min(0,c)/g),e=Math.floor(Math.min(0,
+b)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+e*d),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,b+a.height/this.scale)/d)-e)*d)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
+a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px")};var k=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,b,d,f,g){var e=k.apply(this,arguments);null==g||g||mxEvent.addListener(e,"mousedown",function(a){mxEvent.consume(a)});return e};var m=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=m.apply(this,arguments),b=this.graph.getModel(),d=b.getParent(this.graph.getSelectionCell()),f=b.getParent(c);
+if(null==d||d!=c&&d!=f)for(;!(this.graph.isCellSelected(c)||this.graph.isCellSelected(f)||this.graph.isContainer(f)&&!this.graph.isPart(c))&&b.isVertex(f);)c=f,f=this.graph.getModel().getParent(c);return c};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var b=q.apply(this,arguments);if(!b)for(var d=this.graph.getModel(),f=d.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&d.isVertex(f)){b=!0;break}f=d.getParent(f)}return b};mxGraphHandler.prototype.selectDelayed=
+function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var b=this.graph.view.getState(c);if(!(null!=b&&a.isSource(b.control)||this.graph.isToggleEvent(a.getEvent())))for(var b=this.graph.getModel(),d=b.getParent(c);!this.graph.isCellSelected(d)&&b.isVertex(d);)c=d,d=b.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),b=c.getParent(a);c.isVertex(b)&&
+!this.graph.isContainer(b);)this.graph.isCellSelected(b)&&(a=b),b=c.getParent(b);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var c=this.editor.graph;c.lightbox=e;c.useCssTransforms&&(this.lazyZoomDelay=0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
+this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,c.isEnabled=function(){return!1},c.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();if(!c.standalone){this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return c.isEditing()||null!=a&&this.isSelectionAllowed(a)});this.container==document.body&&(this.menubarContainer.onselectstart=
+k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?
+(b=function(a){if(null!=a){var d=mxEvent.getSource(a);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position=
+"absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
+function(a,d){return m||q.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||c.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(m=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",
+this.keyupHandler);var u=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var z=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return z.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
+mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var B=c.isZoomWheelEvent;c.isZoomWheelEvent=function(){return m||B.apply(this,arguments)};var d=!1,f=null,g=null,p=null,l=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;
+e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var l=0;l<p.length;l++)this.toolbar.container.appendChild(p[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;p=b}}),n=this,x=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){x.apply(this,arguments);l();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=
+d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=n.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));n.toolbar.setFontName(b);n.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var A=
+c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{A.apply(this,arguments),l()}catch(N){n.handleError(N)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(L){}var t=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=
+mxUtils.bind(this,function(a,d,c){this.menus.createPopupMenu(a,d,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var G="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),y="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var d=c.view.getState(a);if(null!=d){var b=
+a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var e=c.getModel().getStyle(d.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var n=l[e],v=n.indexOf("=");if(0<=v){g=n.substring(0,v);var p=n.substring(v+1);null!=f[g]&&"none"==p&&(a.push(p),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(T){this.handleError(T)}};
+this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var E=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),v=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
+["fillColor","gradientColor"],E,["opacity"],["align"],["html"]];for(a=0;a<v.length;a++)for(b=0;b<v[a].length;b++)G.push(v[a][b]);for(a=0;a<y.length;a++)0>mxUtils.indexOf(G,y[a])&&G.push(y[a]);var H=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(d)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=G.slice();for(var p=0;p<n.length;p++){var t=n[p],A=t.indexOf("=");if(0<=A){var x=t.substring(0,A),m=mxUtils.indexOf(e,
+x);0<=m&&e.splice(m,1);for(var k=0;k<v.length;k++){var H=v[k];if(0<=mxUtils.indexOf(H,x))for(var I=0;I<H.length;I++){var u=mxUtils.indexOf(e,H[I]);0<=u&&e.splice(u,1)}}}}}for(var L=b.isEdge(g),z=L?c.currentEdgeStyle:c.currentVertexStyle,C=b.getStyle(g),p=0;p<e.length;p++){var x=e[p],E=z[x];null==E||"shape"==x&&!L||L&&!(0>mxUtils.indexOf(y,x))||(C=mxUtils.setStyle(C,x,E))}b.setStyle(g,C)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){H(d.getProperty("cells"))});c.addListener("textInserted",
+function(a,d){H(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var c=[d.getProperty("cell")];d.getProperty("terminalInserted")&&c.push(d.getProperty("terminal"));H(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"),
+e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(E,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(y,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(G,b[e])&&(null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(G,b[e])){if(f||n)null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null==
+l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||
+"none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
+null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
+mxUtils.getValue(c.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(c.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=c.currentVertexStyle.fontFamily||"Helvetica",d=String(c.currentVertexStyle.fontSize||"12"),b=c.getView().getState(c.getSelectionCell());
+null!=b&&(a=b.style[mxConstants.STYLE_FONTFAMILY]||a,d=b.style[mxConstants.STYLE_FONTSIZE]||d,10<a.length&&(a=a.substring(0,8)+"..."));this.toolbar.setFontName(a);this.toolbar.setFontSize(d)}),c.getSelectionModel().addListener(mxEvent.CHANGE,a),c.getModel().addListener(mxEvent.CHANGE,a));c.addListener(mxEvent.CELLS_ADDED,function(a,d){var b=d.getProperty("cells"),f=d.getProperty("parent");c.getModel().isLayer(f)&&!c.isCellVisible(f)&&null!=b&&0<b.length&&c.getModel().setVisible(f,!0)});this.gestureHandler=
 mxUtils.bind(this,function(a){null!=this.currentMenu&&mxEvent.getSource(a)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
-this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));
-d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;
+this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){c.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){c.view.validateBackground()}));
+c.addListener("gridSizeChanged",mxUtils.bind(this,function(){c.isGridEnabled()&&c.view.validateBackground()}));this.editor.resetGraph()}this.init();c.standalone||this.open()};mxUtils.extend(EditorUi,mxEventSource);EditorUi.compactUi=!0;EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;
 EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
 EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var b=a.getRubberband();null!=b&&b.cancel()}));mxEvent.addListener(a.container,"keydown",mxUtils.bind(this,function(a){this.onKeyDown(a)}));
 mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(a){this.onKeyPress(a)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,e=this;this.editor.graph.setDefaultParent=function(){b.apply(this,arguments);e.updateActionStates()};a.editLink=e.actions.get("editLink").funct;
 this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;9!=a.which||!b.isEnabled()||mxEvent.isAltDown(a)||b.isEditing()&&mxEvent.isShiftDown(a)||(b.isEditing()?b.stopEditing(!1):b.selectCell(!mxEvent.isShiftDown(a)),mxEvent.consume(a))};
 EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a)))};
 EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.getCssClassForMarker=function(a,b,e,d){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==e||"halfCircle"==e?"geSprite geSvgSprite geSprite-"+e+("end"==a?" geFlipSprite":""):e==mxConstants.ARROW_CLASSIC?"1"==d?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==d?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?
-"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==d?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==d?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==d?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
-e==mxConstants.ARROW_DIAMOND_THIN?"1"==d?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==d?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==d||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==
+EditorUi.prototype.getCssClassForMarker=function(a,b,e,c){return"flexArrow"==b?null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+a+"blocktrans":"geSprite geSprite-noarrow":"box"==e||"halfCircle"==e?"geSprite geSvgSprite geSprite-"+e+("end"==a?" geFlipSprite":""):e==mxConstants.ARROW_CLASSIC?"1"==c?"geSprite geSprite-"+a+"classic":"geSprite geSprite-"+a+"classictrans":e==mxConstants.ARROW_CLASSIC_THIN?"1"==c?"geSprite geSprite-"+a+"classicthin":"geSprite geSprite-"+a+"classicthintrans":e==mxConstants.ARROW_OPEN?
+"geSprite geSprite-"+a+"open":e==mxConstants.ARROW_OPEN_THIN?"geSprite geSprite-"+a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==c?"geSprite geSprite-"+a+"block":"geSprite geSprite-"+a+"blocktrans":e==mxConstants.ARROW_BLOCK_THIN?"1"==c?"geSprite geSprite-"+a+"blockthin":"geSprite geSprite-"+a+"blockthintrans":e==mxConstants.ARROW_OVAL?"1"==c?"geSprite geSprite-"+a+"oval":"geSprite geSprite-"+a+"ovaltrans":e==mxConstants.ARROW_DIAMOND?"1"==c?"geSprite geSprite-"+a+"diamond":"geSprite geSprite-"+a+"diamondtrans":
+e==mxConstants.ARROW_DIAMOND_THIN?"1"==c?"geSprite geSprite-"+a+"thindiamond":"geSprite geSprite-"+a+"thindiamondtrans":"openAsync"==e?"geSprite geSprite-"+a+"openasync":"dash"==e?"geSprite geSprite-"+a+"dash":"cross"==e?"geSprite geSprite-"+a+"cross":"async"==e?"1"==c?"geSprite geSprite-"+a+"async":"geSprite geSprite-"+a+"asynctrans":"circle"==e||"circlePlus"==e?"1"==c||"circle"==e?"geSprite geSprite-"+a+"circle":"geSprite geSprite-"+a+"circleplus":"ERone"==e?"geSprite geSprite-"+a+"erone":"ERmandOne"==
 e?"geSprite geSprite-"+a+"eronetoone":"ERmany"==e?"geSprite geSprite-"+a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
 EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var d=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var d=d||b.getSelectionCells(),d=b.getExportableCells(b.model.getTopmostCells(d)),e={},m=b.createCellLookup(d),k=b.cloneCells(d,null,e),c=new mxGraphModel,f=c.getChildAt(c.getRoot(),
-0),g=0;g<k.length;g++)c.add(f,k[g]);b.updateCustomLinks(b.createCellMapping(e,m),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return d};var e=mxClipboard.paste;mxClipboard.paste=function(b){var d=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):d=e.apply(this,arguments);a.updatePasteActionStates();return d};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};
-var m=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){m.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
-this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,b,d,f){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,n=a.view.scale,p=mxRectangle.fromRectangle(g);
-p.x=p.x/n-l.x;p.y=p.y/n-l.y;p.width/=n;p.height/=n;var l=a.container.scrollTop,v=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var D=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,D/p.width)):n;b=(D-c*p.width)/2/c;var x=0==this.lightboxVerticalDivider?0:(t-c*p.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),x=Math.max(x,0));if(e||g.width<D||g.height<t)a.view.scaleAndTranslate(c,
-Math.floor(b-p.x),Math.floor(x-p.y)),a.container.scrollTop=l*c/n,a.container.scrollLeft=v*c/n;else if(0!=d||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
-mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var m=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var c=
-mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",k);k();var q=0,k=mxUtils.bind(this,function(a,c,b){q++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=b&&d.setAttribute("title",
-b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d});null!=m.backBtn&&k(mxUtils.bind(this,function(a){window.location.href=m.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),y=document.createElement("div");
-y.style.display="inline-block";y.style.verticalAlign="top";y.style.fontFamily="Helvetica,Arial";y.style.marginTop="8px";y.style.fontSize="14px";y.style.color="#ffffff";this.chromelessToolbar.appendChild(y);var B=k(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(y.innerHTML="",mxUtils.write(y,mxUtils.indexOf(this.pages,
-this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",y.style.display="inline-block"):(B.style.display="none",u.style.display="none",y.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);k(mxUtils.bind(this,
-function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");k(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(c){c.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(b){var c=null;if(b.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{for(var c=c||b.getSelectionCells(),c=b.getExportableCells(b.model.getTopmostCells(c)),e={},k=b.createCellLookup(c),m=b.cloneCells(c,null,e),d=new mxGraphModel,f=d.getChildAt(d.getRoot(),
+0),g=0;g<m.length;g++)d.add(f,m[g]);b.updateCustomLinks(b.createCellMapping(e,k),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return c};var e=mxClipboard.paste;mxClipboard.paste=function(b){var c=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=e.apply(this,arguments);a.updatePasteActionStates();return c};var c=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){c.apply(this,arguments);a.updatePasteActionStates()};
+var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
+EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale*a.width*d.width,
+this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container&&!a.isViewer()){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,n=a.view.scale,p=mxRectangle.fromRectangle(g);
+p.x=p.x/n-l.x;p.y=p.y/n-l.y;p.width/=n;p.height/=n;var l=a.container.scrollTop,v=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var D=a.container.offsetWidth-t,t=a.container.offsetHeight-t;d=d?Math.max(.3,Math.min(b||1,D/p.width)):n;b=(D-d*p.width)/2/d;var x=0==this.lightboxVerticalDivider?0:(t-d*p.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),x=Math.max(x,0));if(e||g.width<D||g.height<t)a.view.scaleAndTranslate(d,
+Math.floor(b-p.x),Math.floor(x-p.y)),a.container.scrollTop=l*d/n,a.container.scrollLeft=v*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
+mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
+this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var d=
+mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var q=0,m=mxUtils.bind(this,function(a,d,b){q++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",
+b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),z=document.createElement("div");
+z.style.display="inline-block";z.style.verticalAlign="top";z.style.fontFamily="Helvetica,Arial";z.style.marginTop="8px";z.style.fontSize="14px";z.style.color="#ffffff";this.chromelessToolbar.appendChild(z);var B=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(z.innerHTML="",mxUtils.write(z,mxUtils.indexOf(this.pages,
+this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";B.style.paddingLeft="4px";B.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(B.style.display="",u.style.display="",z.style.display="inline-block"):(B.style.display="none",u.style.display="none",z.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);m(mxUtils.bind(this,
+function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(d){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,
 mxResources.get("fit"));var g=null,p=null,l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),
-fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=k(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
+fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var x=m(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
 null}));var b=x.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){x.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(k);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||k(mxUtils.bind(this,function(c){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var t=this.lightboxToolbarActions[f];k(t.fn,t.icon,t.tooltip)}null!=m.refreshBtn&&k(mxUtils.bind(this,function(a){m.refreshBtn.url?window.location.href=m.refreshBtn.url:
-window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=m.fullscreenBtn&&window.self!==window.top&&k(mxUtils.bind(this,function(c){m.fullscreenBtn.url?a.openLink(m.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(m.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&k(mxUtils.bind(this,
-function(a){"1"==urlParams.close||m.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),A=a.getModel();A.addListener(mxEvent.CHANGE,function(){x.style.display=1<A.getChildCount(A.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(d){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var t=this.lightboxToolbarActions[f];m(t.fn,t.icon,t.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
+window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(d){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
+function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
 n(30),l())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?l():n(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?l():n(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
-n(30)}));var G=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<G&&Math.abs(this.scrollTop-a.container.scrollTop)<G&&Math.abs(this.startX-b.getGraphX())<G&&Math.abs(this.startY-b.getGraphY())<
-G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?l():n(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}z.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
-function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*b.x+c.width*d.width),g=Math.ceil(2*b.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-c.x*d.width;b=b.y-c.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
-c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-c)*a.view.scale),a.container.scrollTop+=Math.round((b-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),v=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,L=null,H=null,N=null,D=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
+n(30)}));var G=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<G&&Math.abs(this.scrollTop-a.container.scrollTop)<G&&Math.abs(this.startX-b.getGraphX())<G&&Math.abs(this.startY-b.getGraphY())<
+G&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?l():n(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var y=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}y.apply(this,arguments)};if(!a.isViewer()){var E=a.sizeDidChange;a.sizeDidChange=
+function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?E.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=
+d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),v=a.view.getDrawPane();a.cumulativeZoomFactor=1;var H=null,L=null,I=null,N=null,D=function(d){null!=H&&window.clearTimeout(H);window.setTimeout(function(){a.isMouseDown||(H=window.setTimeout(mxUtils.bind(this,
 function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),v.style.transformOrigin="",C.style.transformOrigin="",mxClient.IS_SF?(v.style.transform="scale(1)",C.style.transform="scale(1)",window.setTimeout(function(){v.style.transform="";C.style.transform=""},0)):(v.style.transform=
-"",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),d=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=L&&(g=a.container.offsetWidth/2-L.x+d.x,l=a.container.offsetHeight/2-L.y+d.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=H&&(g+=c.x-H.x,l+=c.y-H.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&v.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=L=H=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,b,d){(b=b||!a.scrollbars)&&(L=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+"",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),c=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=L&&(g=a.container.offsetWidth/2-L.x+c.x,l=a.container.offsetHeight/2-L.y+c.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=I&&(g+=d.x-I.x,l+=d.y-I.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
+0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&v.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=L=I=H=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(L=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
 (this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=v.getAttribute("filter")&&(N=v.getAttribute("filter"),v.removeAttribute("filter"));H=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=b?a.container.scrollLeft+a.container.clientWidth/2:L.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:L.y+a.container.scrollTop-a.container.offsetTop;v.style.transformOrigin=c+"px "+f+"px";v.style.transform="scale("+
-this.cumulativeZoomFactor+")";C.style.transformOrigin=c+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":L.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":L.y+
-a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
-D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(c)?a.view.setTranslate(d.x+(b?-f:f),d.y):a.view.setTranslate(d.x,d.y+(b?f:-f))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),L=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(b),
-mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=v.getAttribute("filter")&&(N=v.getAttribute("filter"),v.removeAttribute("filter"));I=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:L.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:L.y+a.container.scrollTop-a.container.offsetTop;v.style.transformOrigin=d+"px "+f+"px";v.style.transform="scale("+
+this.cumulativeZoomFactor+")";C.style.transformOrigin=d+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(d=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-d.offsetLeft+"px":L.x+a.container.scrollLeft-d.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-d.offsetTop+"px":L.y+
+a.container.scrollTop-d.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(c)};mxEvent.addGestureListeners(a.container,function(a){null!=H&&window.clearTimeout(H)},null,function(d){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){H&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
+D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b,c){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(d)){c=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(d)?a.view.setTranslate(c.x+(b?-f:f),c.y):a.view.setTranslate(c.x,c.y+(b?f:-f))}else if(c||a.isZoomWheelEvent(d))for(c=mxEvent.getSource(d);null!=c;){if(c==a.container)return a.tooltipHandler.hideTooltip(),L=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),a.lazyZoom(b),
+mxEvent.consume(d),!1;c=c.parentNode}}),a.container);a.panningHandler.zoomGraph=function(d){a.cumulativeZoomFactor=d.scale;a.lazyZoom(0<d.scale,!0);mxEvent.consume(d)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
 EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
 EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.format&&(this.formatWidth=a||0<this.formatWidth?0:240,this.formatContainer.style.display=a||0<this.formatWidth?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
 EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
 EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var e=mxUtils.parseXml(a);this.editor.setGraphXml(e.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
 this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};
 EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};
 EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(e){}};EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};
@@ -2203,29 +2203,29 @@ EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.
 EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,e=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();e!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
 EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
 1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),e=a.view.translate,d=a.view.scale;b.x=b.x/d-e.x;b.y=b.y/d-e.y;b.width/=d;b.height/=d;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,m=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,m=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
-b.view.scale-m);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d,m){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=d;this.previousPageScale=this.pageScale=m;this.ignoreImage=this.ignoreColor=!1}
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else{var b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds()),e=a.view.translate,c=a.view.scale;b.x=b.x/c-e.x;b.y=b.y/c-e.y;b.width/=c;b.height/=c;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),c=0,k=0;e&&(c=b.view.translate.x*b.view.scale-b.container.scrollLeft,k=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-c,b.container.scrollTop=b.view.translate.y*
+b.view.scale-k);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,c,k){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=e;this.previousFormat=this.format=c;this.previousPageScale=this.pageScale=k;this.ignoreImage=this.ignoreColor=!1}
 ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(this.image=this.previousImage,b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),
 this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),this.previousPageScale=a))};
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;c.previousPageScale=c.pageScale;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);return c};mxCodecRegistry.register(a)})();EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};
 EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};
 EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);d()};var k=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(a,b){k.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,m=a.getSelectionCells();if(null!=m)for(var k=0;k<m.length;k++){var q=m[k];a.getModel().isEdge(q)&&(d=!0);a.getModel().isVertex(q)&&(e=!0);if(d&&e)break}m="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(k=
-0;k<m.length;k++)this.actions.get(m[k]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==
-a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,c=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,c);e.addListener(mxEvent.UNDO,c);e.addListener(mxEvent.REDO,c);e.addListener(mxEvent.CLEAR,c);var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);c()};var m=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(a,b){m.apply(this,arguments);c()};c()};
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var m=0;m<k.length;m++){var q=k[m];a.getModel().isEdge(q)&&(c=!0);a.getModel().isVertex(q)&&(e=!0);if(c&&e)break}k="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(m=
+0;m<k.length;m++)this.actions.get(k[m]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("copySize").setEnabled(1==a.getSelectionCount());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(c);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);c=e&&1==
+a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||c&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||c&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(c&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);
 this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);
 this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
 e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var m=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(m=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var k=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),q=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",q+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",q+=this.toolbarHeight);0<q&&!mxClient.IS_QUIRKS&&(q+=1);var u=0;if(null!=this.sidebarFooterContainer){var y=
-this.footerHeight+m,u=Math.max(0,Math.min(d-q-y,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=k+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=y+"px"}y=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=k+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=y+"px";this.formatContainer.style.display=null!=this.format?"":"none";var B=this.getDiagramContainerOffset(),
-c=null!=this.hsplit.parentNode?k+this.splitSize:0;this.diagramContainer.style.left=c+B.x+"px";this.diagramContainer.style.top=q+B.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+m+"px";this.hsplit.style.left=k+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=c+"px");b?(this.menubarContainer.style.width=e+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-k-this.splitSize-y)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+m+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=m+"px"),this.diagramContainer.style.right=y+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+m+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
-this.footerHeight+u+m+"px",this.formatContainer.style.bottom=this.footerHeight+m+"px",this.diagramContainer.style.bottom=this.footerHeight+m+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),q=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",q+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",q+=this.toolbarHeight);0<q&&!mxClient.IS_QUIRKS&&(q+=1);var u=0;if(null!=this.sidebarFooterContainer){var z=
+this.footerHeight+k,u=Math.max(0,Math.min(c-q-z,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=z+"px"}z=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=z+"px";this.formatContainer.style.display=null!=this.format?"":"none";var B=this.getDiagramContainerOffset(),
+d=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=d+B.x+"px";this.diagramContainer.style.top=q+B.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");b?(this.menubarContainer.style.width=e+"px",
+this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-z)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=z+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.footerHeight+u+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
 EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
 this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
 "0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2234,130 +2234,130 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
 this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
 !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
 EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function m(a){if(null!=q){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,u+(b?f.x-q.x:q.y-f.y)-e));mxEvent.consume(a);u!=c()&&(y=!0,B=null)}}function k(a){m(a);q=u=null}var q=null,u=null,y=!0,B=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var c=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));u=c();y=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!y&&this.hsplitClickEnabled){var b=null!=B?B-e:0;B=c();d(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,m,k);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,m,k)})};
-EditorUi.prototype.handleError=function(a,b,e,d,m){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){m=mxUtils.htmlEntities(mxResources.get("unknownError"));var k=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(m=mxUtils.htmlEntities(a.message));this.showError(b,m,k,e,null,null,null,null,null,null,null,null,d?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,d,m,k,q,u,y,B,c,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),d,m,k,q,f,u,y);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,B||340,c||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,d,m,k,q,u,y,B){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,m,k,q,u,y,B);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=q){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,u+(b?f.x-q.x:q.y-f.y)-e));mxEvent.consume(a);u!=d()&&(z=!0,B=null)}}function m(a){k(a);q=u=null}var q=null,u=null,z=!0,B=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var d=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){q=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));u=d();z=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!z&&this.hsplitClickEnabled){var b=null!=B?B-e:0;B=d();c(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};
+EditorUi.prototype.handleError=function(a,b,e,c,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,m,e,null,null,null,null,null,null,null,null,c?e:null)}else null!=e&&e()};
+EditorUi.prototype.showError=function(a,b,e,c,k,m,q,u,z,B,d,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),c,k,m,q,f,u,z);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,B||340,d||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,c,k,m,q,u,z,B){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,m,q,u,z,B);this.dialogs.push(this.dialog)};
 EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():
-(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),m=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(k.container,230,m,!0,!1);k.init()};
+(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0))}};EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(m.container,230,k,!0,!1);m.init()};
 EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(m){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var c=a.lastIndexOf("&lt;/mxGraphModel&gt;");c>e&&(b=a.substring(e,c+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(k){}return b};
 EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=Graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
 (b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
 EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
 "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(m){throw m;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var m=d.saveSelection(),k=mxUtils.prompt(a,b);d.restoreSelection(m);if(null!=k&&0<k.length){var q=new Image;q.onload=function(){e(k,q.width,q.height)};q.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=k}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,e){var c=this.editor.graph;if(c.isEnabled()){c.getModel().beginUpdate();try{a()}catch(k){throw k;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(c),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){c.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(c.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),m=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=m&&0<m.length){var q=new Image;q.onload=function(){e(m,q.width,q.height)};q.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=m}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
 EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
 EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)};
 EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
 EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){q.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else{var l=
-d.getSelectionCell(),e=d.model.getParent(l),f=null;1==d.getSelectionCount()&&d.model.isVertex(l)&&null!=d.layoutManager&&!d.isCellLocked(l)&&(f=d.layoutManager.getLayout(e));if(null!=f&&f.constructor==mxStackLayout)f=e.getIndex(l),37==a||38==a?d.model.add(e,l,Math.max(0,f-1)):39!=a&&40!=a||d.model.add(e,l,Math.min(d.model.getChildCount(e),f+1));else{f=d.getMovableCells(d.getSelectionCells());l=[];for(g=0;g<f.length;g++)e=d.getCurrentCellStyle(f[g]),"1"==mxUtils.getValue(e,"part","0")?(e=d.model.getParent(f[g]),
-d.model.isVertex(e)&&0>mxUtils.indexOf(f,e)&&l.push(e)):l.push(f[g]);0<l.length&&(f=e=0,37==a?e=-c:38==a?f=-c:39==a?e=c:40==a&&(f=c),d.moveCells(l,e,f))}}});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<q.length){d.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{d.getModel().endUpdate()}}},200)}var e=this,d=this.editor.graph,m=new mxKeyHandler(d),k=m.isEventIgnored;m.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
-mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&k.apply(this,arguments)};m.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};m.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],u=
-null,y={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},B=m.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var c=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=c)return c.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return d.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:
-function(){d.selectChildCell()};if(null!=y[a.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var c=d.connectVertex(d.getSelectionCell(),y[a.keyCode],d.defaultEdgeLength,a,!0);null!=c&&0<c.length&&(1==c.length&&d.model.isEdge(c[0])?d.setSelectionCell(d.model.getTerminal(c[0],!1)):d.setSelectionCell(c[c.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?
-function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return B.apply(this,arguments)};m.bindAction=mxUtils.bind(this,function(a,c,b,d){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},c?d?m.bindControlShiftKey(a,b):m.bindControlKey(a,b):d?m.bindShiftKey(a,b):m.bindKey(a,b))});var c=this,f=m.escape;m.escape=function(a){f.apply(this,arguments)};m.enter=function(){};m.bindControlShiftKey(36,function(){d.exitGroup()});
-m.bindControlShiftKey(35,function(){d.enterGroup()});m.bindShiftKey(36,function(){d.home()});m.bindKey(35,function(){d.refresh()});m.bindAction(107,!0,"zoomIn");m.bindAction(109,!0,"zoomOut");m.bindAction(80,!0,"print");m.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)m.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),m.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),m.bindControlKey(13,function(){if(d.isEnabled())try{d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),
-!1))}catch(g){c.handleError(g)}}),m.bindAction(8,!1,"delete"),m.bindAction(8,!0,"deleteAll"),m.bindAction(46,!1,"delete"),m.bindAction(46,!0,"deleteAll"),m.bindAction(36,!1,"resetView"),m.bindAction(72,!0,"fitWindow",!0),m.bindAction(74,!0,"fitPage"),m.bindAction(74,!0,"fitTwoPages",!0),m.bindAction(48,!0,"customZoom"),m.bindAction(82,!0,"turn"),m.bindAction(82,!0,"clearDefaultStyle",!0),m.bindAction(83,!0,"save"),m.bindAction(83,!0,"saveAs",!0),m.bindAction(65,!0,"selectAll"),m.bindAction(65,!0,
-"selectNone",!0),m.bindAction(73,!0,"selectVertices",!0),m.bindAction(69,!0,"selectEdges",!0),m.bindAction(69,!0,"editStyle"),m.bindAction(66,!0,"bold"),m.bindAction(66,!0,"toBack",!0),m.bindAction(70,!0,"toFront",!0),m.bindAction(68,!0,"duplicate"),m.bindAction(68,!0,"setAsDefaultStyle",!0),m.bindAction(90,!0,"undo"),m.bindAction(89,!0,"autosize",!0),m.bindAction(88,!0,"cut"),m.bindAction(67,!0,"copy"),m.bindAction(86,!0,"paste"),m.bindAction(71,!0,"group"),m.bindAction(77,!0,"editData"),m.bindAction(71,
-!0,"grid",!0),m.bindAction(73,!0,"italic"),m.bindAction(76,!0,"lockUnlock"),m.bindAction(76,!0,"layers",!0),m.bindAction(80,!0,"formatPanel",!0),m.bindAction(85,!0,"underline"),m.bindAction(85,!0,"ungroup",!0),m.bindAction(190,!0,"superscript"),m.bindAction(188,!0,"subscript"),m.bindAction(9,!1,"indent",!0),m.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),m.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?m.bindAction(89,!0,"redo"):m.bindAction(90,!0,"redo",
-!0);return m};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){q.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else{var l=
+c.getSelectionCell(),e=c.model.getParent(l),f=null;1==c.getSelectionCount()&&c.model.isVertex(l)&&null!=c.layoutManager&&!c.isCellLocked(l)&&(f=c.layoutManager.getLayout(e));if(null!=f&&f.constructor==mxStackLayout)f=e.getIndex(l),37==a||38==a?c.model.add(e,l,Math.max(0,f-1)):39!=a&&40!=a||c.model.add(e,l,Math.min(c.model.getChildCount(e),f+1));else{f=c.getMovableCells(c.getSelectionCells());l=[];for(g=0;g<f.length;g++)e=c.getCurrentCellStyle(f[g]),"1"==mxUtils.getValue(e,"part","0")?(e=c.model.getParent(f[g]),
+c.model.isVertex(e)&&0>mxUtils.indexOf(f,e)&&l.push(e)):l.push(f[g]);0<l.length&&(f=e=0,37==a?e=-d:38==a?f=-d:39==a?e=d:40==a&&(f=d),c.moveCells(l,e,f))}}});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<q.length){c.getModel().beginUpdate();try{for(var a=0;a<q.length;a++)q[a]();q=[]}finally{c.getModel().endUpdate()}}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&9==a.keyCode)&&(!this.isControlDown(a)||
+mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],u=
+null,z={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},B=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var d=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=d)return d.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return c.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:
+function(){c.selectChildCell()};if(null!=z[a.keyCode]&&!c.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),z[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?
+function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return B.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var d=this,f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});
+k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindShiftKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35,function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){if(c.isEnabled())try{c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),
+!1))}catch(g){d.handleError(g)}}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(36,!1,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,
+"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,
+!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",!0),k.bindAction(80,!0,"formatPanel",!0),k.bindAction(85,!0,"underline"),k.bindAction(85,!0,"ungroup",!0),k.bindAction(190,!0,"superscript"),k.bindAction(188,!0,"subscript"),k.bindAction(9,!1,"indent",!0),k.bindKey(13,function(){c.isEnabled()&&c.startEditingAtCell()}),k.bindKey(113,function(){c.isEnabled()&&c.startEditingAtCell()});mxClient.IS_WIN?k.bindAction(89,!0,"redo"):k.bindAction(90,!0,"redo",
+!0);return k};
 EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,
 "keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var d=0;d<a.length;d++)e=e.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(e)}})();
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(e){for(var c=0;c<a.length;c++)e=e.replace(new RegExp("&"+a[c][0]+";","g"),"&#"+a[c][1]+";");return b(e)}})();
 Date.prototype.toISOString||function(){function a(a){a=String(a);1===a.length&&(a="0"+a);return a}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;
 mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();
 mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;
 mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};
-Graph=function(a,b,e,d,m,k){mxGraph.call(this,a,b,e,d);this.themes=m||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=k?k:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
-return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,u=null,y=null,B=null,c=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var f=d.getState();null!=f&&this.model.isEdge(f.cell)&&(q=new mxPoint(d.getGraphX(),d.getGraphY()),c=this.isCellSelected(f.cell),y=
-f,u=d,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,d.getGraphX(),d.getGraphY())?B=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(B=f.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,f;for(f in d)if(null!=d[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=q&&null!=y&&null!=u){if(d=y,Math.abs(q.x-b.getGraphX())>f||Math.abs(q.y-b.getGraphY())>f){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var g=e.getHandleForEvent(u),l=this.view.getEdgeStyle(d);f=l==mxEdgeStyle.EntityRelation;c||B!=mxEvent.LABEL_HANDLE||(g=B);if(f&&0!=g&&g!=e.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!f||
-null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=d.visibleSourceState||g==e.bends.length-1||null!=d.visibleTargetState)f||g==mxEvent.LABEL_HANDLE||(f=d.absolutePoints,null!=f&&(null==l&&null==g||l==mxEdgeStyle.OrthConnector)&&(g=B,null==g&&(g=new mxRectangle(q.x,q.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,f[0].x,f[0].y)?g=0:mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y)?
-g=e.bends.length-1:null!=l&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?g=2:(g=mxUtils.findNearestSegment(d,q.x,q.y),g=null==l?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),g),B=q=u=y=null,c=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){e=null;f=d.absolutePoints;if(null!=f)if(g=new mxRectangle(b.getGraphX(),
-b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(g,f[0].x,f[0].y)||mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y))e="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)l=this.view.getEdgeStyle(d),e="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(l=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-l<f.length-1&&0<=l&&(e=0==Math.round(f[l].x-f[l+1].x)?"col-resize":"row-resize"));null!=e&&d.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,c){B=q=u=y=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
-this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],d=this.graph.pageFormat,b=this.graph.pageScale,e=d.width*b,d=d.height*b,b=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),n=0;n<l.width;n++)c.push(new mxRectangle(((l.x+n)*e+b.x)*g,(l.y*d+b.y)*g,e*g,d*g));for(n=1;n<l.height;n++)c.push(new mxRectangle((l.x*e+b.x)*g,((l.y+n)*d+b.y)*g,e*g,d*g));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
-function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var g=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var c=g.apply(this,arguments),d=new mxDictionary,b=[],f=0;f<c.length;f++){var e=this.graph.getCompositeParent(c[f]);null==e||d.get(e)||
-(d.put(e,!0),b.push(e))}return b};var p=this.graphHandler.start;this.graphHandler.start=function(a,c,d,b){a=this.graph.getCompositeParent(a);p.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,c){c=this.graph.getCompositeParent(c);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var l=new mxRubberband(this);this.getRubberband=function(){return l};var n=(new Date).getTime(),x=0,A=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
+Graph=function(a,b,e,c,k,m){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){a=this.getCurrentCellStyle(a);
+return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,u=null,z=null,B=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(q=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),z=
+f,u=c,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?B=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(B=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=q&&null!=z&&null!=u){if(c=z,Math.abs(q.x-b.getGraphX())>f||Math.abs(q.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var g=e.getHandleForEvent(u),l=this.view.getEdgeStyle(c);f=l==mxEdgeStyle.EntityRelation;d||B!=mxEvent.LABEL_HANDLE||(g=B);if(f&&0!=g&&g!=e.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!f||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=c.visibleSourceState||g==e.bends.length-1||null!=c.visibleTargetState)f||g==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==l&&null==g||l==mxEdgeStyle.OrthConnector)&&(g=B,null==g&&(g=new mxRectangle(q.x,q.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,f[0].x,f[0].y)?g=0:mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y)?
+g=e.bends.length-1:null!=l&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?g=2:(g=mxUtils.findNearestSegment(c,q.x,q.y),g=null==l?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),g),B=q=u=z=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){e=null;f=c.absolutePoints;if(null!=f)if(g=new mxRectangle(b.getGraphX(),
+b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(g,f[0].x,f[0].y)||mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y))e="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)l=this.view.getEdgeStyle(c),e="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(l=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
+l<f.length-1&&0<=l&&(e=0==Math.round(f[l].x-f[l+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,d){B=q=u=z=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,e=b.width*c,b=b.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),n=0;n<l.width;n++)d.push(new mxRectangle(((l.x+n)*e+c.x)*g,(l.y*b+c.y)*g,e*g,b*g));for(n=1;n<l.height;n++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+n)*b+c.y)*g,e*g,b*g));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+function(a,d){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var g=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var d=g.apply(this,arguments),b=new mxDictionary,c=[],f=0;f<d.length;f++){var e=this.graph.getCompositeParent(d[f]);null==e||b.get(e)||
+(b.put(e,!0),c.push(e))}return c};var p=this.graphHandler.start;this.graphHandler.start=function(a,d,b,c){a=this.graph.getCompositeParent(a);p.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,d){d=this.graph.getCompositeParent(d);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var l=new mxRubberband(this);this.getRubberband=function(){return l};var n=(new Date).getTime(),x=0,A=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
 function(){var a=this.currentState;A.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),x=0):x=(new Date).getTime()-n};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<x||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var G=this.isToggleEvent;this.isToggleEvent=function(a){return G.apply(this,
-arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=l.isForceRubberbandEvent;l.isForceRubberbandEvent=function(a){return z.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,
-function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var C=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||
-a.isConsumed())return C.apply(this,arguments);var d=c?a.sourceState.cell:a.getCell();null!=d&&(d=this.getClickableLinkForCell(d),null!=d&&(this.isCustomLink(d)?this.customLinkClicked(d):this.openLink(d)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};
-var v=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,c){var d=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(d,c);return d};this.getAllCells=function(a,c,d,b,f,e){e=null!=e?e:[];if(0<d||0<b){var g=this.getModel(),l=a+d,n=c+b;null==f&&(f=this.getCurrentRoot(),null==f&&(f=
-g.getRoot()));if(null!=f)for(var p=g.getChildCount(f),v=0;v<p;v++){var t=g.getChildAt(f,v),x=this.view.getState(t);if(null!=x&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(x.style,"locked","0")){var m=mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION)||0;0!=m&&(x=mxUtils.getBoundingBox(x,m));(g.isEdge(t)||g.isVertex(t))&&x.x>=a&&x.y+x.height<=n&&x.y>=c&&x.x+x.width<=l&&e.push(t);this.getAllCells(a,c,d,b,t,e)}}}return e};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
-function(a,c,d){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var L=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var d=c.getProperty("event").getState();L=null==d||this.isSelectionEmpty()||this.isCellSelected(d.cell)?null:
-this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var d=c.getProperty("event"),b=c.getProperty("cell");null==b?(d=mxUtils.convertPoint(this.container,mxEvent.getClientX(d),mxEvent.getClientY(d)),l.start(d.x,d.y)):null!=L?this.addSelectionCells(L):1<this.getSelectionCount()&&this.isCellSelected(b)&&this.removeSelectionCell(b);L=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||
-a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var H=this.updateMouseEvent;this.updateMouseEvent=function(a){a=H.apply(this,
+arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var y=l.isForceRubberbandEvent;l.isForceRubberbandEvent=function(a){return y.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var E=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,
+function(){this.isEnabled()&&(E=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=E)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var C=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||
+a.isConsumed())return C.apply(this,arguments);var b=d?a.sourceState.cell:a.getCell();null!=b&&(b=this.getClickableLinkForCell(b),null!=b&&(this.isCustomLink(b)?this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};
+var v=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return v.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,e){e=null!=e?e:[];if(0<b||0<c){var g=this.getModel(),l=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=
+g.getRoot()));if(null!=f)for(var p=g.getChildCount(f),v=0;v<p;v++){var t=g.getChildAt(f,v),x=this.view.getState(t);if(null!=x&&this.isCellVisible(t)&&"1"!=mxUtils.getValue(x.style,"locked","0")){var k=mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION)||0;0!=k&&(x=mxUtils.getBoundingBox(x,k));(g.isEdge(t)||g.isVertex(t))&&x.x>=a&&x.y+x.height<=n&&x.y>=d&&x.x+x.width<=l&&e.push(t);this.getAllCells(a,d,b,c,t,e)}}}return e};var H=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
+function(a,d,b){return this.graph.isCellSelected(a)?!1:H.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var L=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();L=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:
+this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),l.start(b.x,b.y)):null!=L?this.addSelectionCells(L):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);L=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||
+a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,d){return d&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var I=this.updateMouseEvent;this.updateMouseEvent=function(a){a=I.apply(this,
 arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
 Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";
-Graph.createSvgImage=function(a,b,e,d,m){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=m?'viewBox="0 0 '+d+" "+m+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
-Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))};
+Graph.createSvgImage=function(a,b,e,c,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=c&&null!=k?'viewBox="0 0 '+c+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
+Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var c=a.charCodeAt(e);(32<=c||9==c||10==c||13==c)&&65535!=c&&65534!=c&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))};
 Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
 Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="",a.style.background="",a.style.color=""),a=a.nextSibling};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};Graph.linkPattern=/^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$/i;
 mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
 Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";
 Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var d=a.view.graph.tolerance,b=!0,k=null,q=mxUtils.bind(this,function(a){b=!0;k=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){b=b&&null!=k&&Math.abs(k.x-mxEvent.getClientX(a))<d&&Math.abs(k.y-mxEvent.getClientY(a))<d}),y=mxUtils.bind(this,function(d){if(b)for(var c=mxEvent.getSource(d);null!=
-c&&c!=e.node;){if("a"==c.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,c,d);break}c=c.parentNode}});mxEvent.addGestureListeners(e.node,q,u,y);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,q,u,y){this.useCssTransforms&&
-(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,q,u,y){q=null!=q?q:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var d=this.model.getChildCount(e)-1;0<=d;d--){var c=this.model.getChildAt(e,d),f=this.getScaledCellAt(a,b,c,q,u,y);if(null!=f)return f;if(this.isCellVisible(c)&&(u&&this.model.isEdge(c)||
-q&&this.model.isVertex(c))&&(f=this.view.getState(c),null!=f&&(null==y||!y(f,a,b))&&this.intersects(f,a,b)))return c}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")};Graph.prototype.getCompositeParent=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,q=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),z=mxUtils.bind(this,function(b){if(k)for(var d=mxEvent.getSource(b);null!=
+d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,q,u,z);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,q,u,z){this.useCssTransforms&&
+(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,q,u,z){q=null!=q?q:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),f=this.getScaledCellAt(a,b,d,q,u,z);if(null!=f)return f;if(this.isCellVisible(d)&&(u&&this.model.isEdge(d)||
+q&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==z||!z(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};Graph.prototype.isPart=function(a){return"1"==mxUtils.getValue(this.getCurrentCellStyle(a),"part","0")};Graph.prototype.getCompositeParent=
 function(a){for(;this.isPart(a);){var b=this.model.getParent(a);if(!this.model.isVertex(b))break;a=b}return a};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=
 function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);a.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,
 this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=
-a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(u){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,k=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=
-e,this.translate=k)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,k){var d=this.useCssTransforms,m=this.view.scale,y=this.view.translate;d&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);d&&(this.view.scale=m,this.view.translate=y,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var q=a.style.display;a.style.display="none";a.getBBox();a.style.display=q}}catch(u){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=
+e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var c=this.useCssTransforms,k=this.view.scale,z=this.view.translate;c&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);c&&(this.view.scale=k,this.view.translate=z,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
 Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
-Graph.prototype.openLink=function(a,b,e){var d=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var m=a.split("#")[1];window.location.hash=="#"+m&&(window.location.hash="");window.location.hash=m}else d=window.open(a,null!=b?b:"_blank"),null==d||e||(d.opener=null)}catch(k){}return d};
+Graph.prototype.openLink=function(a,b,e){var c=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else c=window.open(a,null!=b?b:"_blank"),null==c||e||(c.opener=null)}catch(m){}return c};
 Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
 Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var e=this.graph.getCellStyle(a);if("stackLayout"==e.childLayout){var d=new mxStackLayout(this.graph,!0);d.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");d.horizontal="1"==mxUtils.getValue(e,"horizontalStack","1");d.resizeParent="1"==mxUtils.getValue(e,"resizeParent",
-"1");d.resizeLast="1"==mxUtils.getValue(e,"resizeLast","0");d.spacing=e.stackSpacing||d.spacing;d.border=e.stackBorder||d.border;d.marginLeft=e.marginLeft||0;d.marginRight=e.marginRight||0;d.marginTop=e.marginTop||0;d.marginBottom=e.marginBottom||0;d.fill=!0;return d}return"treeLayout"==e.childLayout?(d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(e,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),d.groupPadding=mxUtils.getValue(e,"parentPadding",
-20),d.levelDistance=mxUtils.getValue(e,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d):"flowLayout"==e.childLayout?(d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(e,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),d.parentBorder=mxUtils.getValue(e,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(e,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),
-d.interRankCellSpacing=mxUtils.getValue(e,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(e,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(e,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d):"circleLayout"==e.childLayout?new mxCircleLayout(this.graph):"organicLayout"==e.childLayout?new mxFastOrganicLayout(this.graph):"tableLayout"==e.childLayout?
-new TableLayout(this.graph):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),d=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(e,d,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-e,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-d)};Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a,b){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){if(b==mxEvent.END_UPDATE){var e=this.graph.getCellStyle(a);if("stackLayout"==e.childLayout){var c=new mxStackLayout(this.graph,!0);c.resizeParentMax="1"==mxUtils.getValue(e,"resizeParentMax","1");c.horizontal="1"==mxUtils.getValue(e,"horizontalStack","1");c.resizeParent="1"==
+mxUtils.getValue(e,"resizeParent","1");c.resizeLast="1"==mxUtils.getValue(e,"resizeLast","0");c.spacing=e.stackSpacing||c.spacing;c.border=e.stackBorder||c.border;c.marginLeft=e.marginLeft||0;c.marginRight=e.marginRight||0;c.marginTop=e.marginTop||0;c.marginBottom=e.marginBottom||0;c.fill=!0;return c}if("treeLayout"==e.childLayout)return c=new mxCompactTreeLayout(this.graph),c.horizontal="1"==mxUtils.getValue(e,"horizontalTree","1"),c.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),c.groupPadding=
+mxUtils.getValue(e,"parentPadding",20),c.levelDistance=mxUtils.getValue(e,"treeLevelDistance",30),c.maintainParentLocation=!0,c.edgeRouting=!1,c.resetEdges=!1,c;if("flowLayout"==e.childLayout)return c=new mxHierarchicalLayout(this.graph,mxUtils.getValue(e,"flowOrientation",mxConstants.DIRECTION_EAST)),c.resizeParent="1"==mxUtils.getValue(e,"resizeParent","1"),c.parentBorder=mxUtils.getValue(e,"parentPadding",20),c.maintainParentLocation=!0,c.intraCellSpacing=mxUtils.getValue(e,"intraCellSpacing",
+mxHierarchicalLayout.prototype.intraCellSpacing),c.interRankCellSpacing=mxUtils.getValue(e,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),c.interHierarchySpacing=mxUtils.getValue(e,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),c.parallelEdgeSpacing=mxUtils.getValue(e,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),c;if("circleLayout"==e.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==e.childLayout)return new mxFastOrganicLayout(this.graph);
+if("tableLayout"==e.childLayout)return new TableLayout(this.graph)}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),c=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(e,c,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-e,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+c)};Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
 Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
 Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};
 Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
 Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
 Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,m=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,k=/[^-+\dA-Z]/g,q=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",y=a[u+"Date"](),B=a[u+"Day"](),c=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),p=a[u+"Minutes"](),l=a[u+"Seconds"](),u=a[u+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),x={d:y,dd:q(y),ddd:d.i18n.dayNames[B],dddd:d.i18n.dayNames[B+7],m:c+1,mm:q(c+1),mmm:d.i18n.monthNames[c],mmmm:d.i18n.monthNames[c+
-12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:q(g%12||12),H:g,HH:q(g),M:p,MM:q(p),s:l,ss:q(l),l:q(u,3),L:q(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(m)||[""]).pop().replace(k,""),o:(0<n?"-":"+")+q(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<y%10?0:(10!=y%100-y%10)*y%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,q=function(a,d){a=String(a);for(d=d||2;a.length<d;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",z=a[u+"Date"](),B=a[u+"Day"](),d=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),p=a[u+"Minutes"](),l=a[u+"Seconds"](),u=a[u+"Milliseconds"](),n=e?0:a.getTimezoneOffset(),x={d:z,dd:q(z),ddd:c.i18n.dayNames[B],dddd:c.i18n.dayNames[B+7],m:d+1,mm:q(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+
+12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:q(g%12||12),H:g,HH:q(g),M:p,MM:q(p),s:l,ss:q(l),l:q(u,3),L:q(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<n?"-":"+")+q(100*Math.floor(Math.abs(n)/60)+Math.abs(n)%60,4),S:["th","st","nd","rd"][3<z%10?0:(10!=z%100-z%10)*z%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in x?x[a]:a.slice(1,
 a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)mxUtils.bind(this,function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var m=document.createElement("input");m.style.display="inline-block";m.setAttribute("type","checkbox");b.isVisible(d)&&(m.setAttribute("checked","checked"),
-m.defaultChecked=!0);e.appendChild(m);var u=this.convertValueToString(d)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(m,"click",function(){null!=m.getAttribute("checked")?m.removeAttribute("checked"):m.setAttribute("checked","checked");b.setVisible(d,m.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var d=0;match=this.placeholderPattern.exec(b);){var m=match[0];if(2<m.length&&"%label%"!=m&&"%tooltip%"!=m){var k=null;if(match.index>d&&"%"==b.charAt(match.index-1))k=m.substring(1);else{var q=m.substring(1,m.length-1);if(0>q.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(k=u.hasAttribute(q)?null!=u.getAttribute(q)?u.getAttribute(q):"":null),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(q))}e.push(b.substring(d,
-match.index)+(null!=k?k:m));d=match.index+m.length}}e.push(b.substring(d))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var d=this.model.getCell(a[e].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)mxUtils.bind(this,function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"),
+k.defaultChecked=!0);e.appendChild(k);var u=this.convertValueToString(c)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(q)?null!=u.getAttribute(q)?u.getAttribute(q):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(q))}e.push(b.substring(c,
+match.index)+(null!=m?m:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var c=this.model.getCell(a[e].id);null!=c&&b.push(c)}this.setSelectionCells(b)}else this.clearSelection()};
 Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,d,m,k){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];k=k?k:!1;var q=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(q.x+=a.geometry.width/2,q.y-=e):b==mxConstants.DIRECTION_SOUTH?(q.x+=a.geometry.width/2,q.y+=a.geometry.height+e):(q.x=b==mxConstants.DIRECTION_WEST?q.x-e:q.x+(a.geometry.width+
-e),q.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,y=this.view.translate,B=y.x*u,y=y.y*u;null!=e&&this.model.isVertex(e.cell)&&(B=e.x,y=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);k=k||mxEvent.isControlDown(d)&&!m?null:this.getCellAt(B+q.x*u,y+q.y*u);this.model.isAncestor(k,a)&&(k=null);for(e=k;null!=e;){if(this.isCellLocked(e)){k=null;break}e=this.model.getParent(e)}null!=k&&(e=this.view.getState(a),
-u=this.view.getState(k),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(k=null));if(m=!mxEvent.isShiftDown(d)||m)b==mxConstants.DIRECTION_NORTH?q.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?q.y+=a.geometry.height/2:q.x=b==mxConstants.DIRECTION_WEST?q.x-a.geometry.width/2:q.x+a.geometry.width/2;null==k||this.isCellConnectable(k)||(e=this.getModel().getParent(k),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(k=e));if(k==a||this.model.isEdge(k)||!this.isCellConnectable(k))k=null;e=[];
-this.model.beginUpdate();try{var c=null!=k&&this.isSwimlane(k),u=c?null:k;if(null==u&&m){for(var B=a,f=this.getCellGeometry(a);null!=f&&f.relative;)B=this.getModel().getParent(B),f=this.getCellGeometry(B);B=this.getCompositeParent(B);u=this.duplicateCells([B],!1)[0];f=this.getCellGeometry(u);null!=f&&(f.x=q.x-f.width/2,f.y=q.y-f.height/2);c&&(this.addCells([u],k,null,null,null,!0),k=null)}c=null;null!=this.layoutManager&&(c=this.layoutManager.getLayout(this.model.getParent(a)));var g=mxEvent.isControlDown(d)&&
-m||null==k&&null!=c&&c.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=g&&this.connectionHandler.insertBeforeSource){var p=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=g.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==g.parent&&(p=d.parent.getIndex(d),this.model.add(d.parent,g,p))}null==k&&null!=u&&null!=c&&null!=a.parent&&c.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&
-(p=a.parent.getIndex(a),this.model.add(a.parent,u,p));null!=g&&e.push(g);null==k&&null!=u&&e.push(u);null==u&&null!=g&&g.geometry.setTerminalPoint(q,!1);null!=g&&this.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{this.model.endUpdate()}return e};
-Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
+Graph.prototype.connectVertex=function(a,b,e,c,k,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var q=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(q.x+=a.geometry.width/2,q.y-=e):b==mxConstants.DIRECTION_SOUTH?(q.x+=a.geometry.width/2,q.y+=a.geometry.height+e):(q.x=b==mxConstants.DIRECTION_WEST?q.x-e:q.x+(a.geometry.width+
+e),q.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,z=this.view.translate,B=z.x*u,z=z.y*u;null!=e&&this.model.isVertex(e.cell)&&(B=e.x,z=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(B+q.x*u,z+q.y*u);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),
+u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?q.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?q.y+=a.geometry.height/2:q.x=b==mxConstants.DIRECTION_WEST?q.x-a.geometry.width/2:q.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];
+this.model.beginUpdate();try{var d=null!=m&&this.isSwimlane(m),u=d?null:m;if(null==u&&k){for(var B=a,f=this.getCellGeometry(a);null!=f&&f.relative;)B=this.getModel().getParent(B),f=this.getCellGeometry(B);B=this.getCompositeParent(B);u=this.duplicateCells([B],!1)[0];f=this.getCellGeometry(u);null!=f&&(f.x=q.x-f.width/2,f.y=q.y-f.height/2);d&&(this.addCells([u],m,null,null,null,!0),m=null)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var g=mxEvent.isControlDown(c)&&
+k||null==m&&null!=d&&d.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=g&&this.connectionHandler.insertBeforeSource){var p=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=g.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==g.parent&&(p=c.parent.getIndex(c),this.model.add(c.parent,g,p))}null==m&&null!=u&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&
+(p=a.parent.getIndex(a),this.model.add(a.parent,u,p));null!=g&&e.push(g);null==m&&null!=u&&e.push(u);null==u&&null!=g&&g.geometry.setTerminalPoint(q,!1);null!=g&&this.fireEvent(new mxEventObject("cellsInserted","cells",[g]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
 Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
 Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
-Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,e,d,m){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var k=0;k<e.length;k++){var q=this.view.getState(e[k]),u=this.getCellGeometry(e[k]);if(null!=q&&null!=u){var y=Math.round(u.width-q.width/this.view.scale),B=Math.round(u.height-q.height/this.view.scale);if(0!=B||0!=y){var c=this.model.getParent(e[k]),f=this.layoutManager.getLayout(c);
-null==f?null!=m&&this.isMoveCellsEvent(m,q)&&this.moveSiblings(q,c,y,B):null!=m&&mxEvent.isAltDown(m)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(c,f,y,B)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var m=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<m.length;b++)if(m[b]!=a.cell){var k=this.view.getState(m[b]),q=this.getCellGeometry(m[b]);null!=k&&null!=q&&(q=q.clone(),q.translate(Math.round(e*Math.max(0,Math.min(1,(k.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(k.y-a.y)/a.height)))),this.model.setGeometry(m[b],q))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var m=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==m&&!b.resizeLast;){var k=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=k&&(k=k.clone(),b.horizontal?k.width+=e+Math.min(0,q.width/this.view.scale-k.width):k.height+=d+Math.min(0,q.height/this.view.scale-k.height),this.model.setGeometry(a,
-k));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);return null!=b&&(b=this.getCurrentCellStyle(b),null!=b.expand)?"0"!=b.expand:mxGraph.prototype.isExtendParent.apply(this,arguments)};
+Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var q=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=q&&null!=u){var z=Math.round(u.width-q.width/this.view.scale),B=Math.round(u.height-q.height/this.view.scale);if(0!=B||0!=z){var d=this.model.getParent(e[m]),f=this.layoutManager.getLayout(d);
+null==f?null!=k&&this.isMoveCellsEvent(k,q)&&this.moveSiblings(q,d,z,B):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(d,f,z,B)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var m=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=m&&null!=q&&(q=q.clone(),q.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[b],q))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var m=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,q.width/this.view.scale-m.width):m.height+=c+Math.min(0,q.height/this.view.scale-m.height),this.model.setGeometry(a,
+m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isExtendParent=function(a){var b=this.model.getParent(a);return null!=b&&(b=this.getCurrentCellStyle(b),null!=b.expand)?"0"!=b.expand:mxGraph.prototype.isExtendParent.apply(this,arguments)};
 Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};
-Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};
+Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){var c=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(c)&&(c=null);return c};
 Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var m=0;m<a.length;m++)0>mxUtils.indexOf(e,a[m].nodeName)&&0<a[m].nodeValue.length&&d.push({name:a[m].nodeName,value:a[m].nodeValue});d.sort(function(a,b){return a.name<b.name?
--1:a.name>b.name?1:0});for(m=0;m<d.length;m++)"link"==d[m].name&&this.isCustomLink(d[m].value)||(b+=("link"!=d[m].name?"<b>"+d[m].name+":</b> ":"")+mxUtils.htmlEntities(d[m].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=this.builtInProperties;a=a.value.attributes;var c=[];this.isEnabled()&&e.push("link");for(var k=0;k<a.length;k++)0>mxUtils.indexOf(e,a[k].nodeName)&&0<a[k].nodeValue.length&&c.push({name:a[k].nodeName,value:a[k].nodeValue});c.sort(function(a,b){return a.name<b.name?
+-1:a.name>b.name?1:0});for(k=0;k<c.length;k++)"link"==c[k].name&&this.isCustomLink(c[k].value)||(b+=("link"!=c[k].name?"<b>"+c[k].name+":</b> ":"")+mxUtils.htmlEntities(c[k].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;">'+b+"</div>"))}}return b};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};
 Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
 HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
 HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
@@ -2367,9 +2367,9 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
 HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"));this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"));this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"));this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"));this.elts=[this.arrowUp,this.arrowRight,this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=
 mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);
 this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(a){null!=a.relatedTarget&&mxEvent.getSource(a)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,
-mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,d){b=!1;var e=d.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var k=this.getState(d.getState());
-null==k&&mxEvent.isTouchEvent(e)||this.update(k)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,d){var e=d.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,d){var e=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));
-this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||
+mxUtils.bind(this,function(a){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(b){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(b.getEvent())||this.graph.model.isVertex(b.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(a,c){b=!1;var e=c.getEvent();if(this.isResetEvent(e))this.reset();else if(!this.isActive()){var m=this.getState(c.getState());
+null==m&&mxEvent.isTouchEvent(e)||this.update(m)}this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(a,c){var e=c.getEvent();this.isResetEvent(e)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(e)||this.update(this.getState(c.getState()),c.getGraphX(),c.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,function(a,c){var e=c.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(e),mxEvent.getClientY(e));
+this.isResetEvent(e)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),c):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(c.getGraphX(),c.getGraphY())))):mxEvent.isTouchEvent(e)||null!=this.bbox&&mxUtils.contains(this.bbox,c.getGraphX(),c.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(e)||
 this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isMetaDown(a)||mxEvent.isPopupTrigger(a)&&!mxEvent.isControlDown(a)};
 HoverIcons.prototype.createArrow=function(a,b){var e=null;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(e=document.createElement(mxClient.VML_PREFIX+":image"),e.setAttribute("src",a.src),e.style.borderStyle="none"):(e=document.createElement("div"),e.style.backgroundImage="url("+a.src+")",e.style.backgroundPosition="center",e.style.backgroundRepeat="no-repeat"),e.style.width=a.width+4+"px",e.style.height=a.height+4+"px",e.style.display=mxClient.IS_QUIRKS?"inline":
 "inline-block"):(e=mxUtils.createImage(a.src),e.style.width=a.width+"px",e.style.height=a.height+"px",e.style.padding=this.tolerance+"px");null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){null==this.currentState||this.isResetEvent(a)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),this.drag(a,this.mouseDownPoint.x,this.mouseDownPoint.y),
@@ -2378,458 +2378,460 @@ this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=funct
 HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
 HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
 mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),m=e.getGraphX(),k=e.getGraphY(),m=this.getStateAt(a,m,k);null==m||!this.graph.model.isEdge(m.cell)||mxEvent.isControlDown(d)||m.getVisibleTerminalState(!0)!=a&&m.getVisibleTerminalState(!1)!=a?null!=a&&this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),d,this):(this.graph.setSelectionCell(m.cell),this.reset());e.consume()};
+HoverIcons.prototype.click=function(a,b,e){var c=e.getEvent(),k=e.getGraphX(),m=e.getGraphY(),k=this.getStateAt(a,k,m);null==k||!this.graph.model.isEdge(k.cell)||mxEvent.isControlDown(c)||k.getVisibleTerminalState(!0)!=a&&k.getVisibleTerminalState(!1)!=a?null!=a&&this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,c),c,this):(this.graph.setSelectionCell(k.cell),this.reset());e.consume()};
 HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
 HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
-var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),e=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,b,d){if(null!=e){var c=new mxRectangle(b,d,a.clientWidth,a.clientHeight);
-mxUtils.intersects(c,e)&&(a==this.arrowUp?d-=c.y+c.height-e.y:a==this.arrowRight?b+=e.x+e.width-c.x:a==this.arrowDown?d+=e.y+e.height-c.y:a==this.arrowLeft&&(b-=c.x+c.width-e.x))}a.style.left=b+"px";a.style.top=d+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-
-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),m=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==m&&m==a&&(a=m=d=b=null);var k=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,b){var d=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,this.currentState.cell)||this.graph.isSwimlane(a)||!(null==d||null==k||d.height<3*k.height&&d.width<3*k.width)?b.style.visibility="visible":
-b.style.visibility="hidden"});q(b,this.arrowRight);q(d,this.arrowLeft);q(m,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),
+var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),e=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&(e=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(a,b,c){if(null!=e){var d=new mxRectangle(b,c,a.clientWidth,a.clientHeight);
+mxUtils.intersects(d,e)&&(a==this.arrowUp?c-=d.y+d.height-e.y:a==this.arrowRight?b+=e.x+e.width-d.x:a==this.arrowDown?c+=e.y+e.height-d.y:a==this.arrowLeft&&(b-=d.x+d.width-e.x))}a.style.left=b+"px";a.style.top=c+"px";mxUtils.setOpacity(a,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-
+this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),c=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),k=this.graph.getCellAt(this.currentState.getCenterX(),
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==c&&c==k&&k==a&&(a=k=c=b=null);var m=this.graph.getCellGeometry(this.currentState.cell),q=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null==a||this.graph.model.isAncestor(a,this.currentState.cell)||this.graph.isSwimlane(a)||!(null==c||null==m||c.height<3*m.height&&c.width<3*m.width)?b.style.visibility="visible":
+b.style.visibility="hidden"});q(b,this.arrowRight);q(c,this.arrowLeft);q(k,this.arrowUp);q(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),
 this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
 HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
 HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
-HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var c=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,c=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(c=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||c>this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,
 b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,d,m){a=this.cloneCell(a);for(var k=0;k<e;k++){var q=this.cloneCell(b),u=this.getCellGeometry(q);null!=u&&(u.x+=k*d,u.y+=k*m);a.insert(q)}return a};
-Graph.prototype.createTable=function(a,b,e,d){e=null!=e?e:40;d=null!=d?d:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*d,"html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,d,"html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;"),
-this.createVertex(null,null,"",0,0,e,d,"html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;"),b,e,0),a,0,d)};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,d){e=null!=e?e:120;d=null!=d?d:120;var m=this.createVertex(null,null,"",0,0,b*e,a*d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;containerType=table;container=0;dropTarget=0;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),k=mxUtils.getValue(this.getCellStyle(m),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);m.geometry.width+=k;m.geometry.height+=k;var q=this.createVertex(null,
-null,"",0,k,b*e+k,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;resizeLast=1;resizeParent=0;container=0;");m.insert(this.createParent(q,this.createVertex(null,null,"",k,0,e,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),b,e,0));return 1<a?(q.geometry.y=d+k,this.createParent(m,this.createParent(q,this.createVertex(null,null,"",k,0,e,d,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),
-b,e,0),a-1,0,d)):m};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType};
-Graph.prototype.updateTableRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{var d=this.getCellGeometry(a);if(null!=d){d=d.clone();d.height+=b;e.setGeometry(a,d);var m=e.getParent(a),k=this.getCellGeometry(m);null!=k&&(k=k.clone(),k.height+=b,e.setGeometry(m,k))}}finally{e.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b){var e=this.getModel(),d=e.getParent(a),m=e.getParent(d),k=d.getIndex(a);e.beginUpdate();try{var q=this.getCellGeometry(a),u=0;null!=q&&(u=b-q.width);for(var y=0;y<e.getChildCount(m);y++)if(d=e.getChildAt(m,y),e.isVertex(d)){var B=e.getChildAt(d,k);e.isVertex(B)&&(q=this.getCellGeometry(B),null!=q&&(q=q.clone(),q.width=b,e.setGeometry(B,q)));k<e.getChildCount(d)-1&&(B=e.getChildAt(d,k+1),e.isVertex(B)&&(q=this.getCellGeometry(B),null!=q&&(q=q.clone(),
-q.x+=u,q.width-=u,e.setGeometry(B,q))))}}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.getLayout=function(a,b){for(var e=this.graph.getModel(),d=[],m=0,k=0;k<e.getChildCount(a);k++){var q=e.getChildAt(a,k);if(!this.isVertexIgnored(q)){var u=this.graph.getCellGeometry(q);null!=u&&(m+=b?u.height:u.width,d.push(q))}}return[d,m]};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a),e=this.graph.getCellGeometry(a),d=this.graph.getModel();d.beginUpdate();try{var m=this.getLayout(a,!0),k=m[0],q=m[1],u=b.y;for(a=0;a<k.length;a++){var y=e.height-b.y-b.height,B=this.graph.getCellGeometry(k[a]),B=B.clone();B.height=B.height/q*y;B.width=e.width;B.x=b.x;B.y=u;d.setGeometry(k[a],B);for(var u=u+B.height,c=this.graph.getActualStartSize(k[a]),f=this.getLayout(k[a],!1),g=f[0],p=f[1],l=c.x,m=0;m<g.length;m++){var n=
-this.graph.getCellGeometry(g[m]),x=B.width-c.x-c.width,n=n.clone();n.width=n.width/p*x;n.height=B.height;n.y=0;n.x=l;d.setGeometry(g[m],n);l+=n.width}}}finally{d.endUpdate()}}};
-(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){d=null!=d?d:!0;var c=this.getState(a);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,
-arguments);null!=c&&d&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
-1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var e=new mxPoint(b,f);e.type=c;d.push(e);e=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==e||e.type!=c||e.x!=b||e.y!=f},p=.5*this.scale,c=!1,d=[],l=0;l<b.length-1;l++){for(var n=
-b[l+1],x=b[l],A=[],t=b[l+2];l<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,n.x,n.y)<1*this.scale*this.scale;)n=t,l++,t=b[l+2];for(var c=e(0,x.x,x.y)||c,m=0;m<this.validEdges.length;m++){var k=this.validEdges[m],u=k.absolutePoints;if(null!=u&&mxUtils.intersects(a,k)&&"1"!=k.style.noJump)for(k=0;k<u.length-1;k++){for(var C=u[k+1],v=u[k],t=u[k+2];k<u.length-2&&mxUtils.ptSegDistSq(v.x,v.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=t,k++,t=u[k+2];t=mxUtils.intersection(x.x,x.y,n.x,n.y,v.x,v.y,C.x,
-C.y);if(null!=t&&(Math.abs(t.x-x.x)>p||Math.abs(t.y-x.y)>p)&&(Math.abs(t.x-n.x)>p||Math.abs(t.y-n.y)>p)&&(Math.abs(t.x-v.x)>p||Math.abs(t.y-v.y)>p)&&(Math.abs(t.x-C.x)>p||Math.abs(t.y-C.y)>p)){C=t.x-x.x;v=t.y-x.y;t={distSq:C*C+v*v,x:t.x,y:t.y};for(C=0;C<A.length;C++)if(A[C].distSq>t.distSq){A.splice(C,0,t);t=null;break}null==t||0!=A.length&&A[A.length-1].x===t.x&&A[A.length-1].y===t.y||A.push(t)}}}for(k=0;k<A.length;k++)c=e(1,A[k].x,A[k].y)||c}t=b[b.length-1];c=e(0,t.x,t.y)||c}a.routedPoints=d;return c}return!1};
-var m=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)m.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,p=mxUtils.getValue(this.style,
-"jumpStyle","none"),l=!0,n=null,x=null,k=[],t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var z=this.state.routedPoints[u],E=new mxPoint(z.x/this.scale,z.y/this.scale);0==u?E=b[0]:u==this.state.routedPoints.length-1&&(E=b[b.length-1]);var C=!1;if(null!=n&&1==z.type){var v=this.state.routedPoints[u+1],z=v.x/this.scale-E.x,v=v.y/this.scale-E.y,z=z*z+v*v;null==t&&(t=new mxPoint(E.x-n.x,E.y-n.y),x=Math.sqrt(t.x*t.x+t.y*t.y),0<x?(t.x=t.x*e/x,t.y=t.y*e/x):t=null);z>e*e&&0<x&&(z=n.x-
-E.x,v=n.y-E.y,z=z*z+v*v,z>e*e&&(C=new mxPoint(E.x-t.x,E.y-t.y),z=new mxPoint(E.x+t.x,E.y+t.y),k.push(C),this.addPoints(a,k,c,d,!1,null,l),k=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,l=!1,"sharp"==p?(a.lineTo(C.x-t.y*k,C.y+t.x*k),a.lineTo(z.x-t.y*k,z.y+t.x*k),a.lineTo(z.x,z.y)):"arc"==p?(k*=1.3,a.curveTo(C.x-t.y*k,C.y+t.x*k,z.x-t.y*k,z.y+t.x*k,z.x,z.y)):(a.moveTo(z.x,z.y),l=!0),k=[z],C=!0))}else t=null;C||(k.push(E),n=E)}this.addPoints(a,k,c,d,!1,null,l);a.stroke()}};var k=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)k.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var f=this.getNextPoint(a,c,d),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var x=Math.cos(-l),m=Math.sin(-l),f=mxUtils.getRotatedPoint(f,x,m,n);x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);x+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==l&&e,x);0!=l&&(x=Math.cos(l),m=Math.sin(l),f=mxUtils.getRotatedPoint(f,x,m,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,f),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
-a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||n<d)c=g,d=n}}null!=c&&(e=c)}return e};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(Graph.decompress(c));return new mxShape(new mxStencil(d.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var m=b[d];if(".xml"==m.toLowerCase().substring(m.length-4,m.length))mxStencilRegistry.loadStencilSet(m,null);else if(".js"==m.toLowerCase().substring(m.length-3,m.length))try{if(mxStencilRegistry.allowEval){var k=
-mxUtils.load(m);null!=k&&200<=k.getStatus()&&299>=k.getStatus()&&eval.call(window,k.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",m,q)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e,c,k){a=this.cloneCell(a);for(var m=0;m<e;m++){var q=this.cloneCell(b),u=this.getCellGeometry(q);null!=u&&(u.x+=m*c,u.y+=m*k);a.insert(q)}return a};
+Graph.prototype.createTable=function(a,b,e,c){e=null!=e?e:40;c=null!=c?c:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*c,"html=1;whiteSpace=wrap;container=0;collapsible=0;containerType=table;fillColor=none;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;dropTarget=0;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,c,"html=1;whiteSpace=wrap;container=0;collapsible=0;points=[[0,0.5],[1,0.5]];fillColor=none;portConstraint=eastwest;resizeLast=1;resizeParent=0;part=1;"),
+this.createVertex(null,null,"",0,0,e,c,"html=1;whiteSpace=wrap;connectable=0;part=1;fillColor=none;"),b,e,0),a,0,c)};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,c){e=null!=e?e:120;c=null!=c?c:120;var k=this.createVertex(null,null,"",0,0,b*e,a*c,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;containerType=table;container=0;dropTarget=0;childLayout=tableLayout;resizeLast=1;resizeParent=0;horizontalStack=0;"),m=mxUtils.getValue(this.getCellStyle(k),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);k.geometry.width+=m;k.geometry.height+=m;var q=this.createVertex(null,
+null,"",0,m,b*e+m,c,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;horizontal=0;points=[[0,0.5],[1,0.5]];part=1;portConstraint=eastwest;resizeLast=1;resizeParent=0;container=0;");k.insert(this.createParent(q,this.createVertex(null,null,"",m,0,e,c,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;"),b,e,0));return 1<a?(q.geometry.y=c+m,this.createParent(k,this.createParent(q,this.createVertex(null,null,"",m,0,e,c,"swimlane;html=1;whiteSpace=wrap;collapsible=0;recursiveResize=0;expand=0;connectable=0;part=1;startSize=0;"),
+b,e,0),a-1,0,c)):k};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"table"==a.containerType};
+Graph.prototype.updateTableRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{var c=this.getCellGeometry(a);if(null!=c){c=c.clone();c.height+=b;e.setGeometry(a,c);var k=e.getParent(a),m=this.getCellGeometry(k);null!=m&&(m=m.clone(),m.height+=b,e.setGeometry(k,m))}}finally{e.endUpdate()}};
+Graph.prototype.updateTableColumnWidth=function(a,b){var e=this.getModel(),c=e.getParent(a),k=e.getParent(c),m=c.getIndex(a);e.beginUpdate();try{for(var q=0;q<e.getChildCount(k);q++)if(c=e.getChildAt(k,q),e.isVertex(c)){var u=e.getChildAt(c,m);if(e.isVertex(u)){var z=this.getCellGeometry(u);null!=z&&(z=z.clone(),z.width+=b,e.setGeometry(u,z))}m<e.getChildCount(c)-1&&(u=e.getChildAt(c,m+1),e.isVertex(u)&&(z=this.getCellGeometry(u),null!=z&&(z=z.clone(),z.x+=b,z.width-=b,e.setGeometry(u,z))))}}finally{e.endUpdate()}};
+function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.getLayout=function(a,b){for(var e=this.graph.getModel(),c=[],k=0,m=0;m<e.getChildCount(a);m++){var q=e.getChildAt(a,m);if(!this.isVertexIgnored(q)){var u=this.graph.getCellGeometry(q);null!=u&&(k+=b?u.height:u.width,c.push(q))}}return[c,k]};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a),e=this.graph.getCellGeometry(a),c=this.graph.getModel();c.beginUpdate();try{var k=this.getLayout(a,!0),m=k[0],q=k[1],u=b.y;for(a=0;a<m.length;a++){var z=e.height-b.y-b.height,B=this.graph.getCellGeometry(m[a]),B=B.clone();B.height=B.height/q*z;B.width=e.width;B.x=b.x;B.y=u;c.setGeometry(m[a],B);for(var u=u+B.height,d=this.graph.getActualStartSize(m[a]),f=this.getLayout(m[a],!1),g=f[0],p=f[1],l=d.x,k=0;k<g.length;k++){var n=
+this.graph.getCellGeometry(g[k]),x=B.width-d.x-d.width,n=n.clone();n.width=n.width/p*x;n.height=B.height;n.y=0;n.x=l;c.setGeometry(g[k],n);l+=n.width}}}finally{c.endUpdate()}}};
+(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var d=this.getState(a);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,
+arguments);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
+1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,c=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var e=new mxPoint(b,f);e.type=d;c.push(e);e=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=f},p=.5*this.scale,d=!1,c=[],l=0;l<b.length-1;l++){for(var n=
+b[l+1],x=b[l],k=[],t=b[l+2];l<b.length-2&&mxUtils.ptSegDistSq(x.x,x.y,t.x,t.y,n.x,n.y)<1*this.scale*this.scale;)n=t,l++,t=b[l+2];for(var d=e(0,x.x,x.y)||d,m=0;m<this.validEdges.length;m++){var y=this.validEdges[m],u=y.absolutePoints;if(null!=u&&mxUtils.intersects(a,y)&&"1"!=y.style.noJump)for(y=0;y<u.length-1;y++){for(var C=u[y+1],v=u[y],t=u[y+2];y<u.length-2&&mxUtils.ptSegDistSq(v.x,v.y,t.x,t.y,C.x,C.y)<1*this.scale*this.scale;)C=t,y++,t=u[y+2];t=mxUtils.intersection(x.x,x.y,n.x,n.y,v.x,v.y,C.x,
+C.y);if(null!=t&&(Math.abs(t.x-x.x)>p||Math.abs(t.y-x.y)>p)&&(Math.abs(t.x-n.x)>p||Math.abs(t.y-n.y)>p)&&(Math.abs(t.x-v.x)>p||Math.abs(t.y-v.y)>p)&&(Math.abs(t.x-C.x)>p||Math.abs(t.y-C.y)>p)){C=t.x-x.x;v=t.y-x.y;t={distSq:C*C+v*v,x:t.x,y:t.y};for(C=0;C<k.length;C++)if(k[C].distSq>t.distSq){k.splice(C,0,t);t=null;break}null==t||0!=k.length&&k[k.length-1].x===t.x&&k[k.length-1].y===t.y||k.push(t)}}}for(y=0;y<k.length;y++)d=e(1,k[y].x,k[y].y)||d}t=b[b.length-1];d=e(0,t.x,t.y)||d}a.routedPoints=c;return d}return!1};
+var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,p=mxUtils.getValue(this.style,
+"jumpStyle","none"),l=!0,n=null,x=null,m=[],t=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var y=this.state.routedPoints[u],E=new mxPoint(y.x/this.scale,y.y/this.scale);0==u?E=b[0]:u==this.state.routedPoints.length-1&&(E=b[b.length-1]);var C=!1;if(null!=n&&1==y.type){var v=this.state.routedPoints[u+1],y=v.x/this.scale-E.x,v=v.y/this.scale-E.y,y=y*y+v*v;null==t&&(t=new mxPoint(E.x-n.x,E.y-n.y),x=Math.sqrt(t.x*t.x+t.y*t.y),0<x?(t.x=t.x*e/x,t.y=t.y*e/x):t=null);y>e*e&&0<x&&(y=n.x-
+E.x,v=n.y-E.y,y=y*y+v*v,y>e*e&&(C=new mxPoint(E.x-t.x,E.y-t.y),y=new mxPoint(E.x+t.x,E.y+t.y),m.push(C),this.addPoints(a,m,d,c,!1,null,l),m=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,l=!1,"sharp"==p?(a.lineTo(C.x-t.y*m,C.y+t.x*m),a.lineTo(y.x-t.y*m,y.y+t.x*m),a.lineTo(y.x,y.y)):"arc"==p?(m*=1.3,a.curveTo(C.x-t.y*m,C.y+t.x*m,y.x-t.y*m,y.y+t.x*m,y.x,y.y)):(a.moveTo(y.x,y.y),l=!0),m=[y],C=!0))}else t=null;C||(m.push(E),n=E)}this.addPoints(a,m,d,c,!1,null,l);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,c){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,c);var f=this.getNextPoint(a,d,c),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var x=Math.cos(-l),k=Math.sin(-l),f=mxUtils.getRotatedPoint(f,x,k,n);x=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);x+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==l&&e,x);0!=l&&(x=Math.cos(l),k=Math.sin(l),f=mxUtils.getRotatedPoint(f,x,k,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
+a[f]);if(null!=g){var n=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||n<c)d=g,c=n}}null!=d&&(e=d)}return e};var q=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var d=b.substring(8,b.length-1),c=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(c.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m=
+mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(q){null!=window.console&&console.log("error in getStencil:",k,q)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
 mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,d){var m=mxStencilRegistry.packages[a];if(null!=e&&e||null==m){var k=!1;if(null==m)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(d){null!=d&&null!=d.documentElement&&(mxStencilRegistry.packages[a]=d,k=!0,mxStencilRegistry.parseStencilSet(d.documentElement,b,k))}));return}m=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=m;k=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=m&&null!=
-m.documentElement&&mxStencilRegistry.parseStencilSet(m.documentElement,b,k)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,m="";a=a.getAttribute("name");for(null!=a&&(m=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var m=m.toLowerCase(),k=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(m+k.toLowerCase(),new mxStencil(d));if(null!=b){var q=d.getAttribute("w"),
-u=d.getAttribute("h"),q=null==q?80:parseInt(q,10),u=null==u?80:parseInt(u,10);b(m,k,a,q,u)}}d=d.nextSibling}}};
-"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,c){switch(c){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
+mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var m=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,m=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
+k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(c));if(null!=b){var q=c.getAttribute("w"),
+u=c.getAttribute("h"),q=null==q?80:parseInt(q,10),u=null==u?80:parseInt(u,10);b(k,m,a,q,u)}}c=c.nextSibling}}};
+"undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,d){switch(d){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR=
 "#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=
 !0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var e=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||e.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=
-!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=this.graph.currentEdgeStyle[c];return a};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=d.apply(this,arguments);a.isDashed="1"==
-this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var m=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=m.apply(this,arguments),c=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",
+!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[d];return a};var c=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var a=c.apply(this,arguments);a.isDashed="1"==
+this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return a};mxConnectionHandler.prototype.updatePreview=function(a){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=k.apply(this,arguments),d=a.getCell;a.getCell=mxUtils.bind(this,function(a){var b=d.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",
 orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&(a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&
 (a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&
 (a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+
-"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,c){c=null!=c?c:{};for(var b=0;b<a.length;b++){var d=a[b];c[mxObjectIdentity.get(d)]=d.getId();for(var f=this.model.getChildCount(d),e=0;e<f;e++)this.createCellLookup([this.model.getChildAt(d,e)],c)}return c};Graph.prototype.createCellMapping=function(a,c,b){b=null!=b?b:{};for(var d in a){var f=c[d];null==b[f]&&(b[f]=a[d].getId()||"")}return b};
-Graph.prototype.importGraphModel=function(a,c,b,d){c=null!=c?c:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var v=this.model.getChildren(this.moveCells([l[e]],c,b,!1,this.model.getRoot())[0]);null!=v&&
-(a=a.concat(v))}else a=this.moveCells(e.getChildren(l[0]),c,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,n,g),this.updateCustomLinks(g,a),d)){this.isGridEnabled()&&(c=this.snap(c),b=this.snap(b));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,c-p.x,b-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var c={},b=this.cloneCells(a,null,c),d=new mxDictionary,
-f=0;f<a.length;f++)d.put(a[f],!0);for(f=0;f<b.length;f++){var e=this.view.getState(a[f]);if(null!=e){var g=this.getCellGeometry(b[f]);null==g||!g.relative||this.model.isEdge(a[f])||d.get(this.model.getParent(a[f]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}d=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(f=0;f<b.length;f++)e.add(g,b[f]);this.updateCustomLinks(this.createCellMapping(c,this.createCellLookup(a)),b);return d.encode(e)};
-var k=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,c,b,d,f,e,g){g=null!=g?g:{};var l=k.apply(this,arguments);d&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};Graph.prototype.updateCustomLinks=function(a,c){for(var b=0;b<c.length;b++)null!=c[b]&&this.updateCustomLinksForCell(a,c[b])};Graph.prototype.updateCustomLinksForCell=function(a,c){};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,
-"points",null);if(null!=b){var d=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];d.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(ma){}return d}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;f=a.shape.bounds;b=a.shape.scale;d=f.width/b;f=f.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=d,d=f,f=e;b=a.shape.getConstraints(a.style,d,f);if(null!=b)return b;if(null!=
-a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.getCurrentCellStyle(a),c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a])}};Graph.prototype.isValidRoot=function(a){for(var c=
-this.model.getChildCount(a),b=0,d=0;d<c;d++){var f=this.model.getChildAt(a,d);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(c,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(c,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=
-mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=
-c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a,c){var b=this.getModel(),d=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var n=b.getGeometry(e);if(null!=n){n=n.clone();null!=n.points&&n.points.reverse();var v=n.getTerminalPoint(!0),p=n.getTerminalPoint(!1);n.setTerminalPoint(v,
-!1);n.setTerminalPoint(p,!0);b.setGeometry(e,n);var t=this.view.getState(e),x=this.view.getState(g),k=this.view.getState(l);if(null!=t){var m=null!=x?this.getConnectionConstraint(t,x,!0):null,D=null!=k?this.getConnectionConstraint(t,k,!1):null;this.setConnectionConstraint(e,g,!0,D);this.setConnectionConstraint(e,l,!1,m)}d.push(e)}}else if(b.isVertex(e)&&(n=this.getCellGeometry(e),null!=n)){n=n.clone();n.x+=n.width/2-n.height/2;n.y+=n.height/2-n.width/2;var I=n.width;n.width=n.height;n.height=I;b.setGeometry(e,
-n);var A=this.view.getState(e);if(null!=A){var z=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],fa=mxUtils.getValue(A.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,z[mxUtils.mod(mxUtils.indexOf(z,fa)+(c?-1:1),z.length)],[e])}d.push(e)}}}finally{b.endUpdate()}return d};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=
-a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var c=0;c<a.length;c++){var b=this.view.getState(a[c]);
-null!=b&&null!=b.shape&&null!=b.shape.stencil&&this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(a[c]):this.isReplacePlaceholders(a[c])&&this.view.invalidate(a[c],!1,!1)}};Graph.prototype.replaceElement=function(a,c){for(var b=a.ownerDocument.createElement(null!=c?c:"span"),d=Array.prototype.slice.call(a.attributes);attr=d.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,c){if(null!=
-a)for(var b=a.getElementsByTagName("*"),d=0;d<b.length;d++)c(b[d])};Graph.prototype.updateLabelElements=function(a,c,b){a=null!=a?a:this.getSelectionCells();for(var d=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){d.innerHTML=e;for(var g=d.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)c(g[l]);d.innerHTML!=e&&this.cellLabelChanged(a[f],d.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,c,b){c=
-Graph.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(d)){this.setAttributeForCell(f,d,c);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};
-Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var c=new mxDictionary,b=0;b<a.length;b++)c.put(a[b],!0);for(var d=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||c.get(f)||(c.put(f,!0),d.push(f))}for(b=0;b<d.length;b++)if(f=this.view.getState(d[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)&&this.isTransparentState(f)){for(var e=!0,g=0;g<this.model.getChildCount(f.cell)&&e;g++)c.get(this.model.getChildAt(f.cell,g))||(e=
-!1);e&&a.push(f.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)this.isCellDeletable(a[b])&&this.isTransparentState(this.view.getState(a[b]))&&c.push(a[b]);a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.getAttributeForCell=
-function(a,c,b){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(c):null;return null!=a?a:b};Graph.prototype.setAttributeForCell=function(a,c,b){var d;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;
-for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?
-this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=f||null!=d&&null!=d.text&&null!=d.text.node&&null!=d.text.boundingBox&&(mxUtils.contains(d.text.boundingBox,b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(null==d&&(d=this.view.getState(this.getCellAt(b.x,
-b.y))),c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,
-c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/
-2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b&&this.model.isEdge(b.cell)){d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-
-f.x-(null!=b?b.origin.x:0),d.geometry.y=Math.round(c/this.view.scale)-f.y-(null!=b?b.origin.y:0),d.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));
-null!=d&&(a[b].setAttribute("rel",this.linkRelation),a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,d);d();var f=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var c=a.sourceState;if(null==c||null==g.getLinkForCell(c.cell))a=
-g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,function(a,c,b){return null==g.getLinkForCell(a.cell)}),c=g.view.getState(a);c!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=c,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor=
-"move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(c,!0,this.currentState),(null==this.currentState||c.getState()!=this.currentState&&null!=c.sourceState||
-!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c))}},mouseUp:function(a,d){for(var f=d.getSource(),l=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.sourceState||!d.isSource(d.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=
-this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,l),d.consume())):null!=b&&!d.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=
-g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,
-c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],d,d,!1)[0];f.push(n);if(c)b.add(l,e[g]);else{var v=l.getIndex(a[g]);b.add(l,e[g],v+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a&&null!=this.cellEditor.textarea){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),
-f=[],e=0;e<d.length;e++)f.push(d[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var c=this.cellEditor.textarea.getElementsByTagName("a"),b=[],d=0;d<c.length;d++)b.push(c[d]);
-document.execCommand("createlink",!1,mxUtils.trim(a));c=this.cellEditor.textarea.getElementsByTagName("a");if(c.length==b.length+1)for(d=c.length-1;0<=d;d--)if(c[d]!=b[d-1]){for(c=c[d].getElementsByTagName("a");0<c.length;){for(b=c[0].parentNode;null!=c[0].firstChild;)b.insertBefore(c[0].firstChild,c[0]);b.removeChild(c[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=
-this.getCurrentCellStyle(a);return!this.isTableCell(a)&&!this.isTableRow(a)&&(c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,f=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var g=this.view.getState(c[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),d=null!=d?Math.max(d,l):l,f=null!=f?Math.min(f,l):
-l;b.push(g)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);d=d/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(d-f)/(b.length-1),d=f,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),d=d+n;null!=p&&null!=v&&(p=p.clone(),a?p.x=Math.round(d-p.width/2)-v.origin.x:p.y=Math.round(d-p.height/2)-v.origin.y,this.getModel().setGeometry(b[e].cell,p))}}finally{this.getModel().endUpdate()}}}return c};
-Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,b,d,f,e,g,l,n,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:
-!0;g=null!=g?g:!0;var t=e||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,k=mxUtils.createXmlDocument(),m=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=m.style?m.style.backgroundColor=a:m.setAttribute("style","background-color:"+a));null==k.createElementNS?(m.setAttribute("xmlns",mxConstants.NS_SVG),m.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):
-m.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/x;var D=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),I=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);m.setAttribute("version","1.1");m.setAttribute("width",D+"px");m.setAttribute("height",I+"px");m.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+D+" "+I);k.appendChild(m);var A=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");m.appendChild(A);var z=this.createSvgCanvas(A);
-z.foOffset=f?-.5:0;z.textOffset=f?-.5:0;z.imageOffset=f?-.5:0;z.translate(Math.floor((b/c-t.x)/x),Math.floor((b/c-t.y)/x));var H=document.createElement("div"),u=z.getAlternateText;z.getAlternateText=function(a,c,b,d,f,e,g,l,n,v,p,t,x){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(H.innerHTML=e,e=mxUtils.extractTextWithWhitespace(H.childNodes));for(var k=Math.ceil(2*d/this.state.fontSize),ga=[],Na=0,m=0;(0==k||Na<k)&&m<e.length;){var Oa=e.charCodeAt(m);if(10==Oa||13==Oa){if(0<
-Na)break}else ga.push(e.charAt(m)),255>Oa&&Na++;m++}ga.length<e.length&&1<e.length-ga.length&&(e=mxUtils.trim(ga.join(""))+"...");return e}catch(Ua){return u.apply(this,arguments)}else return u.apply(this,arguments)};var L=this.backgroundImage;if(null!=L){c=x/c;var C=this.view.translate,E=new mxRectangle(C.x*c,C.y*c,L.width*c,L.height*c);mxUtils.intersects(t,E)&&z.image(C.x,C.y,L.width,L.height,L.src,!0)}z.scale(a);z.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var M=l.drawCellState,q=l.getLinkForCellState;
-l.getLinkForCellState=function(a,c){var b=q.apply(this,arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,c){for(var b=a.view.graph,d=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!d&&null!=f;)d=b.isCellSelected(f),f=b.model.getParent(f);(e||d)&&M.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),z);this.updateSvgLinks(m,n,!0);this.addForeignObjectWarning(z,m);return m}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),
-this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),d=a.createElement("g");d.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var f=a.createElement("a");f.setAttribute("transform","translate(0,-5)");null==f.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(f.setAttribute("xlink:href",Graph.foreignObjectWarningLink),f.setAttribute("target",
-"_blank")):(f.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),f.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);b.appendChild(d);f.appendChild(e);b.appendChild(f);c.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,c,b){a=a.getElementsByTagName("a");
-for(var d=0;d<a.length;d++){var f=a[d].getAttribute("href");null==f&&(f=a[d].getAttribute("xlink:href"));null!=f&&(null!=c&&/^https?:\/\//.test(f)?a[d].setAttribute("target",c):b&&this.isCustomLink(f)&&a[d].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&
-(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,b){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var b=document.createRange();b.selectNode(a);
-c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertTableColumn=function(a,c){var b=this.getModel();b.beginUpdate();try{var d=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),d=b.getParent(e),f=e.getIndex(a);else this.isTableRow(a)&&(d=b.getParent(a)),c||(f=b.getChildCount(b.getChildAt(d,0))-1);for(var g=0;g<b.getChildCount(d);g++){var e=b.getChildAt(d,
-g),l=b.getChildAt(e,f),n=b.cloneCell(l),v=this.getCellGeometry(n);n.value=null;if(null!=v){v.width=Graph.minTableColumnWidth;var p=this.getCellGeometry(e);null!=p&&(v.height=p.height)}b.add(e,n,f+(c?0:1))}var t=this.getCellGeometry(d);null!=t&&(t=t.clone(),t.width+=Graph.minTableColumnWidth,b.setGeometry(d,t))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var b=this.getModel();b.beginUpdate();try{var d=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),d=b.getParent(e),f=d.getIndex(e);
-else this.isTableRow(a)?(d=b.getParent(a),f=d.getIndex(a)):c||(f=b.getChildCount(d)-1);e=b.cloneCell(b.getChildAt(d,f));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<b.getChildCount(e);l++){a=b.getChildAt(e,l);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=g.height)}b.add(d,e,f+(c?0:1));var v=this.getCellGeometry(d);null!=v&&(v=v.clone(),v.height+=g.height,b.setGeometry(d,v))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=
-function(a){var c=this.getModel();c.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var f=c.getParent(a),b=c.getParent(f),d=f.getIndex(a);else this.isTableRow(a)?(b=c.getParent(a),d=c.getChildCount(a)-1):this.isTable(a)&&(d=c.getChildCount(c.getChildAt(a,0))-1);for(var e=a=0;e<c.getChildCount(b);e++){var f=c.getChildAt(b,e),g=c.getChildAt(f,d);c.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.width-=a,c.setGeometry(b,
-n))}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var b=a;this.isTableCell(a)?b=c.getParent(a):this.isTable(a)&&(b=c.getChildAt(a,c.getChildCount(a)-1));var d=c.getParent(b);c.remove(b);a=0;var f=this.getCellGeometry(b);null!=f&&(a=f.height);var e=this.getCellGeometry(d);null!=e&&(e=e.clone(),e.height-=a,c.setGeometry(d,e))}finally{c.endUpdate()}};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=b.rows[0].cells,f=0,e=0;e<
-d.length;e++)var g=d[e].getAttribute("colspan"),f=f+(null!=g?parseInt(g):1);b=b.insertRow(c);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=
-c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&
-"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){function b(a,c){a.length>c&&(a=a.substring(0,Math.round(c/2))+"..."+a.substring(a.length-Math.round(c/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==c||0==c.length)c=this.isCustomLink(a)?this.getLinkTitle(a):a;var d=document.createElement("a");d.setAttribute("rel",this.linkRelation);d.setAttribute("href",this.getAbsoluteUrl(a));d.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):
-a,80));null!=this.linkTarget&&d.setAttribute("target",this.linkTarget);mxUtils.write(d,b(c,40));this.isCustomLink(a)&&mxEvent.addListener(d,"click",mxUtils.bind(this,function(c){this.customLinkClicked(a);mxEvent.consume(c)}));return d};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=
-function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,
-e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&
-this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,c){var b=null!=c&&mxEvent.isShiftDown(c);if(b||null!=window.getSelection&&
-null!=window.getSelection().containsNode){var d=!0;this.graph.processElements(this.textarea,function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):d=!1});d&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var c=[],b=0,d=a.rangeCount;b<d;++b)c.push(a.getRangeAt(b));return c}}else if(document.selection&&
-document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(ca){}};var q=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br",
-"1"));q.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){y.apply(this,
-arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||
-mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=
-a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),
-a.removeAttribute("border"))):a.parentNode.removeChild(a)}B.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?b(this.textarea,d):Graph.removePasteFormatting(this.textarea))}),
-0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);if(null!=a){var c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(c?n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,
-mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
-l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=
-c;this.textarea.style.textAlign=f;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||
-(n=mxUtils.replaceTrailingNewlines(n,"<div><br></div>"));n=this.graph.sanitizeHtml(c?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle=
-"";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var c=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),
-this.codeViewMode&&null!=a){var d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=
-Math.round((this.bounds.width-4)/d)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/d)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/d)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*d);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/d)+(this.textarea.offsetWidth-
-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*d);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=d:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+d+","+d+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
-function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(fa){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
-c){this.graph.getModel().beginUpdate();try{g.apply(this,arguments),""==c&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=c&&c!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
-mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,e){mxEvent.isAltDown(e)&&(f=null);p.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
-function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(c){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var d=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-d.x);d=this.roundLength((this.bounds.y+this.currentDy)/f-d.y);f=this.graph.view.unit;this.hint.innerHTML=b(c,f)+", "+b(d,f);this.hint.style.left=this.pBounds.x+this.currentDx+
-Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var l=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){b.get(a)||(b.put(a,!0),f.push(a))}for(var c=l.apply(this,arguments),b=
-new mxDictionary,d=this.graph.model,f=[],e=0;e<c.length;e++){var g=c[e];this.graph.isTableCell(g)?a(d.getParent(d.getParent(g))):this.graph.isTableRow(g)&&a(d.getParent(g));a(g)}return f};var n=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var c=n.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var x=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var c=
-x.apply(this,arguments);c.stroke="#C0C0C0";c.strokewidth=1;return c};var A=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(!this.graph.isCellResizable(this.state.cell)||this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:A.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=
--12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(c.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&
-!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var t=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return t.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=
-function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var G=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return G.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var z=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
-function(a){return a.tableHandle||z.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var E=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=E.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var C=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
-function(){var a=C.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var c=this.graph,b=c.model,d=c.getActualStartSize(this.state.cell),f=b.getChildAt(this.state.cell,0),e=this.state;null==a&&(a=[]);for(var g=0;g<b.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(d){if(null!=d&&b.isVertex(d.cell)){var f=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);d=new mxHandle(d,"row-resize",null,f);d.tableHandle=!0;var e=0;d.shape.node.parentNode.insertBefore(d.shape.node,
-d.shape.node.parentNode.firstChild);d.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+e,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};d.setPosition=function(a,c,b){e=c.y-a.y-a.height};d.execute=function(){c.updateTableRowHeight(this.state.cell,e);e=0};a.push(d)}})(this.graph.view.getState(b.getChildAt(this.state.cell,g)));for(g=
-0;g<b.getChildCount(f)-1;g++)mxUtils.bind(this,function(c){if(null!=c){var b=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);c=new mxHandle(c,"col-resize",null,b);c.tableHandle=!0;var f=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+f,this.shape.bounds.width=1,this.shape.bounds.y=e.y+d.y,this.shape.bounds.height=e.height-d.y-
-d.height,this.shape.redraw())};c.setPosition=function(a,c,b){f=c.x-a.x-a.width};c.execute=function(){var a=this.graph.model.getGeometry(this.state.cell);this.graph.setTableColumnWidth(this.state.cell,a.width+f);f=0};a.push(c)}})(this.graph.view.getState(b.getChildAt(f,g)))}return a};var v=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){v.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.visibility=a?"":"hidden")};mxVertexHandler.prototype.refresh=
-function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())};mxVertexHandler.prototype.isTableHandler=function(){return this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTable(this.state.cell)};var I=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance,
-b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.getStencil(b);b=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!b&&null!=this.customHandles)for(var d=0;d<this.customHandles.length;d++)if(null!=this.customHandles[d].shape&&null!=this.customHandles[d].shape.bounds){var f=this.customHandles[d].shape.bounds,e=f.getCenterX(),g=f.getCenterY();if(Math.abs(this.state.x-e)<f.width/2||Math.abs(this.state.y-g)<f.height/2||Math.abs(this.state.x+
-this.state.width-e)<f.width/2||Math.abs(this.state.y+this.state.height-g)<f.height/2){b=!0;break}}b&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=I.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=
-this.currentAlpha+"&deg;";else{c=this.state.view.scale;var d=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/c),d)+" x "+b(this.roundLength(this.bounds.height/c),d)}c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==c&&(c=this.bounds);this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=c.y+c.height+Editor.hintOffset+"px";null!=this.linkHint&&
-(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var L=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,c){L.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var H=mxEdgeHandler.prototype.mouseUp;
-mxEdgeHandler.prototype.mouseUp=function(a,c){H.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(c,d){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(d.x/e-f.x),f=this.roundLength(d.y/e-f.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(f,e);this.hint.style.visibility=
-"visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),d.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
-"none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",
-17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):
-new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
-24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=
-HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;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);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,
-(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=
-!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=
-function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=
-function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};var N=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){N.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=
-a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&
-(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,c){if(this.cancelled)this.cancelled=!1,c.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,d=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,e=(this.currentX-d)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<
-this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(d,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var n=
-this.graph.view.getState(l[b]),v=this.graph.getCellGeometry(l[b]);null!=n&&null!=v&&(v=v.clone(),v.translate(e,g),this.graph.model.setGeometry(l[b],v))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;
-var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
-0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
-this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),c.consume()}};var D=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);D.apply(this,arguments)};var M=(new Date).getTime(),P=0,R=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){R.apply(this,arguments);b!=this.currentTerminalState?(M=(new Date).getTime(),P=0):P=(new Date).getTime()-M;this.currentTerminalState=
-b};var ba=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<P||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ba.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,c){var b=
-null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;
-this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var X=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return X.apply(this,arguments)};var F=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return F.apply(this,arguments)};var T=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=T.apply(this,arguments),c=[],b=0;b<a.length;b++)"1"!=
-mxUtils.getValue(a[b].style,"part","0")&&c.push(a[b]);return c};var ja=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):
-ja.apply(this,arguments)};var ka=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ka.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,
-mxConstants.NONE),c=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&c==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var la=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,
-c){la.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var ea=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){ea.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
-"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var V=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){V.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));
-null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor="pointer",this.rowMoveHandle.style.width="24px",this.rowMoveHandle.style.height="24px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=
-!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var c=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){try{if(null==c&&(null==b||0==b.length)||
-1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=
-document.createElement("img");d.setAttribute("src",Editor.editImage);d.setAttribute("title",mxResources.get("editLink"));d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);
-f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var e=document.createElement("div");e.style.marginTop=null!=c||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),
-mxUtils.getTextContent(b[d])));this.linkHint.appendChild(e)}}}catch(J){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var U=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){U.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");
-null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
-b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var Y=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ha=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=
-this.rowState.x+this.rowState.width+"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ha.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-
-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/
-2+Editor.hintOffset)+"px"}};var Z=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Z.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var aa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(aa.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){O.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var K=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){K.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function k(){mxActor.call(this)}function q(){mxCylinder.call(this)}function u(){mxActor.call(this)}function y(){mxActor.call(this)}function B(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function l(a,c){this.canvas=
-a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function G(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function v(){mxShape.call(this)}function I(){mxShape.call(this)}
-function L(){mxEllipse.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function M(){mxShape.call(this)}function P(){mxShape.call(this)}function R(){mxShape.call(this)}function ba(){mxShape.call(this)}function X(){mxShape.call(this)}function F(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function ja(){mxRectangleShape.call(this)}function ka(){mxDoubleEllipse.call(this)}function la(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
-this.spacing=0}function V(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function Y(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function O(){mxActor.call(this)}function K(){mxActor.call(this)}function fa(){mxActor.call(this)}function Q(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function qa(){mxActor.call(this)}function J(){mxEllipse.call(this)}
-function ma(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ia(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function oa(){mxActor.call(this)}function sa(){mxActor.call(this)}function ta(){mxActor.call(this)}function na(){mxConnector.call(this)}function Ba(a,c,b,d,f,e,g,l,n,v){g+=n;var ga=d.clone();d.x-=f*(2*g+n);d.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(ga.x-
-f-g,ga.y-e-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ga=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
-a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-e,0);a.lineTo(d,e);a.lineTo(d,f);a.lineTo(e,f);a.lineTo(0,f-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(d-e,0),a.lineTo(d,e),a.lineTo(e,e),a.close(),a.fill()),0!=ga&&(a.setFillAlpha(Math.abs(ga)),a.setFillColor(0>ga?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,f),a.lineTo(0,f-
-e),a.close(),a.fill()),a.begin(),a.moveTo(e,f),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(d,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Da=Math.tan(mxUtils.toRadians(30)),pa=(.5-Da)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=
-Math.min(d,f/Da);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*pa);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-pa)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(d,f/(.5+Da));e?(a.moveTo(0,.25*c),a.lineTo(.5*c,(.5-pa)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-pa)*c),a.lineTo(.5*c,(1-pa)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*
-c,c*pa),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-pa)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,e){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),
-a.curveTo(0,2*c,d,2*c,d,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(m,mxCylinder);m.prototype.size=30;m.prototype.darkOpacity=0;m.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.max(0,
-Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(c,b);a.begin();a.moveTo(0,0);a.lineTo(d-e,0);a.lineTo(d,e);a.lineTo(d,f);a.lineTo(0,f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(d-e,0),a.lineTo(d-e,e),a.lineTo(d,e),a.close(),
-a.fill()),a.begin(),a.moveTo(d-e,0),a.lineTo(d-e,e),a.lineTo(d,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",m);mxUtils.extend(k,mxActor);k.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",k);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.redrawPath=function(a,c,b,d,
-f,e){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==g?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,
-b),a.close());a.end()};mxCellRenderer.registerShape("folder",q);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);
-a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(y,mxActor);y.prototype.size=.4;y.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};y.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",
-!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+c,a.y,b-2*c,d)}return a};mxCellRenderer.registerShape("tape",y);mxUtils.extend(B,mxActor);B.prototype.size=.3;B.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*a.height):null};B.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.registerShape("document",B);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,c,b,d){var f=mxUtils.getValue(this.style,"size");return null!=
-f?d*Math.max(0,Math.min(1,f)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*c),0,0)}return null};mxUtils.extend(c,mxActor);c.prototype.size=.2;c.prototype.isRoundable=function(){return!0};c.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",c);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(g,mxActor);g.prototype.size=.5;g.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",p);l.prototype.moveTo=
-function(a,c){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};l.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};l.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};l.prototype.curveTo=function(a,c,b,d,f,e){this.originalCurveTo.apply(this.canvas,
-arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,c,b,d,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};l.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),e=Math.sqrt(d*d+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var g=Math.round(e/10),l=this.defaultVariation;
-5>g&&(g=5,l/=3);for(var ga=b(a-this.lastX)*d/g,b=b(c-this.lastY)*f/g,d=d/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ga*e+this.lastX-n*f,b*e+this.lastY-n*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,d){d=null!=d?d:{};for(var b=0;b<a.length;b++){var c=a[b];d[mxObjectIdentity.get(c)]=c.getId();for(var f=this.model.getChildCount(c),e=0;e<f;e++)this.createCellLookup([this.model.getChildAt(c,e)],d)}return d};Graph.prototype.createCellMapping=function(a,d,b){b=null!=b?b:{};for(var c in a){var f=d[c];null==b[f]&&(b[f]=a[c].getId()||"")}return b};
+Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var v=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=v&&
+(a=a.concat(v))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,n,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var p=this.getBoundingBoxFromGeometry(a,!0);null!=p&&this.moveCells(a,d-p.x,b-p.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary,
+f=0;f<a.length;f++)c.put(a[f],!0);for(f=0;f<b.length;f++){var e=this.view.getState(a[f]);if(null!=e){var g=this.getCellGeometry(b[f]);null==g||!g.relative||this.model.isEdge(a[f])||c.get(this.model.getParent(a[f]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(f=0;f<b.length;f++)e.add(g,b[f]);this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(a)),b);return c.encode(e)};
+var m=Graph.prototype.selectCell;Graph.prototype.selectCell=function(a,d,b){if(d||b)m.apply(this,arguments);else{var c=this.getSelectionCell(),f=null,e=[],g=mxUtils.bind(this,function(d){if(null!=this.view.getState(d)&&(this.model.isVertex(d)||this.model.isEdge(d)))if(e.push(d),d==c)f=e.length-1;else if(a&&null==c&&0<e.length||null!=f&&a&&e.length>f||!a&&0<f)return;for(var b=0;b<this.model.getChildCount(d);b++)g(this.model.getChildAt(d,b))});g(this.model.root);0<e.length&&(f=null!=f?mxUtils.mod(f+
+(a?1:-1),e.length):0,this.setSelectionCell(e[f]))}};var q=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,d,b,c,f,e,g){g=null!=g?g:{};var l=q.apply(this,arguments);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};var u=Graph.prototype.removeCells;Graph.prototype.removeCells=function(a,d){var b=[];this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.isTableCell(a[c])||this.isTableRow(a[c])?this.labelChanged(a[c],""):b.push(a[c]);b=u.apply(this,
+[b,d])}finally{this.model.endUpdate()}return b};Graph.prototype.updateCustomLinks=function(a,d){for(var b=0;b<d.length;b++)null!=d[b]&&this.updateCustomLinksForCell(a,d[b])};Graph.prototype.updateCustomLinksForCell=function(a,d){};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:
+!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(fa){}return c}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;f=a.shape.bounds;b=a.shape.scale;c=f.width/b;f=f.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=c,c=f,f=e;b=a.shape.getConstraints(a.style,c,f);if(null!=b)return b;if(null!=a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=
+function(a){if(null!=a){var d=this.getCurrentCellStyle(a),d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a])}};Graph.prototype.isValidRoot=function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};
+Graph.prototype.isValidDropTarget=function(a){var d=this.getCurrentCellStyle(a);return("1"!=mxUtils.getValue(d,"part","0")||this.isContainer(a))&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,
+arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();
+try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var n=b.getGeometry(e);if(null!=n){n=n.clone();null!=n.points&&n.points.reverse();var v=n.getTerminalPoint(!0),p=n.getTerminalPoint(!1);n.setTerminalPoint(v,!1);n.setTerminalPoint(p,!0);b.setGeometry(e,n);var t=this.view.getState(e),x=this.view.getState(g),k=this.view.getState(l);if(null!=t){var m=null!=x?this.getConnectionConstraint(t,x,!0):null,D=
+null!=k?this.getConnectionConstraint(t,k,!1):null;this.setConnectionConstraint(e,g,!0,D);this.setConnectionConstraint(e,l,!1,m)}c.push(e)}}else if(b.isVertex(e)&&(n=this.getCellGeometry(e),null!=n)){n=n.clone();n.x+=n.width/2-n.height/2;n.y+=n.height/2-n.width/2;var H=n.width;n.width=n.height;n.height=H;b.setGeometry(e,n);var y=this.view.getState(e);if(null!=y){var Q=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],A=mxUtils.getValue(y.style,
+mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Q[mxUtils.mod(mxUtils.indexOf(Q,A)+(d?-1:1),Q.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);
+a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value&&this.invalidateDescendantsWithPlaceholders(a.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(a){a=this.model.getDescendants(a);if(0<a.length)for(var d=0;d<a.length;d++){var b=this.view.getState(a[d]);null!=b&&null!=b.shape&&null!=b.shape.stencil&&this.stencilHasPlaceholders(b.shape.stencil)?this.removeStateForCell(a[d]):this.isReplacePlaceholders(a[d])&&this.view.invalidate(a[d],!1,!1)}};
+Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,d){if(null!=a)for(var b=a.getElementsByTagName("*"),c=0;c<b.length;c++)d(b[c])};Graph.prototype.updateLabelElements=function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),
+f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)d(g[l]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=Graph.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var c=a.getAttribute("placeholder"),
+f=a;null!=f;){if(f==this.model.getRoot()||null!=f.value&&"object"==typeof f.value&&f.hasAttribute(c)){this.setAttributeForCell(f,c,d);break}f=this.model.getParent(f)}var e=a.value.cloneNode(!0);e.setAttribute("label",d);d=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(a){if(null!=a){for(var d=new mxDictionary,b=0;b<a.length;b++)d.put(a[b],!0);for(var c=[],b=0;b<a.length;b++){var f=this.model.getParent(a[b]);null==f||
+d.get(f)||(d.put(f,!0),c.push(f))}for(b=0;b<c.length;b++)if(f=this.view.getState(c[b]),null!=f&&(this.model.isEdge(f.cell)||this.model.isVertex(f.cell))&&this.isCellDeletable(f.cell)&&this.isTransparentState(f)){for(var e=!0,g=0;g<this.model.getChildCount(f.cell)&&e;g++)d.get(this.model.getChildAt(f.cell,g))||(e=!1);e&&a.push(f.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(a){for(var d=[],b=0;b<a.length;b++)this.isCellDeletable(a[b])&&
+this.isTransparentState(this.view.getState(a[b]))&&d.push(a[b]);a=d;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,d){this.setAttributeForCell(a,"link",d)};Graph.prototype.setTooltipForCell=function(a,d){this.setAttributeForCell(a,"tooltip",d)};Graph.prototype.getAttributeForCell=function(a,d,b){a=null!=a.value&&"object"===typeof a.value?a.value.getAttribute(d):null;return null!=a?a:b};Graph.prototype.setAttributeForCell=function(a,d,b){var c;
+null!=a.value&&"object"==typeof a.value?c=a.value.cloneNode(!0):(c=mxUtils.createXmlDocument().createElement("UserObject"),c.setAttribute("label",a.value||""));null!=b?c.setAttribute(d,b):c.removeAttribute(d);this.model.setValue(a,c)};Graph.prototype.getDropTarget=function(a,d,b,c){this.getModel();if(mxEvent.isAltDown(d))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=
+function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,d){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(d)){var c=this.model.isEdge(d)?this.view.getState(d):null,f=mxEvent.getSource(a);this.firstClickState!=c||this.firstClickSource!=f||null!=c&&null!=c.text&&null!=c.text.node&&null!=c.text.boundingBox&&(mxUtils.contains(c.text.boundingBox,
+b.x,b.y)||mxUtils.isAncestorNode(c.text.node,mxEvent.getSource(a)))||(null!=c||this.isCellLocked(this.getDefaultParent()))&&(null==c||this.isCellLocked(c.cell))||!(null!=c||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(null==c&&(c=this.view.getState(this.getCellAt(b.x,b.y))),d=this.addText(b.x,b.y,c))}mxGraph.prototype.dblClick.call(this,a,d)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),d=this.container.scrollLeft/this.view.scale-
+this.view.translate.x,b=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible)var c=this.getPageLayout(),f=this.getPageSize(),d=Math.max(d,c.x*f.width),b=Math.max(b,c.y*f.height);return new mxPoint(this.snap(d+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,d=this.getGraphBounds(),b=this.getInsertPoint(),c=this.snap(Math.round(Math.max(b.x,d.x/a.scale-a.translate.x+(0==d.width?2*this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,
+(d.y+d.height)/a.scale-a.translate.y+2*this.gridSize)));return new mxPoint(c,a)};Graph.prototype.getCenterInsertPoint=function(a){a=null!=a?a:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-a.width/2),this.snap((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-a.height/2)):new mxPoint(this.snap(this.container.clientWidth/2/this.view.scale-
+this.view.translate.x-a.width/2),this.snap(this.container.clientHeight/2/this.view.scale-this.view.translate.y-a.height/2))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,d,b){var c=new mxCell;c.value="Text";c.geometry=new mxGeometry(0,0,0,0);c.vertex=!0;if(null!=b&&this.model.isEdge(b.cell)){c.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";c.geometry.relative=!0;c.connectable=!1;var f=this.view.getRelativePoint(b,a,d);
+c.geometry.x=Math.round(1E4*f.x)/1E4;c.geometry.y=Math.round(f.y);c.geometry.offset=new mxPoint(0,0);var f=this.view.getPoint(b,c.geometry),e=this.view.scale;c.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((d-f.y)/e))}else f=this.view.translate,c.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",c.geometry.width=40,c.geometry.height=20,c.geometry.x=Math.round(a/this.view.scale)-f.x-(null!=b?b.origin.x:0),c.geometry.y=Math.round(d/this.view.scale)-f.y-(null!=
+b?b.origin.y:0),c.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([c],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[c])),this.autoSizeCell(c)}finally{this.getModel().endUpdate()}return c};Graph.prototype.addClickHandler=function(a,d,b){var c=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var c=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=c&&(a[b].setAttribute("rel",this.linkRelation),
+a[b].setAttribute("href",c),null!=d&&mxEvent.addGestureListeners(a[b],null,null,d))}});this.model.addListener(mxEvent.CHANGE,c);c();var f=this.container.style.cursor,e=this.getTolerance(),g=this,l={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){var d=a.sourceState;if(null==d||null==g.getLinkForCell(d.cell))a=g.getCellAt(a.getGraphX(),a.getGraphY(),null,null,null,
+function(a,d,b){return null==g.getLinkForCell(a.cell)}),d=g.view.getState(a);d!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=d,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,d){this.startX=d.getGraphX();this.startY=d.getGraphY();this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(d)},mouseMove:function(a,
+d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-d.getGraphX()),c=Math.abs(this.startY-d.getGraphY());(b>e||c>e)&&this.clear()}}else{for(b=d.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null!=g.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&g.tooltipHandler.reset(d,!0,this.currentState),(null==this.currentState||d.getState()!=this.currentState&&null!=d.sourceState||!g.intersects(this.currentState,d.getGraphX(),
+d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(a,c){for(var f=c.getSource(),l=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),
+"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));
+null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();
+d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];f.push(n);if(d)b.add(l,e[g]);else{var v=l.getIndex(a[g]);b.add(l,e[g],v+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);
+document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),b=[],c=0;c<d.length;c++)b.push(d[c]);document.execCommand("createlink",
+!1,mxUtils.trim(a));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==b.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=b[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(b=d[0].parentNode;null!=d[0].firstChild;)b.insertBefore(d[0].firstChild,d[0]);b.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.getCurrentCellStyle(a);return!this.isTableCell(a)&&
+!this.isTableRow(a)&&(d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,f=null!=f?Math.min(f,l):l;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?
+d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var v=this.view.getState(this.model.getParent(b[e].cell)),p=this.getCellGeometry(b[e].cell),c=c+n;null!=p&&null!=v&&(p=p.clone(),a?p.x=Math.round(c-p.width/2)-v.origin.x:p.y=Math.round(c-p.height/2)-v.origin.y,this.getModel().setGeometry(b[e].cell,p))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=
+function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,n,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||c?
+this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));var x=this.view.scale,k=mxUtils.createXmlDocument(),m=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"svg"):k.createElement("svg");null!=a&&(null!=m.style?m.style.backgroundColor=a:m.setAttribute("style","background-color:"+a));null==k.createElementNS?(m.setAttribute("xmlns",mxConstants.NS_SVG),m.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):m.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:xlink",mxConstants.NS_XLINK);a=d/x;var D=Math.max(1,Math.ceil(t.width*a)+2*b)+(v?5:0),H=Math.max(1,Math.ceil(t.height*a)+2*b)+(v?5:0);m.setAttribute("version","1.1");m.setAttribute("width",D+"px");m.setAttribute("height",H+"px");m.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+D+" "+H);k.appendChild(m);var y=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"g"):k.createElement("g");m.appendChild(y);var A=this.createSvgCanvas(y);A.foOffset=f?-.5:0;A.textOffset=f?-.5:0;A.imageOffset=
+f?-.5:0;A.translate(Math.floor((b/d-t.x)/x),Math.floor((b/d-t.y)/x));var I=document.createElement("div"),u=A.getAlternateText;A.getAlternateText=function(a,d,b,c,f,e,g,l,n,v,p,t,ma){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(I.innerHTML=e,e=mxUtils.extractTextWithWhitespace(I.childNodes));for(var Qa=Math.ceil(2*c/this.state.fontSize),x=[],Na=0,k=0;(0==Qa||Na<Qa)&&k<e.length;){var m=e.charCodeAt(k);if(10==m||13==m){if(0<Na)break}else x.push(e.charAt(k)),255>m&&Na++;k++}x.length<
+e.length&&1<e.length-x.length&&(e=mxUtils.trim(x.join(""))+"...");return e}catch(Ua){return u.apply(this,arguments)}else return u.apply(this,arguments)};var L=this.backgroundImage;if(null!=L){d=x/d;var C=this.view.translate,E=new mxRectangle(C.x*d,C.y*d,L.width*d,L.height*d);mxUtils.intersects(t,E)&&A.image(C.x,C.y,L.width,L.height,L.src,!0)}A.scale(a);A.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var M=l.drawCellState,Q=l.getLinkForCellState;l.getLinkForCellState=function(a,d){var b=Q.apply(this,
+arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&M.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),A);this.updateSvgLinks(m,n,!0);this.addForeignObjectWarning(A,m);return m}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+function(a,d){if(0<d.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var f=a.createElement("a");f.setAttribute("transform","translate(0,-5)");null==f.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(f.setAttribute("xlink:href",Graph.foreignObjectWarningLink),f.setAttribute("target","_blank")):(f.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",
+Graph.foreignObjectWarningLink),f.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);b.appendChild(c);f.appendChild(e);b.appendChild(f);d.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,d,b){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var f=a[c].getAttribute("href");
+null==f&&(f=a[c].getAttribute("xlink:href"));null!=f&&(null!=d&&/^https?:\/\//.test(f)?a[c].setAttribute("target",d):b&&this.isCustomLink(f)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
+return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,d,b){for(;null!=a&&!(0<=mxUtils.indexOf(d,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&
+"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertTableColumn=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=e.getIndex(a);else this.isTableRow(a)&&(c=b.getParent(a)),d||(f=b.getChildCount(b.getChildAt(c,0))-1);for(var g=0;g<b.getChildCount(c);g++){var e=b.getChildAt(c,g),l=b.getChildAt(e,f),n=b.cloneCell(l),v=this.getCellGeometry(n);
+n.value=null;if(null!=v){v.width=Graph.minTableColumnWidth;var p=this.getCellGeometry(e);null!=p&&(v.height=p.height)}b.add(e,n,f+(d?0:1))}var t=this.getCellGeometry(c);null!=t&&(t=t.clone(),t.width+=Graph.minTableColumnWidth,b.setGeometry(c,t))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=c.getIndex(e);else this.isTableRow(a)?(c=b.getParent(a),f=c.getIndex(a)):
+d||(f=b.getChildCount(c)-1);e=b.cloneCell(b.getChildAt(c,f));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<b.getChildCount(e);l++){a=b.getChildAt(e,l);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=g.height)}b.add(c,e,f+(d?0:1));var v=this.getCellGeometry(c);null!=v&&(v=v.clone(),v.height+=g.height,b.setGeometry(c,v))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var d=this.getModel();d.beginUpdate();try{var b=
+a,c=0;if(this.isTableCell(a))var f=d.getParent(a),b=d.getParent(f),c=f.getIndex(a);else this.isTableRow(a)?(b=d.getParent(a),c=d.getChildCount(a)-1):this.isTable(a)&&(c=d.getChildCount(d.getChildAt(a,0))-1);for(var e=a=0;e<d.getChildCount(b);e++){var f=d.getChildAt(b,e),g=d.getChildAt(f,c);d.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.width-=a,d.setGeometry(b,n))}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=
+function(a){var d=this.getModel();d.beginUpdate();try{var b=a;this.isTableCell(a)?b=d.getParent(a):this.isTable(a)&&(b=d.getChildAt(a,d.getChildCount(a)-1));var c=d.getParent(b);d.remove(b);a=0;var f=this.getCellGeometry(b);null!=f&&(a=f.height);var e=this.getCellGeometry(c);null!=e&&(e=e.clone(),e.height-=a,d.setGeometry(c,e))}finally{d.endUpdate()}};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=b.rows[0].cells,f=0,e=0;e<c.length;e++)var g=c[e].getAttribute("colspan"),f=f+(null!=
+g?parseInt(g):1);b=b.insertRow(d);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
+function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};
+Graph.prototype.createLinkForHint=function(a,d){function b(a,d){a.length>d&&(a=a.substring(0,Math.round(d/2))+"..."+a.substring(a.length-Math.round(d/4)));return a}a=null!=a?a:"javascript:void(0);";if(null==d||0==d.length)d=this.isCustomLink(a)?this.getLinkTitle(a):a;var c=document.createElement("a");c.setAttribute("rel",this.linkRelation);c.setAttribute("href",this.getAbsoluteUrl(a));c.setAttribute("title",b(this.isCustomLink(a)?this.getLinkTitle(a):a,80));null!=this.linkTarget&&c.setAttribute("target",
+this.linkTarget);mxUtils.write(c,b(d,40));this.isCustomLink(a)&&mxEvent.addListener(c,"click",mxUtils.bind(this,function(d){this.customLinkClicked(a);mxEvent.consume(d)}));return c};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,d){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(d){d=a.apply(this,arguments);if(mxEvent.isTouchEvent(d.getEvent())&&
+null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,d.graphX,d.graphY)||(d.state=this.view.getState(b),null!=d.state&&null!=d.state.shape&&(this.container.style.cursor=d.state.shape.node.style.cursor))}null==d.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return d};var d=!1,b=!1,c=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,e,g){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),d=this.isCellSelected(e.getCell()),
+b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,d){var b=null!=d&&mxEvent.isShiftDown(d);if(b||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,
+function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(J){}};var z=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));z.apply(this,arguments)};var B=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?B.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var d=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){d.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=
+c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":
+"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var f=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=
+a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}f.apply(this,arguments);
+mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?b(this.textarea,c):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=
+this.graph.view.getState(this.editingCell);if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,
+mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,
+mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=
+f;this.textarea.style.padding="0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,
+"<div><br></div>"));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
+mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var g=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,d){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
+null!=a){var b=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*b;this.bounds.height=60*b;var c=null!=a.text?a.text.margin:null;null==c&&(c=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=c.x*this.bounds.width;this.bounds.y+=c.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/b)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/b)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/b)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*b);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/b)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*b);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=b:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+b+","+b+")")}else this.textarea.style.height="",this.textarea.style.overflow="",g.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
+function(a,d){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,d);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var d=this.graph.sanitizeHtml(this.textarea.innerHTML,
+!0);return d="1"==mxUtils.getValue(a.style,"nl2Br","1")?d.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):d.replace(/\r\n/g,"").replace(/\n/g,"")};var p=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();p.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(Q){}};var l=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+d){this.graph.getModel().beginUpdate();try{l.apply(this,arguments),""==d&&this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)&&this.graph.isTransparentState(a)&&this.graph.removeCells([a.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=d&&d!=mxConstants.NONE||!(null!=a.cell.geometry&&0<a.cell.geometry.width)||0==mxUtils.getValue(a.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)||(d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null));d==mxConstants.NONE&&(d=null);return d};mxCellEditor.prototype.getMinimumSize=function(a){var d=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*d+20,30)};var n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);n.apply(this,arguments)};mxGraphView.prototype.formatUnitText=
+function(a){return a?b(a,this.unit):a};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/f-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/f-c.y);f=this.graph.view.unit;this.hint.innerHTML=b(d,f)+", "+b(c,f);this.hint.style.left=this.pBounds.x+this.currentDx+
+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var x=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function a(a){b.get(a)||(b.put(a,!0),f.push(a))}for(var d=x.apply(this,arguments),b=
+new mxDictionary,c=this.graph.model,f=[],e=0;e<d.length;e++){var g=d[e];this.graph.isTableCell(g)?a(c.getParent(c.getParent(g))):this.graph.isTableRow(g)&&a(c.getParent(g));a(g)}return f};var A=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(a){var d=A.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var t=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(a){var d=
+t.apply(this,arguments);d.stroke="#C0C0C0";d.strokewidth=1;return d};var G=mxVertexHandler.prototype.getSelectionStrokeWidth;mxVertexHandler.prototype.getSelectionStrokeWidth=function(a){return this.graph.cellEditor.getEditingCell()!=this.state.cell&&(this.graph.isTable(this.state.cell)&&this.graph.isCellSelected(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTableCell(this.state.cell))?2:G.apply(this,arguments)};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var a=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+a.x/2,this.bounds.y+this.rotationHandleVSpacing-a.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return this.graph.isRecursiveVertexResize(a)&&!mxEvent.isControlDown(d.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(a,d){return!(!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,
+"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(d.getEvent())||mxEvent.isMetaDown(d.getEvent())};var y=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
+this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var E=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return E.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var C=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(a){return a.tableHandle||C.apply(this,arguments)&&
+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};var v=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){var a=v.apply(this,arguments);this.graph.isTableRow(this.state.cell)?a.grow(-1):this.graph.isTableCell(this.state.cell)&&a.grow(-2);return a};var H=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=H.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var d=
+this.graph,b=d.model,c=d.getActualStartSize(this.state.cell),f=b.getChildAt(this.state.cell,0),e=this.state;null==a&&(a=[]);for(var g=0;g<b.getChildCount(this.state.cell)-1;g++)mxUtils.bind(this,function(c){if(null!=c&&b.isVertex(c.cell)){var f=new mxLine(new mxRectangle,mxVertexHandler.TABLE_HANDLE_COLOR,2);c=new mxHandle(c,"row-resize",null,f);c.tableHandle=!0;var e=0;c.shape.node.parentNode.insertBefore(c.shape.node,c.shape.node.parentNode.firstChild);c.redraw=function(){null!=this.shape&&null!=
+this.state.shape&&(this.shape.bounds.x=this.state.x,this.shape.bounds.width=this.state.width,this.shape.bounds.y=this.state.y+this.state.height+e,this.shape.bounds.height=1,this.shape.node.style.zOrder=-1,this.shape.redraw())};c.setPosition=function(a,d,b){e=d.y-a.y-a.height};c.execute=function(){d.updateTableRowHeight(this.state.cell,e);e=0};a.push(c)}})(this.graph.view.getState(b.getChildAt(this.state.cell,g)));for(g=0;g<b.getChildCount(f)-1;g++)mxUtils.bind(this,function(d){if(null!=d){var b=new mxLine(new mxRectangle,
+mxVertexHandler.TABLE_HANDLE_COLOR,2,!0);d=new mxHandle(d,"col-resize",null,b);d.tableHandle=!0;var f=0;d.shape.node.parentNode.insertBefore(d.shape.node,d.shape.node.parentNode.firstChild);d.redraw=function(){null!=this.shape&&null!=this.state.shape&&(this.shape.bounds.x=this.state.x+this.state.width+f,this.shape.bounds.width=1,this.shape.bounds.y=e.y+c.y,this.shape.bounds.height=e.height-c.y-c.height,this.shape.redraw())};d.setPosition=function(a,d,b){f=d.x-a.x-a.width};d.execute=function(){this.graph.updateTableColumnWidth(this.state.cell,
+f);f=0};a.push(d)}})(this.graph.view.getState(b.getChildAt(f,g)))}return a};var L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){L.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.style.visibility=a?"":"hidden")};mxVertexHandler.prototype.refresh=function(){null!=this.selectionBorder&&(this.selectionBorder.stroke=this.getSelectionColor(),this.selectionBorder.strokewidth=this.getSelectionStrokeWidth(),this.selectionBorder.redraw())};
+mxVertexHandler.prototype.isTableHandler=function(){return this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell)||this.graph.isTable(this.state.cell)};var I=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),d=this.tolerance,b=this.state.style.shape;null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.getStencil(b);b=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
+if(!b&&null!=this.customHandles)for(var c=0;c<this.customHandles.length;c++)if(null!=this.customHandles[c].shape&&null!=this.customHandles[c].shape.bounds){var f=this.customHandles[c].shape.bounds,e=f.getCenterX(),g=f.getCenterY();if(Math.abs(this.state.x-e)<f.width/2||Math.abs(this.state.y-g)<f.height/2||Math.abs(this.state.x+this.state.width-e)<f.width/2||Math.abs(this.state.y+this.state.height-g)<f.height/2){b=!0;break}}b&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(d/=2,a.x=
+this.sizers[0].bounds.width+d,a.y=this.sizers[0].bounds.height+d):a=I.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{d=this.state.view.scale;var c=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/d),c)+" x "+b(this.roundLength(this.bounds.height/
+d),c)}d=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==d&&(d=this.bounds);this.hint.style.left=d.x+Math.round((d.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=d.y+d.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
+"")};var N=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(a,d){N.apply(this,arguments);null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none")};var D=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(a,d){D.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=
+function(d,c){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,e=this.graph.view.scale,g=this.roundLength(c.x/e-f.x),f=this.roundLength(c.y/e-f.y),e=this.graph.view.unit;this.hint.innerHTML=b(g,e)+", "+b(f,e);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML=
+"["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),c.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+HoverIcons.prototype.arrowFill+'" stroke-width="1"/>'):new mxImage(IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.secondaryHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>'):new mxImage(IMAGE_PATH+"/handle-secondary.png",17,17);HoverIcons.prototype.fixedHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><path d="m 7 7 L 11 11 M 7 11 L 11 7" stroke="#fff"/>'):
+new mxImage(IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=mxClient.IS_SVG?Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'" stroke-width="1"/><circle cx="9" cy="9" r="2" stroke="#fff" fill="transparent"/>'):new mxImage(IMAGE_PATH+"/handle-terminal.png",17,17);HoverIcons.prototype.rotationHandle=mxClient.IS_SVG?Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+
+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',24,24):new mxImage(IMAGE_PATH+"/handle-rotate.png",16,16);mxClient.IS_SVG&&(mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,
+5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>'));mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;
+mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=HoverIcons.prototype.mainHandle;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);mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image).src=HoverIcons.prototype.fixedHandle.src,(new Image).src=HoverIcons.prototype.terminalHandle.src,(new Image).src=HoverIcons.prototype.secondaryHandle.src,(new Image).src=HoverIcons.prototype.rotationHandle.src,(new Image).src=HoverIcons.prototype.triangleUp.src,(new Image).src=HoverIcons.prototype.triangleRight.src,(new Image).src=HoverIcons.prototype.triangleDown.src,(new Image).src=
+HoverIcons.prototype.triangleLeft.src,(new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=
+!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
+0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(d)||
+mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var M=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){M.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
+a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,d){if(this.cancelled)this.cancelled=
+!1,d.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&
+this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var n=this.graph.view.getState(l[b]),v=this.graph.getCellGeometry(l[b]);null!=n&&null!=v&&(v=v.clone(),v.translate(e,g),this.graph.model.setGeometry(l[b],
+v))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==
+this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=c-this.width),this.y<this.first.y&&(this.y=b-this.height)),
+this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+
+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),d.consume()}};var R=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);R.apply(this,arguments)};var S=(new Date).getTime(),Y=0,X=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){X.apply(this,arguments);b!=this.currentTerminalState?(S=(new Date).getTime(),Y=0):Y=(new Date).getTime()-S;this.currentTerminalState=b};var F=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
+this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<Y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&F.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==
+mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+var T=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return T.apply(this,arguments)};var ia=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&
+null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return ia.apply(this,arguments)};var ja=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=ja.apply(this,arguments),d=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&d.push(a[b]);return d};var ka=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=
+function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):ka.apply(this,arguments)};var ea=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),
+f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ea.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var a=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&a==mxConstants.NONE&&
+d==mxConstants.NONE?(a=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,a,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var V=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){V.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),
+null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var U=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,d){U.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};var Z=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=
+function(){Z.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));this.rowState=null;this.graph.isTableRow(this.state.cell)?this.rowState=this.state:this.graph.isTableCell(this.state.cell)&&(this.rowState=this.graph.view.getState(this.graph.model.getParent(this.state.cell)));null!=this.rowState&&(this.rowMoveHandle=mxUtils.createImage(Editor.moveImage),this.rowMoveHandle.style.position="absolute",this.rowMoveHandle.style.cursor=
+"pointer",this.rowMoveHandle.style.width="24px",this.rowMoveHandle.style.height="24px",this.graph.container.appendChild(this.rowMoveHandle),mxEvent.addGestureListeners(this.rowMoveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),[this.rowState.cell]);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})));var d=mxUtils.bind(this,function(){null!=
+this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=
+mxUtils.bind(this,function(a,d){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),c=this.graph.getLinksForState(this.state);this.updateLinkHint(b,c);if(null!=b||null!=c&&0<c.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(d,b){try{if(null==d&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
+this.linkHint=null);else if(null!=d||null!=b&&0<b.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=d&&(this.linkHint.appendChild(this.graph.createLinkForHint(d)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var c=document.createElement("img");c.setAttribute("src",Editor.editImage);c.setAttribute("title",
+mxResources.get("editLink"));c.setAttribute("width","11");c.setAttribute("height","11");c.style.marginLeft="10px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}));var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
+f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(a)}))}if(null!=b)for(c=0;c<b.length;c++){var e=document.createElement("div");e.style.marginTop=null!=d||0<c?"6px":"0px";e.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),mxUtils.getTextContent(b[c])));
+this.linkHint.appendChild(e)}}}catch(ca){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var ga=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){ga.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&
+(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(d,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var d=this.graph.getLinkForCell(this.state.cell),
+b=this.graph.getLinksForState(this.state);if(null!=d||null!=b&&0<b.length)this.updateLinkHint(d,b),this.redrawHandles()};var aa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){aa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){null!=this.rowMoveHandle&&null!=this.rowState&&(this.rowMoveHandle.style.left=
+this.rowState.x+this.rowState.width+"px",this.rowMoveHandle.style.top=this.rowState.y+this.rowState.height+"px");null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.rowMoveHandle||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");ba.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),d=new mxRectangle(this.state.x,this.state.y-
+22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(d,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,d=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=d&&(b=Math.max(b,d.y+d.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/
+2+Editor.hintOffset)+"px"}};var O=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){O.apply(this,arguments);null!=this.rowMoveHandle&&(this.rowMoveHandle.parentNode.removeChild(this.rowMoveHandle),this.rowState=this.rowMoveHandle=null);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),
+this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var K=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(K.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-
+this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ha=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ha.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var P=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){P.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function q(){mxCylinder.call(this)}function u(){mxActor.call(this)}function z(){mxActor.call(this)}function B(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function l(a,d){this.canvas=
+a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,l.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,l.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,l.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,l.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
+this.canvas.curveTo=mxUtils.bind(this,l.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,l.prototype.arcTo)}function n(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function A(){mxActor.call(this)}function t(){mxActor.call(this)}function G(){mxActor.call(this)}function y(){mxRectangleShape.call(this)}function E(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function v(){mxShape.call(this)}function H(){mxShape.call(this)}
+function L(){mxEllipse.call(this)}function I(){mxShape.call(this)}function N(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function M(){mxShape.call(this)}function R(){mxShape.call(this)}function S(){mxShape.call(this)}function Y(){mxShape.call(this)}function X(){mxShape.call(this)}function F(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function ia(){mxRectangleShape.call(this)}function ja(){mxDoubleEllipse.call(this)}function ka(){mxDoubleEllipse.call(this)}function ea(){mxArrowConnector.call(this);
+this.spacing=0}function V(){mxArrowConnector.call(this);this.spacing=0}function U(){mxActor.call(this)}function Z(){mxRectangleShape.call(this)}function ga(){mxActor.call(this)}function aa(){mxActor.call(this)}function ba(){mxActor.call(this)}function O(){mxActor.call(this)}function K(){mxActor.call(this)}function ha(){mxActor.call(this)}function P(){mxActor.call(this)}function Q(){mxActor.call(this)}function da(){mxActor.call(this)}function qa(){mxActor.call(this)}function J(){mxEllipse.call(this)}
+function na(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function oa(){mxActor.call(this)}function sa(){mxActor.call(this)}function ta(){mxActor.call(this)}function la(){mxConnector.call(this)}function Ba(a,d,b,c,f,e,g,l,n,v){g+=n;var ma=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(ma.x-
+f-g,ma.y-e-g,2*g,2*g);v?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ma=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(e,f);a.lineTo(0,f-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-e,0),a.lineTo(c,e),a.lineTo(e,e),a.close(),a.fill()),0!=ma&&(a.setFillAlpha(Math.abs(ma)),a.setFillColor(0>ma?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,f),a.lineTo(0,f-
+e),a.close(),a.fill()),a.begin(),a.moveTo(e,f),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(c,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Da=Math.tan(mxUtils.toRadians(30)),pa=(.5-Da)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=
+Math.min(c,f/Da);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*pa);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-pa)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+Da));e?(a.moveTo(0,.25*d),a.lineTo(.5*d,(.5-pa)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-pa)*d),a.lineTo(.5*d,(1-pa)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5*
+d,d*pa),a.lineTo(d,.25*d),a.lineTo(d,.75*d),a.lineTo(.5*d,(1-pa)*d),a.lineTo(0,.75*d),a.close());a.end()};mxCellRenderer.registerShape("isoCube",e);mxUtils.extend(c,mxCylinder);c.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,d/2),a.moveTo(0,d),
+a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.moveTo(0,d),a.curveTo(0,-d/3,c,-d/3,c,d),a.lineTo(c,f-d),a.curveTo(c,f+d/3,0,f+d/3,0,f-d),a.close())};c.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=0;k.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,
+Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(0,f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(c-e,0),a.lineTo(c-e,e),a.lineTo(c,e),a.close(),
+a.fill()),a.begin(),a.moveTo(c-e,0),a.lineTo(c-e,e),a.lineTo(c,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(q,mxCylinder);q.prototype.tabWidth=60;q.prototype.tabHeight=20;q.prototype.tabPosition="right";q.prototype.redrawPath=function(a,d,b,c,
+f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,
+b),a.close());a.end()};mxCellRenderer.registerShape("folder",q);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);
+a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(z,mxActor);z.prototype.size=.4;z.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};z.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",
+!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",z);mxUtils.extend(B,mxActor);B.prototype.size=.3;B.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*a.height):null};B.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};mxCellRenderer.registerShape("document",B);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,d,b,c){var f=mxUtils.getValue(this.style,"size");return null!=
+f?c*Math.max(0,Math.min(1,f)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*d),0,0)}return null};mxUtils.extend(d,mxActor);d.prototype.size=.2;d.prototype.isRoundable=function(){return!0};d.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",d);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("trapezoid",f);mxUtils.extend(g,mxActor);g.prototype.size=.5;g.prototype.redrawPath=function(a,d,b,c,f){a.setFillColor(null);d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(p,mxActor);p.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",p);l.prototype.moveTo=
+function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};l.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};l.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};l.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,
+arguments);this.lastX=f;this.lastY=e};l.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};l.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),l=this.defaultVariation;
+5>g&&(g=5,l/=3);for(var ma=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,ma*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};l.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
 this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ca=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new l(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ca.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var wa=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&wa.apply(this,arguments)};var xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)xa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
-mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(d/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(d*e,f*e)),a.moveTo(c+e,b),a.lineTo(c+d-e,b),a.quadTo(c+d,b,c+d,b+e),a.lineTo(c+d,b+f-e),a.quadTo(c+
-d,b+f,c+d-e,b+f),a.lineTo(c+e,b+f),a.quadTo(c,b+f,c,b+f-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Pa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Pa.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.prototype.getLabelBounds=
-function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=
-Math.round(d);a.width-=Math.round(2*d)}return a};n.prototype.paintForeground=function(a,c,b,d,f){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.moveTo(c+d-e,b);a.lineTo(c+d-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(x,mxRectangleShape);x.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};x.prototype.paintForeground=function(a,c,b,d,f){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,c,b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(d,
-parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-b),new mxPoint(Math.min(d,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,c,b,d,f){c="0"!=mxUtils.getValue(this.style,"fixedSize",
-"0")?Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(G,mxHexagon);G.prototype.size=
-.25;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=
-function(){return!1};z.prototype.paintForeground=function(a,c,b,d,f){var e=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+e);a.lineTo(c+d/2,b+f-e);a.moveTo(c+e,b+f/2);a.lineTo(c+d-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",z);var Ka=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Ka.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&(a.setShadow(!1),Ka.apply(this,[a,c,b,d,f]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==
-this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};E.prototype.paintForeground=function(a,c,b,d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;d-=2*e;f-=2*e;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);
-var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],n=this.style["symbol"+e+"VerticalAlign"],ga=this.style["symbol"+e+"Width"],v=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),p+=x,t+=x);var x=c,k=b,x=l==mxConstants.ALIGN_CENTER?x+(d-ga)/2:l==mxConstants.ALIGN_RIGHT?x+
-(d-ga-p):x+p,k=n==mxConstants.ALIGN_MIDDLE?k+(f-v)/2:n==mxConstants.ALIGN_BOTTOM?k+(f-v-t):k+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,x,k,ga,v);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,c,b,d,f,e){e?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),
-a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
-6,0,0,0)};I.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
-L);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-f/8,d,7*f/8);a.fillAndStroke()};N.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(D,mxRectangleShape);D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};D.prototype.paintBackground=
-function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,d,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,c,b,d,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+e),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};D.prototype.paintForeground=
-function(a,c,b,d,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",D);mxUtils.extend(M,mxShape);M.prototype.width=60;M.prototype.height=30;M.prototype.corner=10;M.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};M.prototype.paintBackground=function(a,c,b,d,f){var e=this.corner,g=Math.min(d,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(c,b,d,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
-mxConstants.NONE?(this.getGradientBounds(a,c,b,d,f),a.setGradient(this.fill,this.gradient,c,b,d,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(c,b);a.lineTo(c+g,b);a.lineTo(c+g,b+Math.max(0,l-1.5*e));a.lineTo(c+Math.max(0,g-e),b+l);a.lineTo(c,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",M);mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=D.prototype.size;
-null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
-mxPerimeter.BackbonePerimeter=function(a,c,b,d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
-a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",A.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,d,f){var e=c.prototype.size;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&wa.apply(this,arguments)};var xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)xa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
+mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+
+c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,b)),a.close(),a.end(),a.fillAndStroke()}};var Oa=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Oa.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.prototype.getLabelBounds=
+function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=
+Math.round(c);a.width-=Math.round(2*c)}return a};n.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(x,mxRectangleShape);x.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};x.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",x);mxUtils.extend(A,mxHexagon);A.prototype.size=30;A.prototype.position=.5;A.prototype.position2=.5;A.prototype.base=20;A.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*this.scale)};A.prototype.isRoundable=function(){return!0};A.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,
+parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",A);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize",
+"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",t);mxUtils.extend(G,mxHexagon);G.prototype.size=
+.25;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=
+function(){return!1};y.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",y);var Ka=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ka.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ka.apply(this,[a,d,b,c,f]))}};mxUtils.extend(E,mxRectangleShape);E.prototype.isHtmlAllowed=function(){return!1};E.prototype.getLabelBounds=function(a){if(1==
+this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};E.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);
+var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],n=this.style["symbol"+e+"VerticalAlign"],ma=this.style["symbol"+e+"Width"],v=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,x=this.style["symbol"+e+"ArcSpacing"];null!=x&&(x*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),p+=x,t+=x);var x=d,k=b,x=l==mxConstants.ALIGN_CENTER?x+(c-ma)/2:l==mxConstants.ALIGN_RIGHT?x+
+(c-ma-p):x+p,k=n==mxConstants.ALIGN_MIDDLE?k+(f-v)/2:n==mxConstants.ALIGN_BOTTOM?k+(f-v-t):k+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,x,k,ma,v);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",E);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),
+a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(H,mxShape);H.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
+6,0,0,0)};H.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",H);mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
+L);mxUtils.extend(I,mxShape);I.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",I);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,
+f/8,c,7*f/8);a.fillAndStroke()};N.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(D,mxRectangleShape);D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};D.prototype.paintBackground=
+function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};D.prototype.paintForeground=
+function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",D);mxUtils.extend(M,mxShape);M.prototype.width=60;M.prototype.height=30;M.prototype.corner=10;M.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
+"height",this.height)*this.scale))};M.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,l-1.5*e));a.lineTo(d+Math.max(0,g-e),b+l);a.lineTo(d,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",M);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=D.prototype.size;
+null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
+mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
+a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",A.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size;
 null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l)]):(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g,
-l+v),new mxPoint(g+e,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(d.x<g||d.x>g+n?a.y=d.y:a.x=d.x);return mxUtils.getPerimeterPoint(l,a,d)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n-e,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v),new mxPoint(g+e,l)]):c==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g+e,l+v),new mxPoint(g,l)]):c==mxConstants.DIRECTION_NORTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+n,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l+e)]):(e=v*Math.max(0,
-Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v-e),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);d&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f="0"!=mxUtils.getValue(c.style,"fixedSize","0"),e=f?t.prototype.fixedSize:t.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,
-"size",e));var g=a.x,l=a.y,n=a.width,v=a.height,p=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n-f,l),new mxPoint(g+n,a),new mxPoint(g+n-f,l+v),new mxPoint(g,l+v),new mxPoint(g+f,a),new mxPoint(g,l)]):c==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,
-Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+n,l),new mxPoint(g+n-f,a),new mxPoint(g+n,l+v),new mxPoint(g+f,l+v),new mxPoint(g,a),new mxPoint(g+f,l)]):c==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(p,l),new mxPoint(g+n,l+f),new mxPoint(g+n,l+v),new mxPoint(p,l+v-f),new mxPoint(g,l+v),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(p,l+f),new mxPoint(g+
-n,l),new mxPoint(g+n,l+v-f),new mxPoint(p,l+v),new mxPoint(g,l+v-f),new mxPoint(g,l)]);p=new mxPoint(p,a);d&&(b.x<g||b.x>g+n?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,d){var f=G.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,g=a.y,l=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+n-f),new mxPoint(v,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(v,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);v=new mxPoint(v,a);d&&(b.x<e||b.x>e+
-l?v.y=b.y:v.x=b.x);return mxUtils.getPerimeterPoint(g,v,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((d-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(d/2,e);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",P);mxUtils.extend(R,mxShape);R.prototype.size=
-10;R.prototype.inset=2;R.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,e+g);a.lineTo(d/2,f);a.end();a.stroke();a.begin();a.moveTo((d-e)/2-g,e/2);a.quadTo((d-e)/2-g,e+g,d/2,e+g);a.quadTo((d+e)/2+g,e+g,(d+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",R);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=
-function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",ba);mxUtils.extend(X,mxShape);X.prototype.inset=2;X.prototype.paintBackground=function(a,c,b,d,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,d-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(d/2,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-X);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=20;F.prototype.jettyHeight=10;F.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(c,f-c),n=Math.min(l+2*c,f-c);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,
-f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",F);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,c,b,d,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-c/
-2,n=.7*f-c/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+c),a.lineTo(b,n+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,n+c),a.lineTo(0,n+c),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",T);mxUtils.extend(ja,mxRectangleShape);ja.prototype.paintForeground=function(a,c,b,d,f){var e=d/2,g=f/2,l=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(c+e,b),new mxPoint(c+d,b+g),new mxPoint(c+e,b+f),new mxPoint(c,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ja);mxUtils.extend(ka,mxDoubleEllipse);ka.prototype.outerStroke=!0;ka.prototype.paintVertexShape=function(a,c,b,d,f){var e=Math.min(4,Math.min(d/5,f/5));0<d&&0<f&&(a.ellipse(c+e,b+e,d-2*e,f-2*
-e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.registerShape("endState",ka);mxUtils.extend(la,ka);la.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",la);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};
+l+v),new mxPoint(g+e,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);f&&(c.x<g||c.x>g+n?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(l,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,l=a.y,n=a.width,v=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+d==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n-e,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v),new mxPoint(g+e,l)]):d==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+v),new mxPoint(g+e,l+v),new mxPoint(g,l)]):d==mxConstants.DIRECTION_NORTH?(e=v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+n,l),new mxPoint(g+n,l+v),new mxPoint(g,l+v-e),new mxPoint(g,l+e)]):(e=v*Math.max(0,
+Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+v-e),new mxPoint(g,l+v),new mxPoint(g,l)]);v=a.getCenterX();a=a.getCenterY();a=new mxPoint(v,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?t.prototype.fixedSize:t.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,
+"size",e));var g=a.x,l=a.y,n=a.width,v=a.height,p=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n-f,l),new mxPoint(g+n,a),new mxPoint(g+n-f,l+v),new mxPoint(g,l+v),new mxPoint(g+f,a),new mxPoint(g,l)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,
+Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+n,l),new mxPoint(g+n-f,a),new mxPoint(g+n,l+v),new mxPoint(g+f,l+v),new mxPoint(g,a),new mxPoint(g+f,l)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(p,l),new mxPoint(g+n,l+f),new mxPoint(g+n,l+v),new mxPoint(p,l+v-f),new mxPoint(g,l+v),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(v,e)):v*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(p,l+f),new mxPoint(g+
+n,l),new mxPoint(g+n,l+v-f),new mxPoint(p,l+v),new mxPoint(g,l+v-f),new mxPoint(g,l)]);p=new mxPoint(p,a);c&&(b.x<g||b.x>g+n?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(l,p,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=G.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,n=a.height,v=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(v,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+n-f),new mxPoint(v,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(v,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);v=new mxPoint(v,a);c&&(b.x<e||b.x>e+
+l?v.y=b.y:v.x=b.x);return mxUtils.getPerimeterPoint(g,v,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",R);mxUtils.extend(S,mxShape);S.prototype.size=
+10;S.prototype.inset=2;S.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(Y,mxShape);Y.prototype.paintBackground=
+function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",Y);mxUtils.extend(X,mxShape);X.prototype.inset=2;X.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.ellipse(0,e,c-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
+X);mxUtils.extend(F,mxCylinder);F.prototype.jettyWidth=20;F.prototype.jettyHeight=10;F.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),n=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,
+f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",F);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/
+2,n=.7*f-d/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",T);mxUtils.extend(ia,mxRectangleShape);ia.prototype.paintForeground=function(a,d,b,c,f){var e=c/2,g=f/2,l=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(d+e,b),new mxPoint(d+c,b+g),new mxPoint(d+e,b+f),new mxPoint(d,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ia);mxUtils.extend(ja,mxDoubleEllipse);ja.prototype.outerStroke=!0;ja.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*
+e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",ja);mxUtils.extend(ka,ja);ka.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ka);mxUtils.extend(ea,mxArrowConnector);ea.prototype.defaultWidth=4;ea.prototype.isOpenEnded=function(){return!0};ea.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ea.prototype.isArrowRounded=function(){return this.isRounded};
 mxCellRenderer.registerShape("link",ea);mxUtils.extend(V,mxArrowConnector);V.prototype.defaultWidth=10;V.prototype.defaultArrowWidth=20;V.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};V.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};V.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+
-Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",V);mxUtils.extend(U,mxActor);U.prototype.size=30;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",
-U);mxUtils.extend(Y,mxRectangleShape);Y.prototype.dx=20;Y.prototype.dy=20;Y.prototype.isHtmlAllowed=function(){return!1};Y.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(d*g,f*g));g=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,
-parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+d,b+e);a.end();a.stroke();a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",Y);mxUtils.extend(ha,mxActor);ha.prototype.dx=20;ha.prototype.dy=20;ha.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
-parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ha);mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);a.lineTo(d,
-f/2);a.end()};mxCellRenderer.registerShape("crossbar",Z);mxUtils.extend(aa,mxActor);aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
-0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",aa);mxUtils.extend(O,mxActor);O.prototype.arrowWidth=.3;O.prototype.arrowSize=.2;O.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",O);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,c,b,d,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
-O.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,e),new mxPoint(c,e),new mxPoint(c,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",
-K);mxUtils.extend(fa,mxActor);fa.prototype.size=.1;fa.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",fa);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",
-Q);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(qa,mxActor);qa.prototype.size=.375;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",qa);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",J);mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,
-c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",ma);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();
-a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",da);mxUtils.extend(ia,mxRhombus);ia.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",ia);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);
-a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,c,b,d,f){var e=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+d,e);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,e);a.lineTo(c+d-10,e-5);
-a.moveTo(c+d,e);a.lineTo(c+d-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?
-a.lineTo(c+d,b+f):a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,b+f)):(a.moveTo(c,
-b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ra);mxUtils.extend(oa,mxActor);oa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",oa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c=(f-e)/2;b=c+e;var g=(d-e)/2,e=g+e;a.moveTo(0,c);a.lineTo(g,c);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",sa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,f/2);a.lineTo(b,
-0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ta);mxUtils.extend(na,mxConnector);na.prototype.origPaintEdgeShape=na.prototype.paintEdgeShape;na.prototype.paintEdgeShape=function(a,c,b){for(var d=[],f=0;f<c.length;f++)d.push(mxUtils.clone(c[f]));var f=a.state.dashed,e=a.state.fixDash;na.prototype.origPaintEdgeShape.apply(this,[a,d,b]);3<=a.state.strokeWidth&&(d=mxUtils.getValue(this.style,"fillColor",null),null!=d&&
-(a.setStrokeColor(d),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),na.prototype.origPaintEdgeShape.apply(this,[a,c,b])))};mxCellRenderer.registerShape("filledEdge",na);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==c.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});
-return b}}();mxMarker.addMarker("dash",function(a,c,b,d,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-p/2-t/2,d.y-t/2+p/2);a.lineTo(d.x+t/2-3*p/2,d.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,b,d,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1),x=d.x+p/2,k=d.y+t/2;d.x-=p;d.y-=t;return function(){a.begin();a.moveTo(x-p/2-t/2,k-t/2+p/2);a.lineTo(x-p/2+t/2,k-t/2-p/2);a.lineTo(x+t/2-3*p/2,k-3*t/2-p/2);a.lineTo(x-t/2-3*p/2,k-3*t/2+p/2);a.close();v?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(d.x-p/2-t/2,d.y-t/2+p/2);a.lineTo(d.x+t/2-3*p/2,d.y-3*t/2-p/2);a.moveTo(d.x-p/2+t/2,d.y-t/2-p/2);a.lineTo(d.x-t/2-3*p/2,d.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,e,g,l,n,v){var p=d.clone(),t=Ba.apply(this,arguments),x=f*(g+2*n),k=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-
-f*n,p.y-e*n);a.lineTo(p.x-2*x+f*n,p.y-2*k+e*n);a.moveTo(p.x-x-k+e*n,p.y-k+x-f*n);a.lineTo(p.x+k-x-e*n,p.y-k-x+f*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,c,b,d,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1),x=d.clone();d.x-=p;d.y-=t;return function(){a.begin();a.moveTo(x.x-t,x.y+p);a.quadTo(d.x-t,d.y+p,d.x,d.y);a.quadTo(d.x+t,d.y-p,x.x+t,x.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,f,e,g,l,n,v){c=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var p=d.clone();p.x-=c;p.y-=b;d.x+=
-1*-f-c;d.y+=1*-e-b;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-f-e/2,p.y-e+f/2):a.lineTo(p.x+e/2-f,p.y-e-f/2);a.lineTo(p.x-f,p.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,e,g,l,n,v,p){e*=l+v;g*=l+v;var t=f.clone();return function(){c.begin();c.moveTo(t.x,t.y);n?c.lineTo(t.x-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Qa=function(a,
-c,b){return Ea(a,["width"],c,function(c,d,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+d*c/4+f*g/2,e.y+f*c/4-d*g/2)},function(c,d,f,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-b})},Ea=function(a,c,b,d,f){return W(a,c,function(c){var f=a.absolutePoints,e=f.length-1;c=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,n=f.y-l.y,v=Math.sqrt(e*e+n*n),l=d.call(this,v,e/v,n/v,l,f);return new mxPoint(l.x/
-g-c.x,l.y/g-c.y)},function(c,d,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var n=a.view.scale,v=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-v.x,p=g.y-v.y,t=Math.sqrt(l*l+p*p);d.x=(d.x+c.x)*n;d.y=(d.y+c.y)*n;f.call(this,t,l/t,p/t,v,g,d,e)})},va=function(a){return function(c){return[W(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",O.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",O.prototype.arrowSize)));
-return new mxPoint(c.x+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},Ma=function(a,c,b){return function(d){var f=[W(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,
-Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ua(d));return f}},Ga=function(a,c,b,d,f){b=null!=b?b:1;return function(e){var g=[W(e,["size"],function(c){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,d=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(c.x+Math.max(0,Math.min(c.width,d*(b?1:c.width))),c.getCenterY())},function(a,c,d){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null;a=g?c.x-a.x:Math.max(0,Math.min(b,(c.x-a.x)/a.width));g&&!mxEvent.isAltDown(d.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,d)];c&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ua(e));return g}},Ra=function(a){return function(c){var b=[W(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=
-Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ua(c));return b}},Fa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ua(a));return c}},ua=function(a,c){return W(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},W=function(a,c,b,d,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};g.getPosition=b;g.setPosition=d;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ha={link:function(a){return[Qa(a,!0,10),
-Qa(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+
-d*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(e+a.shape.strokewidth*
-a.view.scale)-b*c/2)},function(b,d,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||
-(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEdgeWidth()-
-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
-b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
-a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));d=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-d,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/
-a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},
-swimlane:function(a){var c=[W(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
-Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ua(a,b/2))}return c},label:Fa(),ext:Fa(),rectangle:Fa(),triangle:Fa(),rhombus:Fa(),umlLifeline:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[W(a,["width","height"],function(a){var c=Math.max(M.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",M.prototype.width))),b=Math.max(1.5*M.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",M.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(M.prototype.corner,
-Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*M.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[W(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ua(a));return c},cross:function(a){return[W(a,
-["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",sa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",m.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[W(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",U.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(ua(a));return c},dataStorage:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",fa.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[W(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),
-b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),W(a,["position2"],function(a){var c=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),W(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ua(a));return c},internalStorage:function(a){var c=[W(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",Y.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Y.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ua(a));return c},module:function(a){return[W(a,["jettyWidth","jettyHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"jettyWidth",F.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",F.prototype.jettyHeight)));return new mxPoint(a.x+c/2,a.y+2*b)},function(a,c){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y))/2)})]},corner:function(a){return[W(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ha.prototype.dx))),
-b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ha.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[W(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",aa.prototype.dy)));
-return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[W(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",
-q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[W(a,["size"],
-function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",y.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c*a.height/2)},function(a,c){this.state.style.size=Math.max(0,
-Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[W(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",qa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:Ga(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ga(G.prototype.size,!0,.5,!0),curlyBracket:Ga(g.prototype.size,!1),display:Ga(ta.prototype.size,
-!1),cube:Ma(1,a.prototype.size,!1),card:Ma(.5,u.prototype.size,!0),loopLimit:Ma(.5,ca.prototype.size,!0),trapezoid:Ra(.5),parallelogram:Ra(1)};Graph.createHandle=W;Graph.handleFactory=Ha;var Sa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Sa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_RECTANGLE);
-c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),
-Ja=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var e=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=d&&(d=e.transformControlPoint(a,d));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));
-var n=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,c,b){a-=k.x;var d=c-k.y;c=(t*a-p*d)/(n*t-v*p);a=(v*a-n*d)/(v*p-n*t);x?(b&&(k=new mxPoint(k.x+n*c,k.y+v*c),f.push(k)),k=new mxPoint(k.x+p*a,k.y+t*a)):(b&&(k=new mxPoint(k.x+p*a,k.y+t*a),f.push(k)),k=new mxPoint(k.x+n*c,k.y+v*c));f.push(k)};var k=l;null==d&&(d=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
-mxEdgeStyle.IsometricConnector);var Ta=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ta.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,c,b){a=[];var d=Math.tan(mxUtils.toRadians(30)),f=(.5-d)/2,d=Math.min(c,b/(.5+d));c=(c-d)/2;b=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c+.5*d,b+d*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+d,b+.25*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+d,b+.75*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*d,b+(1-f)*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b+.75*d));return a};A.prototype.getConstraints=function(a,c,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",V);mxUtils.extend(U,mxActor);U.prototype.size=30;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,d),new mxPoint(c,0),new mxPoint(c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("manualInput",
+U);mxUtils.extend(Z,mxRectangleShape);Z.prototype.dx=20;Z.prototype.dy=20;Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.paintForeground=function(a,d,b,c,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));g=Math.max(e,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(d,b+e);a.lineTo(d+c,b+e);a.end();a.stroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+g,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("internalStorage",Z);mxUtils.extend(ga,mxActor);ga.prototype.dx=20;ga.prototype.dy=20;ga.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d,b),new mxPoint(d,f),new mxPoint(0,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("corner",ga);mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(c,0);a.lineTo(c,f);a.end();a.moveTo(0,f/2);a.lineTo(c,
+f/2);a.end()};mxCellRenderer.registerShape("crossbar",aa);mxUtils.extend(ba,mxActor);ba.prototype.dx=20;ba.prototype.dy=20;ba.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,
+0),new mxPoint(c,0),new mxPoint(c,b),new mxPoint((c+d)/2,b),new mxPoint((c+d)/2,f),new mxPoint((c-d)/2,f),new mxPoint((c-d)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.registerShape("tee",ba);mxUtils.extend(O,mxActor);O.prototype.arrowWidth=.3;O.prototype.arrowSize=.2;O.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(0,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("singleArrow",O);mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+O.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize))));b=(f-e)/2;var e=b+e,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c-d,b),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(c-d,e),new mxPoint(d,e),new mxPoint(d,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.registerShape("doubleArrow",
+K);mxUtils.extend(ha,mxActor);ha.prototype.size=.1;ha.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(d,0);a.lineTo(c,0);a.quadTo(c-2*d,f/2,c,f);a.lineTo(d,f);a.quadTo(d-2*d,f/2,d,0);a.close();a.end()};mxCellRenderer.registerShape("dataStorage",ha);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.close();a.end()};mxCellRenderer.registerShape("or",
+P);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.quadTo(c/2,f/2,0,0);a.close();a.end()};mxCellRenderer.registerShape("xor",Q);mxUtils.extend(da,mxActor);da.prototype.size=20;da.prototype.isRoundable=function(){return!0};da.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.8*d),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,.8*d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("loopLimit",da);mxUtils.extend(qa,mxActor);qa.prototype.size=.375;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-d),new mxPoint(c/2,f),new mxPoint(0,f-d)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("offPageConnector",qa);mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/2,b+f);a.lineTo(d+c,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("tapeData",J);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(a,
+d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke();a.begin();a.moveTo(d+c/2,b);a.lineTo(d+c/2,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("orEllipse",na);mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d+.145*c,b+.145*f);a.lineTo(d+.855*c,b+.855*f);a.end();a.stroke();
+a.begin();a.moveTo(d+.855*c,b+.145*f);a.lineTo(d+.145*c,b+.855*f);a.end();a.stroke()};mxCellRenderer.registerShape("sumEllipse",ca);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(a,d,b,c,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(d,b+f/2);a.lineTo(d+c,b+f/2);a.end();a.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(a,d,b,c,f){a.begin();a.moveTo(d,b);
+a.lineTo(d+c,b);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke();a.begin();a.moveTo(d,b+f);a.lineTo(d+c,b+f);a.lineTo(d+c/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.registerShape("collate",ya);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(a,d,b,c,f){var e=b+f-5;a.begin();a.moveTo(d,b);a.lineTo(d,b+f);a.moveTo(d,e);a.lineTo(d+10,e-5);a.moveTo(d,e);a.lineTo(d+10,e+5);a.moveTo(d,e);a.lineTo(d+c,e);a.moveTo(d+c,b);a.lineTo(d+c,b+f);a.moveTo(d+c,e);a.lineTo(d+c-10,e-5);
+a.moveTo(d+c,e);a.lineTo(d+c-10,e+5);a.end();a.stroke()};mxCellRenderer.registerShape("dimension",za);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=function(a,d,b,c,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(d,b,c,f),a.fill(),a.begin(),a.moveTo(d,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(d+c,b):a.moveTo(d+c,b),"1"==mxUtils.getValue(this.style,"right","1")?
+a.lineTo(d+c,b+f):a.moveTo(d+c,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(d,b+f):a.moveTo(d,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(d,b),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",Aa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(d+c/2,b),a.lineTo(d+c/2,b+f)):(a.moveTo(d,
+b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRenderer.registerShape("lineEllipse",ra);mxUtils.extend(oa,mxActor);oa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);a.moveTo(0,0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("delay",oa);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(f,c);var e=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",sa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b,
+0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ta);mxUtils.extend(la,mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,d,b){for(var c=[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&
+(a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),la.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",la);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});
+return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-p/2-t/2,c.y-t/2+p/2);a.lineTo(c.x+t/2-3*p/2,c.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,d,b,c,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1),x=c.x+p/2,k=c.y+t/2;c.x-=p;c.y-=t;return function(){a.begin();a.moveTo(x-p/2-t/2,k-t/2+p/2);a.lineTo(x-p/2+t/2,k-t/2-p/2);a.lineTo(x+t/2-3*p/2,k-3*t/2-p/2);a.lineTo(x-t/2-3*p/2,k-3*t/2+p/2);a.close();v?a.fillAndStroke():
+a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-p/2-t/2,c.y-t/2+p/2);a.lineTo(c.x+t/2-3*p/2,c.y-3*t/2-p/2);a.moveTo(c.x-p/2+t/2,c.y-t/2-p/2);a.lineTo(c.x-t/2-3*p/2,c.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,l,n,v){var p=c.clone(),t=Ba.apply(this,arguments),x=f*(g+2*n),k=e*(g+2*n);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-
+f*n,p.y-e*n);a.lineTo(p.x-2*x+f*n,p.y-2*k+e*n);a.moveTo(p.x-x-k+e*n,p.y-k+x-f*n);a.lineTo(p.x+k-x-e*n,p.y-k-x+f*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,d,b,c,f,e,g,l,n,v){var p=f*(g+n+1),t=e*(g+n+1),x=c.clone();c.x-=p;c.y-=t;return function(){a.begin();a.moveTo(x.x-t,x.y+p);a.quadTo(c.x-t,c.y+p,c.x,c.y);a.quadTo(c.x+t,c.y-p,x.x+t,x.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,l,n,v){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var p=c.clone();p.x-=d;p.y-=b;c.x+=
+1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-f-e/2,p.y-e+f/2):a.lineTo(p.x+e/2-f,p.y-e-f/2);a.lineTo(p.x-f,p.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,l,n,v,p){e*=l+v;g*=l+v;var t=f.clone();return function(){d.begin();d.moveTo(t.x,t.y);n?d.lineTo(t.x-e-g/a,t.y-g+e/a):d.lineTo(t.x+g/a-e,t.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ra=function(a,
+d,b){return Fa(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},Fa=function(a,d,b,c,f){return W(a,d,function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,n=f.y-l.y,v=Math.sqrt(e*e+n*n),l=c.call(this,v,e/v,n/v,l,f);return new mxPoint(l.x/
+g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var n=a.view.scale,v=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-v.x,p=g.y-v.y,t=Math.sqrt(l*l+p*p);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,t,l/t,p/t,v,g,c,e)})},va=function(a){return function(d){return[W(d,["arrowWidth","arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",O.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",O.prototype.arrowSize)));
+return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},Ma=function(a,d,b){return function(c){var f=[W(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,
+Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ua(c));return f}},Ga=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[W(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(ua(e));return g}},Pa=function(a){return function(d){var b=[W(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(d.x+b*d.width*.75,d.y+d.height/4)},function(d,b){this.state.style.size=
+Math.max(0,Math.min(a,(b.x-d.x)/(.75*d.width)))},null,!0)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ua(d));return b}},Ea=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d}},ua=function(a,d){return W(a,[mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
+Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},W=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ha={link:function(a){return[Ra(a,!0,10),
+Ra(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+
+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
+parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*
+a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||
+(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Fa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-
+a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
+b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Fa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
+a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/
+a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},
+swimlane:function(a){var d=[W(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
+Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(ua(a,b/2))}return d},label:Ea(),ext:Ea(),rectangle:Ea(),triangle:Ea(),rhombus:Ea(),umlLifeline:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[W(a,["width","height"],function(a){var d=Math.max(M.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",M.prototype.width))),b=Math.max(1.5*M.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",M.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(M.prototype.corner,
+Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*M.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[W(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},cross:function(a){return[W(a,
+["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",sa.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=[W(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",U.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,
+mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},dataStorage:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[W(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),
+b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));mxUtils.getValue(this.state.style,"base",A.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,"base",A.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),W(a,["position2"],function(a){var d=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position2",A.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),W(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",A.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"base",A.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",A.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},internalStorage:function(a){var d=[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"dx",Z.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",Z.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ua(a));return d},module:function(a){return[W(a,["jettyWidth","jettyHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
+"jettyWidth",F.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",F.prototype.jettyHeight)));return new mxPoint(a.x+d/2,a.y+2*b)},function(a,d){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y))/2)})]},corner:function(a){return[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ga.prototype.dx))),
+b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ga.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[W(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));
+return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[W(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",q.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",
+q.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,d.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",q.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[W(a,["size"],
+function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",B.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",z.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,
+Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[W(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",qa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ga(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:Ga(G.prototype.size,!0,.5,!0),curlyBracket:Ga(g.prototype.size,!1),display:Ga(ta.prototype.size,
+!1),cube:Ma(1,a.prototype.size,!1),card:Ma(.5,u.prototype.size,!0),loopLimit:Ma(.5,da.prototype.size,!0),trapezoid:Pa(.5),parallelogram:Pa(1)};Graph.createHandle=W;Graph.handleFactory=Ha;var Sa=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Sa.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_RECTANGLE);
+d=Ha[d];null==d&&null!=this.state.shape&&this.state.shape.isRoundable()&&(d=Ha[mxConstants.SHAPE_RECTANGLE]);null!=d&&(d=d(this.state),null!=d&&(a=null==a?d:a.concat(d)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),
+Ja=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));
+var n=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,x="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,b){a-=k.x;var c=d-k.y;d=(t*a-p*c)/(n*t-v*p);a=(v*a-n*c)/(v*p-n*t);x?(b&&(k=new mxPoint(k.x+n*d,k.y+v*d),f.push(k)),k=new mxPoint(k.x+p*a,k.y+t*a)):(b&&(k=new mxPoint(k.x+p*a,k.y+t*a),f.push(k)),k=new mxPoint(k.x+n*d,k.y+v*d));f.push(k)};var k=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var Ta=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ta.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,d,b){a=[];var c=Math.tan(mxUtils.toRadians(30)),f=(.5-c)/2,c=Math.min(d,b/(.5+c));d=(d-c)/2;b=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d+.5*c,b+c*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+(1-f)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*c));return a};A.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-c)));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
 0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),
 new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,
-Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(1,
-1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c+d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c>=2*d&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)));return a};
-q.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),f))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Y.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;
-da.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.getConstraints=function(a,c,b){a=[];var d=Math.min(c,b/2),f=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+c-d),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};F.prototype.getConstraints=function(a,c,b){c=parseFloat(mxUtils.getValue(a,
-"jettyWidth",F.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",F.prototype.jettyHeight));var d=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,c),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,c),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,3.5*a))];b>5*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,c));b>8*a&&d.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,c));b>15*a&&d.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,c));return d};ca.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;y.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,
+Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,
+1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-c)));return a};
+q.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,c,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,f)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(b-f)+f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return a};Z.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxEllipse.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;
+ca.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.getConstraints=function(a,d,b){a=[];var c=Math.min(d,b/2),f=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(f+d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};F.prototype.getConstraints=function(a,d,b){d=parseFloat(mxUtils.getValue(a,
+"jettyWidth",F.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",F.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,3.5*a))];b>5*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));b>8*a&&c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,d));b>15*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};da.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
 .5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
 .1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
 .7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
 .65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
 0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
 .5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
 1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;aa.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(c+d),.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*c-.25*d,f));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*f));return a};ha.prototype.getConstraints=function(a,c,b){a=[];var d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return a};Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];O.prototype.getConstraints=
-function(a,c,b){a=[];var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),d=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-d));return a};K.prototype.getConstraints=function(a,c,b){a=[];var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth)))),f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize)))),d=(b-d)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};sa.prototype.getConstraints=
-function(a,c,b){a=[];var d=Math.min(b,c),f=Math.max(0,Math.min(d,d*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),d=(b-f)/2,e=d+f,g=(c-f)/2,f=g+f;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b-.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,d));return a};D.prototype.constraints=null;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];d.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ba.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*d+.25*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(d+c),.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*d-.25*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*f));return a};ga.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),f=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b+f)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1));return a};aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];O.prototype.getConstraints=
+function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-f),b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));return a};K.prototype.getConstraints=function(a,d,b){a=[];var c=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth)))),f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize)))),c=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));return a};sa.prototype.getConstraints=
+function(a,d,b){a=[];var c=Math.min(b,d),f=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),c=(b-f)/2,e=c+f,g=(d-f)/2,f=g+f;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,f,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+f),c));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+f),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,c));return a};D.prototype.constraints=null;P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
 .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var e=d.selectParentAfterDelete?d.model.getParents(b):null;d.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)d.model.contains(e[b])&&(d.model.isVertex(e[b])||d.model.isEdge(e[b]))&&a.push(e[b]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,m=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",
-function(){d.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
-": "+c.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=m;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=m;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=m;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
-620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=m;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
-Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(d)}catch(u){b.handleError(u)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();
-try{var b=mxClipboard.paste(d);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&d.model.isEdge(b[e]);var c=d.view.translate,f=d.view.scale,g=c.x,p=c.y,c=null;if(1==b.length&&a){var l=d.getCellGeometry(b[0]);null!=l&&(c=l.getTerminalPoint(!0))}c=null!=c?c:d.getBoundingBoxFromGeometry(b,a);if(null!=c){var n=Math.round(d.snap(d.popupMenuHandler.triggerX/f-g)),x=Math.round(d.snap(d.popupMenuHandler.triggerY/f-p));d.cellsMoved(b,n-c.x,x-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("copySize",
-function(a){a=d.getSelectionCell();d.isEnabled()&&null!=a&&d.getModel().isVertex(a)&&(a=d.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=b.copiedSize){d.getModel().beginUpdate();try{var e=d.getSelectionCells();for(a=0;a<e.length;a++)if(d.getModel().isVertex(e[a])){var k=d.getCellGeometry(e[a]);null!=k&&(k=k.clone(),k.width=b.copiedSize.width,k.height=
-b.copiedSize.height,d.getModel().setGeometry(e[a],k))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells())}catch(u){b.handleError(u)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
-function(a){d.turnShapes(d.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");
-this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",
-function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",
-function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container","0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});
-this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),e="";if(mxUtils.isNode(d.value)){var c=d.value.getAttribute("tooltip");null!=c&&(e=c)}e=new TextareaDialog(b,mxResources.get("editTooltip")+
-":",e,function(c){a.setTooltipForCell(d,c)});b.showDialog(e.container,320,200,!0,!0);e.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&d.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var d=a.getSelectionCell(),e=a.getLinkForCell(d)||"";b.showLinkDialog(e,mxResources.get("apply"),function(c){c=mxUtils.trim(c);a.setLinkForCell(d,0<c.length?c:null)})}},null,
-null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())})).isEnabled=m;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var e=null,c=d.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,
-c=b[0].name||b[0].type,c=c.charAt(0).toUpperCase()+c.substring(1),30<c.length&&(c=c.substring(0,30)+"..."));var f=d.getFreeInsertPoint(),e=new mxCell(c,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));e.vertex=!0;d.setLinkForCell(e,a);d.cellSizeUpdated(e,!0);d.getModel().beginUpdate();try{e=d.addCell(e),d.fireEvent(new mxEventObject("cellsInserted","cells",
-[e]))}finally{d.getModel().endUpdate()}d.setSelectionCell(e);d.scrollCellToVisible(d.getSelectionCell())}})})).isEnabled=m;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var d=a.getSelectedElement(),e=a.getParentByName(d,"A",a.cellEditor.textarea),c="";if(null==e&&null!=d&&null!=d.getElementsByTagName)for(var f=d.getElementsByTagName("a"),g=0;g<f.length&&null==e;g++)f[g].textContent==d.textContent&&(e=f[g]);null!=e&&
-"A"==e.nodeName&&(c=e.getAttribute("href")||"",a.selectNode(e));var p=a.cellEditor.saveSelection();b.showLinkDialog(c,mxResources.get("apply"),mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(p);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=m;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().getChildCount(e))d.updateGroupBounds([e],
-20);else{var c=d.view.getState(e),f=d.getCellGeometry(e);d.getModel().isVertex(e)&&null!=c&&null!=c.text&&null!=f&&d.isWrapping(e)?(f=f.clone(),f.height=c.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(e,f)):d.updateCellSize(e)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){d.stopEditing();a="1"==a.style.html?null:"1";d.getModel().beginUpdate();try{for(var e=
-d.getSelectionCells(),k=0;k<e.length;k++)if(state=d.getView().getState(e[k]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==a){var f=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=f;f=mxUtils.extractTextWithWhitespace(g.childNodes);d.cellLabelChanged(state.cell,f);d.setCellStyles("html",a,[e[k]])}else"0"==c&&"1"==a&&(f=mxUtils.htmlEntities(d.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(f)),d.setCellStyles("html",a,[e[k]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",e))}finally{d.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),b="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-b)});this.addAction("rotation",function(){var a="0",e=d.getView().getState(d.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",
-function(a){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,b.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,b.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),b=d.view.translate,e=d.view.scale;a.width/=e;a.height/=e;a.x=a.x/e-b.x;a.y=
-a.y/e-b.y;var e=d.container.clientWidth-10,c=d.container.clientHeight-10,f=Math.floor(20*Math.min(e/a.width,c/a.height))/20;d.zoomTo(f);mxUtils.hasScrollbars(d.container)&&(d.container.scrollTop=(a.y+b.y)*f-Math.max((c-a.height*f)/2+5,0),d.container.scrollLeft=(a.x+b.x)*f-Math.max((e-a.width*f)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
-10)/a.width/b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,b=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/(2*a.width)/
-b,(d.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=Math.min(a.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/
-20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,
-300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var k=null,k=this.addAction("grid",
-function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isGridEnabled()});k.setEnabled(!1);k=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});k.setEnabled(!1);
-k=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});k=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.foldingEnabled});k.isEnabled=m;k=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
-k.setToggleAction(!0);k.setSelectedCallback(function(){return d.scrollbars});k=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return d.pageVisible});k=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.connectionArrowsEnabled});
-k=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});k=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});
-k.isEnabled=m;k=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});k.setToggleAction(!0);k.setSelectedCallback(function(){return b.editor.autosave});k.isEnabled=m;k.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,
-320,280,!0,!0,function(){q=!1}),q=!0)}));k=mxUtils.bind(this,function(a,b,e,c){return this.addAction(a,function(){if(null!=e&&d.cellEditor.isContentEditing())e();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b,a);(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
-d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,c)});k("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",
-!1,null)},Editor.ctrlKey+"+B");k("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");k("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
+Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var e=c.selectParentAfterDelete?c.model.getParents(b):null;c.removeCells(b,a);if(null!=e){a=[];for(b=0;b<e.length;b++)c.model.contains(e[b])&&(c.model.isVertex(e[b])||c.model.isEdge(e[b]))&&a.push(e[b]);c.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,c=e.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&c.isEnabled()};this.addAction("new...",
+function(){c.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
+": "+d.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
+620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
+Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(c)}catch(u){b.handleError(u)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();
+try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&c.model.isEdge(b[e]);var d=c.view.translate,f=c.view.scale,g=d.x,p=d.y,d=null;if(1==b.length&&a){var l=c.getCellGeometry(b[0]);null!=l&&(d=l.getTerminalPoint(!0))}d=null!=d?d:c.getBoundingBoxFromGeometry(b,a);if(null!=d){var n=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g)),x=Math.round(c.snap(c.popupMenuHandler.triggerY/f-p));c.cellsMoved(b,n-d.x,x-d.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("copySize",
+function(a){a=c.getSelectionCell();c.isEnabled()&&null!=a&&c.getModel().isVertex(a)&&(a=c.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(c.isEnabled()&&!c.isSelectionEmpty()&&null!=b.copiedSize){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(a=0;a<e.length;a++)if(c.getModel().isVertex(e[a])){var k=c.getCellGeometry(e[a]);null!=k&&(k=k.clone(),k.width=b.copiedSize.width,k.height=
+b.copiedSize.height,c.getModel().setGeometry(e[a],k))}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{c.setSelectionCells(c.duplicateCells())}catch(u){b.handleError(u)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
+function(a){c.turnShapes(c.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");
+this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",
+function(){c.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){c.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",
+function(){c.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==c.getSelectionCount()?c.setCellStyles("container","1"):c.setSelectionCell(c.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==c.getSelectionCount()&&0==c.getModel().getChildCount(c.getSelectionCell())?c.setCellStyles("container","0"):c.setSelectionCells(c.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){c.removeCellsFromParent()});
+this.addAction("edit",function(){c.isEnabled()&&c.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=c.getSelectionCell()||c.getModel().getRoot();b.showDataDialog(a)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),e="";if(mxUtils.isNode(c.value)){var d=c.value.getAttribute("tooltip");null!=d&&(e=d)}e=new TextareaDialog(b,mxResources.get("editTooltip")+
+":",e,function(d){a.setTooltipForCell(c,d)});b.showDialog(e.container,320,200,!0,!0);e.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=c.getLinkForCell(c.getSelectionCell());null!=a&&c.openLink(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),e=a.getLinkForCell(c)||"";b.showLinkDialog(e,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}},null,
+null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(c.clearSelection(),b.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,b){a=mxUtils.trim(a);if(0<a.length){var e=null,d=c.getLinkTitle(a);null!=b&&0<b.length&&(e=b[0].iconUrl,
+d=b[0].name||b[0].type,d=d.charAt(0).toUpperCase()+d.substring(1),30<d.length&&(d=d.substring(0,30)+"..."));var f=c.getFreeInsertPoint(),e=new mxCell(d,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));e.vertex=!0;c.setLinkForCell(e,a);c.cellSizeUpdated(e,!0);c.getModel().beginUpdate();try{e=c.addCell(e),c.fireEvent(new mxEventObject("cellsInserted","cells",
+[e]))}finally{c.getModel().endUpdate()}c.setSelectionCell(e);c.scrollCellToVisible(c.getSelectionCell())}})})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getSelectedElement(),e=a.getParentByName(c,"A",a.cellEditor.textarea),d="";if(null==e&&null!=c&&null!=c.getElementsByTagName)for(var f=c.getElementsByTagName("a"),g=0;g<f.length&&null==e;g++)f[g].textContent==c.textContent&&(e=f[g]);null!=e&&
+"A"==e.nodeName&&(d=e.getAttribute("href")||"",a.selectNode(e));var p=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(p);null!=d&&a.insertLink(d)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var a=c.getSelectionCells();if(null!=a){c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(c.getModel().getChildCount(e))c.updateGroupBounds([e],
+20);else{var d=c.view.getState(e),f=c.getCellGeometry(e);c.getModel().isVertex(e)&&null!=d&&null!=d.text&&null!=f&&c.isWrapping(e)?(f=f.clone(),f.height=d.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(e,f)):c.updateCellSize(e)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=a){c.stopEditing();a="1"==a.style.html?null:"1";c.getModel().beginUpdate();try{for(var e=
+c.getSelectionCells(),k=0;k<e.length;k++)if(state=c.getView().getState(e[k]),null!=state){var d=mxUtils.getValue(state.style,"html","0");if("1"==d&&null==a){var f=c.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=f;f=mxUtils.extractTextWithWhitespace(g.childNodes);c.cellLabelChanged(state.cell,f);c.setCellStyles("html",a,[e[k]])}else"0"==d&&"1"==a&&(f=mxUtils.htmlEntities(c.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),c.cellLabelChanged(state.cell,c.sanitizeHtml(f)),c.setCellStyles("html",a,[e[k]]))}b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=a?a:"0"],"cells",e))}finally{c.getModel().endUpdate()}}});this.addAction("wordWrap",function(){var a=c.getView().getState(c.getSelectionCell()),b="wrap";c.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(b=null);c.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+b)});this.addAction("rotation",function(){var a="0",e=c.getView().getState(c.getSelectionCell());null!=e&&(a=e.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&c.setCellStyles(mxConstants.STYLE_ROTATION,a)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,375,80,!0,!0);a.init()});this.addAction("resetView",function(){c.zoomTo(1);b.resetScrollbars()},null,null,"Home");this.addAction("zoomIn",
+function(a){c.isFastZoomEnabled()?c.lazyZoom(!0,!0,b.buttonZoomDelay):c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){c.isFastZoomEnabled()?c.lazyZoom(!1,!0,b.buttonZoomDelay):c.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var a=c.isSelectionEmpty()?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),b=c.view.translate,e=c.view.scale;a.width/=e;a.height/=e;a.x=a.x/e-b.x;a.y=
+a.y/e-b.y;var e=c.container.clientWidth-10,d=c.container.clientHeight-10,f=Math.floor(20*Math.min(e/a.width,d/a.height))/20;c.zoomTo(f);mxUtils.hasScrollbars(c.container)&&(c.container.scrollTop=(a.y+b.y)*f-Math.max((d-a.height*f)/2+5,0),c.container.scrollLeft=(a.x+b.x)*f-Math.max((e-a.width*f)/2+5,0))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-
+10)/a.width/b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=a.y*c.view.scale-1,c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();var a=c.pageFormat,b=c.pageScale;c.zoomTo(Math.floor(20*Math.min((c.container.clientWidth-10)/(2*a.width)/
+b,(c.container.clientHeight-10)/a.height/b))/20);mxUtils.hasScrollbars(c.container)&&(a=c.getPagePadding(),c.container.scrollTop=Math.min(a.y,(c.container.scrollHeight-c.container.clientHeight)/2),c.container.scrollLeft=Math.min(a.x,(c.container.scrollWidth-c.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){c.pageVisible||this.get("pageView").funct();c.zoomTo(Math.floor(20*(c.container.clientWidth-10)/c.pageFormat.width/c.pageScale)/
+20);if(mxUtils.hasScrollbars(c.container)){var a=c.getPagePadding();c.container.scrollLeft=Math.min(a.x*c.view.scale,(c.container.scrollWidth-c.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&c.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,
+300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*c.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,c.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var m=null,m=this.addAction("grid",
+function(){c.setGridEnabled(!c.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.isGridEnabled()});m.setEnabled(!1);m=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.graphHandler.guidesEnabled});m.setEnabled(!1);
+m=this.addAction("tooltips",function(){c.tooltipHandler.setEnabled(!c.tooltipHandler.isEnabled())});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.tooltipHandler.isEnabled()});m=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.foldingEnabled});m.isEnabled=k;m=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
+m.setToggleAction(!0);m.setSelectedCallback(function(){return c.scrollbars});m=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return c.pageVisible});m=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionArrowsEnabled});
+m=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});m=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});
+m.isEnabled=k;m=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return b.editor.autosave});m.isEnabled=k;m.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,
+320,280,!0,!0,function(){q=!1}),q=!0)}));m=mxUtils.bind(this,function(a,b,e,d){return this.addAction(a,function(){if(null!=e&&c.cellEditor.isContentEditing())e();else{c.stopEditing(!1);c.getModel().beginUpdate();try{var a=c.getSelectionCells();c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,b,a);(b&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?c.updateLabelElements(c.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?
+c.updateLabelElements(c.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&c.replaceElement(a)}):(b&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&c.updateLabelElements(c.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&c.replaceElement(a)});for(var d=0;d<a.length;d++)0==c.model.getChildCount(a[d])&&c.autoSizeCell(a[d],!1)}finally{c.getModel().endUpdate()}}},null,null,d)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",
+!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});
 this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",
-function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
-b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
-d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,
-"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),e=d.getCurrentCellStyle(a[0]),k="1"==mxUtils.getValue(e,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,
-k);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[k,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
-"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=d.view.getState(d.getSelectionCell()),e="1";null!=a&&null!=d.getFoldingImage(a)&&(e="0");d.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var b=d.getModel(),b=
-new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&d.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},
-null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var k=d.view.translate,c=d.view.scale,f=k.x,k=k.y,a=d.getModel().getParent(a),g=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=g;)f+=g.x,k+=g.y,a=d.getModel().getParent(a),g=d.getCellGeometry(a);f=Math.round(d.snap(d.popupMenuHandler.triggerX/c-f));c=Math.round(d.snap(d.popupMenuHandler.triggerY/
-c-k));b.addPointAt(b.state,f,c)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(d.getModel().isEdge(e)){var c=d.getCellGeometry(e);null!=c&&(c=c.clone(),c.points=null,d.getModel().setGeometry(e,c))}}}finally{d.getModel().endUpdate()}}},
-null,null,"Alt+Shift+C");k=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");k=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");k=this.addAction("indent",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");
-this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=d.getView().getState(d.getSelectionCell()),k="";null!=e&&(k=e.style[mxConstants.STYLE_IMAGE]||k);var c=d.cellEditor.saveSelection();b.showImageDialog(a,k,function(a,b,e){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(c),d.insertImage(a,b,e);else{var f=d.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var g=null;
-d.getModel().beginUpdate();try{if(0==f.length){var p=d.getFreeInsertPoint(),g=f=[d.insertVertex(d.getDefaultParent(),null,"",p.x,p.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",g))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=d.getCurrentCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",
-f):0==a.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==d.getSelectionCount()&&null!=b&&null!=e){var t=f[0],m=d.getModel().getGeometry(t);null!=m&&(m=m.clone(),m.width=b,m.height=e,d.getModel().setGeometry(t,m))}}finally{d.getModel().endUpdate()}null!=g&&(d.setSelectionCells(g),d.scrollCellToVisible(g[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=m;k=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=
-new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");k.setToggleAction(!0);
-k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));k=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));k=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,
-180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&
-this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,m){var k;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),k=mxResources.get(a)+"..."):k=mxResources.get(a);return this.put(a,new Action(k,b,e,d,m))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,e,d,m){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=m;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,null),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dashed",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),
+b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("dotted",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_DASHED,"1"),c.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",
+c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("sharp",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("rounded",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,
+"1"),c.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!c.isSelectionEmpty()&&c.isEnabled()){c.getModel().beginUpdate();try{var a=c.getSelectionCells(),e=c.getCurrentCellStyle(a[0]),k="1"==mxUtils.getValue(e,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,
+k);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[k,"0"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}}});this.addAction("curved",function(){c.getModel().beginUpdate();try{c.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),c.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
+"values",["0","1"],"cells",c.getSelectionCells()))}finally{c.getModel().endUpdate()}});this.addAction("collapsible",function(){var a=c.view.getState(c.getSelectionCell()),e="1";null!=a&&null!=c.getFoldingImage(a)&&(e="0");c.setCellStyles("collapsible",e);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[e],"cells",c.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=c.getSelectionCells();if(null!=a&&0<a.length){var b=c.getModel(),b=
+new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",b.getStyle(a[0])||"",function(b){null!=b&&c.setCellStyle(mxUtils.trim(b),a)},null,null,400,220);this.editorUi.showDialog(b.container,420,300,!0,!0);b.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){c.isEnabled()&&!c.isSelectionEmpty()&&b.setDefaultStyle(c.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){c.isEnabled()&&b.clearDefaultStyle()},
+null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=c.getSelectionCell();if(null!=a&&c.getModel().isEdge(a)){var b=e.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(var k=c.view.translate,d=c.view.scale,f=k.x,k=k.y,a=c.getModel().getParent(a),g=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=g;)f+=g.x,k+=g.y,a=c.getModel().getParent(a),g=c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/d-f));d=Math.round(c.snap(c.popupMenuHandler.triggerY/
+d-k));b.addPointAt(b.state,f,d)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(c.getModel().isEdge(e)){var d=c.getCellGeometry(e);null!=d&&(d=d.clone(),d.points=null,c.getModel().setGeometry(e,d))}}}finally{c.getModel().endUpdate()}}},
+null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("indent",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("indent",!1,null)}),null,null,"Shift+Tab");
+this.addAction("image...",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),k="";null!=e&&(k=e.style[mxConstants.STYLE_IMAGE]||k);var d=c.cellEditor.saveSelection();b.showImageDialog(a,k,function(a,b,e){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(d),c.insertImage(a,b,e);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var g=null;
+c.getModel().beginUpdate();try{if(0==f.length){var p=c.getFreeInsertPoint(),g=f=[c.insertVertex(c.getDefaultParent(),null,"",p.x,p.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=c.getCurrentCellStyle(f[0]);"image"!=k[mxConstants.STYLE_SHAPE]&&"label"!=k[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=b&&null!=e){var t=f[0],m=c.getModel().getGeometry(t);null!=m&&(m=m.clone(),m.width=b,m.height=e,c.getModel().setGeometry(t,m))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=
+new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);
+m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,
+180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&
+this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,c,k){var m;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),m=mxResources.get(a)+"..."):m=mxResources.get(a);return this.put(a,new Action(m,b,e,c,k))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,c,k){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=c;this.shortcut=k;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
 Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.shadowData=this.data=b||"";this.shadowPages=null;this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
 DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowData=null;DrawioFile.prototype.shadowPages=null;
 DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
 DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
-DrawioFile.prototype.updateFile=function(a,b,e,d){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(m){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=m?this.mergeFile(m,a,b,d):this.reloadFile(a,b))}catch(k){null!=b&&b(k)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,e,d){var m=!0;try{this.stats.fileMerged++;var k=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(k,this.ui.pages):null;var u=[this.ui.diffPages(null!=d?d:k,this.shadowPages)];if(!this.ignorePatches(u)){var y=this.ui.patchPages(k,
-u[0]);d={};var B=this.ui.getHashValueForPages(y,d),k={},c=this.ui.getHashValueForPages(this.shadowPages,k);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",c==B,B);if(null!=B&&B!=c){var f=this.compressReportData(this.getAnonymizedXmlForPages(q)),g=this.compressReportData(this.getAnonymizedXmlForPages(y)),p=this.ui.hashValue(a.getCurrentEtag()),l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(d)+
-"\nChecksum: "+B+"\nCurrent: "+c+"\nCurrent Details: "+JSON.stringify(k)+"\nFrom: "+p+"\nTo: "+l+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(A);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var n=this.getCurrentUser(),x=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}}catch(t){}}};
-DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var d=0;d<a.length;d++){var m=b.encode(new mxGraphModel(a[d].root));"1"!=urlParams.dev&&(m=this.ui.anonymizeNode(m,!0));m.setAttribute("id",a[d].getId());a[d].viewState&&this.ui.editor.graph.saveViewState(a[d].viewState,m,!0);e.appendChild(m)}return mxUtils.getPrettyXml(e)};
+DrawioFile.prototype.updateFile=function(a,b,e,c){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,c):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
+DrawioFile.prototype.mergeFile=function(a,b,e,c){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),q=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=q&&0<q.length){this.shadowPages=q;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=c?c:m,this.shadowPages)];if(!this.ignorePatches(u)){var z=this.ui.patchPages(m,
+u[0]);c={};var B=this.ui.getHashValueForPages(z,c),m={},d=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",d==B,B);if(null!=B&&B!=d){var f=this.compressReportData(this.getAnonymizedXmlForPages(q)),g=this.compressReportData(this.getAnonymizedXmlForPages(z)),p=this.ui.hashValue(a.getCurrentEtag()),l=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(c)+
+"\nChecksum: "+B+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+p+"\nTo: "+l+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(A){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(A);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,A);else{var n=this.getCurrentUser(),x=null!=n?n.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),x,A)}}catch(t){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var c=0;c<a.length;c++){var k=b.encode(new mxGraphModel(a[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[c].getId());a[c].viewState&&this.ui.editor.graph.saveViewState(a[c].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
 DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
-DrawioFile.prototype.checksumError=function(a,b,e,d,m){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var k=mxUtils.bind(this,function(a){var d=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+m+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+d+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==d?k(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==d?k(a):k(null)}),function(){})}else{var q=this.getCurrentUser(),u=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+m+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:m,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(y){}}}catch(y){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e,d){try{var m=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),k=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),u=null!=q?this.ui.hashValue(q.id):"unknown",y=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",B=this.getTitle(),c=B.lastIndexOf("."),q="xml";0<c&&(q=B.substring(c));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+q+")\nUser="+u+y+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:
-"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+m+"\n\nData:\n"+k,d)}catch(g){}};
-DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),k=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(k,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=
-this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(d){null!=b&&b(d)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
+DrawioFile.prototype.checksumError=function(a,b,e,c,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==c?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==c?m(a):m(null)}),function(){})}else{var q=this.getCurrentUser(),u=null!=q?q.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(z){}}}catch(z){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),q=this.getCurrentUser(),u=null!=q?this.ui.hashValue(q.id):"unknown",z=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",B=this.getTitle(),d=B.lastIndexOf("."),q="xml";0<d&&(q=B.substring(d));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+q+")\nUser="+u+z+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=b?"\n\n"+b:
+"")+(null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+k+"\n\nData:\n"+m,c)}catch(g){}};
+DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var c=this.ui.getCurrentFile();null!=c&&(c.stats=
+this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(c){null!=b&&b(c)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
 DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,d=e.history.slice(),m=e.indexOfNextAdd,k=this.ui.editor.graph;k.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=k.foldingEnabled,y=k.mathEnabled,B=k.cellRenderer.redraw;k.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());B.apply(this,arguments)};k.model.beginUpdate();try{for(var c=
-0;c<a.length;c++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[c],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{k.container.style.visibility="";k.model.endUpdate();k.cellRenderer.redraw=B;this.changeListenerEnabled=q;e.history=d;e.indexOfNextAdd=m;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)y!=
-k.mathEnabled?(this.ui.editor.updateGraphComponents(),k.refresh()):(u!=k.foldingEnabled?k.view.revalidate():k.view.validate(),k.sizeDidChange());this.ui.updateTabContainer()}};
-DrawioFile.prototype.save=function(a,b,e,d,m,k){try{if(this.isEditable())if(!m&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=e)e(q);else throw q;}};
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,c=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var q=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,z=m.mathEnabled,B=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());B.apply(this,arguments)};m.model.beginUpdate();try{for(var d=
+0;d<a.length;d++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[d],!0,b,this.isModified());0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=B;this.changeListenerEnabled=q;e.history=c;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)z!=
+m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.save=function(a,b,e,c,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(q){if(null!=e)e(q);else throw q;}};
 DrawioFile.prototype.updateFileData=function(a){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,null!=a?!a:!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};
-DrawioFile.prototype.decompress=function(){this.updateFileData(!1);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","false");this.fileChanged()};DrawioFile.prototype.compress=function(){this.updateFileData(!0);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","true");this.fileChanged()};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
+DrawioFile.prototype.decompress=function(){this.updateFileData(!1);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","false");this.fileChanged()};DrawioFile.prototype.compress=function(){this.updateFileData(!0);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","true");this.fileChanged()};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
 DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};
 DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
 DrawioFile.prototype.open=function(){this.stats.opened++;var a=this.getData();if(null!=a){var b=function(a){for(var b=0;null!=a&&b<a.length;b++){var e=a[b];null!=e.id&&0==e.id.indexOf("extFont_")&&e.parentNode.removeChild(e)}};b(document.querySelectorAll("head > style[id]"));b(document.querySelectorAll("head > link[id]"));this.ui.setFileData(a);this.isModified()||(this.shadowData=mxUtils.getXml(this.ui.getXmlFileData()),this.shadowPages=null)}this.installListeners();this.isSyncSupported()&&this.startSync()};
@@ -2852,26 +2854,26 @@ DrawioFile.prototype.showRefreshDialog=function(a,b,e){null==e&&(e=mxResources.g
 b)}),null,mxResources.get("synchronize"),mxUtils.bind(this,function(){this.reloadFile(a,b)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150))};
 DrawioFile.prototype.showCopyDialog=function(a,b,e){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(a,b)}),null,mxResources.get("overwrite"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),360,150)};
 DrawioFile.prototype.showConflictDialog=function(a,b){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),a,null,mxResources.get("synchronize"),b,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),340,150)};
-DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),d=mxResources.get("redirectToNewApp");null!=b&&(d+=" ("+b+")");var m=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
-window.location.href=e});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),m,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(d,m,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-m)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
+DrawioFile.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var e=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),c=mxResources.get("redirectToNewApp");null!=b&&(c+=" ("+b+")");var k=mxUtils.bind(this,function(){var b=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==e?window.location.reload():
+window.location.href=e});null==a&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});null!=a?this.isModified()?this.ui.confirm(c,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(c,k,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+k)}};DrawioFile.prototype.handleFileSuccess=function(a){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.isModified()?this.fileChanged():a?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
 DrawioFile.prototype.handleFileError=function(a,b){this.ui.spinner.stop();if(this.ui.getCurrentFile()==this)if(this.inConflictState)this.handleConflictError(a,b);else if(this.isModified()&&this.addUnsavedStatus(a),b)this.ui.handleError(a,null!=a?mxResources.get("errorSavingFile"):null);else if(!this.isModified()){var e=null!=a?null!=a.error?a.error.message:a.message:null;null!=e&&60<e.length&&(e=e.substring(0,60)+"...");this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+
 mxUtils.htmlEntities(mxResources.get("error"))+(null!=e?" ("+mxUtils.htmlEntities(e)+")":"")+"</div>")}};
-DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,d,m):this.invalidChecksum?this.showRefreshDialog(e,d,this.getErrorMessage(a)):b?this.showConflictDialog(m,k):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(e,d)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.handleConflictError=function(a,b){var e=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),c=mxUtils.bind(this,function(a){this.handleFileError(a,!0)}),k=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&(this.ui.editor.setStatus(""),this.save(!0,e,c,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage))}),m=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.save(!0,e,c,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==a?null:a.commitMessage)}),c)});"none"==DrawioFile.SYNC?this.showCopyDialog(e,c,k):this.invalidChecksum?this.showRefreshDialog(e,c,this.getErrorMessage(a)):b?this.showConflictDialog(k,m):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(e,c)}),this.getErrorMessage(a))};DrawioFile.prototype.getErrorMessage=function(a){return null!=a?null!=a.error?a.error.message:a.message:null};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
 DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=
 this.lastChanged)}),mxUtils.bind(this,function(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
-DrawioFile.prototype.fileSaved=function(a,b,e,d){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,d,a)}catch(q){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=d&&d(q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,q);else{var m=
-this.getCurrentUser(),k=null!=m?m.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),k,q)}}catch(u){}}};
-DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var m=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==m&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this,
-function(a){null!=d&&d(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=m};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
+DrawioFile.prototype.fileSaved=function(a,b,e,c){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,c,a)}catch(q){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=c&&c(q);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,q);else{var k=
+this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,q)}}catch(u){}}};
+DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this,
+function(a){null!=c&&c(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};
 DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};
+DrawioFile.prototype.close=function(a){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),c=0<e?a.substring(e):"",e=b.lastIndexOf(".");return c===(0<e?b.substring(e):"")}return a==b};
 DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.stats.destroyed++;this.clearAutosave();this.removeListeners();null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
-LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var m=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,m?"image/png":"text/xml",m);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)+
-(m?"&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()});m?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):k(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(a,b){a([])};DrawioFile.prototype.addComment=function(a,b,e){b(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(a,b){return new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};LocalFile=function(a,b,e,c){DrawioFile.call(this,a,b);this.title=e;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,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
+LocalFile.prototype.saveFile=function(a,b,e,c){this.title=a;this.updateFileData();b=this.getData();var k=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),m=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,k?"image/png":"text/xml",k);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)+
+(k?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});k?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(a)}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
 LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio"},{description:"diagramPngDesc",extension:"png"},{description:"diagramSvgDesc",extension:"svg"},{description:"diagramHtmlDesc",extension:"html"},{description:"diagramXmlDesc",extension:"xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},
 {ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
@@ -2893,62 +2895,62 @@ type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal
 enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",
 type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",defVal:!0},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",
 defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",
-dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a,c){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,d=c.editorUi.editor.graph;return null!=b&&(d.isSwimlane(b)||0<d.model.getChildCount(b))},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,c){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,d=c.editorUi.editor.graph;return null!=b&&
-(d.isContainer(b)&&"0"!=a.style.collapsible||!d.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,c){return 1==a.vertices.length&&0==a.edges.length&&!c.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",
-defVal:!1,isVisible:function(a,c){var b=c.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,c){var b=0<a.vertices.length?c.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
+dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1.5,isVisible:function(a,d){return"1"==mxUtils.getValue(a.style,"comic","0")}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&(c.isSwimlane(b)||0<c.model.getChildCount(b))},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(a,d){var b=1==a.vertices.length&&0==a.edges.length?a.vertices[0]:null,c=d.editorUi.editor.graph;return null!=b&&
+(c.isContainer(b)&&"0"!=a.style.collapsible||!c.isContainer(b)&&"1"==a.style.collapsible)},isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(a,d){return 1==a.vertices.length&&0==a.edges.length&&!d.editorUi.editor.graph.isSwimlane(a.vertices[0])&&null==mxUtils.getValue(a.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",
+defVal:!1,isVisible:function(a,d){var b=d.editorUi.editor.graph.model;return 0<a.vertices.length?b.isVertex(b.getParent(a.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(a,d){var b=0<a.vertices.length?d.editorUi.editor.graph.getCellGeometry(a.vertices[0]):
 null;return null!=b&&!b.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",
-dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,c){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,c){return 0<a.vertices.length&&c.editorUi.editor.graph.isContainer(a.vertices[0])}}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n#          "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,c,b){if(null!=a&&"undefined"!==typeof pako){var d=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=d&&0<d.length)for(var e=0;e<d.length;e++)if("mxgraph"==d[e].getAttribute("class")){f.push(d[e]);break}0<f.length&&
-(d=f[0].getAttribute("data-mxgraph"),null!=d?(f=JSON.parse(d),null!=f&&null!=f.xml&&(a=mxUtils.parseXml(f.xml),a=a.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(d=mxUtils.getTextContent(f[0]),d=Graph.decompress(d,null,b),0<d.length&&(a=mxUtils.parseXml(d),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(d=a.getAttribute("content"),null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),
-null!=d&&0<d.length)a=mxUtils.parseXml(d).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),0<d.length&&(f=d[Math.max(0,Math.min(d.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f,b)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,c){var b=mxUtils.trim(mxUtils.getTextContent(a)),d=null;
-0<b.length?(b=Graph.decompress(b,null,c),null!=b&&0<b.length&&(d=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(d=mxUtils.createXmlDocument(),d.appendChild(d.importNode(b[0],!0)),d=d.documentElement));return d};Editor.getDiagramNodeXml=function(a){var c=mxUtils.getTextContent(a),b=null;0<c.length?b=Graph.decompress(c):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&
-!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var c=null,b="",d=0,f=0,e=[],g=null;f<a.length;){var l=a.charCodeAt(f),f=f+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(d)?d++:d=0;if(19==d){var n=a.indexOf("%3C%2Fmxfile%3E)",f)+15,f=f-9;if(n>f){c=a.substring(f,n);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==c&&(c=Editor.extractGraphModelFromXref(e));null!=c&&
-(c=decodeURIComponent(c.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return c};Editor.extractGraphModelFromXref=function(a){var c=a.trailer,b=null;null!=c&&(c=/.* \/Info (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(c=a[c[1]],null!=c&&(c=/.* \/Subject (\d+) (\d+) R/g.exec(c.join("\n")),null!=c&&0<c.length&&(a=a[c[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var c=null;try{var b=a.substring(a.indexOf(",")+1),d=window.atob&&
-!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,b,f){a=d.substring(a+8,a+8+f);"zTXt"==b?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=pako.inflateRaw(a.substring(f+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(N){}null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));
-null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};Editor.extractParserError=function(a,c){var b=null,d=null!=a?a.getElementsByTagName("parsererror"):null;null!=d&&0<d.length&&(b=c||mxResources.get("invalidChars"),d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0])));return null!=b?mxUtils.trim(b):b};Editor.configure=function(a,c){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;
+dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(a,d){var b=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,null);return null==b||b==mxConstants.NONE}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(a,d){return 0<a.vertices.length&&d.editorUi.editor.graph.isContainer(a.vertices[0])}}];Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## The label is concatenated in the form fromlabel + label + tolabel if all are defined.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n#          "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nEvan Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nRon Donovan,System Admin,rdo,Office 3,Evan Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
+Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.deflateRaw(a,{to:"string"})};Editor.fastDecompress=function(a){return null==a||0==a.length||"undefined"===typeof pako?a:pako.inflateRaw(a,{to:"string"})};Editor.extractGraphModel=function(a,d,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=c&&0<c.length)for(var e=0;e<c.length;e++)if("mxgraph"==c[e].getAttribute("class")){f.push(c[e]);break}0<f.length&&
+(c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(a=mxUtils.parseXml(f.xml),a=a.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c,null,b),0<c.length&&(a=mxUtils.parseXml(c),a=a.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||d||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f,b)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,d){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;
+0<b.length?(b=Graph.decompress(b,null,d),null!=b&&0<b.length&&(c=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(b[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var d=mxUtils.getTextContent(a),b=null;0<d.length?b=Graph.decompress(d):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&
+!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var d=null,b="",c=0,f=0,e=[],g=null;f<a.length;){var l=a.charCodeAt(f),f=f+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var n=a.indexOf("%3C%2Fmxfile%3E)",f)+15,f=f-9;if(n>f){d=a.substring(f,n);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==d&&(d=Editor.extractGraphModelFromXref(e));null!=d&&
+(d=decodeURIComponent(d.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return d};Editor.extractGraphModelFromXref=function(a){var d=a.trailer,b=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(d=a[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(a=a[d[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var d=null;try{var b=a.substring(a.indexOf(",")+1),c=window.atob&&
+!mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,b,f){a=c.substring(a+8,a+8+f);"zTXt"==b?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=pako.inflateRaw(a.substring(f+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(d=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(d=a[1]));if(null!=d||"IDAT"==b)return!0}))}catch(N){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));
+null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(a,d){var b=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(b=d||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0])));return null!=b?mxUtils.trim(b):b};Editor.configure=function(a,d){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;
 ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=a.autosaveDelay||DrawioFile.prototype.autosaveDelay;null!=a.templateFile&&(EditorUi.templateFile=
 a.templateFile);null!=a.globalVars&&(Editor.globalVars=a.globalVars);null!=a.compressXml&&(Editor.compressXml=a.compressXml);a.customFonts&&(Menus.prototype.defaultFonts=a.customFonts.concat(Menus.prototype.defaultFonts));a.customPresetColors&&(ColorDialog.prototype.presetColors=a.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=a.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=a.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=
-a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var d=document.getElementsByTagName("script")[0];d.parentNode.insertBefore(b,d)}null!=a.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);
+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.libraries&&(Sidebar.prototype.customEntries=a.libraries);null!=a.enabledLibraries&&(Sidebar.prototype.enabledLibraries=a.enabledLibraries);null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);
 null!=a.enableCustomLibraries&&(Editor.enableCustomLibraries=a.enableCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);
-a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&Editor.configureFontCss(a.fontCss);null!=a.autosaveDelay&&(b=parseInt(a.autosaveDelay),!isNaN(b)&&0<b?DrawioFile.prototype.autosaveDelay=b:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!c)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.configureFontCss=function(a){if(null!=a){Editor.prototype.fontCss=a;var c=document.getElementsByTagName("script")[0];
-if(null!=c&&null!=c.parentNode){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a));c.parentNode.insertBefore(b,c);a=a.split("url(");for(b=1;b<a.length;b++){var d=a[b].indexOf(")"),d=a[b].substring(0,d).replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),""),f=document.createElement("link");f.setAttribute("rel","preload");f.setAttribute("href",d);f.setAttribute("as","font");f.setAttribute("crossorigin","");c.parentNode.insertBefore(f,
-c)}}}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var c=[],b=0;b<a;b++)c.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return c.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!mxClient.IS_SF;Editor.prototype.editButtonLink=null!=urlParams.edit?
-decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div");null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&
-(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");
-b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1);if(b=c.getAttribute("extFonts"))try{for(b=
-b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),d=0;d<b.length;d++)this.graph.addExtFont(b[d].name,b[d].url)}catch(N){console.log("ExtFonts format error: "+N.message)}}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");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var d=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});c.setAttribute("extFonts",d.join("|"))}return c};Editor.prototype.isDataSvg=function(a){try{var c=
-mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(H){}return!1};Editor.prototype.extractGraphModel=function(a,c,b){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;
-Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,
-arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,c){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
-MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=
-0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&
-Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=
-[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
-return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.diagrams\.new\/proxy/.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=
-a.convert,b=this;a.convert=function(d){if(null!=d){var f="http://"==d.substring(0,7)||"https://"==d.substring(0,8);f&&!navigator.onLine?d=EditorUi.prototype.svgBrokenImage.src:!f||d.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=c.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(EditorUi.prototype.svgBrokenImage.src)});else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=b.height;a.width=b.width;d.drawImage(b,0,0);try{c(a.toDataURL())}catch(D){c(EditorUi.prototype.svgBrokenImage.src)}};
-b.onerror=function(){c(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,c,b,d){null==d&&(d=this.createImageUrlConverter());var f=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var l=a.getElementsByTagName(b),n=0;n<l.length;n++)mxUtils.bind(this,function(b){var l=d.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=e[l];null==n?(f++,this.convertImageToDataUri(l,function(d){null!=d&&(e[l]=d,b.setAttribute(g,d));f--;0==f&&c(a)})):b.setAttribute(g,
-n)}else null!=l&&b.setAttribute(g,l)})(l[n])});b("image","xlink:href");b("img","src");0==f&&c(a)};Editor.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,f,e,g;b<d;){f=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
-2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);
-c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c};Editor.prototype.loadUrl=function(a,c,b,d,f,e){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);f=null!=f?f:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
-mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}e=null!=e?e:"data:image/png;base64,";d=e+this.base64Encode(d)}c(d)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){f&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(R){null!=b&&b(R)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var c=
-function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),d=0,f={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[b[0]],g=1;g<b.length;g++){var l=b[g].indexOf(")");e.push('url("');e.push(f[c(b[g].substring(0,l))]);e.push('"'+b[g].substring(l))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var g=1;g<b.length;g++){var l=b[g].indexOf(")"),n=null,p=b[g].indexOf("format(",l);0<p&&(n=c(b[g].substring(p+7,b[g].indexOf(")",
-p))));mxUtils.bind(this,function(a){if(null==f[a]){f[a]=a;d++;var c="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))c=
-"application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){f[a]=c;d--;e()}),mxUtils.bind(this,function(a){d--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[g].substring(0,l)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var c=document.getElementsByTagName("style"),b=0;b<c.length;b++)0<mxUtils.getTextContent(c[b]).indexOf("MathJax")&&
-a[0].appendChild(c[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,c){c=null!=c?c:this.fontCss;if(null!=c){var b=a.getElementsByTagName("defs"),d=a.ownerDocument;0==b.length?(b=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,
-c);b.appendChild(d)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,c,b,d,f,e,g,l,n,p,t,k,x,m){e=null!=e?e:!0;k=null!=k?k:this.graph;x=null!=x?x:0;var v=n?null:k.background;v==mxConstants.NONE&&(v=null);null==v&&(v=d);null==v&&0==n&&(v=this.graph.defaultPageBackgroundColor);this.convertImages(k.getSvg(v,
-null,null,m,null,null!=g?g:!0,null,null,null,p),mxUtils.bind(this,function(b){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=c&&(l=e?Math.min(1,Math.min(3*c/(4*p),c/n)):c/n);n=Math.ceil(l*n)+2*x;p=Math.ceil(l*p)+2*x;g.setAttribute("width",n);g.setAttribute("height",p);var t=g.getContext("2d");null!=v&&(t.beginPath(),t.rect(0,0,n,p),t.fillStyle=v,t.fill());
-t.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(d,x/l,x/l);a(g)},0):(t.drawImage(d,x/l,x/l),a(g))}catch(aa){null!=f&&f(aa)}});d.onerror=function(a){null!=f&&f(a)};try{p&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}k.mathEnabled&&this.addMathCss(b);d.src=this.createSvgDataUri(mxUtils.getXml(b))});
-this.loadFonts(g)}catch(U){null!=f&&f(U)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,c,b,d,f){function e(a,c){var b=n;n+=c;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
-10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,n);do{var p=g(a);if("IDAT"==e(a,4)){f=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=EditorUi.prototype.updateCRC(d,c,0,4);d=EditorUi.prototype.updateCRC(d,b,0,b.length);f+=l(b.length)+c+b+l(d^4294967295);f+=a.substring(n-8,a.length);break}f+=a.substring(n-8,n-4+p);e(a,p);e(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};
-if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var m=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
-function(a,c){var b=null;null!=a.editor.graph.getModel().getParent(c)?b=c.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var q=Format.prototype.init;Format.prototype.init=function(){q.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments):
-this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var y=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=y.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,d=this.createOption(mxResources.get("shadow"),
-function(){return b.shadowVisible},function(a){var d=new ChangePageSetup(c);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;b.model.execute(d)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var B=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(a){a=B.apply(this,arguments);var c=this.editorUi,b=c.editor.graph;if(b.isEnabled()){var d=c.getCurrentFile();if(null!=d&&d.isAutosaveOptional()){var f=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a);c.editor.autosave&&d.isModified()&&d.fileChanged()},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}});
-a.appendChild(f)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){c.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};c.addListener("mathEnabledChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var e=c.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&Editor.configureFontCss(a.fontCss);null!=a.autosaveDelay&&(b=parseInt(a.autosaveDelay),!isNaN(b)&&0<b?DrawioFile.prototype.autosaveDelay=b:EditorUi.debug("Invalid autosaveDelay: "+a.autosaveDelay));if(null!=a.plugins&&!d)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.configureFontCss=function(a){if(null!=a){Editor.prototype.fontCss=a;var d=document.getElementsByTagName("script")[0];
+if(null!=d&&null!=d.parentNode){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a));d.parentNode.insertBefore(b,d);a=a.split("url(");for(b=1;b<a.length;b++){var c=a[b].indexOf(")"),c=a[b].substring(0,c).replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),""),f=document.createElement("link");f.setAttribute("rel","preload");f.setAttribute("href",c);f.setAttribute("as","font");f.setAttribute("crossorigin","");d.parentNode.insertBefore(f,
+d)}}}};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(a){a=null!=a?a:Editor.GUID_LENGTH;for(var d=[],b=0;b<a;b++)d.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return d.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!mxClient.IS_SF;Editor.prototype.editButtonLink=null!=urlParams.edit?
+decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(d){d=null!=d&&"mxlibrary"!=d.nodeName?this.extractGraphModel(d):null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],c=b.getElementsByTagName("div");null!=c&&0<c.length&&(b=c[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==d.nodeName){b=d.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&
+(c=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=c&&(f=new mxCodec(c.ownerDocument),f.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var f=new mxCodec(c.ownerDocument);f.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==d.getAttribute("math");
+b=d.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1);if(b=d.getAttribute("extFonts"))try{for(b=
+b.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}}),c=0;c<b.length;c++)this.graph.addExtFont(b[c].name,b[c].url)}catch(N){console.log("ExtFonts format error: "+N.message)}}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 d=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=
+this.graph.currentStyle&&d.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&d.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));d.setAttribute("math",this.graph.mathEnabled?"1":"0");d.setAttribute("shadow",this.graph.shadowVisible?"1":"0");if(null!=this.graph.extFonts&&0<this.graph.extFonts.length){var c=this.graph.extFonts.map(function(a){return a.name+"^"+a.url});d.setAttribute("extFonts",c.join("|"))}return d};Editor.prototype.isDataSvg=function(a){try{var d=
+mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=d&&(null!=d&&"<"!=d.charAt(0)&&"%"!=d.charAt(0)&&(d=unescape(window.atob?atob(d):Base64.decode(cont,d))),null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d)),null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(a,d,b){return Editor.extractGraphModel.apply(this,arguments)};var e=Editor.prototype.resetGraph;
+Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();e.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,
+arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(a,d){a=null!=a?a:DRAW_MATH_URL+"/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(function(){"hidden"!=a.style.visibility&&MathJax.Hub.Queue(["Typeset",
+MathJax.Hub,a])},0)};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(d||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],"HTML-CSS":{imageFont:null},TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=
+0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,d){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&
+Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var f=document.createElement("script");f.type="text/javascript";f.src=a;c[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 d=
+[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,c,f){void 0!==b?d.push(b.replace(/\\'/g,"'")):void 0!==c?d.push(c.replace(/\\"/g,'"')):void 0!==f&&d.push(f);return""});/,\s*$/.test(a)&&d.push("");return d};Editor.prototype.isCorsEnabledForUrl=function(a){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(a)||"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(a)||/^https?:\/\/[^\/]*\.diagrams\.new\/proxy/.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};Editor.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var d=
+a.convert,b=this;a.convert=function(c){if(null!=c){var f="http://"==c.substring(0,7)||"https://"==c.substring(0,8);f&&!navigator.onLine?c=EditorUi.prototype.svgBrokenImage.src:!f||c.substring(0,a.baseUrl.length)==a.baseUrl||EditorUi.prototype.crossOriginImages&&b.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=d.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};Editor.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
+btoa(unescape(encodeURIComponent(a)))};Editor.prototype.convertImageToDataUri=function(a,d){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){d(this.createSvgDataUri(a.getText()))}),function(){d(EditorUi.prototype.svgBrokenImage.src)});else{var b=new Image;EditorUi.prototype.crossOriginImages&&(b.crossOrigin="anonymous");b.onload=function(){var a=document.createElement("canvas"),c=a.getContext("2d");a.height=b.height;a.width=b.width;c.drawImage(b,0,0);try{d(a.toDataURL())}catch(D){d(EditorUi.prototype.svgBrokenImage.src)}};
+b.onerror=function(){d(EditorUi.prototype.svgBrokenImage.src)};b.src=a}};Editor.prototype.convertImages=function(a,d,b,c){null==c&&(c=this.createImageUrlConverter());var f=0,e=b||{};b=mxUtils.bind(this,function(b,g){for(var l=a.getElementsByTagName(b),n=0;n<l.length;n++)mxUtils.bind(this,function(b){var l=c.convert(b.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=e[l];null==n?(f++,this.convertImageToDataUri(l,function(c){null!=c&&(e[l]=c,b.setAttribute(g,c));f--;0==f&&d(a)})):b.setAttribute(g,
+n)}else null!=l&&b.setAttribute(g,l)})(l[n])});b("image","xlink:href");b("img","src");0==f&&d(a)};Editor.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,f,e,g;b<c;){f=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);d+="==";break}e=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
+2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);d+="=";break}g=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(e&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);
+d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return d};Editor.prototype.loadUrl=function(a,d,b,c,f,e){try{var g=c||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);f=null!=f?f:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=d){var c=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=
+mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var c=Array(a.length),f=0;f<a.length;f++)c[f]=String.fromCharCode(a[f]);c=c.join("")}e=null!=e?e:"data:image/png;base64,";c=e+this.base64Encode(c)}d(c)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){f&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:l})})});l()}catch(S){null!=b&&b(S)}};Editor.prototype.loadFonts=function(a){if(null!=this.fontCss&&null==this.resolvedFontCss){var d=
+function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.fontCss.split("url("),c=0,f={},e=mxUtils.bind(this,function(){if(0==c){for(var e=[b[0]],g=1;g<b.length;g++){var l=b[g].indexOf(")");e.push('url("');e.push(f[d(b[g].substring(0,l))]);e.push('"'+b[g].substring(l))}this.resolvedFontCss=e.join("");a()}});if(0<b.length)for(var g=1;g<b.length;g++){var l=b[g].indexOf(")"),n=null,p=b[g].indexOf("format(",l);0<p&&(n=d(b[g].substring(p+7,b[g].indexOf(")",
+p))));mxUtils.bind(this,function(a){if(null==f[a]){f[a]=a;c++;var d="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))d=
+"application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){f[a]=d;c--;e()}),mxUtils.bind(this,function(a){c--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[g].substring(0,l)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)0<mxUtils.getTextContent(d[b]).indexOf("MathJax")&&
+a[0].appendChild(d[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.fontCss;if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,
+d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,d,b,c,f,e,g,l,n,p,t,k,x,m){e=null!=e?e:!0;k=null!=k?k:this.graph;x=null!=x?x:0;var v=n?null:k.background;v==mxConstants.NONE&&(v=null);null==v&&(v=c);null==v&&0==n&&(v=this.graph.defaultPageBackgroundColor);this.convertImages(k.getSvg(v,
+null,null,m,null,null!=g?g:!0,null,null,null,p),mxUtils.bind(this,function(b){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),p=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=d&&(l=e?Math.min(1,Math.min(3*d/(4*p),d/n)):d/n);n=Math.ceil(l*n)+2*x;p=Math.ceil(l*p)+2*x;g.setAttribute("width",n);g.setAttribute("height",p);var t=g.getContext("2d");null!=v&&(t.beginPath(),t.rect(0,0,n,p),t.fillStyle=v,t.fill());
+t.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(c,x/l,x/l);a(g)},0):(t.drawImage(c,x/l,x/l),a(g))}catch(ba){null!=f&&f(ba)}});c.onerror=function(a){null!=f&&f(a)};try{p&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}k.mathEnabled&&this.addMathCss(b);c.src=this.createSvgDataUri(mxUtils.getXml(b))});
+this.loadFonts(g)}catch(U){null!=f&&f(U)}}),b,t)};Editor.prototype.writeGraphModelToPng=function(a,d,b,c,f){function e(a,d){var b=n;n+=d;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
+10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,n);do{var p=g(a);if("IDAT"==e(a,4)){f=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=EditorUi.prototype.updateCRC(c,d,0,4);c=EditorUi.prototype.updateCRC(c,b,0,b.length);f+=l(b.length)+d+b+l(c^4294967295);f+=a.substring(n-8,a.length);break}f+=a.substring(n-8,n-4+p);e(a,p);e(a,4)}while(p);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};
+if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
+function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var q=Format.prototype.init;Format.prototype.init=function(){q.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments):
+this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var z=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=z.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),
+function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var B=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(a){a=B.apply(this,arguments);var d=this.editorUi,b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var f=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
+a.appendChild(f)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){d.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var e=d.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
 e.style.position="relative";e.style.marginLeft="6px";e.style.top="2px";f.appendChild(e)}return a};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
 [{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
 dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -2970,63 +2972,63 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
 font:"#ffffff"},{fill:"#aa00ff",stroke:"#7700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#ffffff"},{fill:"#f0a30a",stroke:"#BD7000",font:"#ffffff"},{fill:"#e3c800",stroke:"#B09500",font:"#ffffff"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},
 {fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",
 stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=
-null;StyleFormatPanel.prototype.findCommonProperties=function(a,c,b){if(null!=c){var d=function(a){if(null!=a)if(b)for(var d=0;d<a.length;d++)c[a[d].name]=a[d];else for(var f in c){for(var e=!1,d=0;d<a.length;d++)if(a[d].name==f&&a[d].type==c[f].type){e=!0;break}e||delete c[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&null!=f.shape&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,
-Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),d(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{d(JSON.parse(a))}catch(D){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
-{},d=a.vertices,f=a.edges,e=0;e<d.length;e++)this.findCommonProperties(d[e],b,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==d.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));
-c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);
-mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,c,b){function d(a,c,b,d){k.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=d?g.splice(d,1):g[b.index]=c:g.push(c);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));c=g.join(",");null!=b.countProperty&&
-(k.setCellStyles(b.countProperty,g.length,k.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}k.setCellStyles(a,c,k.getSelectionCells());f.push(a);e.push(c);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>c)p=p.slice(0,c);else for(var x=p.length;x<c;x++)p.push(n);p=p.join(",");k.setCellStyles(b.dependentProps[a],p,k.getSelectionCells());f.push(b.dependentProps[a]);e.push(p)}if("function"==typeof b.onChange)b.onChange(k,
-c);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}function f(c,b,d){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(c,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=c.offsetWidth+"px";b.style.height=c.offsetHeight-(d?4:0)+"px";b.style.zIndex=5}function e(a,c,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";
-f.style.border="1px solid black";f.style.background=c&&"none"!=c?c:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(e){this.editorUi.pickColor(c,function(c){f.style.background="none"==c?"url('"+Dialog.prototype.noColorImage+"')":c;d(a,c,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,c,b,f,e,g,l){null!=c&&(c=c.split(","),x.push({name:a,values:c,type:b,defVal:f,countProperty:e,
-parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(c){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var k={type:b,parentRow:g,index:t,isDeletable:!0,defVal:f,countProperty:e},t=p(a,"",k,0==t%2,l);d(a,f,k);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(c)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,c,b,d,f,e,g){if(0<f){var l=Array(f);
-c=null!=c?c.split(","):[];for(var n=0;n<f;n++)l[n]=null!=c[n]?c[n]:null!=d?d:"";x.push({name:a,values:l,type:b,defVal:d,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,c,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==c;mxEvent.addListener(f,"change",function(){d(a,f.checked?"1":"0",b)});return f}function p(c,b,p,k,x){var v=p.dispName,m=p.type,A=document.createElement("tr");A.className="gePropRow"+(x?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";
-A.setAttribute("data-pName",c);A.setAttribute("data-pValue",b);k=!1;null!=p.index&&(A.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",k=!0);var z=document.createElement("td");z.className="gePropRowCell";z.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(z.style.textAlign="right");A.appendChild(z);z=document.createElement("td");z.className="gePropRowCell";if("color"==m)z.appendChild(e(c,b,p));else if("bool"==m||"boolean"==m)z.appendChild(n(c,b,p));else if("enum"==m){var D=
-p.enumList;for(x=0;x<D.length;x++)if(v=D[x],v.val==b){z.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(z,"click",mxUtils.bind(t,function(){var e=document.createElement("select");f(z,e);for(var g=0;g<D.length;g++){var l=D[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",
-function(){var a=mxUtils.htmlEntities(e.value);d(c,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==m?z.appendChild(g(c,b,p.subType,p.subDefVal,p.countProperty,A,x)):"staticArr"==m?z.appendChild(l(c,b,p.subType,p.subDefVal,p.size,A,x)):(z.innerHTML=b,mxEvent.addListener(z,"click",mxUtils.bind(t,function(){function e(){var a=g.value,a=0==a.length&&"string"!=m?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",m="string"):(a=parseFloat(a),
-a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==m?parseInt(a):a)+"");d(c,a,p)}var g=document.createElement("input");f(z,g,!0);g.value=b;g.className="gePropEditor";"int"!=m&&"float"!=m||p.allowAuto||(g.type="number",g.step="int"==m?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",
-function(){e()})})));p.isDeletable&&(x=mxUtils.button("-",mxUtils.bind(t,function(a){d(c,"",p,p.index);mxEvent.consume(a)})),x.style.height="16px",x.style.width="25px",x.style["float"]="right",x.className="geColorBtn",z.appendChild(x));A.appendChild(z);return A}var t=this,k=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.style.whiteSpace="nowrap";m.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";
-var A=document.createElement("th");A.className="gePropHeaderCell";var z=document.createElement("img");z.src=Sidebar.prototype.expandedImage;A.appendChild(z);mxUtils.write(A,mxResources.get("property"));v.style.cursor="pointer";var C=function(){var c=m.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){z.src=Sidebar.prototype.collapsedImage;b="none";for(var d=a.childNodes.length-1;0<=d;d--)try{var f=a.childNodes[d],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(ma){}}else z.src=
-Sidebar.prototype.expandedImage,b="";for(d=0;d<c.length;d++)c[d].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;C()});v.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");v.appendChild(A);m.appendChild(v);var E=!1,q=!1,I;for(I in c)if(v=c[I],"function"!=typeof v.isVisible||v.isVisible(b,this)){var G=null!=b.style[I]?mxUtils.htmlEntities(b.style[I]+""):null!=v.getDefaultValue?
-v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||c[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var u=v.dependentProps,L=[],y=[],A=0;A<u.length;A++){var B=b.style[u[A]];y.push(c[u[A]].subDefVal);L.push(null!=B?B.split(","):[])}v.dependentPropsDefVal=y;v.dependentPropsVals=L}m.appendChild(p(I,G,v,E,q));E=!E}}for(A=0;A<x.length;A++)for(v=x[A],c=v.parentRow,b=0;b<v.values.length;b++)I=p(v.name,v.values[b],
-{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),c.parentNode.insertBefore(I,c.nextSibling),c=I;a.appendChild(m);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
-e[g]);var l=d.getModel().isVertex(b[c])?d.defaultVertexStyle:d.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,
-a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,
-mxConstants.STYLE_GRADIENTCOLOR,null)),d.getModel().isVertex(b[c])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+
-a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?c.style.background="url('"+Dialog.prototype.noColorImage+"')":c.style.backgroundColor=""==a.fill?mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),c.style.border=a.stroke==mxConstants.NONE?
-"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(d.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");c.style.backgroundColor=b;c.style.border="1px solid "+
-g}f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);
+null;StyleFormatPanel.prototype.findCommonProperties=function(a,d,b){if(null!=d){var c=function(a){if(null!=a)if(b)for(var c=0;c<a.length;c++)d[a[c].name]=a[c];else for(var f in d){for(var e=!1,c=0;c<a.length;c++)if(a[c].name==f&&a[c].type==d[f].type){e=!0;break}e||delete d[f]}},f=this.editorUi.editor.graph.view.getState(a);null!=f&&null!=f.shape&&(f.shape.commonCustomPropAdded||(f.shape.commonCustomPropAdded=!0,f.shape.customProperties=f.shape.customProperties||[],f.cell.vertex?Array.prototype.push.apply(f.shape.customProperties,
+Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),c(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(D){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
+{},c=a.vertices,f=a.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],b,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));
+d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);
+mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){k.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=c?g.splice(c,1):g[b.index]=d:g.push(d);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));d=g.join(",");null!=b.countProperty&&
+(k.setCellStyles(b.countProperty,g.length,k.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}k.setCellStyles(a,d,k.getSelectionCells());f.push(a);e.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],p=b.dependentPropsVals[a];if(p.length>d)p=p.slice(0,d);else for(var x=p.length;x<d;x++)p.push(n);p=p.join(",");k.setCellStyles(b.dependentProps[a],p,k.getSelectionCells());f.push(b.dependentProps[a]);e.push(p)}if("function"==typeof b.onChange)b.onChange(k,
+d);t.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",k.getSelectionCells()))}finally{k.getModel().endUpdate()}}function f(d,b,c){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function e(a,d,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";
+f.style.border="1px solid black";f.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(t,function(e){this.editorUi.pickColor(d,function(d){f.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,d,b,f,e,g,l){null!=d&&(d=d.split(","),x.push({name:a,values:d,type:b,defVal:f,countProperty:e,
+parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(t,function(d){for(var n=g,t=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,t++;else break;var k={type:b,parentRow:g,index:t,isDeletable:!0,defVal:f,countProperty:e},t=p(a,"",k,0==t%2,l);c(a,f,k);n.parentNode.insertBefore(t,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,d,b,c,f,e,g){if(0<f){var l=Array(f);
+d=null!=d?d.split(","):[];for(var n=0;n<f;n++)l[n]=null!=d[n]?d[n]:null!=c?c:"";x.push({name:a,values:l,type:b,defVal:c,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,d,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==d;mxEvent.addListener(f,"change",function(){c(a,f.checked?"1":"0",b)});return f}function p(d,b,p,k,x){var v=p.dispName,m=p.type,A=document.createElement("tr");A.className="gePropRow"+(x?"Dark":"")+(k?"Alt":"")+" gePropNonHeaderRow";
+A.setAttribute("data-pName",d);A.setAttribute("data-pValue",b);k=!1;null!=p.index&&(A.setAttribute("data-index",p.index),v=(null!=v?v:"")+"["+p.index+"]",k=!0);var y=document.createElement("td");y.className="gePropRowCell";y.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));k&&(y.style.textAlign="right");A.appendChild(y);y=document.createElement("td");y.className="gePropRowCell";if("color"==m)y.appendChild(e(d,b,p));else if("bool"==m||"boolean"==m)y.appendChild(n(d,b,p));else if("enum"==m){var D=
+p.enumList;for(x=0;x<D.length;x++)if(v=D[x],v.val==b){y.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(y,"click",mxUtils.bind(t,function(){var e=document.createElement("select");f(y,e);for(var g=0;g<D.length;g++){var l=D[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",
+function(){var a=mxUtils.htmlEntities(e.value);c(d,a,p)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==m?y.appendChild(g(d,b,p.subType,p.subDefVal,p.countProperty,A,x)):"staticArr"==m?y.appendChild(l(d,b,p.subType,p.subDefVal,p.size,A,x)):(y.innerHTML=b,mxEvent.addListener(y,"click",mxUtils.bind(t,function(){function e(){var a=g.value,a=0==a.length&&"string"!=m?0:a;p.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",m="string"):(a=parseFloat(a),
+a=isNaN(a)?0:a));null!=p.min&&a<p.min?a=p.min:null!=p.max&&a>p.max&&(a=p.max);a=mxUtils.htmlEntities(("int"==m?parseInt(a):a)+"");c(d,a,p)}var g=document.createElement("input");f(y,g,!0);g.value=b;g.className="gePropEditor";"int"!=m&&"float"!=m||p.allowAuto||(g.type="number",g.step="int"==m?"1":"any",null!=p.min&&(g.min=parseFloat(p.min)),null!=p.max&&(g.max=parseFloat(p.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",
+function(){e()})})));p.isDeletable&&(x=mxUtils.button("-",mxUtils.bind(t,function(a){c(d,"",p,p.index);mxEvent.consume(a)})),x.style.height="16px",x.style.width="25px",x.style["float"]="right",x.className="geColorBtn",y.appendChild(x));A.appendChild(y);return A}var t=this,k=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var m=document.createElement("table");m.style.whiteSpace="nowrap";m.style.width="100%";var v=document.createElement("tr");v.className="gePropHeader";
+var A=document.createElement("th");A.className="gePropHeaderCell";var y=document.createElement("img");y.src=Sidebar.prototype.expandedImage;A.appendChild(y);mxUtils.write(A,mxResources.get("property"));v.style.cursor="pointer";var C=function(){var d=m.querySelectorAll(".gePropNonHeaderRow"),b;if(t.editorUi.propertiesCollapsed){y.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var f=a.childNodes[c],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(na){}}else y.src=
+Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(v,"click",function(){t.editorUi.propertiesCollapsed=!t.editorUi.propertiesCollapsed;C()});v.appendChild(A);A=document.createElement("th");A.className="gePropHeaderCell";A.innerHTML=mxResources.get("value");v.appendChild(A);m.appendChild(v);var E=!1,q=!1,H;for(H in d)if(v=d[H],"function"!=typeof v.isVisible||v.isVisible(b,this)){var G=null!=b.style[H]?mxUtils.htmlEntities(b.style[H]+""):null!=v.getDefaultValue?
+v.getDefaultValue(b,this):v.defVal;if("separator"==v.type)q=!q;else{if("staticArr"==v.type)v.size=parseInt(b.style[v.sizeProperty]||d[v.sizeProperty].defVal)||0;else if(null!=v.dependentProps){for(var u=v.dependentProps,z=[],L=[],A=0;A<u.length;A++){var B=b.style[u[A]];L.push(d[u[A]].subDefVal);z.push(null!=B?B.split(","):[])}v.dependentPropsDefVal=L;v.dependentPropsVals=z}m.appendChild(p(H,G,v,E,q));E=!E}}for(A=0;A<x.length;A++)for(v=x[A],d=v.parentRow,b=0;b<v.values.length;b++)H=p(v.name,v.values[b],
+{type:v.type,parentRow:v.parentRow,isDeletable:v.isDeletable,index:b,defVal:v.defVal,countProperty:v.countProperty,size:v.size},0==b%2,v.flipBkg),d.parentNode.insertBefore(H,d.nextSibling),d=H;a.appendChild(m);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+e[g]);var l=c.getModel().isVertex(b[d])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,
+a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,
+mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+
+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":d.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":a.fill==mxConstants.NONE?d.style.background="url('"+Dialog.prototype.noColorImage+"')":d.style.backgroundColor=""==a.fill?mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"):a.fill||mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"dark"==uiTheme?"#2a2a2a":"#ffffff"),d.style.border=a.stroke==mxConstants.NONE?
+"1px solid transparent":""==a.stroke?"1px solid "+mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"):"1px solid "+(a.stroke||mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"dark"!=uiTheme?"#2a2a2a":"#ffffff"));else{var b=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.getValue(c.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");d.style.backgroundColor=b;d.style.border="1px solid "+
+g}f.appendChild(d)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),d(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 c=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(f);
 var e="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var g=document.createElement("div");g.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(l);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
-function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
-(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var g=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=document.createEventObject(a),c.type=a.type,c.canBubble=a.canBubble,c.cancelable=a.cancelable,c.view=a.view,c.detail=a.detail,c.screenX=a.screenX,c.screenY=a.screenY,c.clientX=a.clientX,c.clientY=a.clientY,c.ctrlKey=a.ctrlKey,c.altKey=a.altKey,c.shiftKey=a.shiftKey,c.metaKey=a.metaKey,c.button=
-a.button,c.relatedTarget=a.relatedTarget}catch(D){}}g.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;
-this.layoutManager.getLayout=function(a){var c=this.graph.getCellStyle(a);if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=c.rackUnitSize?parseFloat(c.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.allowGaps=c.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
-c.childLayout)return b=new mxTableLayout(this.graph),b.rows=c.tableRows||2,b.columns=c.tableColumns||2,b.colPercentages=c.colPercentages,b.rowPercentages=c.rowPercentages,b.equalColumns="1"==mxUtils.getValue(c,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(c,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(c,"resizeParent","1"),b.border=c.tableBorder||b.border,b.marginLeft=c.marginLeft||0,b.marginRight=c.marginRight||0,b.marginTop=c.marginTop||
-0,b.marginBottom=c.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(c,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return d.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return p.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
-Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=
-l.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,d,f,e,g,l,p,t,k){var x=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var m=n.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var v=m.ownerDocument,A=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var z="",D="",C=0;C<this.extFonts.length;C++){var E=this.extFonts[C].name,q=this.extFonts[C].url;0==q.indexOf(Editor.GOOGLE_FONTS)?
-z+="@import url("+q+");\n":D+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+q+'");\n}\n'}A.appendChild(v.createTextNode(z+D));m.getElementsByTagName("defs")[0].appendChild(A)}null!=x&&(this.stylesheet=x,this.refresh());return m};var x=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=x.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
-(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var d=a.text.getContentNode();if(null!=d){d=d.cloneNode(!0);if(d.getElementsByTagNameNS)for(var f=d.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=d.innerHTML&&(f=a.text.value,a.text.value=d.innerHTML,c.apply(this,arguments),a.text.value=f)}}else c.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));var l=document.createElement("div");l.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(g),a.appendChild(l));mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);d(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(g);b(l);d(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var d=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 c=this.editorUi.editor.graph,f=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(d=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("editShape").funct()})),d.setAttribute("title",mxResources.get("editShape")),d.style.marginBottom="2px",null==b?d.style.width="202px":(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d)):d.image&&(d=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),d.setAttribute("title",mxResources.get("editImage")),d.style.marginBottom="2px",null==b?d.style.width="202px":
+(b.style.width="100px",d.style.width="100px",d.style.marginLeft="2px"),a.appendChild(d));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 g=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;try{if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=document.createEventObject(a),d.type=a.type,d.canBubble=a.canBubble,d.cancelable=a.cancelable,d.view=a.view,d.detail=a.detail,d.screenX=a.screenX,d.screenY=a.screenY,d.clientX=a.clientX,d.clientY=a.clientY,d.ctrlKey=a.ctrlKey,d.altKey=a.altKey,d.shiftKey=a.shiftKey,d.metaKey=a.metaKey,d.button=
+a.button,d.relatedTarget=a.relatedTarget}catch(D){}}g.apply(this,arguments);window.mxFreehand&&(this.freehand=new mxFreehand(this));var d=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){d=null});this.isMouseInsertPoint=function(){return null!=d};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=d?this.getPointForEvent(d):b.apply(this,arguments)};var c=this.layoutManager.getLayout;
+this.layoutManager.getLayout=function(a){var d=this.graph.getCellStyle(a);if(null!=d){if("rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.gridSize=null!=d.rackUnitSize?parseFloat(d.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;b.fill=!0;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.allowGaps=d.allowGaps||0;b.resizeParent=!1;return b}if("undefined"!==typeof mxTableLayout&&"tableLayout"==
+d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop||
+0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return p.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=
+Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(L){null!=window.console&&console.log("Error in vars URL parameter: "+L)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var l=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=
+l.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var n=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,p,t,k){var x=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
+(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var m=n.apply(this,arguments);if(k&&null!=this.extFonts&&0<this.extFonts.length){var v=m.ownerDocument,A=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"style"):v.createElement("style");null!=v.setAttributeNS?A.setAttributeNS("type","text/css"):A.setAttribute("type","text/css");for(var y="",D="",C=0;C<this.extFonts.length;C++){var E=this.extFonts[C].name,q=this.extFonts[C].url;0==q.indexOf(Editor.GOOGLE_FONTS)?
+y+="@import url("+q+");\n":D+='@font-face {\nfont-family: "'+E+'";\nsrc: url("'+q+'");\n}\n'}A.appendChild(v.createTextNode(y+D));m.getElementsByTagName("defs")[0].appendChild(A)}null!=x&&(this.stylesheet=x,this.refresh());return m};var x=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=x.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
 function(){A.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
 this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
-a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var c=0;c<a.actions.length;c++){var b=a.actions[c];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(c=0;c<a.actions.length;c++)b=a.actions[c],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,
-!0),!1)}finally{this.model.endUpdate()}for(c=0;c<a.actions.length;c++){var b=a.actions[c],d=[];null!=b.select&&this.isEnabled()&&(d=this.getCellsForAction(b.select),this.setSelectionCells(d));null!=b.highlight&&(d=this.getCellsForAction(b.highlight),this.highlightCells(d,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(d=this.getCellsForAction(b.scroll));0<d.length&&this.scrollCellToVisible(d[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,c){var b=this.getLinkForCell(c);
-null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(c,this.updateCustomLink(a,b));if(this.isHtmlLabel(c)){var d=document.createElement("div");d.innerHTML=this.getLabel(c);for(var f=d.getElementsByTagName("a"),e=!1,g=0;g<f.length;g++)b=f[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(f[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(c,d.innerHTML)}};Graph.prototype.updateCustomLink=function(a,c){if("data:action/json,"==c.substring(0,
-17))try{var b=JSON.parse(c.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),c="data:action/json,"+JSON.stringify(b))}catch(H){}return c};Graph.prototype.updateCustomLinkActions=function(a,c){for(var b=0;b<c.length;b++){var d=c[b];this.updateCustomLinkAction(a,d.toggle);this.updateCustomLinkAction(a,d.show);this.updateCustomLinkAction(a,d.hide);this.updateCustomLinkAction(a,d.select);this.updateCustomLinkAction(a,d.highlight);this.updateCustomLinkAction(a,d.scroll)}};Graph.prototype.updateCustomLinkAction=
-function(a,c){if(null!=c&&null!=c.cells){for(var b=[],d=0;d<c.cells.length;d++)if("*"==c.cells[d])b.push(c.cells[d]);else{var f=a[c.cells[d]];null!=f?""!=f&&b.push(f):b.push(c.cells[d])}c.cells=b}};Graph.prototype.getCellsForAction=function(a,c){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,c))};Graph.prototype.getCellsById=function(a){var c=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var d=this.getDefaultParent(),c=c.concat(this.model.filterDescendants(function(a){return a!=
-d},d));else{var f=this.model.getCell(a[b]);null!=f&&c.push(f)}return c};Graph.prototype.getCellsForTags=function(a,c,b,d){var f=[];if(null!=a){c=null!=c?c:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,e++);for(l=0;l<c.length;l++)if(d&&this.model.getParent(c[l])==this.model.root||this.model.isVertex(c[l])||this.model.isEdge(c[l])){var n=null!=c[l].value&&"object"==typeof c[l].value?mxUtils.trim(c[l].value.getAttribute(b)||
-""):"",p=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=p=0;t<n.length&&p<e;t++)null!=g[n[t]]&&p++;p=p==e}}else p=0==a.length;p&&f.push(c[l])}}return f};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],!this.model.isVisible(a[c]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,c){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],c)}finally{this.model.endUpdate()}};
-Graph.prototype.highlightCells=function(a,c,b,d){for(var f=0;f<a.length;f++)this.highlightCell(a[f],c,b,d)};Graph.prototype.highlightCell=function(a,c,b,d){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,c,f,!1);null!=d&&(e.opacity=d);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition",
-"all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",
-this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",
-this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):d.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2",
-"offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.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=e[0];d.appendChild(f);b||(c=null!=c?c:a.getElementsByTagName("g")[0],null!=c&&(c.setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+
-6),c=a.getAttribute("viewBox"),null!=c&&0<c.length&&(c=c.split(" "),3<c.length&&(w=parseFloat(c[2])+6,h=parseFloat(c[3])+6,a.setAttribute("viewBox",c[0]+" "+c[1]+" "+w+" "+h))))));return f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&!mxClient.IS_SF&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
+a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var d=0;d<a.actions.length;d++){var b=a.actions[d];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(d=0;d<a.actions.length;d++)b=a.actions[d],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,
+!0),!1)}finally{this.model.endUpdate()}for(d=0;d<a.actions.length;d++){var b=a.actions[d],c=[];null!=b.select&&this.isEnabled()&&(c=this.getCellsForAction(b.select),this.setSelectionCells(c));null!=b.highlight&&(c=this.getCellsForAction(b.highlight),this.highlightCells(c,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(c=this.getCellsForAction(b.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,d){var b=this.getLinkForCell(d);
+null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(a,b));if(this.isHtmlLabel(d)){var c=document.createElement("div");c.innerHTML=this.getLabel(d);for(var f=c.getElementsByTagName("a"),e=!1,g=0;g<f.length;g++)b=f[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(f[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(d,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,d){if("data:action/json,"==d.substring(0,
+17))try{var b=JSON.parse(d.substring(17));null!=b.actions&&(this.updateCustomLinkActions(a,b.actions),d="data:action/json,"+JSON.stringify(b))}catch(I){}return d};Graph.prototype.updateCustomLinkActions=function(a,d){for(var b=0;b<d.length;b++){var c=d[b];this.updateCustomLinkAction(a,c.toggle);this.updateCustomLinkAction(a,c.show);this.updateCustomLinkAction(a,c.hide);this.updateCustomLinkAction(a,c.select);this.updateCustomLinkAction(a,c.highlight);this.updateCustomLinkAction(a,c.scroll)}};Graph.prototype.updateCustomLinkAction=
+function(a,d){if(null!=d&&null!=d.cells){for(var b=[],c=0;c<d.cells.length;c++)if("*"==d.cells[c])b.push(d.cells[c]);else{var f=a[d.cells[c]];null!=f?""!=f&&b.push(f):b.push(d.cells[c])}d.cells=b}};Graph.prototype.getCellsForAction=function(a,d){return this.getCellsById(a.cells).concat(this.getCellsForTags(a.tags,null,null,d))};Graph.prototype.getCellsById=function(a){var d=[];if(null!=a)for(var b=0;b<a.length;b++)if("*"==a[b])var c=this.getDefaultParent(),d=d.concat(this.model.filterDescendants(function(a){return a!=
+c},c));else{var f=this.model.getCell(a[b]);null!=f&&d.push(f)}return d};Graph.prototype.getCellsForTags=function(a,d,b,c){var f=[];if(null!=a){d=null!=d?d:this.model.getDescendants(this.model.getRoot());b=null!=b?b:"tags";for(var e=0,g={},l=0;l<a.length;l++)0<a[l].length&&(g[a[l].toLowerCase()]=!0,e++);for(l=0;l<d.length;l++)if(c&&this.model.getParent(d[l])==this.model.root||this.model.isVertex(d[l])||this.model.isEdge(d[l])){var n=null!=d[l].value&&"object"==typeof d[l].value?mxUtils.trim(d[l].value.getAttribute(b)||
+""):"",p=!1;if(0<n.length){if(n=n.toLowerCase().split(" "),n.length>=a.length){for(var t=p=0;t<n.length&&p<e;t++)null!=g[n[t]]&&p++;p=p==e}}else p=0==a.length;p&&f.push(d[l])}}return f};Graph.prototype.toggleCells=function(a){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.model.setVisible(a[d],!this.model.isVisible(a[d]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(a,d){this.model.beginUpdate();try{for(var b=0;b<a.length;b++)this.model.setVisible(a[b],d)}finally{this.model.endUpdate()}};
+Graph.prototype.highlightCells=function(a,d,b,c){for(var f=0;f<a.length;f++)this.highlightCell(a[f],d,b,c)};Graph.prototype.highlightCell=function(a,d,b,c){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),e=new mxCellHighlight(this,d,f,!1);null!=c&&(e.opacity=c);e.highlight(a);window.setTimeout(function(){null!=e.shape&&(mxUtils.setPrefixedStyle(e.shape.node.style,"transition",
+"all 1200ms ease-in-out"),e.shape.node.style.opacity=0);window.setTimeout(function(){e.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1;var c=a.ownerDocument,f=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");f.setAttribute("id",this.shadowId);var e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation",
+this.svgShadowBlur);e.setAttribute("result","blur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx",this.svgShadowSize);e.setAttribute("dy",this.svgShadowSize);e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");e.setAttribute("flood-color",this.svgShadowColor);e.setAttribute("flood-opacity",
+this.svgShadowOpacity);e.setAttribute("result","offsetColor");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):c.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");f.appendChild(e);e=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2",
+"offsetBlur");f.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)):c=e[0];c.appendChild(f);b||(d=null!=d?d:a.getElementsByTagName("g")[0],null!=d&&(d.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),d=a.getAttribute("viewBox"),null!=d&&0<d.length&&(d=d.split(" "),3<d.length&&(w=parseFloat(d[2])+6,h=parseFloat(d[3])+6,a.setAttribute("viewBox",d[0]+" "+d[1]+" "+w+" "+h))))));return f};Graph.prototype.setShadowVisible=function(a,d){mxClient.IS_SVG&&!mxClient.IS_SF&&(d=null!=d?d:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),d&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),d,b=0;do d=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(d),"locked","0"));null!=d&&this.setDefaultParent(d)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
 [SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",
 STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=
 [STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"];mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"];mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["electrical/logic_gates"]=
@@ -3035,345 +3037,345 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
 [SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+
 "/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
 [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.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 G=mxMarker.createMarker;mxMarker.createMarker=
-function(a,c,b,d,f,e,g,l,n,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){m.value=Math.max(1,Math.min(l,Math.max(parseInt(m.value),parseInt(x.value))));x.value=Math.max(1,Math.min(l,Math.min(parseInt(m.value),parseInt(x.value))))}function d(c){function b(c,b,e){var g=c.useCssTransforms,l=c.currentTranslate,n=c.currentScale,p=c.view.translate,t=
-c.view.scale;c.useCssTransforms&&(c.useCssTransforms=!1,c.currentTranslate=new mxPoint(0,0),c.currentScale=1,c.view.translate=new mxPoint(0,0),c.view.scale=1);var k=c.getGraphBounds(),x=0,m=0,A=qa.get(),z=1/c.pageScale,E=C.checked;if(E)var z=parseInt(S.value),D=parseInt(ca.value),z=Math.min(A.height*D/(k.height/c.view.scale),A.width*z/(k.width/c.view.scale));else z=parseInt(v.value)/(100*c.pageScale),isNaN(z)&&(d=1/c.pageScale,v.value="100 %");A=mxRectangle.fromRectangle(A);A.width=Math.ceil(A.width*
-d);A.height=Math.ceil(A.height*d);z*=d;!E&&c.pageVisible?(k=c.getPageLayout(),x-=k.x*A.width,m-=k.y*A.height):E=!0;if(null==b){b=PrintDialog.createPrintPreview(c,z,A,0,x,m,E);b.pageSelector=!1;b.mathEnabled=!1;x=a.getCurrentFile();null!=x&&(b.title=x.getTitle());var q=b.writeHead;b.writeHead=function(b){q.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var d=0;d<c.extFonts.length;d++){var f=
-c.extFonts[d].name,e=c.extFonts[d].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var G=b.renderPage;b.renderPage=function(c,b,d,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
-var n=G.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}x=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(x=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=x&&(f.stylesheet=x,f.refresh())}else{A=c.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";b.backgroundColor=A;b.autoOrigin=E;b.appendGraph(c,z,x,m,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=
-0;e<c.extFonts.length;e++)x=c.extFonts[e].name,m=c.extFonts[e].url,0==m.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+x+'";\n\tsrc: url("'+m+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=n,c.view.translate=p,c.view.scale=t);return b}var d=parseInt(J.value)/
-100;isNaN(d)&&(d=1,J.value="100 %");var d=.75*d,e=x.value,g=m.value,l=!t.checked,p=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var k=0,l=a.pages.length-1;t.checked||(k=parseInt(e)-1,l=parseInt(g)-1);for(var A=k;A<=l;A++){var z=a.pages[A],e=z==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,D=null,E=null;null==z.viewState&&null==z.root&&a.updatePageRoot(z);null!=z.viewState&&(g=z.viewState.pageVisible,k=z.viewState.mathEnabled,D=z.viewState.background,
-E=z.viewState.backgroundImage,e.extFonts=z.viewState.extFonts);e.background=D;e.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;e.pageVisible=g;e.mathEnabled=k;var q=e.getGlobalVariable;e.getGlobalVariable=function(c){return"page"==c?z.getName():"pagenumber"==c?A+1:"pagecount"==c?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(z);e.model.setRoot(z.root)}p=b(e,p,A!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else p=
+[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 d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var G=mxMarker.createMarker;mxMarker.createMarker=
+function(a,d,b,c,f,e,g,l,n,p){if(null!=b&&null==mxMarker.markers[b]){var t=this.getPackageForType(b);null!=t&&mxStencilRegistry.getStencil(t)}return G.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){m.value=Math.max(1,Math.min(l,Math.max(parseInt(m.value),parseInt(x.value))));x.value=Math.max(1,Math.min(l,Math.min(parseInt(m.value),parseInt(x.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,p=d.view.translate,t=
+d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var x=d.getGraphBounds(),k=0,m=0,A=qa.get(),y=1/d.pageScale,E=C.checked;if(E)var y=parseInt(Q.value),D=parseInt(da.value),y=Math.min(A.height*D/(x.height/d.view.scale),A.width*y/(x.width/d.view.scale));else y=parseInt(v.value)/(100*d.pageScale),isNaN(y)&&(c=1/d.pageScale,v.value="100 %");A=mxRectangle.fromRectangle(A);A.width=Math.ceil(A.width*
+c);A.height=Math.ceil(A.height*c);y*=c;!E&&d.pageVisible?(x=d.getPageLayout(),k-=x.x*A.width,m-=x.y*A.height):E=!0;if(null==b){b=PrintDialog.createPrintPreview(d,y,A,0,k,m,E);b.pageSelector=!1;b.mathEnabled=!1;k=a.getCurrentFile();null!=k&&(b.title=k.getTitle());var q=b.writeHead;b.writeHead=function(b){q.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f=
+d.extFonts[c].name,e=d.extFonts[c].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var G=b.renderPage;b.renderPage=function(d,b,c,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
+var n=G.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}k=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(k=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=k&&(f.stylesheet=k,f.refresh())}else{A=d.background;if(null==A||""==A||A==mxConstants.NONE)A="#ffffff";b.backgroundColor=A;b.autoOrigin=E;b.appendGraph(d,y,k,m,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e=
+0;e<d.extFonts.length;e++)k=d.extFonts[e].name,m=d.extFonts[e].url,0==m.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+m+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+k+'";\n\tsrc: url("'+m+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=p,d.view.scale=t);return b}var c=parseInt(J.value)/
+100;isNaN(c)&&(c=1,J.value="100 %");var c=.75*c,e=x.value,g=m.value,l=!t.checked,p=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var k=0,l=a.pages.length-1;t.checked||(k=parseInt(e)-1,l=parseInt(g)-1);for(var A=k;A<=l;A++){var y=a.pages[A],e=y==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,k=!1,D=null,E=null;null==y.viewState&&null==y.root&&a.updatePageRoot(y);null!=y.viewState&&(g=y.viewState.pageVisible,k=y.viewState.mathEnabled,D=y.viewState.background,
+E=y.viewState.backgroundImage,e.extFonts=y.viewState.extFonts);e.background=D;e.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;e.pageVisible=g;e.mathEnabled=k;var q=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?y.getName():"pagenumber"==d?A+1:"pagecount"==d?null!=a.pages?a.pages.length:1:q.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(y);e.model.setRoot(y.root)}p=b(e,p,A!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else p=
 b(f);null==p?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(p.mathEnabled&&(l=p.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"),
-l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),c&&(l.writeln("MathJax.Hub.Queue(function () {"),l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
-p.closeDocument(),!p.mathEnabled&&c&&PrintDialog.printPreview(p))}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";
+l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),d&&(l.writeln("MathJax.Hub.Queue(function () {"),l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
+p.closeDocument(),!p.mathEnabled&&d&&PrintDialog.printPreview(p))}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var l=1,n=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";
 t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");p.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));p.appendChild(g);mxUtils.br(p);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");p.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");p.appendChild(g);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";
 x.setAttribute("value","1");x.setAttribute("type","number");x.setAttribute("min","1");x.style.width="50px";p.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));p.appendChild(g);var m=x.cloneNode(!0);p.appendChild(m);mxEvent.addListener(x,"focus",function(){k.checked=!0});mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(m,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
-a.pages[g]){n=g+1;x.value=n;m.value=n;break}x.setAttribute("max",l);m.setAttribute("max",l);1<l&&e.appendChild(p);var A=document.createElement("div");A.style.marginBottom="10px";var z=document.createElement("input");z.style.marginRight="8px";z.setAttribute("value","adjust");z.setAttribute("type","radio");z.setAttribute("name","printZoom");A.appendChild(z);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));A.appendChild(g);var v=document.createElement("input");v.style.cssText=
-"margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";A.appendChild(v);mxEvent.addListener(v,"focus",function(){z.checked=!0});e.appendChild(A);var p=p.cloneNode(!1),C=z.cloneNode(!0);C.setAttribute("value","fit");z.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);p.appendChild(g);A=document.createElement("table");A.style.display="inline-block";var E=document.createElement("tbody"),
-q=document.createElement("tr"),G=q.cloneNode(!0),u=document.createElement("td"),y=u.cloneNode(!0),I=u.cloneNode(!0),B=u.cloneNode(!0),fa=u.cloneNode(!0),Q=u.cloneNode(!0);u.style.textAlign="right";B.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","1");S.setAttribute("min","1");S.setAttribute("type","number");S.style.width="40px";y.appendChild(S);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));I.appendChild(g);mxUtils.write(B,mxResources.get("fitToBy"));var ca=S.cloneNode(!0);fa.appendChild(ca);mxEvent.addListener(S,"focus",function(){C.checked=!0});mxEvent.addListener(ca,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));Q.appendChild(g);q.appendChild(u);q.appendChild(y);q.appendChild(I);G.appendChild(B);G.appendChild(fa);G.appendChild(Q);E.appendChild(q);E.appendChild(G);A.appendChild(E);
+a.pages[g]){n=g+1;x.value=n;m.value=n;break}x.setAttribute("max",l);m.setAttribute("max",l);1<l&&e.appendChild(p);var A=document.createElement("div");A.style.marginBottom="10px";var y=document.createElement("input");y.style.marginRight="8px";y.setAttribute("value","adjust");y.setAttribute("type","radio");y.setAttribute("name","printZoom");A.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));A.appendChild(g);var v=document.createElement("input");v.style.cssText=
+"margin:0 8px 0 8px;";v.setAttribute("value","100 %");v.style.width="50px";A.appendChild(v);mxEvent.addListener(v,"focus",function(){y.checked=!0});e.appendChild(A);var p=p.cloneNode(!1),C=y.cloneNode(!0);C.setAttribute("value","fit");y.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);p.appendChild(g);A=document.createElement("table");A.style.display="inline-block";var E=document.createElement("tbody"),
+q=document.createElement("tr"),G=q.cloneNode(!0),u=document.createElement("td"),z=u.cloneNode(!0),H=u.cloneNode(!0),B=u.cloneNode(!0),ha=u.cloneNode(!0),P=u.cloneNode(!0);u.style.textAlign="right";B.style.textAlign="right";mxUtils.write(u,mxResources.get("fitTo"));var Q=document.createElement("input");Q.style.cssText="margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("min","1");Q.setAttribute("type","number");Q.style.width="40px";z.appendChild(Q);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));H.appendChild(g);mxUtils.write(B,mxResources.get("fitToBy"));var da=Q.cloneNode(!0);ha.appendChild(da);mxEvent.addListener(Q,"focus",function(){C.checked=!0});mxEvent.addListener(da,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));P.appendChild(g);q.appendChild(u);q.appendChild(z);q.appendChild(H);G.appendChild(B);G.appendChild(ha);G.appendChild(P);E.appendChild(q);E.appendChild(G);A.appendChild(E);
 p.appendChild(A);e.appendChild(p);p=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));p.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));p.appendChild(g);
 var J=document.createElement("input");J.style.cssText="margin:0 8px 0 8px;";J.setAttribute("value","100 %");J.style.width="60px";p.appendChild(J);e.appendChild(p);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&g.appendChild(p);a.isOffline()||(A=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-A.className="geBtn",g.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),A.className="geBtn",g.appendChild(A));A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});A.className="geBtn gePrimaryBtn";g.appendChild(A);a.editor.cancelFirst||g.appendChild(p);e.appendChild(g);this.container=e};var z=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)):(z.apply(this,arguments),null!=this.mathEnabled&&
+A.className="geBtn",g.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),A.className="geBtn",g.appendChild(A));A=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});A.className="geBtn gePrimaryBtn";g.appendChild(A);a.editor.cancelFirst||g.appendChild(p);e.appendChild(g);this.container=e};var y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(y.apply(this,arguments),null!=this.mathEnabled&&
 this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var E=document.createElement("canvas"),C=new Image;C.onload=function(){try{E.getContext("2d").drawImage(C,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(I){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
+null!=a&&6<a.length}catch(H){}};C.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}})();
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,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="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
 "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
 !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,
-topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,d,e,l,n,x){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
-null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";l=null!=l?l:Error(a);(new Image).src=c+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(d)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=l&&null!=l.stack?"&stack="+encodeURIComponent(l.stack):"")}}catch(t){}try{x||null==window.console||
-console.error(n,a,b,d,e,l)}catch(t){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
-b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b,
-e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var g=c(a,4);if(null!=b&&b(e-8,g,d))break;value=c(a,d);c(a,4);if("IEND"==g)break}while(d)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(a,b,c,e,l,n,k){n=null!=n?n:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
+null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";l=null!=l?l:Error(a);(new Image).src=d+"/log?severity="+n+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=l&&null!=l.stack?"&stack="+encodeURIComponent(l.stack):"")}}catch(t){}try{k||null==window.console||
+console.error(n,a,b,c,e,l)}catch(t){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
+b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,
+e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=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 g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
 EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
 EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=
 5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(l){}try{var b=document.createElement("canvas"),
-d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(n){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(l){}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(l){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
+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(n){}};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(l){}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(l){}})();EditorUi.prototype.openLink=function(a,b,c){return this.editor.graph.openLink(a,b,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);null!=c&&c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
 b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
-"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&
-(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&c.status.parentNode.removeChild(c.status);c.status=null};
-c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
-80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=
-a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var l=mxUtils.parseXml(c),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=
-a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||
-1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var n=this.updatePageRoot(new DiagramPage(d[e]));null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,n,0==e?n:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,l,n,k,m,t,q,z){b=null!=b?b:this.editor.graph;l=null!=l?l:!1;t=null!=t?t:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?
-c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(z){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}q?(g=g.cloneNode(!0),g.removeAttribute("modified"),
+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,e){var g=!1;this.active||(f.call(this,c),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
+"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,c.appendChild(g),d.status=g,mxClient.IS_VML&&
+(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),g=!0);return g};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&null!=d.status.parentNode&&d.status.parentNode.removeChild(d.status);d.status=null};
+d.pause=function(){return function(){}};return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.parseXml(a),b=this.editor.extractGraphModel(d.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
+80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3)};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var b=
+a.apply(this,arguments);if(null==b)try{var c=d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var l=mxUtils.parseXml(d),n=this.editor.extractGraphModel(l.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=n?mxUtils.getXml(n):""}catch(x){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=
+a.indexOf('<meta charset="utf-8">');0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||
+1<c.length||1==c.length&&c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var n=this.updatePageRoot(new DiagramPage(c[e]));null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,n,0==e?n: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])),d.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++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,l,n,k,m,t,q,y){b=null!=b?b:this.editor.graph;l=null!=l?l:!1;t=null!=t?t:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
+d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(y){var p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());p.appendChild(a)}else{p=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(p);if(Graph.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");p.setAttribute("id",Editor.guid());mxUtils.setTextContent(p,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}q?(g=g.cloneNode(!0),g.removeAttribute("modified"),
 g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",
-(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!l&&(k||null!=d&&/(\.html)$/i.test(d.getTitle())))z=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(n||
-!l&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,b,e,null,m,t,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),
-a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
-(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],d=0;d<a.length;d++){var f=a.charAt(d);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?c.push(f):isNaN(parseInt(f))?f.toLowerCase()!=
-f?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
-this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][c].data=n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+
-"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&delete e.cells[a]}}),c(EditorUi.DIFF_INSERT),c(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][d]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var c=0;c<a.attributes.length;c++)"as"!=
-a.attributes[c].name&&a.setAttribute(a.attributes[c].name,this.anonymizeString(a.attributes[c].value,b));if(null!=a.childNodes)for(c=0;c<a.childNodes.length;c++)this.anonymizeAttributes(a.childNodes[c],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var c=a.getElementsByTagName("mxCell"),d=0;d<c.length;d++)null!=c[d].getAttribute("value")&&c[d].setAttribute("value","["+c[d].getAttribute("value").length+"]"),null!=c[d].getAttribute("xmlValue")&&c[d].setAttribute("xmlValue","["+c[d].getAttribute("xmlValue").length+
-"]"),null!=c[d].getAttribute("style")&&c[d].setAttribute("style","["+c[d].getAttribute("style").length+"]"),null!=c[d].parentNode&&"root"!=c[d].parentNode.nodeName&&null!=c[d].parentNode.parentNode&&(c[d].setAttribute("id",c[d].parentNode.getAttribute("id")),c[d].parentNode.parentNode.replaceChild(c[d],c[d].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var c=this.getCurrentFile();null!=c&&(c.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&c.invalidChecksum?
-c.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(c.clearAutosave(),this.editor.setStatus(""),a?c.reloadFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)})):c.synchronizeFile(mxUtils.bind(this,function(){c.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){c.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,d,e,l,n,k,
-m,t,q){l=null!=l?l:!0;n=null!=n?n:!1;var c=this.editor.graph;if(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))if(q=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=c.getGlobalVariable,c=this.createTemporaryGraph(c.getStylesheet()),g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(l,n,q);t=null!=t?t:this.getCurrentFile();a=this.createFileData(k,
-c,t,window.location.href,a,b,d,e,l,m,q);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);return a};EditorUi.prototype.getHtml=function(a,b,d,e,l,n){n=null!=n?n:!0;var c=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var c=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==l&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
+(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));y=y?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!n&&!l&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))y=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(n||
+!l&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),y=this.getEmbeddedSvg(y,b,e,null,m,t,f);return y};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
+a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
+(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var f=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?d.push(f):isNaN(parseInt(f))?f.toLowerCase()!=
+f?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
+this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mxUtils.getXml(b)}catch(n){a[EditorUi.DIFF_INSERT][d].data=n.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var c in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][c];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(d=mxUtils.bind(this,function(a){var d=e.cells[a];if(null!=d){for(var b in d)null!=d[b].value&&(d[b].value="["+d[b].value.length+"]"),null!=d[b].xmlValue&&(d[b].xmlValue="["+d[b].xmlValue.length+
+"]"),null!=d[b].style&&(d[b].style="["+d[b].style.length+"]"),0==Object.keys(d[b]).length&&delete d[b];0==Object.keys(d).length&&delete e.cells[a]}}),d(EditorUi.DIFF_INSERT),d(EditorUi.DIFF_UPDATE),0==Object.keys(e.cells).length&&delete e.cells);0==Object.keys(e).length&&delete a[EditorUi.DIFF_UPDATE][c]}0==Object.keys(a[EditorUi.DIFF_UPDATE]).length&&delete a[EditorUi.DIFF_UPDATE]}return a};EditorUi.prototype.anonymizeAttributes=function(a,b){if(null!=a.attributes)for(var d=0;d<a.attributes.length;d++)"as"!=
+a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+
+"]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?
+d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,l,n,k,
+m,t,q){l=null!=l?l:!0;n=null!=n?n:!1;var d=this.editor.graph;if(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))if(q=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(l,n,q);t=null!=t?t:this.getCurrentFile();a=this.createFileData(k,
+d,t,window.location.href,a,b,c,e,l,m,q);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,l,n){n=null!=n?n:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=n?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;n=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==l&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
 "/embed.js?s="+b));a.setAttribute("x0",n);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=l&&(l=l.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
-"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":"")+"</head>\n<body"+(null==l&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+
-(null==l?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,l){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=l&&(l=l.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
-toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":
+"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\n":"")+"</head>\n<body"+(null==l&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+
+(null==l?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,l){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=l&&(l=l.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(a),
+toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==l?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=l?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==l?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=l?'<meta http-equiv="refresh" content="0;URL=\''+l+"'\"/>\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==l?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+l+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=
-this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(c)throw Error(mxResources.get("notADiagramFile")+" ("+c+")");c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a&&"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){var b=null;this.fileNode=
-a;this.pages=[];for(var d=0;d<c.length;d++)null==c[d].getAttribute("id")&&c[d].setAttribute("id",d),a=new DiagramPage(c[d]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[d+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(d=0;d<e.length;d++)a[e[d]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),d=0;d<k.length;d++){var m=k[d];n.setVisible(m,a[m.id]||
-!1)}}catch(t){}};EditorUi.prototype.getBaseFilename=function(a){var c=this.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(c)||/(\.html)$/i.test(c)||/(\.svg)$/i.test(c)||/(\.png)$/i.test(c)||/(\.drawio)$/i.test(c))c=c.substring(0,c.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(c=c+"-"+this.currentPage.getName());return c};
-EditorUi.prototype.downloadFile=function(a,b,d,e,l,n,k,m,t,q,z){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(!l),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,l,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var f=this.createDownloadRequest(c,a,e,b,k,l,m,t,q,z);this.editor.graph.pageVisible=d;return f}catch(ba){this.handleError(ba)}}));else{var p=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var A=this.editor.graph.background;if(k||A==mxConstants.NONE)A=null;var G=this.editor.graph.getSvg(A,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(G);this.convertImages(G,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e,l,n,k,m,t,q){var c=this.editor.graph,f=c.getGraphBounds();d=this.getFileData(!0,null,null,null,d,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};q=q?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(q="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=
-0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=c.background;"png"==b&&l?n=mxConstants.NONE:l||null!=n&&n!=mxConstants.NONE||(n="#ffffff");l={globalVars:c.getExportVariables()};t&&(l.grid={size:c.gridSize,steps:c.view.gridSteps,color:c.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+q+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(l))+
-(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,d){var c=window.location.hash,f=mxUtils.bind(this,function(d){var f=null!=a.data?a.data:"";null!=d&&0<d.length&&(0<f.length&&(f+="\n"),f+=d);d=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);d.getHash=function(){return c};this.fileLoaded(d);"csv"==
-a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var c=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){c===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
-" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=d&&
-d(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){d.alert(a.tooltip)});return c}var b=null,d=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=n.getCell(a.getAttribute("id"));
-if(null!=m){try{var t=a.getAttribute("value");if(null!=t){var q=mxUtils.parseXml(t).documentElement;if(null!=q)if("1"==q.getAttribute("replace-value"))n.setValue(m,q);else for(var z=q.attributes,E=0;E<z.length;E++)e.setAttributeForCell(m,z[E].nodeName,0<z[E].nodeValue.length?z[E].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+m.id+": "+M)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(m,C)}catch(M){null!=window.console&&console.log("Error in style for "+
-m.id+": "+M)}try{var v=a.getAttribute("icon");if(null!=v){var u=0<v.length?JSON.parse(v):null;null!=u&&u.append||e.removeCellOverlays(m);null!=u&&e.addCellOverlay(m,c(u))}}catch(M){null!=window.console&&console.log("Error in icon for "+m.id+": "+M)}try{var y=a.getAttribute("geometry");if(null!=y){var y=JSON.parse(y),H=e.getCellGeometry(m);if(null!=H){H=H.clone();for(key in y){var B=parseFloat(y[key]);"dx"==key?H.x+=B:"dy"==key?H.y+=B:"dw"==key?H.width+=B:"dh"==key?H.height+=B:H[key]=parseFloat(y[key])}e.model.setGeometry(m,
-H)}}}catch(M){null!=window.console&&console.log("Error in icon for "+m.id+": "+M)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
-a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var c=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,d="",f=c.lastIndexOf(".");0<=f&&(d=c.substring(f),c=c.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),k=e.getMonth()+1,m=e.getDate(),t=e.getHours(),q=e.getMinutes(),e=e.getSeconds(),c=
-c+(" "+(f+"-"+k+"-"+m+"-"+t+"-"+q+"-"+e));return c=mxResources.get("copyOf",[c])+d};EditorUi.prototype.fileLoaded=function(a,b){var c=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var d=!1;this.hideDialog();null!=c&&(EditorUi.debug("File.closed",[c]),c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();
+this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b=null;this.fileNode=
+a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var n=this.editor.graph.getModel(),k=n.getChildren(n.root),c=0;c<k.length;c++){var m=k[c];n.setVisible(m,a[m.id]||
+!1)}}catch(t){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};
+EditorUi.prototype.downloadFile=function(a,b,c,e,l,n,k,m,t,q,y){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!l),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,l,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=n&&(this.editor.graph.pageVisible=n);var f=this.createDownloadRequest(d,a,e,b,k,l,m,t,q,y);this.editor.graph.pageVisible=c;return f}catch(Y){this.handleError(Y)}}));else{var p=null,x=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var A=this.editor.graph.background;if(k||A==mxConstants.NONE)A=null;var G=this.editor.graph.getSvg(A,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(G);this.convertImages(G,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();x('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",p=this.getFileData(!1,
+!0,null,mxUtils.bind(this,function(a){this.spinner.stop();x(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,l,n,k,m,t,q){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==n?!1:"xmlpng"!=b);var g="",p="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};q=q?"1":"0";"pdf"==b&&0==n&&(p="&allPages=1");if("xmlpng"==b&&(q="1",b="png",null!=this.pages&&null!=this.currentPage))for(n=
+0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){g="&from="+n;break}n=d.background;"png"==b&&l?n=mxConstants.NONE:l||null!=n&&n!=mxConstants.NONE||(n="#ffffff");l={globalVars:d.getExportVariables()};t&&(l.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+p+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+e+"&embedXml="+q+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(l))+
+(null!=k?"&scale="+k:"")+(null!=m?"&border="+m:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==
+a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&
+c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,n=e.getModel();n.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=n.getCell(a.getAttribute("id"));
+if(null!=m){try{var t=a.getAttribute("value");if(null!=t){var q=mxUtils.parseXml(t).documentElement;if(null!=q)if("1"==q.getAttribute("replace-value"))n.setValue(m,q);else for(var y=q.attributes,E=0;E<y.length;E++)e.setAttributeForCell(m,y[E].nodeName,0<y[E].nodeValue.length?y[E].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+m.id+": "+M)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(m,C)}catch(M){null!=window.console&&console.log("Error in style for "+
+m.id+": "+M)}try{var v=a.getAttribute("icon");if(null!=v){var u=0<v.length?JSON.parse(v):null;null!=u&&u.append||e.removeCellOverlays(m);null!=u&&e.addCellOverlay(m,d(u))}}catch(M){null!=window.console&&console.log("Error in icon for "+m.id+": "+M)}try{var z=a.getAttribute("geometry");if(null!=z){var z=JSON.parse(z),I=e.getCellGeometry(m);if(null!=I){I=I.clone();for(key in z){var B=parseFloat(z[key]);"dx"==key?I.x+=B:"dy"==key?I.y+=B:"dw"==key?I.width+=B:"dh"==key?I.height+=B:I[key]=parseFloat(z[key])}e.model.setGeometry(m,
+I)}}}catch(M){null!=window.console&&console.log("Error in icon for "+m.id+": "+M)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,n)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
+a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{n.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",f=d.lastIndexOf(".");0<=f&&(c=d.substring(f),d=d.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),k=e.getMonth()+1,m=e.getDate(),t=e.getHours(),q=e.getMinutes(),e=e.getSeconds(),d=
+d+(" "+(f+"-"+k+"-"+m+"-"+t+"-"+q+"-"+e));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();
 this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;
 this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
-mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
 a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(A){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?this.fileLoaded(c):f()});b?e():this.handleError(x,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return d};EditorUi.prototype.getHashValueForPages=function(a,b){var c=0,d=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=
-0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");d.root=a[e].root;var m=f.encode(d);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");k.appendChild(m);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);c=(c<<5)-c+this.hashValue(k,function(a,c,b,d){return!d||"mxGeometry"!=
-a.nodeName&&"mxPoint"!=a.nodeName||"x"!=c&&"y"!=c&&"width"!=c&&"height"!=c?d&&"mxCell"==a.nodeName&&"previous"==c?null:b:Math.round(b)},b)<<0}return c};EditorUi.prototype.hashValue=function(a,b,d){var c=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(c^=this.hashValue(a.nodeName,b,d));if(null!=a.attributes){null!=d&&(d.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,
-g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(c^=this.hashValue(e,b,d)+this.hashValue(g,b,d))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)c=(c<<5)-c+this.hashValue(a.childNodes[f],b,d)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=d&&(d.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;c^=b}return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
-function(a,b,d,e,l,n,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".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,b){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var d=JSON.parse(mxUtils.getTextContent(c.documentElement));
-this.libraryLoaded(a,d,c.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d,e){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,g=mxUtils.bind(this,function(c,b){0==c.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(c,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);d=null!=d&&0<d.length?d:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),d,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(c);var k=p.parentNode.previousSibling;e=k.getAttribute("title");
-null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");k.style.position="relative";var z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get("close"));z.setAttribute("valign","absmiddle");
-z.setAttribute("border","0");z.style.cursor="pointer";z.style.margin="0 3px";var E=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=E?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var C=this.editor.graph,v=null,
-q=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),p,b,a,a.getMode());mxEvent.consume(c)}),u=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v),v=z.cloneNode(!1),v.setAttribute("src",Editor.spinImage),v.setAttribute("title",mxResources.get("saving")),v.style.cursor="default",v.style.marginRight="2px",v.style.marginTop="-2px",m.insertBefore(v,m.firstChild),k.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=v&&null!=v.parentNode&&(v.parentNode.removeChild(v),k.style.paddingRight=18*m.childNodes.length+"px")})):null==E&&(E=z.cloneNode(!1),E.setAttribute("src",IMAGE_PATH+"/download.png"),E.setAttribute("title",mxResources.get("save")),m.insertBefore(E,m.firstChild),mxEvent.addListener(E,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==E||a.isModified()||(k.style.paddingRight=18*m.childNodes.length+
-"px",E.parentNode.removeChild(E),E=null)});mxEvent.consume(c)})),k.style.paddingRight=18*m.childNodes.length+"px")}),H=mxUtils.bind(this,function(a,c,d,e){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-c.x,-c.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&
-(a.title=e);b.push(a);u(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),y=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=C.getSelectionCells(),b=C.view.getBounds(c),d=C.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=C.view.translate.x;b.y-=C.view.translate.y;
-H(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor=
-"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,y(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
-function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,l,n,k,t,m,x){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,k),c)],c[0].vertex=!0,H(c,new mxRectangle(0,0,n,k),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 z=!1,A=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,p);b=b.concat(l);u(a);this.spinner.stop();z=!0}catch(K){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);H(k,new mxRectangle(0,0,t.width,t.height),a)}z=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}z||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=x&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(x,function(a){A(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));z=z.cloneNode(!1);z.setAttribute("src",Editor.editImage);z.setAttribute("title",mxResources.get("edit"));m.insertBefore(z,m.firstChild);mxEvent.addListener(z,"click",q);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
-p&&q(a)});e=z.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",y);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
-mxEvent.consume(a)})),m.insertBefore(e,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var c=0;c<a.length;c++){var d=a[c],e=d.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,d.w,d.h,"",d.title||"",!1,!1,!0))}else null!=d.xml&&(e=this.stringToCells(Graph.decompress(d.xml)),
-0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,d.w,d.h,d.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
+(null!=a?a.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(A){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(x,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=
+0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");c.root=a[e].root;var m=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,m,!0);m.removeAttribute("pageWidth");m.removeAttribute("pageHeight");k.appendChild(m);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(a,d,b,c){return!c||"mxGeometry"!=
+a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,
+g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(d^=this.hashValue(e,b,c)+this.hashValue(g,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
+function(a,b,c,e,l,n,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".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 d=mxUtils.createXmlDocument(),
+b=d.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));d.appendChild(b);return mxUtils.getXml(d)};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 d=this.sidebar.palettes[a];if(null!=d){for(var b=0;b<d.length;b++)d[b].parentNode.removeChild(d[b]);delete this.sidebar.palettes[a]}};
+EditorUi.prototype.repositionLibrary=function(a){var d=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:d.firstChild.nextSibling.nextSibling;var b=d.lastChild,c=b.previousSibling;d.insertBefore(b,a);d.insertBefore(c,b)};EditorUi.prototype.loadLibrary=function(a,b){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(d.documentElement));
+this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){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,g=mxUtils.bind(this,function(d,b){0==d.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(d,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var p=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(d);var k=p.parentNode.previousSibling;e=k.getAttribute("title");
+null!=e&&0<e.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");k.style.position="relative";var y=document.createElement("img");y.setAttribute("src",Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get("close"));y.setAttribute("valign","absmiddle");
+y.setAttribute("border","0");y.style.cursor="pointer";y.style.margin="0 3px";var E=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(y),mxEvent.addListener(y,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=E?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var C=this.editor.graph,v=null,
+q=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),p,b,a,a.getMode());mxEvent.consume(d)}),u=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v),v=y.cloneNode(!1),v.setAttribute("src",Editor.spinImage),v.setAttribute("title",mxResources.get("saving")),v.style.cursor="default",v.style.marginRight="2px",v.style.marginTop="-2px",m.insertBefore(v,m.firstChild),k.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=v&&null!=v.parentNode&&(v.parentNode.removeChild(v),k.style.paddingRight=18*m.childNodes.length+"px")})):null==E&&(E=y.cloneNode(!1),E.setAttribute("src",IMAGE_PATH+"/download.png"),E.setAttribute("title",mxResources.get("save")),m.insertBefore(E,m.firstChild),mxEvent.addListener(E,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==E||a.isModified()||(k.style.paddingRight=18*m.childNodes.length+
+"px",E.parentNode.removeChild(E),E=null)});mxEvent.consume(d)})),k.style.paddingRight=18*m.childNodes.length+"px")}),z=mxUtils.bind(this,function(a,d,c,e){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-d.x,-d.y)}p.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
+(a.title=e);b.push(a);u(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),B=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=C.getSelectionCells(),b=C.view.getBounds(d),c=C.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=C.view.translate.x;b.y-=C.view.translate.y;
+z(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(p,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),p.style.backgroundColor="#f1f3f4",p.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(p.style.backgroundColor=
+"",p.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,B(a),mxEvent.consume(a))}));mxEvent.addListener(p,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),p.style.backgroundColor="",p.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(p,"dragover",mxUtils.bind(this,
+function(a){p.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";p.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"drop",mxUtils.bind(this,function(a){p.style.cursor="";p.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,l,n,k,t,m,x){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,k),d)],d[0].vertex=!0,z(d,new mxRectangle(0,0,n,k),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 y=!1,A=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var l=
+JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,p);b=b.concat(l);u(a);this.spinner.stop();y=!0}catch(K){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var k=this.stringToCells(Editor.getDiagramNodeXml(n[l])),t=this.editor.graph.getBoundingBoxFromGeometry(k);z(k,new mxRectangle(0,0,t.width,t.height),a)}y=!0}catch(K){null!=window.console&&console.log("error in drop handler:",K)}y||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=x&&null!=t&&(/(\.v(dx|sdx?))($|\?)/i.test(t)||/(\.vs(x|sx?))($|\?)/i.test(t))?this.importVisio(x,function(a){A(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,t)&&null!=x?this.parseFile(x,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?A(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):A(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(p,"dragleave",function(a){p.style.cursor="";p.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));y=y.cloneNode(!1);y.setAttribute("src",Editor.editImage);y.setAttribute("title",mxResources.get("edit"));m.insertBefore(y,m.firstChild);mxEvent.addListener(y,"click",q);mxEvent.addListener(p,"dblclick",function(a){mxEvent.getSource(a)==
+p&&q(a)});e=y.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",B);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+mxEvent.consume(a)})),m.insertBefore(e,m.firstChild))}k.appendChild(m);k.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],e=c.data;if(null!=e){var e=this.convertDataUri(e),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(f+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(f+"image="+e,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(e=this.stringToCells(Graph.decompress(c.xml)),
+0<e.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(e,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?
 "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
 "black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",
-Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,d,e,l){a=new ImageDialog(this,a,b,d,e,l);this.showDialog(a.container,Graph.fileSupport?
-480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,l){a=new LibraryDialog(this,a,b,d,e,l);this.showDialog(a.container,640,440,!0,!1,
-mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var c=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&c.refresh()}));return c};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position=
+Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(a,b,c,e,l){a=new ImageDialog(this,a,b,c,e,l);this.showDialog(a.container,Graph.fileSupport?
+480: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 d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,l){a=new LibraryDialog(this,a,b,c,e,l);this.showDialog(a.container,640,440,!0,!1,
+mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var d=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position=
 "absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
-mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d,e,l,n,k){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(v){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));
-var g=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),p=function(){c();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=l?l:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m=
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,l,n,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(v){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));
+var g=mxResources.get("ok"),p=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),p=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=l?l:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m=
 null!=n?n:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,
-function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,d,e,l)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<c.length;a++){var b=document.createElement("option");mxUtils.write(b,c[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+c[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");
-mxUtils.write(b,mxResources.get("addAccount"));b.value=c.length;e.appendChild(b)}var c=this.drive.getUsersList(),b=document.createElement("div"),d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+": ");b.appendChild(d);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var b=e.value,d=c.length!=b;d&&this.drive.setUser(c[b]);this.drive.authorize(d,mxUtils.bind(this,function(){d||
-(c=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=d&&d()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!==
-typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,d,p,null,null,n,x,null,null,null,e?d:null)}else null!=d&&d()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,
-340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,l,n){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,l,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,d){var c=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&
+function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,e,l)}),p,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){e.innerHTML="";for(var a=0;a<d.length;a++){var b=document.createElement("option");mxUtils.write(b,d[a].displayName);b.value=a;e.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+d[a].email+">");b.setAttribute("disabled","disabled");e.appendChild(b)}b=document.createElement("option");
+mxUtils.write(b,mxResources.get("addAccount"));b.value=d.length;e.appendChild(b)}var d=this.drive.getUsersList(),b=document.createElement("div"),c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+": ");b.appendChild(c);var e=document.createElement("select");e.style.width="200px";a();mxEvent.addListener(e,"change",mxUtils.bind(this,function(){var b=e.value,c=d.length!=b;c&&this.drive.setUser(d[b]);this.drive.authorize(c,mxUtils.bind(this,function(){c||
+(d=this.drive.getUsersList(),a())}),mxUtils.bind(this,function(a){this.handleError(a)}),!0)}));b.appendChild(e);b=new CustomDialog(this,b,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(b.container,300,75,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=c&&c()}),480,150);return}}null!=f.message?k=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error?k=mxUtils.htmlEntities(f.response.error):"undefined"!==
+typeof window.App&&(f.code==App.ERROR_TIMEOUT?k=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY&&(k=mxUtils.htmlEntities(mxResources.get("busy"))))}var x=n=null;null!=f&&null!=f.helpLink&&(n=mxResources.get("help"),x=mxUtils.bind(this,function(){return this.editor.graph.openLink(f.helpLink)}));this.showError(b,k,g,c,p,null,null,n,x,null,null,null,e?c:null)}else null!=c&&c()};EditorUi.prototype.alert=function(a,b){var d=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(d.container,
+340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(a,b,c,e,l,n){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=Math.min(200,28*Math.ceil(a.length/50));a=new ConfirmDialog(this,a,function(){d();null!=b&&b()},function(){d();null!=c&&c()},e,l,null,null,null,null,f);this.showDialog(a.container,340,46+f,!0,n);a.init()};EditorUi.prototype.showBanner=function(a,b,c){var d=!1;if(!(this.bannerShowing||this["hideBanner"+a]||isLocalStorage&&null!=mxSettings.settings&&
 null!=mxSettings.settings["close"+a])){var e=document.createElement("div");e.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(e.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.className="geBtn gePrimaryBtn";
-c=document.createElement("img");c.setAttribute("src",IMAGE_PATH+"/logo.png");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(c);c=document.createElement("img");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("close"));c.setAttribute("border","0");c.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-e.appendChild(c);mxUtils.write(e,b);document.body.appendChild(e);this.bannerShowing=!0;var f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";f.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));f.appendChild(b);
-e.style.paddingBottom="30px";e.appendChild(f);var k=mxUtils.bind(this,function(c){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);c!=g&&c!=b&&(mxEvent.consume(a),
-d(),k())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k(!0)}),1E3)}),3E4);c=!0}return c};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d,e){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(c=this.writeGraphModelToPng(c,"pHYs","dpi",e));return c};EditorUi.prototype.saveCanvas=
-function(a,b,d,e,l){var c="jpeg"==d?"jpg":d;e=this.getBaseFilename(e)+"."+c;a=this.createImageDataUri(a,b,d,l);this.saveData(e,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=
-function(a,b){var c=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));c.textarea.style.width="600px";c.textarea.style.height="380px";this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,l){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),
-null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==d||"image/"!=d.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,d,e);else{var c=document.createElement("a"),f=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof c.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),
-f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(t){}}else this.createEchoRequest(a,b,d,e,l).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,l,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
-a+(null!=d?"&mime="+d:"")+(null!=l?"&format="+l:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&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 m=1024*k,t=Math.min(m+1024,d),q=Array(t-m),z=0;m<t;++z,++m)q[z]=c[m].charCodeAt(0);f[k]=new Uint8Array(q)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,l,n,k){n=null!=n?n:!1;k=null!=k?k:
-"vsdx"!=l&&(!mxClient.IS_IOS||!navigator.standalone);l=this.getServiceCount(n);isLocalStorage&&l++;var c=4>=l?2:6<l?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null!=d&&"image/"==d.substring(0,6))this.openInNewWindow(a,d,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&
-this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(C){this.handleError(C)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,k,null,1<l,c,a,d,e);n=this.isServices(l)?l>c?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){var c=window.open("about:blank");null==c||null==c.document?mxUtils.popup(a,!0):("image/svg+xml"!=
-b||mxClient.IS_SVG?(d=d?a:btoa(unescape(encodeURIComponent(a))),"image/svg+xml"==b?mxClient.IS_GC&&mxClient.IS_MAC?c.document.write('<html><object style="max-width:100%;" data="data:'+b+";base64,"+d+'"/></html>'):c.document.write("<html>"+a+"</html>"):c.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+d+'"/></html>')):c.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),c.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=
-function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
-this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var 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.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
-function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,l){this.isLocalFileSave()?this.saveLocalFile(d,a,e,l,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,l,b,c)}),d,l,e)};EditorUi.prototype.saveRequest=function(a,
-b,d,e,l,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);isLocalStorage&&c++;var f=4>=c?2:6<c?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+
-b;if(null!=e)try{this.exportFile(e,a,n,!0,c,d)}catch(v){this.handleError(v)}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,n,!0,c,d)}catch(v){this.handleError(v)}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,f,e,n,l);c=this.isServices(c)?4<c?390:270:160;this.showDialog(a.container,380,c,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,d,e,l,n){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,l,n,k,m,t,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var c=
-this.editor.graph.isSelectionEmpty();d=null!=d?d:c;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,k,m,null,d,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();l&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,t,null,null,null,!1));var c='<?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);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.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,x,this.thumbImageCache)):x(g)}catch(L){this.handleError(L)}};EditorUi.prototype.addRadiobox=
-function(a,b,d,e,l,n,k){return this.addCheckbox(a,d,e,l,n,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,d,e,l,n,k,m){n=null!=n?n:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();c.id=k;null!=m&&c.setAttribute("name",m);d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");n&&(a.appendChild(c),d=document.createElement("label"),mxUtils.write(d,
-b),d.setAttribute("for",k),a.appendChild(d),l||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),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 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,d,e,l,n,k,m){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=l&&0<l.length&&f.push("edit="+encodeURIComponent(l)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));d&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?d=
-"#U"+encodeURIComponent(k):(c=this.getCurrentFile(),m||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
-"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,l,n,k,m,t,q,z){this.getBasenames();var c={};""!=l&&l!=mxConstants.NONE&&(c.highlight=l);"auto"!==e&&(c.target=e);t||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];k&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);
-m&&d.push("layers");0<d.length&&(t&&d.push("lightbox"),c.toolbar=d.join(" "));null!=q&&0<q.length&&(c.edit=q);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
-EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");
+d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/logo.png");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";e.appendChild(d);d=document.createElement("img");d.setAttribute("src",Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.setAttribute("border","0");d.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+e.appendChild(d);mxUtils.write(e,b);document.body.appendChild(e);this.bannerShowing=!0;var f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("id","geDoNotShowAgainCheckbox");g.style.marginRight="6px";f.appendChild(g);b=document.createElement("label");b.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(b,mxResources.get("doNotShowAgain"));f.appendChild(b);
+e.style.paddingBottom="30px";e.appendChild(f);var k=mxUtils.bind(this,function(d){null!=e.parentNode&&(e.parentNode.removeChild(e),this.bannerShowing=!1,g.checked&&(this["hideBanner"+a]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+a]=Date.now(),mxSettings.save())))});mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){mxEvent.consume(a);k()}));mxEvent.addListener(e,"click",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);d!=g&&d!=b&&(mxEvent.consume(a),
+c(),k())}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){k(!0)}),1E3)}),3E4);d=!0}return d};EditorUi.prototype.setCurrentFile=function(a){null!=a&&(a.opened=new Date);this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c,e){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,"tEXt","mxfile",encodeURIComponent(b)));0<e&&(d=this.writeGraphModelToPng(d,"pHYs","dpi",e));return d};EditorUi.prototype.saveCanvas=
+function(a,b,c,e,l){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,b,c,l);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.showTextDialog=
+function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,l){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?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&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,e);else{var d=document.createElement("a"),f=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&!mxClient.IS_IOS&&"undefined"!==typeof d.download;if(mxClient.IS_GC&&null!=navigator.userAgent)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),
+f=65==(g?parseInt(g[2],10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(t){}}else this.createEchoRequest(a,b,c,e,l).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,l,n){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,
+a+(null!=c?"&mime="+c:"")+(null!=l?"&format="+l:"")+(null!=n?"&base64="+n:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,e=Math.ceil(c/1024),f=Array(e),k=0;k<e;++k){for(var m=1024*k,t=Math.min(m+1024,c),q=Array(t-m),y=0;m<t;++y,++m)q[y]=d[m].charCodeAt(0);f[k]=new Uint8Array(q)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,l,n,k){n=null!=n?n:!1;k=null!=k?k:
+"vsdx"!=l&&(!mxClient.IS_IOS||!navigator.standalone);l=this.getServiceCount(n);isLocalStorage&&l++;var d=4>=l?2:6<l?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&
+this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(C){this.handleError(C)}}))}catch(E){this.handleError(E)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,n,k,null,1<l,d,a,c,e);n=this.isServices(l)?l>d?390:270:160;this.showDialog(b.container,400,n,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=
+b||mxClient.IS_SVG?(c=c?a:btoa(unescape(encodeURIComponent(a))),"image/svg+xml"==b?mxClient.IS_GC&&mxClient.IS_MAC?d.document.write('<html><object style="max-width:100%;" data="data:'+b+";base64,"+c+'"/></html>'):d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+c+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=
+function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=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 c=d.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=c.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=c.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 d=this.createImageDataUri(a,
+null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
+function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,l){this.isLocalFileSave()?this.saveLocalFile(c,a,e,l,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,l,b,d)}),c,l,e)};EditorUi.prototype.saveRequest=function(a,
+b,c,e,l,n,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){n=null!=n?n:"pdf"==b?"application/pdf":"image/"+
+b;if(null!=e)try{this.exportFile(e,a,n,!0,d,c)}catch(v){this.handleError(v)}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,n,!0,d,c)}catch(v){this.handleError(v)}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<d,f,e,n,l);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,l,n){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,l,n,k,m,t,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=
+this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==q?"_blank":"self"==q?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();l&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,t,null,null,null,!1));var 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);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);n?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,x,this.thumbImageCache)):x(g)}catch(L){this.handleError(L)}};EditorUi.prototype.addRadiobox=
+function(a,b,c,e,l,n,k){return this.addCheckbox(a,c,e,l,n,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,l,n,k,m){n=null!=n?n:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();d.id=k;null!=m&&d.setAttribute("name",m);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");n&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,
+b),c.setAttribute("for",k),a.appendChild(c),l||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.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";c=document.createElement("option");
+c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);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(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){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 c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);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;d()});mxEvent.consume(a)}));d();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 c.value},focus:function(){c.focus()}}};
+EditorUi.prototype.createLink=function(a,b,c,e,l,n,k,m){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=l&&0<l.length&&f.push("edit="+encodeURIComponent(l)),n&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?c=
+"#U"+encodeURIComponent(k):(d=this.getCurrentFile(),m||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
+"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,l,n,k,m,t,q,y){this.getBasenames();var d={};""!=l&&l!=mxConstants.NONE&&(d.highlight=l);"auto"!==e&&(d.target=e);t||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);
+m&&c.push("layers");0<c.length&&(t&&c.push("lightbox"),d.toolbar=c.join(" "));null!=q&&0<q.length&&(d.edit=q);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(n?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";y(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.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";d.appendChild(f);var g=document.createElement("div");
 g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);
-p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked",
-"checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var z=this.addLinkSection(c),q=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";c.appendChild(C);var v=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(c,mxResources.get("allPages"),
-g,!g),y=this.addCheckbox(c,mxResources.get("layers"),!0),H=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addEditButton(c,H),D=B.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(H,"change",function(){H.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&H.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,q.checked,
-C.value,z.getTarget(),z.getColor(),v.checked,u.checked,y.checked,H.checked,B.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,l,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";
+p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),g.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked",
+"checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var y=this.addLinkSection(d),q=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";d.appendChild(C);var v=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(d,mxResources.get("allPages"),
+g,!g),z=this.addCheckbox(d,mxResources.get("layers"),!0),I=this.addCheckbox(d,mxResources.get("lightbox"),!0),B=this.addEditButton(d,I),D=B.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(I,"change",function(){I.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&I.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,q.checked,
+C.value,y.getTarget(),y.getColor(),v.checked,u.checked,z.checked,I.checked,B.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,l,n){var d=document.createElement("div");d.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";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";
 a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));k.appendChild(p);p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));
-p.style.marginTop="12px";p.className="geBtn";k.appendChild(p);c.appendChild(k);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));k.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
-null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",c.appendChild(m),mxUtils.write(c,mxResources.get("height")+
-":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var v=this.addLinkSection(c,n);d=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var y=this.addCheckbox(c,mxResources.get("lightbox"),!0),H=this.addEditButton(c,y),B=H.getEditInput(),D=this.addCheckbox(c,mxResources.get("layers"),
-!0);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&y.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){l(v.getTarget(),v.getColor(),null==u?
-!0:u.checked,y.checked,H.getLink(),D.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
-mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";c.appendChild(f);if(l){mxUtils.write(c,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";c.appendChild(g);mxUtils.write(c,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
-"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";c.appendChild(k);mxUtils.br(c)}var p=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a=
-new CustomDialog(this,c,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,c=parseInt(k.value)||0;d(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,c)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,l,n,k,m){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-c.appendChild(p);mxUtils.write(c,mxResources.get("zoom")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";c.appendChild(x);mxUtils.write(c,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||
-"0";c.appendChild(A);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");n&&(c.appendChild(y),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),g+=26,mxEvent.addListener(u,"change",function(){u.checked?
-y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(y.setAttribute("checked","checked"),y.defaultChecked=!0);var B=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),g+=
-26);var M=null;if("png"==m||"jpeg"==m)M=this.addCheckbox(c,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var P=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),R=null!=this.pages&&1<this.pages.length,ba=this.addCheckbox(c,R?mxResources.get("allPages"):"",R,!R,null,"jpeg"!=m);ba.style.marginLeft="24px";ba.style.marginBottom="16px";R?g+=26:ba.style.display="none";mxEvent.addListener(P,"change",function(){P.checked&&R?ba.removeAttribute("disabled"):
-ba.setAttribute("disabled","disabled")});k&&R||ba.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));X.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));X.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==m&&(mxUtils.write(c,mxResources.get("links")+":"),c.appendChild(X),mxUtils.br(c),mxUtils.br(c),g+=26);d=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=A.value;this.lastExportZoom=x.value;l(x.value,q.checked,!u.checked,B.checked,P.checked,D.checked,A.value,y.checked,!ba.checked,X.value,null!=M?M.checked:null)}),null,d,e);this.showDialog(d.container,340,g,!0,!0,null,
-null,null,null,!0);x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var k=this.addCheckbox(c,mxResources.get("fit"),
-!0),p=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(c,d),q=this.addCheckbox(c,mxResources.get("lightbox"),!0),C=this.addEditButton(c,q),v=C.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),y=this.addCheckbox(c,mxResources.get("layers"),u,!u);y.style.marginLeft=v.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(u&&y.removeAttribute("disabled"),v.removeAttribute("disabled")):
-(y.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),y.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,l,n,k,m){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";d&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+c+'"'+p+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,
-mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?c("data:image/png;base64,"+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,l,n,k){var c=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!d),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var m=" ",x="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",x+="cursor:pointer;");a&&(x+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=x?' style="'+x+'"':"")+m+"/>")}))}else x="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),x+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),x+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=x&&c.setAttribute("style",x),this.editor.addFontCss(c),this.editor.graph.mathEnabled&&this.editor.addMathCss(c),k(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.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&&(a=Editor.parseDiagramNode(c))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){try{var c=this.editor.graph,e=null;if(null!=
-d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),e=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=d.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(G){null!=b&&b(G)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)}catch(A){null!=
-b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,d,e,l,n,k,m){m=null!=m?m:!0;k=b.background;k==mxConstants.NONE&&(k=null);n=b.getSvg(k,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&n.setAttribute("content",a);null!=d&&n.setAttribute("resource",d);if(null!=l)this.embedFonts(n,mxUtils.bind(this,function(a){m?this.convertImages(a,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+p.style.marginTop="12px";p.className="geBtn";k.appendChild(p);d.appendChild(k);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));k.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
+null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,C=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,mxResources.get("height")+
+":"),C=document.createElement("input"),C.setAttribute("type","text"),C.style.width="50px",C.style.marginLeft="6px",C.style.marginBottom="10px",C.value=e+"px",d.appendChild(C),mxUtils.br(d);var v=this.addLinkSection(d,n);c=null!=this.pages&&1<this.pages.length;var q=null;if(null==g||g.constructor!=window.DriveFile||b)q=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(d,mxResources.get("lightbox"),!0),z=this.addEditButton(d,u),B=z.getEditInput(),D=this.addCheckbox(d,mxResources.get("layers"),
+!0);D.style.marginLeft=B.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(D.removeAttribute("disabled"),B.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&u.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){l(v.getTarget(),v.getColor(),null==q?
+!0:q.checked,u.checked,z.getLink(),D.checked,null!=m?m.value:null,null!=C?C.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
+mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(l?"10":"4")+"px";d.appendChild(f);if(l){mxUtils.write(d,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";d.appendChild(g);mxUtils.write(d,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
+"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,q=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=q&&(q.style.marginBottom="16px");a=
+new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,d=parseInt(k.value)||0;c(!p.checked,null!=m?m.checked:!1,null!=q?q.checked:!1,a,d)}),null,a,b);this.showDialog(a.container,300,(l?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,l,n,k,m){k=null!=k?k:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";d.appendChild(x);mxUtils.write(d,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||
+"0";d.appendChild(A);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),u=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");n&&(d.appendChild(z),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(u,"change",function(){u.checked?
+z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var B=this.addCheckbox(d,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&&(d.appendChild(D),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=
+26);var M=null;if("png"==m||"jpeg"==m)M=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var R=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),S=null!=this.pages&&1<this.pages.length,Y=this.addCheckbox(d,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=m);Y.style.marginLeft="24px";Y.style.marginBottom="16px";S?g+=26:Y.style.display="none";mxEvent.addListener(R,"change",function(){R.checked&&S?Y.removeAttribute("disabled"):
+Y.setAttribute("disabled","disabled")});k&&S||Y.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));X.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));X.appendChild(a);a=document.createElement("option");
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==m&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(X),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=A.value;this.lastExportZoom=x.value;l(x.value,q.checked,!u.checked,B.checked,R.checked,D.checked,A.value,z.checked,!Y.checked,X.value,null!=M?M.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null,
+null,null,null,!0);x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,l){var d=document.createElement("div");d.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";d.appendChild(g)}var k=this.addCheckbox(d,mxResources.get("fit"),
+!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(d,c),q=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,q),v=C.getEditInput(),u=1<f.model.getChildCount(f.model.getRoot()),z=this.addCheckbox(d,mxResources.get("layers"),u,!u);z.style.marginLeft=v.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(u&&z.removeAttribute("disabled"),v.removeAttribute("disabled")):
+(z.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&q.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(k.checked,p.checked,m.checked,q.checked,C.getLink(),z.checked)}),null,mxResources.get("embed"),l);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,l,n,k,m){function d(d){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');k('<img src="'+d+'"'+p+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(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),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?d("data:image/png;base64,"+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,e,l,n,k){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var m=" ",x="";e&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}})(this);\"",x+="cursor:pointer;");a&&(x+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=x?' style="'+x+'"':"")+m+"/>")}))}else x="",e&&(d.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.drawHost+"/?client=1&lightbox=1"+(l?"&edit=_blank":"")+(n?"&layers=1":"")+"');}}})(this);"),x+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),x+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=x&&d.setAttribute("style",x),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==
+a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(n){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{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()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(G){null!=b&&b(G)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(A){null!=
+b&&b(A)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,l,n,k,m){m=null!=m?m:!0;k=b.background;k==mxConstants.NONE&&(k=null);n=b.getSvg(k,null,null,null,null,n);b.shadowVisible&&b.addSvgShadow(n);null!=a&&n.setAttribute("content",a);null!=c&&n.setAttribute("resource",c);if(null!=l)this.embedFonts(n,mxUtils.bind(this,function(a){m?this.convertImages(a,mxUtils.bind(this,function(a){l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a))})):l((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(n)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(c){try{null!=c&&this.editor.addFontCss(a,c),b(a)}catch(p){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,d,e,l,n,k,m,t,q,z){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,d,m):null,t,null==this.pages||0==this.pages.length,z)}catch(v){"Invalid image"==v.message?this.downloadFile(t):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,n,k,q)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function c(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
-"g"),"")}var d=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[d[0]],f=1;f<d.length;f++){var g=d[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[c(d[f].substring(0,g))]);a.push('"'+d[f].substring(g))}b(a.join(""))}});if(0<d.length){for(var k=1;k<d.length;k++){var m=d[k].indexOf(")"),t=null,q=d[k].indexOf("format(",m);0<q&&(t=c(d[k].substring(q+7,d[k].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
-a;e++;var c="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))c="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
-!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){this.cachedFonts[a]=c;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(d[k].substring(0,m)),t)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(c){this.editor.resolvedFontCss=c;a()})):a()};EditorUi.prototype.embedExtFonts=
-function(a){var c=this.editor.graph.extFonts;if(null!=c&&0<c.length){var b="",d=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==d&&this.embedCssFonts(b,a)}),n=0;n<c.length;n++)mxUtils.bind(this,function(a,c){0==c.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[c]?(d++,this.loadUrl(c,mxUtils.bind(this,function(a){this.cachedGoogleFonts[c]=a;b+=a;d--;e()}),mxUtils.bind(this,function(a){d--;b+="@import url("+c+");";e()}))):b+=this.cachedGoogleFonts[c]:
-b+='@font-face {font-family: "'+a+'";src: url("'+c+'");}'})(c[n].name,c[n].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,l,n,k,m,t,q,z,u,C,v,y){try{n=null!=n?n:!0;k=null!=k?k:!0;u=null!=u?u:this.editor.graph;C=null!=C?C:0;var c=t?null:u.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==t&&(c="#ffffff");this.convertImages(u.getSvg(null,null,null,v,null,k,null,null,null,q),mxUtils.bind(this,function(d){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=
-function(){mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,C/m,C/m);a(g)},0):(t.drawImage(e,C/m,C/m),a(g))},g=document.createElement("canvas"),k=parseInt(d.getAttribute("width")),p=parseInt(d.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=n?Math.min(1,Math.min(3*b/(4*p),b/k)):b/k);k=Math.ceil(m*k)+2*C;p=Math.ceil(m*p)+2*C;g.setAttribute("width",k);g.setAttribute("height",p);var t=g.getContext("2d");null!=c&&(t.beginPath(),t.rect(0,0,k,p),t.fillStyle=c,t.fill());t.scale(m,m);if(y){var z=
-u.view,x=z.scale;z.scale=1;var q=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=x;var q="data:image/svg+xml;base64,"+q,v=u.gridSize*z.gridSteps*m,A=u.getGraphBounds(),D=z.translate.x*x,E=z.translate.y*x,H=D+(A.x-D)/x,B=E+(A.y-E)/x,G=new Image;G.onload=function(){try{for(var a=-Math.round(v-mxUtils.mod((D-H)*m,v)),c=-Math.round(v-mxUtils.mod((E-B)*m,v));a<k;a+=v)for(var b=c;b<p;b+=v)t.drawImage(G,a/m,b/m);f()}catch(K){null!=l&&l(K)}};G.onerror=function(a){null!=l&&l(a)};G.src=
-q}else f()}catch(Z){null!=l&&l(Z)}});e.onerror=function(a){null!=l&&l(a)};q&&this.editor.graph.addSvgShadow(d);this.editor.graph.mathEnabled&&this.editor.addMathCss(d);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(d))}catch(M){null!=l&&l(M)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(d,a),this.loadFonts(f)}catch(P){null!=l&&l(P)}}))}catch(M){null!=
-l&&l(M)}}),d,z)}catch(H){null!=l&&l(H)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var e="http://"==c.substring(0,7)||"https://"==c.substring(0,8);e&&!navigator.onLine?c=d.svgBrokenImage.src:!e||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.editor.isCorsEnabledForUrl(c)?"chrome-extension://"==c.substring(0,19)||mxClient.IS_CHROMEAPP||(c=b.apply(this,arguments)):c=PROXY_URL+
-"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,function(d,g){for(var l=a.getElementsByTagName(d),n=0;n<l.length;n++)mxUtils.bind(this,function(d){try{if(null!=d){var l=e.convert(d.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=f[l];null==n?(c++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,
-n)}else null!=l&&d.setAttribute(g,l)}}catch(v){}})(l[n])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,l,n,k,m){try{var c=!k&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));l=null!=l?l:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}n=null!=n?n:"data:image/png;base64,";e=n+this.base64Encode(e)}b(e)}}else null!=d&&(0==a.getStatus()?d({message:mxResources.get("accessDenied")},a):d({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=d&&d({message:mxResources.get("error")+" "+a.getStatus()})},c,this.timeout,function(){l&&
-null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})},m)});f()}catch(z){null!=d&&d(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var c=!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(d);c&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(d);
-c&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(d);if(c)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(d);c&&b(f.svgBrokenImage.src)};e.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,d,e,l){b=null!=
-b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=Editor.parseDiagramNode(m[0]),null!=this.currentPage&&(a[m[0].getAttribute("id")]=this.currentPage.getId());else if(1<m.length){var g=[],p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-(a[m[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(m[0]),e=!1,p=1);for(;p<m.length;p++){var q=m[p].getAttribute("id");m[p].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(m[p]));a[q]=m[p].getAttribute("id");var v=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[v+1]));f.model.execute(new ChangePage(this,C,C,v,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(c=f.importGraphModel(k,b,d,e),null!=
-c))for(p=0;p<c.length;p++)this.updatePageLinksForCell(a,c[p])}finally{f.model.endUpdate()}}}catch(I){if(l)throw I;this.handleError(I)}return c};EditorUi.prototype.updatePageLinks=function(a,b){for(var c=0;c<b.length;c++)this.updatePageLinksForCell(a,b[c].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var c=document.createElement("div"),d=this.editor.graph,e=d.getLinkForCell(b);null!=e&&d.setLinkForCell(b,this.updatePageLink(a,e));if(d.isHtmlLabel(b)){c.innerHTML=d.getLabel(b);for(var f=
-c.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&d.labelChanged(b,c.innerHTML)}for(m=0;m<d.model.getChildCount(b);m++)this.updatePageLinksForCell(a,d.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var c=a[b.substring(b.indexOf(",")+1)];b=null!=c?"data:page/id,"+c:null}else if("data:action/json,"==b.substring(0,17))try{var d=JSON.parse(b.substring(17));
-if(null!=d.actions){for(var e=0;e<d.actions.length;e++){var f=d.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(c=a[f.open.substring(f.open.indexOf(",")+1)],null!=c?f.open="data:page/id,"+c:delete f.open)}b="data:action/json,"+JSON.stringify(d)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,
-function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var c=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:c?"remote":"local"})}catch(G){}if(c)if(null==VSD_CONVERT_URL||this.isOffline())d({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
-else{c=new FormData;c.append("file1",a,e);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var c=new FileReader;c.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){d({message:mxResources.get("errorLoadingFile")})}});c.readAsText(a)}else this.doImportVisio(a,b,d,e)}catch(E){d(E)}else d({})});
-l.send(c)}else try{this.doImportVisio(a,b,d,e)}catch(G){d(G)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.importGraphML=function(a,b,d){d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
-b,d)}catch(l){d(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),
-this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,d){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!=
-window.console&&console.error(l),d(l)}}else d({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.generateMermaidImage=function(a,b,d,e){var c=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel=
-"strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));d(c.convertDataUri(c.createSvgDataUri(a)),
-f,g)}else e({message:mxResources.get("invalidInput")})}catch(z){e(z)}})}catch(x){e(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,d,e){function c(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(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?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+c(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+c(a.charCodeAt(i),0,0):r+c(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType=
-"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)d(this.response);else{var c=new FileReader;c.readAsDataURL(this.response);c.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=c.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),f=parseFloat(k[0].getAttribute("height")))}d(c.result,a,
-f)}catch(N){e(N)}};b.src=c.result};c.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,d){var c=this.editor.graph,e=null;c.getModel().beginUpdate();try{e=c.insertVertex(null,null,"<pre>"+a+"</pre>",b,d,1,1,"text;html=1;align=left;verticalAlign=top;"),c.updateCellSize(e,!0)}finally{c.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,d,e,l,n,k){n=null!=n?n:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&
-!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=
-Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,d,n,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,d,n,!0);if("data:image/svg+xml;"==a.substring(0,19))try{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));var g=this.importXml(f,
-b,d,n,!0);if(0<g.length)return g}catch(E){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
-g=Math.round(e.width*f);e=Math.round(e.height*f);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=
-Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,n);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(c){this.editor.graph.setSelectionCells(this.importXml(c,b,d,n));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
-mxUtils.bind(this,function(){var c=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(c.container,610,360,!0,!1);c.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{c=this.editor.graph;l=null;c.getModel().beginUpdate();try{l=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));c.fireEvent(new mxEventObject("textInserted","cells",[l]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
-a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");l.value=a;c.updateCellSize(l);if(0<this.maxTextWidth&&l.geometry.width>this.maxTextWidth){var m=c.getPreferredSizeForCell(l,this.maxTextWidth);l.geometry.width=m.width;l.geometry.height=m.height}Graph.isLink(l.value)&&c.setLinkForCell(l,l.value);l.geometry.width+=c.gridSize;l.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<
-a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
-14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){null!=c.files&&(this.importFiles(c.files,null,null,this.maxImageSize),c.type="",c.type="file",c.value="")}));c.style.display="none";document.body.appendChild(c);this.importFileInputElt=c}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
-if(!b){var d=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){if(null!=c&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(c)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,c)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
-360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,d){var c=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)d();else{var f=0,g,l=!1;e.forEach(function(a,
-c){var e=c.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,c.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):d()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=c))});0<f?g.async("string").then(function(e){!c.isOffline()&&(new XMLHttpRequest).upload&&c.isRemoteFileFormat(e,a.name)?c.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):d())}),a.name):d()}):l||d()}},
-function(a){d(a)}):d()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,d,e,l,n,k,m,t,q,z){q=null!=q?q:!0;var c=!1,f=null,g=mxUtils.bind(this,function(a){var c=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):c=this.importXml(a,d,e,q);null!=m&&m(c)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=z?null:
-this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,q),t=!0)),t||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),q&&b.isGridEnabled()&&(d=b.snap(d),e=b.snap(e)),f=[b.insertVertex(null,null,"",d,e,l,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(c=!0,this.importGraphML(a,g)):null!=t&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
-/(\.vs(x|sx?))($|\?)/i.test(k))?(c=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(c=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=t?(c=!0,this.importZipFile(t,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q);m(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
-/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,q));c||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,n,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}n=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2|(k&192)>>6);
-c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,l,n,k,m,t,q,z,u){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var c=null!=b&&null!=d,f=!0;b=null!=b?b:0;d=null!=d?d:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=z||this.resampleThreshold,x=0;x<a.length;x++)if("image/"==a[x].type.substring(0,6)&&a[x].size>p){g=!0;break}var A=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;
-l=null!=l?l:mxUtils.bind(this,function(a,b,d,e,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,d,e,f,g,l,n,k,c,u)}catch(Z){return this.handleError(Z),null}});n=null!=n?n:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,x=t,v=[],C=mxUtils.bind(this,function(a,c){v[a]=c;if(0==--x){this.spinner.stop();if(null!=
-m)m(v);else{var b=[];g.getModel().beginUpdate();try{for(var d=0;d<v.length;d++){var e=v[d]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}n(b)}}),A=0;A<t;A++)mxUtils.bind(this,function(c){var n=a[c];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),x=decodeURIComponent(escape(atob(m.substring(t+1)))),v=mxUtils.parseXml(x),x=v.getElementsByTagName("svg");
-if(0<x.length){var x=x[0],D=u?null:x.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)?C(c,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],k=f.getAttribute("width"),q=f.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-
-1)?parseFloat(k):NaN,q=null!=q&&"%"!=q.charAt(q.length-1)?parseFloat(q):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+k+" "+q);else if(isNaN(k)||isNaN(q)){var z=x.split(" ");3<z.length&&(k=parseFloat(z[2]),q=parseFloat(z[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var D=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,q)),u=l(m,n.type,b+c*p,d+c*p,Math.max(1,Math.round(k*D)),Math.max(1,Math.round(q*D)),n.name);if(isNaN(k)||isNaN(q)){var C=new Image;C.onload=
-mxUtils.bind(this,function(){k=Math.max(1,C.width);q=Math.max(1,C.height);u[0].geometry.width=k;u[0].geometry.height=q;f.setAttribute("viewBox","0 0 "+k+" "+q);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[u[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(da){}return null})):C(c,mxUtils.bind(this,function(){return l(D,"text/xml",b+c*p,d+c*p,0,0,n.name)}))}else C(c,mxUtils.bind(this,
-function(){return null}))}else{x=!1;if("image/png"==n.type){var A=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var y=new Image;y.src=a.target.result;C(c,mxUtils.bind(this,function(){return l(A,"text/xml",b+c*p,d+c*p,y.width,y.height,n.name)}));x=!0}}x||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,
-function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){C(c,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var t=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/k,e/m)):1;return l(g,n.type,b+c*p,d+c*p,Math.round(k*t),Math.round(m*t),n.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=
-a.target.result,l(m,n.type,b+c*p,d+c*p,240,160,n.name,function(a){C(c,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?l(null,n.type,b+c*p,d+c*p,240,160,n.name,function(a){C(c,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(g){g=[];for(x=0;x<a.length;x++)g.push(a[x]);a=g;this.confirmImageResize(function(a){f=a;A()},t)}else A()};EditorUi.prototype.confirmImageResize=
-function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
-'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(c);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=
-function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,l,n){l=null!=l?l:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,n))try{var g=Math.max(c/l,f/l);if(1<g){var k=Math.round(c/g),m=Math.round(f/g),p=document.createElement("canvas");p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=k;v.height=
-m;var u=v.toDataURL();q!==u&&(b=q,c=k,f=m)}}}catch(L){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var m=d,k=0;8>k;k++)m=1==(m&1)?3988292384^m>>>1:m>>>1,EditorUi.prototype.crcTable[d]=m;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(d+c))&255]^a>>>8;return a};EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var c=-1,b=0;b<a.length;b++)c=c>>>8^this.crcTable[(c^a.charCodeAt(b))&
-255];return(c^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,l){function c(a,c){var b=k;k+=c;return a.substring(b,k)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(c(a,
-4),"IHDR"!=c(a,4))null!=l&&l();else{c(a,17);l=a.substring(0,k);do{var m=f(a);if("IDAT"==c(a,4)){l=a.substring(0,k-8);"pHYs"==b&&"dpi"==d?(d=Math.round(e/.0254),d=g(d)+g(d)+String.fromCharCode(1)):d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);l+=g(d.length)+b+d+g(e^4294967295);l+=a.substring(k-8,a.length);break}l+=a.substring(k-8,k-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):
-Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,d){try{var c=new Image;c.onload=function(){c.width=0<c.width?c.width:120;c.height=0<c.height?c.height:120;b(c)};null!=d&&(c.onerror=d);c.src=a}catch(l){if(null!=d)d(l);else throw l;}};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==
-typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(d,f.format,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(c,"<pre>"+e+"</pre>"),b.updateCellSize(c,!0);else{b.setCellStyles("image",
-a.convertDataUri(e),[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=g,k.height=l,b.cellsResized([c],[k],!1))}b.setAttributeForCell(c,"plantUmlData",JSON.stringify({data:d,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(d){null!=d&&a.spinner.spin(document.body,
-mxResources.get("inserting"))&&a.generateMermaidImage(d,f.config,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[c]);var k=b.model.getGeometry(c);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,l),b.cellsResized([c],[k],!1));b.setAttributeForCell(c,"mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,
-!0,!0);d.init()};var d=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,c){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,c,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,c,e):d.apply(this,arguments))}catch(L){a.handleError(L)}};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(I){a.handleError(I)}return c};var e=this.clearDefaultStyle;
-this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");
-return l.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&mxEvent.consume(a);null!=e&&e(a,c)};k.call(this,a,c,d)};q.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=
-function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};
-var u=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,
-arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,
+this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(p){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,e,l,n,k,m,t,q,y){t=null!=t?t:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,l?this.getFileData(!0,null,null,null,c,m):null,t,null==this.pages||0==this.pages.length,y)}catch(v){"Invalid image"==v.message?this.downloadFile(t):this.handleError(v)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,n,k,q)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function d(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+"g"),"")}var c=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[c[0]],f=1;f<c.length;f++){var g=c[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[d(c[f].substring(0,g))]);a.push('"'+c[f].substring(g))}b(a.join(""))}});if(0<c.length){for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),t=null,q=c[k].indexOf("format(",m);0<q&&(t=d(c[k].substring(q+7,c[k].indexOf(")",q))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
+a;e++;var d="application/x-font-ttf";if("svg"==t||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==t||"embedded-opentype"==t||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==t||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==t||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==t||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==t||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
+!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){this.cachedFonts[a]=d;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(c[k].substring(0,m)),t)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(d){this.editor.resolvedFontCss=d;a()})):a()};EditorUi.prototype.embedExtFonts=
+function(a){var d=this.editor.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),n=0;n<d.length;n++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]:
+b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[n].name,d[n].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,l,n,k,m,t,q,y,u,C,v,z){try{n=null!=n?n:!0;k=null!=k?k:!0;u=null!=u?u:this.editor.graph;C=null!=C?C:0;var d=t?null:u.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==t&&(d="#ffffff");this.convertImages(u.getSvg(null,null,null,v,null,k,null,null,null,q),mxUtils.bind(this,function(c){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=
+function(){mxClient.IS_SF?window.setTimeout(function(){t.drawImage(e,C/m,C/m);a(g)},0):(t.drawImage(e,C/m,C/m),a(g))},g=document.createElement("canvas"),k=parseInt(c.getAttribute("width")),p=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=n?Math.min(1,Math.min(3*b/(4*p),b/k)):b/k);k=Math.ceil(m*k)+2*C;p=Math.ceil(m*p)+2*C;g.setAttribute("width",k);g.setAttribute("height",p);var t=g.getContext("2d");null!=d&&(t.beginPath(),t.rect(0,0,k,p),t.fillStyle=d,t.fill());t.scale(m,m);if(z){var y=
+u.view,x=y.scale;y.scale=1;var q=btoa(unescape(encodeURIComponent(y.createSvgGrid(y.gridColor))));y.scale=x;var q="data:image/svg+xml;base64,"+q,v=u.gridSize*y.gridSteps*m,A=u.getGraphBounds(),D=y.translate.x*x,E=y.translate.y*x,I=D+(A.x-D)/x,B=E+(A.y-E)/x,G=new Image;G.onload=function(){try{for(var a=-Math.round(v-mxUtils.mod((D-I)*m,v)),d=-Math.round(v-mxUtils.mod((E-B)*m,v));a<k;a+=v)for(var b=d;b<p;b+=v)t.drawImage(G,a/m,b/m);f()}catch(K){null!=l&&l(K)}};G.onerror=function(a){null!=l&&l(a)};G.src=
+q}else f()}catch(aa){null!=l&&l(aa)}});e.onerror=function(a){null!=l&&l(a)};q&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(M){null!=l&&l(M)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(f)}catch(R){null!=l&&l(R)}}))}catch(M){null!=
+l&&l(M)}}),c,y)}catch(I){null!=l&&l(I)}};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.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+
+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),n=0;n<l.length;n++)mxUtils.bind(this,function(c){try{if(null!=c){var l=e.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var n=f[l];null==n?(d++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,
+n)}else null!=l&&c.setAttribute(g,l)}}catch(v){}})(l[n])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,l,n,k,m){try{var d=!k&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));l=null!=l?l:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}n=null!=n?n:"data:image/png;base64,";e=n+this.base64Encode(e)}b(e)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},d,this.timeout,function(){l&&
+null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})},m)});f()}catch(y){null!=c&&c(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var d=!0,c=window.setTimeout(mxUtils.bind(this,function(){d=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);d&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c);
+d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(t){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(x){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,l){b=null!=
+b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var k=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=Editor.parseDiagramNode(m[0]),null!=this.currentPage&&(a[m[0].getAttribute("id")]=this.currentPage.getId());else if(1<m.length){var g=[],p=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
+(a[m[0].getAttribute("id")]=this.pages[0].getId(),k=Editor.parseDiagramNode(m[0]),e=!1,p=1);for(;p<m.length;p++){var q=m[p].getAttribute("id");m[p].removeAttribute("id");var C=this.updatePageRoot(new DiagramPage(m[p]));a[q]=m[p].getAttribute("id");var v=this.pages.length;null==C.getName()&&C.setName(mxResources.get("pageWithNumber",[v+1]));f.model.execute(new ChangePage(this,C,C,v,!0));g.push(C)}this.updatePageLinks(a,g)}}if(null!=k&&"mxGraphModel"===k.nodeName&&(d=f.importGraphModel(k,b,c,e),null!=
+d))for(p=0;p<d.length;p++)this.updatePageLinksForCell(a,d[p])}finally{f.model.endUpdate()}}}catch(H){if(l)throw H;this.handleError(H)}return d};EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var f=
+d.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&c.labelChanged(b,d.innerHTML)}for(m=0;m<c.model.getChildCount(b);m++)this.updatePageLinksForCell(a,c.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));
+if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var f=c.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(d=a[f.open.substring(f.open.indexOf(",")+1)],null!=d?f.open="data:page/id,"+d:delete f.open)}b="data:action/json,"+JSON.stringify(c)}}catch(x){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,
+function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var d=this.isRemoteVisioFormat(e);try{var f="UNKNOWN-VISIO",g=e.lastIndexOf(".");0<=g&&g<e.length&&(f=e.substring(g+1).toUpperCase());EditorUi.logEvent({category:f+"-MS-IMPORT-FILE",action:"filename_"+e,label:d?"remote":"local"})}catch(G){}if(d)if(null==VSD_CONVERT_URL||this.isOffline())c({message:"conf"==this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});
+else{d=new FormData;d.append("file1",a,e);var l=new XMLHttpRequest;l.open("POST",VSD_CONVERT_URL);l.responseType="blob";this.addRemoteServiceSecurityCheck(l);l.onreadystatechange=mxUtils.bind(this,function(){if(4==l.readyState)if(200<=l.status&&299>=l.status)try{var a=l.response;if("text/xml"==a.type){var d=new FileReader;d.onload=mxUtils.bind(this,function(a){try{b(a.target.result)}catch(C){c({message:mxResources.get("errorLoadingFile")})}});d.readAsText(a)}else this.doImportVisio(a,b,c,e)}catch(E){c(E)}else c({})});
+l.send(d)}else try{this.doImportVisio(a,b,c,e)}catch(G){c(G)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.importGraphML=function(a,b,c){c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(a,
+b,c)}catch(l){c(l)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()||this.handleError({message:mxResources.get("unknownError")})}catch(f){this.handleError(f)}else this.spinner.stop(),
+this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.convertLucidChart=function(a,b,c){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter){try{EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+a.length}),EditorUi.debug("convertLucidChart",a)}catch(l){}try{b(LucidImporter.importState(JSON.parse(a)))}catch(l){null!=
+window.console&&console.error(l),c(l)}}else c({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.generateMermaidImage=function(a,b,c,e){var d=this,f=function(){try{this.loadingMermaid=!1,b=null!=b?b:EditorUi.defaultMermaidConfig,b.securityLevel=
+"strict",b.startOnLoad=!1,mermaid.mermaidAPI.initialize(b),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),a,function(a){try{if(mxClient.IS_IE||mxClient.IS_IE11)a=a.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var b=mxUtils.parseXml(a).getElementsByTagName("svg");if(0<b.length){var f=parseFloat(b[0].getAttribute("width")),g=parseFloat(b[0].getAttribute("height"));c(d.convertDataUri(d.createSvgDataUri(a)),
+f,g)}else e({message:mxResources.get("invalidInput")})}catch(y){e(y)}})}catch(x){e(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?f():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.generatePlantUmlImage=function(a,b,c,e){function d(a,d,b){c1=a>>2;c2=(a&3)<<4|d>>4;c3=(d&15)<<2|b>>6;c4=b&63;r="";r+=f(c1&63);r+=f(c2&63);r+=f(c3&63);return r+=f(c4&63)}function f(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?"_":"?"}var g=new XMLHttpRequest;g.open("GET",("txt"==b?PLANT_URL+"/txt/":"png"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(a){r="";for(i=0;i<a.length;i+=3)r=i+2==a.length?r+d(a.charCodeAt(i),a.charCodeAt(i+1),0):i+1==a.length?r+d(a.charCodeAt(i),0,0):r+d(a.charCodeAt(i),a.charCodeAt(i+1),a.charCodeAt(i+2));return r}(pako.deflateRaw(a,{to:"string"})),!0);"txt"!=b&&(g.responseType=
+"blob");g.onload=function(a){if(200<=this.status&&300>this.status)if("txt"==b)c(this.response);else{var d=new FileReader;d.readAsDataURL(this.response);d.onloadend=function(a){var b=new Image;b.onload=function(){try{var a=b.width,f=b.height;if(0==a&&0==f){var g=d.result,l=g.indexOf(","),n=decodeURIComponent(escape(atob(g.substring(l+1)))),k=mxUtils.parseXml(n).getElementsByTagName("svg");0<k.length&&(a=parseFloat(k[0].getAttribute("width")),f=parseFloat(k[0].getAttribute("height")))}c(d.result,a,
+f)}catch(N){e(N)}};b.src=d.result};d.onerror=function(a){e(a)}}else e(a)};g.onerror=function(a){e(a)};g.send()};EditorUi.prototype.insertAsPreText=function(a,b,c){var d=this.editor.graph,e=null;d.getModel().beginUpdate();try{e=d.insertVertex(null,null,"<pre>"+a+"</pre>",b,c,1,1,"text;html=1;align=left;verticalAlign=top;"),d.updateCellSize(e,!0)}finally{d.getModel().endUpdate()}return e};EditorUi.prototype.insertTextAt=function(a,b,c,e,l,n,k){n=null!=n?n:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&
+!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(l||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:application/pdf;base64,"==a.substring(0,28)){var f=
+Editor.extractGraphModelFromPdf(a);if(null!=f&&0<f.length)return this.importXml(f,b,c,n,!0)}if("data:image/png;base64,"==a.substring(0,22)&&(f=this.extractGraphModelFromPng(a),null!=f&&0<f.length))return this.importXml(f,b,c,n,!0);if("data:image/svg+xml;"==a.substring(0,19))try{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));var g=this.importXml(f,
+b,c,n,!0);if(0<g.length)return g}catch(E){}this.loadImage(a,mxUtils.bind(this,function(e){if("data:"==a.substring(0,5))this.resizeImage(e,a,mxUtils.bind(this,function(a,e,f){d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/e.height)),
+g=Math.round(e.width*f);e=Math.round(e.height*f);d.setSelectionCell(d.insertVertex(null,null,"",d.snap(b),d.snap(c),g,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;d.getModel().beginUpdate();try{f=d.insertVertex(d.getDefaultParent(),null,a,d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.updateCellSize(f),d.fireEvent(new mxEventObject("textInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f)}))}else{a=
+Graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,n);if(0<a.length)if(this.isLucidChartData(a))this.convertLucidChart(a,mxUtils.bind(this,function(d){this.editor.graph.setSelectionCells(this.importXml(d,b,c,n));!this.isOffline()&&(/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.appspot\.com$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname))&&this.showBanner("LucidChartImportSurvey",mxResources.get("notSatisfiedWithImport"),
+mxUtils.bind(this,function(){var d=new FeedbackDialog(this,"Lucidchart Import Feedback",!0,a);this.showDialog(d.container,610,360,!0,!1);d.init()}))}),mxUtils.bind(this,function(a){this.handleError(a)}));else{d=this.editor.graph;l=null;d.getModel().beginUpdate();try{l=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;whiteSpace=wrap;"+(e?"html=1;":""));d.fireEvent(new mxEventObject("textInserted","cells",[l]));"<"==a.charAt(0)&&a.indexOf(">")==a.length-1&&(a=mxUtils.htmlEntities(a));
+a.length>this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"...");l.value=a;d.updateCellSize(l);if(0<this.maxTextWidth&&l.geometry.width>this.maxTextWidth){var m=d.getPreferredSizeForCell(l,this.maxTextWidth);l.geometry.width=m.width;l.geometry.height=m.height}Graph.isLink(l.value)&&d.setLinkForCell(l,l.value);l.geometry.width+=d.gridSize;l.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[l]}}return[]};EditorUi.prototype.formatFileSize=function(a){var d=-1;do a/=1024,d++;while(1024<
+a);return Math.max(a,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[d]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var d=a.indexOf(";");0<d&&(a=a.substring(0,d)+a.substring(a.indexOf(",",d+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.isLucidChartData=function(a){return null!=a&&('{"state":"{\\"Properties\\":'==a.substring(0,26)||'{"Properties":'==a.substring(0,
+14))};EditorUi.prototype.importLocalFile=function(a,b){if(a&&Graph.fileSupport){if(null==this.importFileInputElt){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){null!=d.files&&(this.importFiles(d.files,null,null,this.maxImageSize),d.type="",d.type="file",d.value="")}));d.style.display="none";document.body.appendChild(d);this.importFileInputElt=d}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";
+if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,d){if(null!=d&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(d)){var b=new Blob([a],{type:"application/octet-stream"});this.importVisio(b,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,d)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,
+360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();else{var f=0,g,l=!1;e.forEach(function(a,
+d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):c())}),a.name):c()}):l||c()}},
+function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,l,n,k,m,t,q,y){q=null!=q?q:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var d=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,k)):d=this.importXml(a,c,e,q);null!=m&&m(d)});"image"==b.substring(0,5)?(t=!1,"image/png"==b.substring(0,9)&&(b=y?null:
+this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,q),t=!0)),t||(b=this.editor.graph,y=a.indexOf(";"),0<y&&(a=a.substring(0,y)+a.substring(a.indexOf(",",y+1))),q&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,l,n,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=t&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||
+/(\.vs(x|sx?))($|\?)/i.test(k))?(d=!0,this.importVisio(t,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(d=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=m&&m(null))}),k)):0==a.indexOf("PK")&&null!=t?(d=!0,this.importZipFile(t,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,q);m(f)}))):/(\.v(sd|dx))($|\?)/i.test(k)||
+/(\.vs(s|x))($|\?)/i.test(k)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,q));d||null==m||m(f);return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,n,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}n=a.charCodeAt(b++);if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(n&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((n&15)<<2|(k&192)>>6);
+d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};EditorUi.prototype.importFiles=function(a,b,c,e,l,n,k,m,t,q,y,u){e=null!=e?e:this.maxImageSize;q=null!=q?q:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=y||this.resampleThreshold,x=0;x<a.length;x++)if("image/"==a[x].type.substring(0,6)&&a[x].size>p){g=!0;break}var A=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;
+l=null!=l?l:mxUtils.bind(this,function(a,b,c,e,f,g,l,n,k){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,n,k,d,u)}catch(aa){return this.handleError(aa),null}});n=null!=n?n:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,x=t,v=[],C=mxUtils.bind(this,function(a,d){v[a]=d;if(0==--x){this.spinner.stop();if(null!=
+m)m(v);else{var b=[];g.getModel().beginUpdate();try{for(var c=0;c<v.length;c++){var e=v[c]();null!=e&&(b=b.concat(e))}}finally{g.getModel().endUpdate()}}n(b)}}),A=0;A<t;A++)mxUtils.bind(this,function(d){var n=a[d];if(null!=n){var m=new FileReader;m.onload=mxUtils.bind(this,function(a){if(null==k||k(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var m=a.target.result,t=m.indexOf(","),x=decodeURIComponent(escape(atob(m.substring(t+1)))),v=mxUtils.parseXml(x),x=v.getElementsByTagName("svg");
+if(0<x.length){var x=x[0],D=u?null:x.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)?C(d,mxUtils.bind(this,function(){try{if(m.substring(0,t+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var f=a[0],k=f.getAttribute("width"),y=f.getAttribute("height"),k=null!=k&&"%"!=k.charAt(k.length-
+1)?parseFloat(k):NaN,y=null!=y&&"%"!=y.charAt(y.length-1)?parseFloat(y):NaN,x=f.getAttribute("viewBox");if(null==x||0==x.length)f.setAttribute("viewBox","0 0 "+k+" "+y);else if(isNaN(k)||isNaN(y)){var q=x.split(" ");3<q.length&&(k=parseFloat(q[2]),y=parseFloat(q[3]))}m=this.createSvgDataUri(mxUtils.getXml(f));var D=Math.min(1,Math.min(e/Math.max(1,k)),e/Math.max(1,y)),u=l(m,n.type,b+d*p,c+d*p,Math.max(1,Math.round(k*D)),Math.max(1,Math.round(y*D)),n.name);if(isNaN(k)||isNaN(y)){var C=new Image;C.onload=
+mxUtils.bind(this,function(){k=Math.max(1,C.width);y=Math.max(1,C.height);u[0].geometry.width=k;u[0].geometry.height=y;f.setAttribute("viewBox","0 0 "+k+" "+y);m=this.createSvgDataUri(mxUtils.getXml(f));var a=m.indexOf(";");0<a&&(m=m.substring(0,a)+m.substring(m.indexOf(",",a+1)));g.setCellStyles("image",m,[u[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(f))}return u}}}catch(ca){}return null})):C(d,mxUtils.bind(this,function(){return l(D,"text/xml",b+d*p,c+d*p,0,0,n.name)}))}else C(d,mxUtils.bind(this,
+function(){return null}))}else{x=!1;if("image/png"==n.type){var A=u?null:this.extractGraphModelFromPng(a.target.result);if(null!=A&&0<A.length){var z=new Image;z.src=a.target.result;C(d,mxUtils.bind(this,function(){return l(A,"text/xml",b+d*p,c+d*p,z.width,z.height,n.name)}));x=!0}}x||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,
+function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,m){C(d,mxUtils.bind(this,function(){if(null!=g&&g.length<q){var t=f&&this.isResampleImage(a.target.result,y)?Math.min(1,Math.min(e/k,e/m)):1;return l(g,n.type,b+d*p,c+d*p,Math.round(k*t),Math.round(m*t),n.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,y)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else m=
+a.target.result,l(m,n.type,b+d*p,c+d*p,240,160,n.name,function(a){C(d,function(){return a})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?l(null,n.type,b+d*p,c+d*p,240,160,n.name,function(a){C(d,function(){return a})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?m.readAsDataURL(n):m.readAsText(n)}})(A)});if(g){g=[];for(x=0;x<a.length;x++)g.push(a[x]);a=g;this.confirmImageResize(function(a){f=a;A()},t)}else A()};EditorUi.prototype.confirmImageResize=
+function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||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,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(n){}};EditorUi.prototype.isResampleImage=
+function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,l,n){l=null!=l?l:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,n))try{var g=Math.max(d/l,f/l);if(1<g){var k=Math.round(d/g),m=Math.round(f/g),p=document.createElement("canvas");p.width=k;p.height=m;p.getContext("2d").drawImage(a,0,0,k,m);var q=p.toDataURL();if(q.length<b.length){var v=document.createElement("canvas");v.width=k;v.height=
+m;var u=v.toDataURL();q!==u&&(b=q,d=k,f=m)}}}catch(L){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var k=c,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[c]=k;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a};EditorUi.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};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,l){function d(a,b){var d=k;k+=b;return a.substring(d,k)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=l&&l();else if(d(a,
+4),"IHDR"!=d(a,4))null!=l&&l();else{d(a,17);l=a.substring(0,k);do{var m=f(a);if("IDAT"==d(a,4)){l=a.substring(0,k-8);"pHYs"==b&&"dpi"==c?(c=Math.round(e/.0254),c=g(c)+g(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);l+=g(c.length)+b+c+g(e^4294967295);l+=a.substring(k-8,a.length);break}l+=a.substring(k-8,k-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(l):
+Base64.encode(l,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(l){if(null!=c)c(l);else throw l;}};var q=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==
+typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,f.format,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(d,"<pre>"+e+"</pre>"),b.updateCellSize(d,!0);else{b.setCellStyles("image",
+a.convertDataUri(e),[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=g,k.height=l,b.cellsResized([d],[k],!1))}b.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:c,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};b.cellEditor.editMermaidData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,
+mxResources.get("inserting"))&&a.generateMermaidImage(c,f.config,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,l),b.cellsResized([d],[k],!1));b.setAttributeForCell(d,"mermaidData",JSON.stringify({data:c,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,
+!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(L){a.handleError(L)}};b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(H){a.handleError(H)}return d};var e=this.clearDefaultStyle;
+this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var l=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");
+return l.apply(this,arguments)};var k=b.addClickHandler;b.addClickHandler=function(a,d,c){var e=d;d=function(a,d){if(null==d){var c=mxEvent.getSource(a);"a"==c.nodeName.toLowerCase()&&(d=c.getAttribute("href"))}null!=d&&b.isCustomLink(d)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(d)&&mxEvent.consume(a);null!=e&&e(a,d)};k.call(this,a,d,c)};q.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=
+function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};
+var u=b.getGlobalVariable;b.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,d,c){var e=d.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))t.apply(this,
+arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,
 !0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
-0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view,y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:
-new mxDualRuler(this,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(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)})),y.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 z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==
-this.styleInput?!0:z.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,
-null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var n=null,d=c.getElementsByTagName("img");
-null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?k=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(k=mxUtils.getTextContent(c[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
-this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.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 k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,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 m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(t){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
-function(){function a(){window.setTimeout(function(){d.innerHTML="&nbsp;";d.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,d=document.createElement("div");d.setAttribute("autocomplete","off");d.setAttribute("autocorrect","off");d.setAttribute("autocapitalize","off");d.setAttribute("spellcheck","false");d.style.textRendering="optimizeSpeed";d.style.fontFamily="monospace";d.style.wordBreak="break-all";d.style.background="transparent";d.style.color="transparent";d.style.position=
-"absolute";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.display="block";d.style.fontSize="1";d.style.zIndex="-1";d.style.resize="none";d.style.outline="none";d.style.width="1px";d.style.height="1px";mxUtils.setOpacity(d,0);d.contentEditable=!0;d.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var c=mxEvent.getSource(a);
-null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==c.nodeName||"TEXTAREA"==c.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(d.style.left=b.container.scrollLeft+10+"px",d.style.top=b.container.scrollTop+10+"px",b.container.appendChild(d),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){d.focus();document.execCommand("selectAll",!1,null)},0):(d.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,
-"keyup",mxUtils.bind(this,function(a){var c=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=c&&17!=c&&91!=c||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),d.parentNode.removeChild(d),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(d,"copy",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(d),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"cut",mxUtils.bind(this,function(c){if(b.isEnabled())try{mxClipboard.copy(b),
-this.copyCells(d,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(d,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),d.innerHTML="&nbsp;",d.focus(),null!=a.clipboardData&&this.pasteCells(a,d,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,d,!1,!0)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==d?!0:l.apply(this,arguments)}};
-EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+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,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();
+a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,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 d=a.dataTransfer.getData("text/uri-list");
+/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=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,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*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()})))}));"undefined"!==typeof window.mxSettings&&(z=this.editor.graph.view,z.setUnit(mxSettings.getUnit()),z.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:
+new mxDualRuler(this,z.unit),this.refresh());if("1"==urlParams.styledev){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 d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var y=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==
+this.styleInput?!0:y.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,g=d.y/e-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,
+null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=k;var n=null,c=d.getElementsByTagName("img");
+null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(c=d.getElementsByTagName("a"),null!=c&&1==c.length?k=c[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(k=mxUtils.getTextContent(d[0]))));var m=!0,p=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;p()},mxEvent.isControlDown(a)):p()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?
+this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var d=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,d)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===
+d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,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 m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(t){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=
+function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position=
+"absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);
+null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,
+"keyup",mxUtils.bind(this,function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(x){this.handleError(x)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1,!0)}),0))}),!0);var l=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:l.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
 "Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),
-this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(c){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
+this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(a,b){var d=b.getProperty("customFonts");this.menus.customFonts=d;mxSettings.setCustomFonts(d);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("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
 function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);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(c.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,d,e){if(!mxEvent.isConsumed(a)){var c=b,f=!1;if(d&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){c=document.createElement("div");c.innerHTML=g;f=!0;g=c.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&
-null!=c.firstChild.nextSibling&&c.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==c.firstChild.nodeName&&"A"==c.firstChild.nextSibling.nodeName&&null==c.firstChild.nextSibling.nextSibling&&(g=null==c.firstChild.nextSibling.innerText?mxUtils.getTextContent(c.firstChild.nextSibling):c.firstChild.nextSibling.innerText,g==c.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(c,g),f=!1));Graph.removePasteFormatting(c)}else g=a.clipboardData.getData("text/plain"),
-null!=g&&0<g.length&&(c=document.createElement("div"),mxUtils.setTextContent(c,g))}g=c.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))d=g[0].getAttribute("data-lucid-content"),null!=d&&0<d.length&&(this.convertLucidChart(d,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,
-c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?c.innerHTML:mxUtils.trim(null==c.innerText?mxUtils.getTextContent(c):c.innerText),k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(v){}try{var g=c.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(p)&&(k=!0,f=p)}catch(v){}try{var q=
-this.editor.graph;if(null!=f&&0<f.length){q.lastPasteXml==f?q.pasteCounter++:(q.lastPasteXml=f,q.pasteCounter=0);var u=q.pasteCounter*q.gridSize;if(k||this.isCompatibleString(f))q.setSelectionCells(this.importXml(f,u,u));else if(e&&1==q.getSelectionCount())q.labelChanged(q.getSelectionCell(),f),Graph.isLink(f)&&q.setLinkForCell(q.getSelectionCell(),f);else{var y=q.getInsertPoint();q.isMouseInsertPoint()&&(u=0,q.lastPasteXml==f&&0<q.pasteCounter&&q.pasteCounter--);q.setSelectionCells(this.insertTextAt(f,
-y.x+u,y.y+u,!0))}q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));try{mxEvent.consume(a)}catch(v){}}else d||(q.lastPasteXml=null,q.pasteCounter=0)}catch(v){this.handleError(v)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);
-a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),
-"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,
-"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,
-function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;
-var k=document.documentElement;d=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=b+"px";k.style.left=c+"px";k.style.width=Math.max(0,d-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?
-this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=
-0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&
-this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&
-(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,
-e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();
-f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,e,b)}));else{if("image/png"==a.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,e,b)}}}catch(z){this.handleError(z)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===
-a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(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))});if(null!=a&&0<a.length)null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):
-e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));
-null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,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=
+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 d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=
+null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c,e){if(!mxEvent.isConsumed(a)){var d=b,f=!1;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var g=a.clipboardData.getData("text/html");if(null!=g&&0<g.length){d=document.createElement("div");d.innerHTML=g;f=!0;g=d.getElementsByTagName("style");if(null!=g)for(;0<g.length;)g[0].parentNode.removeChild(g[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&
+null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(g=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,g==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,g),f=!1));Graph.removePasteFormatting(d)}else g=a.clipboardData.getData("text/plain"),
+null!=g&&0<g.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,g))}g=d.getElementsByTagName("span");if(null!=g&&0<g.length&&"application/vnd.lucid.chart.objects"===g[0].getAttribute("data-lucid-type"))c=g[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,
+d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=f?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),k=!1;try{var m=f.lastIndexOf("%3E");0<=m&&m<f.length-3&&(f=f.substring(0,m+3))}catch(v){}try{var g=d.getElementsByTagName("span"),p=null!=g&&0<g.length?mxUtils.trim(decodeURIComponent(g[0].textContent)):decodeURIComponent(f);this.isCompatibleString(p)&&(k=!0,f=p)}catch(v){}try{var y=
+this.editor.graph;if(null!=f&&0<f.length){y.lastPasteXml==f?y.pasteCounter++:(y.lastPasteXml=f,y.pasteCounter=0);var q=y.pasteCounter*y.gridSize;if(k||this.isCompatibleString(f))y.setSelectionCells(this.importXml(f,q,q));else if(e&&1==y.getSelectionCount())y.labelChanged(y.getSelectionCell(),f),Graph.isLink(f)&&y.setLinkForCell(y.getSelectionCell(),f);else{var u=y.getInsertPoint();y.isMouseInsertPoint()&&(q=0,y.lastPasteXml==f&&0<y.pasteCounter&&y.pasteCounter--);y.setSelectionCells(this.insertTextAt(f,
+u.x+q,u.y+q,!0))}y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));try{mxEvent.consume(a)}catch(v){}}else c||(y.lastPasteXml=null,y.pasteCounter=0)}catch(v){this.handleError(v)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);
+a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"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[d],"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 d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,
+"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,
+function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;
+var k=document.documentElement;c=(e.clientWidth||k.clientWidth)-3;e=Math.max(e.clientHeight||0,k.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;k=document.createElement("div");k.style.zIndex=mxPopupMenu.prototype.zIndex+2;k.style.border="3px dotted rgb(254, 137, 12)";k.style.pointerEvents="none";k.style.position="absolute";k.style.top=b+"px";k.style.left=d+"px";k.style.width=Math.max(0,c-3)+"px";k.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?
+this.editor.graph.container.appendChild(k):document.body.appendChild(k);return k};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=
+0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&
+this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&
+(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,
+e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==d.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,d.target.result,a.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();
+f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(y){this.handleError(y)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===
+a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):
+e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));
+null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.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.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&
-this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,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.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);
+null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<
 this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,
-page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=
-f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ha){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(Y){g=null}try{if(null==
+page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,k=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=
+f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ga){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(Z){g=null}try{if(null==
 g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&m.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},
 null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),
-g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(Y){m.postMessage(JSON.stringify({event:"draft",error:Y.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=
-1==g.enableRecent,q=1==g.enableSearch,x=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?m.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,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):
-null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,x?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==
-g.action){var u=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var y=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,
-y):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);
-m.postMessage(JSON.stringify(b),"*")}),P=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);B(a)}),R=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=R){for(var ba=D.getGlobalVariable,D=this.createTemporaryGraph(D.getStylesheet()),X,F=0;F<this.pages.length;F++)if(this.pages[F].getId()==
-R){X=this.updatePageRoot(this.pages[F]);break}D.getGlobalVariable=function(a){return"page"==a?X.getName():"pagenumber"==a?1:ba.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=D.model,ja=T.getChildCells(T.getRoot()),k={},F=0;F<g.layerIds.length;F++)k[g.layerIds[F]]=!0;for(F=0;F<ja.length;F++)T.setVisible(ja[F],k[ja[F].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){P(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
-function(){P(null)}),null,null,g.scale,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):P(null)}),mxUtils.bind(this,function(){P(null)}))}}else{null!=
-g.xml&&0<g.xml.length&&this.setFileData(g.xml);y=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ka=this.getXmlFileData();y.xml=mxUtils.getXml(ka);y.data=this.getFileData(null,null,!0,null,null,null,ka);y.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),y.data=this.getHtml(A,this.editor.graph),y.xml=mxUtils.getXml(A),y.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var la=this.editor.graph.background;
-la==mxConstants.NONE&&(la=null);y.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);y.format="svg";var ea=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);m.postMessage(JSON.stringify(y),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,ea,null,null,g.embedImages);else if(null==
-g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var V=this.editor.graph.getSvg(la);this.embedFonts(V,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ea(mxUtils.getXml(a))})):ea(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(y),"*")}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&
+g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();m.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(Z){m.postMessage(JSON.stringify({event:"draft",error:Z.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=
+1==g.enableRecent,q=1==g.enableSearch,x=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?m.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):
+null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){m.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,x?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==
+g.action){var u=this.getDiagramTextContent();m.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var z=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,
+z):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var A=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var D=this.editor.graph,B=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(A);
+m.postMessage(JSON.stringify(b),"*")}),R=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(A)));D!=this.editor.graph&&D.container.parentNode.removeChild(D.container);B(a)}),S=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=S){for(var Y=D.getGlobalVariable,D=this.createTemporaryGraph(D.getStylesheet()),X,F=0;F<this.pages.length;F++)if(this.pages[F].getId()==
+S){X=this.updatePageRoot(this.pages[F]);break}D.getGlobalVariable=function(a){return"page"==a?X.getName():"pagenumber"==a?1:Y.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=D.model,ia=T.getChildCells(T.getRoot()),k={},F=0;F<g.layerIds.length;F++)k[g.layerIds[F]]=!0;for(F=0;F<ia.length;F++)T.setVisible(ia[F],k[ia[F].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){R(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){R(null)}),null,null,g.scale,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?B("data:image/png;base64,"+a.getText()):R(null)}),mxUtils.bind(this,function(){R(null)}))}}else{null!=
+g.xml&&0<g.xml.length&&this.setFileData(g.xml);z=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();z.xml=mxUtils.getXml(ja);z.data=this.getFileData(null,null,!0,null,null,null,ja);z.format=g.format}else if("html"==g.format)A=this.editor.getGraphXml(),z.data=this.getHtml(A,this.editor.graph),z.xml=mxUtils.getXml(A),z.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var ka=this.editor.graph.background;
+ka==mxConstants.NONE&&(ka=null);z.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);z.format="svg";var ea=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(a);m.postMessage(JSON.stringify(z),"*")});if("xmlsvg"==g.format)(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))&&this.getEmbeddedSvg(z.xml,this.editor.graph,null,!0,ea,null,null,g.embedImages);else if(null==
+g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){this.editor.graph.setEnabled(!1);var V=this.editor.graph.getSvg(ka);this.embedFonts(V,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ea(mxUtils.getXml(a))})):ea(mxUtils.getXml(a))}))}return}m.postMessage(JSON.stringify(z),"*")}return}if("load"==g.action)c=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&
 (urlParams.modified=g.modified),null!=g.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&
-this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(Y){this.handleError(Y)}}var U=
-mxUtils.bind(this,function(f,g){c=!0;try{a(f,g)}catch(aa){this.handleError(aa)}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.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(m):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):m.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(Z){this.handleError(Z)}}var U=
+mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ba){this.handleError(ba)}d=!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();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),
 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||m.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){U(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&
 this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&U(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){U(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),U(g,f))}}));var m=window.opener||window.parent,k="json"==urlParams.proto?
@@ -3381,212 +3383,213 @@ JSON.stringify({event:"init"}):urlParams.ready||"ready";m.postMessage(k,"*")};Ed
 mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
 mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",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="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";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.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
-640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var k={},m=null,
-q=null,u=null,z=null,y=null,C=null,v=null,B=null,L="",H="auto",N="auto",D=null,M=null,P=40,R=40,ba=100,X=0,F=this.editor.graph;F.getGraphBounds();for(var T=function(){null!=b?b(oa):(F.setSelectionCells(oa),F.scrollCellToVisible(F.getSelectionCell()))},ja=F.getFreeInsertPoint(),ka=ja.x,la=ja.y,ja=la,ea=null,V="auto",B=null,U=[],Y=null,ha=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),
-Z++;if("#"!=a.charAt(1)){var aa=a.indexOf(":");if(0<aa){var O=mxUtils.trim(a.substring(1,aa)),K=mxUtils.trim(a.substring(aa+1));"label"==O?ea=F.sanitizeHtml(K):"labelname"==O&&0<K.length&&"-"!=K?z=K:"labels"==O&&0<K.length&&"-"!=K?y=JSON.parse(K):"style"==O?m=K:"parentstyle"==O?C=K:"stylename"==O&&0<K.length&&"-"!=K?u=K:"styles"==O&&0<K.length&&"-"!=K?q=JSON.parse(K):"identity"==O&&0<K.length&&"-"!=K?v=K:"parent"==O&&0<K.length&&"-"!=K?B=K:"namespace"==O&&0<K.length&&"-"!=K?L=K:"width"==O?H=K:"height"==
-O?N=K:"left"==O&&0<K.length?D=K:"top"==O&&0<K.length?M=K:"ignore"==O?ha=K.split(","):"connect"==O?U.push(JSON.parse(K)):"link"==O?Y=K:"padding"==O?X=parseFloat(K):"edgespacing"==O?P=parseFloat(K):"nodespacing"==O?R=parseFloat(K):"levelspacing"==O?ba=parseFloat(K):"layout"==O&&(V=K)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var fa=this.editor.csvToArray(c[Z]),O=aa=null,K=[],Q=0;Q<fa.length;Q++)v==fa[Q]&&(aa=Q),B==fa[Q]&&(O=Q),K.push(mxUtils.trim(fa[Q]).replace(/[^a-z0-9]+/ig,
-"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+K[0]+"%");if(null!=U)for(var S=0;S<U.length;S++)null==k[U[S].to]&&(k[U[S].to]={});v=[];for(Q=Z+1;Q<c.length;Q++){var ca=this.editor.csvToArray(c[Q]);if(null==ca){var qa=40<c[Q].length?c[Q].substring(0,40)+"...":c[Q];throw Error(qa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<ca.length&&v.push(ca)}F.model.beginUpdate();try{for(Q=0;Q<v.length;Q++){var ca=v[Q],J=null,ma=null!=aa?L+ca[aa]:null;null!=ma&&(J=F.model.getCell(ma));
-var c=null!=J,da=new mxCell(ea,new mxGeometry(ka,ja,0,0),m||"whiteSpace=wrap;html=1;");da.vertex=!0;da.id=ma;for(var ia=0;ia<ca.length;ia++)F.setAttributeForCell(da,K[ia],ca[ia]);if(null!=z&&null!=y){var ya=y[da.getAttribute(z)];null!=ya&&F.labelChanged(da,ya)}if(null!=u&&null!=q){var za=q[da.getAttribute(u)];null!=za&&(da.style=za)}F.setAttributeForCell(da,"placeholders","1");da.style=F.replacePlaceholders(da,da.style);c&&(F.model.setGeometry(J,da.geometry),F.model.setStyle(J,da.style),0>mxUtils.indexOf(e,
-J)&&e.push(J));J=da;if(!c)for(S=0;S<U.length;S++)k[U[S].to][J.getAttribute(U[S].to)]=J;null!=Y&&"link"!=Y&&(F.setLinkForCell(J,J.getAttribute(Y)),F.setAttributeForCell(J,Y,null));F.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var Aa=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=D&&null!=J.getAttribute(D)&&(J.geometry.x=ka+parseFloat(J.getAttribute(D))),null!=M&&null!=J.getAttribute(M)&&(J.geometry.y=la+parseFloat(J.getAttribute(M))),"@"==H.charAt(0)&&null!=J.getAttribute(H.substring(1))?
-J.geometry.width=parseFloat(J.getAttribute(H.substring(1))):J.geometry.width="auto"==H?Aa.width+X:parseFloat(H),"@"==N.charAt(0)&&null!=J.getAttribute(N.substring(1))?J.geometry.height=parseFloat(J.getAttribute(N.substring(1))):J.geometry.height="auto"==N?Aa.height+X:parseFloat(N),ja+=J.geometry.height+R);c?(null==f[ma]&&(f[ma]=[]),f[ma].push(J)):(B=null!=O?F.model.getCell(L+ca[O]):null,d.push(J),null!=B?(B.style=F.replacePlaceholders(B,C),F.addCell(J,B)):e.push(F.addCell(J)))}for(var ra=e.slice(),
-oa=e.slice(),S=0;S<U.length;S++)for(var sa=U[S],Q=0;Q<d.length;Q++){var J=d[Q],ta=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(F.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=k[c.to][d[e]];if(null!=f){var g=c.label;null!=c.fromlabel&&(g=(b.getAttribute(c.fromlabel)||"")+(g||""));null!=c.tolabel&&(g=(g||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?F.replacePlaceholders(l,
-c.style):F.createCurrentEdgeStyle();oa.push(F.insertEdge(null,null,g||"",c.invert?f:a,c.invert?a:f,l));mxUtils.remove(c.invert?a:f,ra)}}});ta(J,J,sa);if(null!=f[J.id])for(ia=0;ia<f[J.id].length;ia++)ta(J,f[J.id][ia],sa)}if(null!=ha)for(Q=0;Q<d.length;Q++)for(J=d[Q],ia=0;ia<ha.length;ia++)F.setAttributeForCell(J,mxUtils.trim(ha[ia]),null);if(0<e.length){var na=new mxParallelEdgeLayout(F);na.spacing=P;var Ba=function(){0<na.spacing&&na.execute(F.getDefaultParent());for(var a=0;a<e.length;a++){var b=
-F.getCellGeometry(e[a]);b.x=Math.round(F.snap(b.x));b.y=Math.round(F.snap(b.y));"auto"==H&&(b.width=Math.round(F.snap(b.width)));"auto"==N&&(b.height=Math.round(F.snap(b.height)))}};if("["==V.charAt(0)){var Da=T;F.view.validate();this.executeLayoutList(JSON.parse(V),function(){Ba();Da()});T=null}else if("circle"==V){var pa=new mxCircleLayout(F);pa.resetEdges=!1;var La=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){pa.execute(F.getDefaultParent());
-Ba()},!0,T);T=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&oa.length==2*e.length-1&&1==ra.length){F.view.validate();var Ca=new mxCompactTreeLayout(F,"horizontaltree"==V);Ca.levelDistance=R;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(F.getDefaultParent(),0<ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ra.length){F.view.validate();var wa=new mxHierarchicalLayout(F,"horizontalflow"==V?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=R;wa.parallelEdgeSpacing=P;wa.interRankCellSpacing=ba;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(F.getDefaultParent(),oa);F.moveCells(oa,ka,la)},!0,T);T=null}else if("organic"==V||"auto"==V&&oa.length>e.length){F.view.validate();var xa=new mxFastOrganicLayout(F);xa.forceConstant=3*R;xa.resetEdges=!1;var Pa=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Pa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};na=new mxParallelEdgeLayout(F);
-na.spacing=P;this.executeLayout(function(){xa.execute(F.getDefaultParent());Ba()},!0,T);T=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=T&&T()}}catch(Ka){this.handleError(Ka)}};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,560,130,!0,!0);a.init()};var u=
-EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=u.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};
-var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();
-return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+
-a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&
-(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
-c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);
-d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(d);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(d),this.menus.get("newLibrary").setEnabled(d));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,
+q=null,u=null,y=null,z=null,C=null,v=null,B=null,L="",I="auto",N="auto",D=null,M=null,R=40,S=40,Y=100,X=0,F=this.editor.graph;F.getGraphBounds();for(var T=function(){null!=b?b(oa):(F.setSelectionCells(oa),F.scrollCellToVisible(F.getSelectionCell()))},ia=F.getFreeInsertPoint(),ja=ia.x,ka=ia.y,ia=ka,ea=null,V="auto",B=null,U=[],Z=null,ga=null,aa=0;aa<d.length&&"#"==d[aa].charAt(0);){a=d[aa];for(aa++;aa<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[aa].substring(1)),
+aa++;if("#"!=a.charAt(1)){var ba=a.indexOf(":");if(0<ba){var O=mxUtils.trim(a.substring(1,ba)),K=mxUtils.trim(a.substring(ba+1));"label"==O?ea=F.sanitizeHtml(K):"labelname"==O&&0<K.length&&"-"!=K?y=K:"labels"==O&&0<K.length&&"-"!=K?z=JSON.parse(K):"style"==O?m=K:"parentstyle"==O?C=K:"stylename"==O&&0<K.length&&"-"!=K?u=K:"styles"==O&&0<K.length&&"-"!=K?q=JSON.parse(K):"identity"==O&&0<K.length&&"-"!=K?v=K:"parent"==O&&0<K.length&&"-"!=K?B=K:"namespace"==O&&0<K.length&&"-"!=K?L=K:"width"==O?I=K:"height"==
+O?N=K:"left"==O&&0<K.length?D=K:"top"==O&&0<K.length?M=K:"ignore"==O?ga=K.split(","):"connect"==O?U.push(JSON.parse(K)):"link"==O?Z=K:"padding"==O?X=parseFloat(K):"edgespacing"==O?R=parseFloat(K):"nodespacing"==O?S=parseFloat(K):"levelspacing"==O?Y=parseFloat(K):"layout"==O&&(V=K)}}}if(null==d[aa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ha=this.editor.csvToArray(d[aa]),O=ba=null,K=[],P=0;P<ha.length;P++)v==ha[P]&&(ba=P),B==ha[P]&&(O=P),K.push(mxUtils.trim(ha[P]).replace(/[^a-z0-9]+/ig,
+"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+K[0]+"%");if(null!=U)for(var Q=0;Q<U.length;Q++)null==k[U[Q].to]&&(k[U[Q].to]={});v=[];for(P=aa+1;P<d.length;P++){var da=this.editor.csvToArray(d[P]);if(null==da){var qa=40<d[P].length?d[P].substring(0,40)+"...":d[P];throw Error(qa+" ("+P+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&v.push(da)}F.model.beginUpdate();try{for(P=0;P<v.length;P++){var da=v[P],J=null,na=null!=ba?L+da[ba]:null;null!=na&&(J=F.model.getCell(na));
+var d=null!=J,ca=new mxCell(ea,new mxGeometry(ja,ia,0,0),m||"whiteSpace=wrap;html=1;");ca.vertex=!0;ca.id=na;for(var fa=0;fa<da.length;fa++)F.setAttributeForCell(ca,K[fa],da[fa]);if(null!=y&&null!=z){var ya=z[ca.getAttribute(y)];null!=ya&&F.labelChanged(ca,ya)}if(null!=u&&null!=q){var za=q[ca.getAttribute(u)];null!=za&&(ca.style=za)}F.setAttributeForCell(ca,"placeholders","1");ca.style=F.replacePlaceholders(ca,ca.style);d&&(F.model.setGeometry(J,ca.geometry),F.model.setStyle(J,ca.style),0>mxUtils.indexOf(e,
+J)&&e.push(J));J=ca;if(!d)for(Q=0;Q<U.length;Q++)k[U[Q].to][J.getAttribute(U[Q].to)]=J;null!=Z&&"link"!=Z&&(F.setLinkForCell(J,J.getAttribute(Z)),F.setAttributeForCell(J,Z,null));F.fireEvent(new mxEventObject("cellsInserted","cells",[J]));var Aa=this.editor.graph.getPreferredSizeForCell(J);J.vertex&&(null!=D&&null!=J.getAttribute(D)&&(J.geometry.x=ja+parseFloat(J.getAttribute(D))),null!=M&&null!=J.getAttribute(M)&&(J.geometry.y=ka+parseFloat(J.getAttribute(M))),"@"==I.charAt(0)&&null!=J.getAttribute(I.substring(1))?
+J.geometry.width=parseFloat(J.getAttribute(I.substring(1))):J.geometry.width="auto"==I?Aa.width+X:parseFloat(I),"@"==N.charAt(0)&&null!=J.getAttribute(N.substring(1))?J.geometry.height=parseFloat(J.getAttribute(N.substring(1))):J.geometry.height="auto"==N?Aa.height+X:parseFloat(N),ia+=J.geometry.height+S);d?(null==f[na]&&(f[na]=[]),f[na].push(J)):(B=null!=O?F.model.getCell(L+da[O]):null,c.push(J),null!=B?(B.style=F.replacePlaceholders(B,C),F.addCell(J,B)):e.push(F.addCell(J)))}for(var ra=e.slice(),
+oa=e.slice(),Q=0;Q<U.length;Q++)for(var sa=U[Q],P=0;P<c.length;P++){var J=c[P],ta=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(F.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?F.replacePlaceholders(l,
+d.style):F.createCurrentEdgeStyle();oa.push(F.insertEdge(null,null,g||"",d.invert?f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ta(J,J,sa);if(null!=f[J.id])for(fa=0;fa<f[J.id].length;fa++)ta(J,f[J.id][fa],sa)}if(null!=ga)for(P=0;P<c.length;P++)for(J=c[P],fa=0;fa<ga.length;fa++)F.setAttributeForCell(J,mxUtils.trim(ga[fa]),null);if(0<e.length){var la=new mxParallelEdgeLayout(F);la.spacing=R;var Ba=function(){0<la.spacing&&la.execute(F.getDefaultParent());for(var a=0;a<e.length;a++){var b=
+F.getCellGeometry(e[a]);b.x=Math.round(F.snap(b.x));b.y=Math.round(F.snap(b.y));"auto"==I&&(b.width=Math.round(F.snap(b.width)));"auto"==N&&(b.height=Math.round(F.snap(b.height)))}};if("["==V.charAt(0)){var Da=T;F.view.validate();this.executeLayoutList(JSON.parse(V),function(){Ba();Da()});T=null}else if("circle"==V){var pa=new mxCircleLayout(F);pa.resetEdges=!1;var La=pa.isVertexIgnored;pa.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){pa.execute(F.getDefaultParent());
+Ba()},!0,T);T=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&oa.length==2*e.length-1&&1==ra.length){F.view.validate();var Ca=new mxCompactTreeLayout(F,"horizontaltree"==V);Ca.levelDistance=S;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(F.getDefaultParent(),0<ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==ra.length){F.view.validate();var wa=new mxHierarchicalLayout(F,"horizontalflow"==V?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=S;wa.parallelEdgeSpacing=R;wa.interRankCellSpacing=Y;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(F.getDefaultParent(),oa);F.moveCells(oa,ja,ka)},!0,T);T=null}else if("organic"==V||"auto"==V&&oa.length>e.length){F.view.validate();var xa=new mxFastOrganicLayout(F);xa.forceConstant=3*S;xa.resetEdges=!1;var Oa=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Oa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};la=new mxParallelEdgeLayout(F);
+la.spacing=R;this.executeLayout(function(){xa.execute(F.getDefaultParent());Ba()},!0,T);T=null}}this.hideDialog()}finally{F.model.endUpdate()}null!=T&&T()}}catch(Ka){this.handleError(Ka)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}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 d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var u=
+EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=u.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.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 c.apply(this,arguments)};
+var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.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(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();
+return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var k=b.init;b.init=function(){k.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.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,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&
+(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.gitLab||d++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&
+d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);
+c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&
 a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
-function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var y=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){y.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
-this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
-this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=d&&d.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
-var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);B.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,l,k,m){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,
-"svg",mxUtils.getXml(c.getSvg(e,l,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),n=Math.floor(g.width*l/c.view.scale),p=Math.floor(g.height*l/c.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=d&&"jpg"!=d&&"jpeg"!=d||!a.isExportToCanvas()){var q={globalVars:c.getExportVariables()};a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(f))})}else"png"==d?a.exportImage(l,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,m):a.exportImage(l,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var d=0;d<this.pages.length;d++){var e=
-a;this.currentPage!=this.pages[d]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[d]),e.model.setRoot(this.pages[d].root));b+=this.pages[d].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var q=m[a];if("R"==q.substring(0,1)){var t=JSON.parse(decodeURIComponent(q.substring(1)));k[t[0]]={id:t[0],title:t[1],downloadUrl:t[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML=
-"";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];k[d.id]&&(b[d.id]=d);var f=this.addCheckbox(e,d.title,k[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
-mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==k[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(v){this.handleError(v,
-mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in k)b[c]||this.closeLibrary(new RemoteLibrary(this,null,k[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var z=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){z.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);
+this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));
+this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};
+var B=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);B.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,l,k,m){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,
+"svg",mxUtils.getXml(d.getSvg(e,l,k)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*l/d.view.scale),p=Math.floor(g.height*l/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+k+"&xml="+encodeURIComponent(f))})}else"png"==c?a.exportImage(l,null==e||"none"==e,!0,!1,!1,k,!0,!1,null,null,m):a.exportImage(l,!1,!0,!1,!1,k,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=
+a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxUtils.htmlEntities(a));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+d.appendChild(c);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var k={};try{var m=mxSettings.getCustomLibraries();for(a=0;a<m.length;a++){var q=m[a];if("R"==q.substring(0,1)){var t=JSON.parse(decodeURIComponent(q.substring(1)));k[t[0]]={id:t[0],title:t[1],downloadUrl:t[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML=
+"";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<a.length;d++){var c=a[d];k[c.id]&&(b[c.id]=c);var f=this.addCheckbox(e,c.title,k[c.id]);(function(a,d){mxEvent.addListener(d,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(c,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,d;for(d in b)null==k[d]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(d){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,b))}catch(v){this.handleError(v,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[d]));for(d in k)b[d]||this.closeLibrary(new RemoteLibrary(this,null,k[d]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(d.container,340,375,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
 allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
-a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,d,e,l){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);
-c&&e.apply(this,arguments)});d=d||{};d.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:d});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=
-b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){c(Array.prototype.slice.apply(arguments))}),m.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,
-m);else{var q=this[d].apply(this,m);c([q])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(G){c(null,"Invalid Call: An error occured, "+G.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
-b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.result;this.database=c;EditorUi.migrateStorageFiles&&(StorageFile.migrate(c),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");b.style.display=
-"none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;k()}),k=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,
-function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(N){console.log(N)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(N){console.log(N)}});a=mxUtils.bind(this,function(a){try{if(a.source==b.contentWindow){var f=
-{};try{f=JSON.parse(a.data)}catch(D){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||d||(c?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],c=!1,k()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):l())}}catch(D){console.log(D)}});window.addEventListener("message",a)}})));a(c);c.onversionchange=
-function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,d,e,l){this.openDatabase(mxUtils.bind(this,function(c){try{l=l||"objects";Array.isArray(l)||(l=[l],a=[a],b=[b]);var f=c.transaction(l,"readwrite");f.oncomplete=d;f.onerror=e;for(c=0;c<l.length;c++)f.objectStore(l[c]).put(null!=a&&null!=a[c]?{key:a[c],data:b[c]}:b[c])}catch(A){null!=e&&e(A)}}),e)};EditorUi.prototype.removeDatabaseItem=
-function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);c=c.transaction(e,"readwrite");c.oncomplete=b;c.onerror=d;for(var f=0;f<e.length;f++)c.objectStore(e[f])["delete"](a[f])}),d)};EditorUi.prototype.getDatabaseItem=function(a,b,d,e){this.openDatabase(mxUtils.bind(this,function(c){try{e=e||"objects";var f=c.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=d}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.getDatabaseItems=
-function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(x){null!=b&&b(x)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,d){this.openDatabase(mxUtils.bind(this,function(c){try{d=d||"objects";var e=c.transaction([d],"readonly").objectStore(d).getAllKeys();
-e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();
-null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,d){var c=this.getCurrentFile();null!=c?c.addComment(a,b,d):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,
-a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
-function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var d=localStorage.key(b),e=localStorage.getItem(d);if(0<d.length&&(".scratchpad"==d||"."!=d.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===
-e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(d)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,e,d,m,k){function q(){for(var a=t.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==t&&b++;G.style.display=0==b?"block":"none"}function u(a,b,c,d){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}n={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
-"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),q()):e();n=null});m.className="geCommentEditBtn";l.appendChild(m);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();c(a);n=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";l.appendChild(p);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function y(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
-[e],"{1} ago"));c.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString())}function B(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function c(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,d,e,k,m){function z(a,c,d){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){c(a,b);a.preventDefault();mxEvent.consume(a)});P.appendChild(e);d&&(e.style.display="none")}function v(){function a(b){c.push(d);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)d=d.nextSibling,a(b.replies[e])}var c=[],d=D;a(b);return{pdiv:d,replies:c}}function x(d,e,l,m,n){function q(){B(x);b.addReply(z,function(a){z.id=a;b.replies.push(z);f(x);l&&l()},function(b){p();c(x);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function p(){u(z,x,function(a){q()},!0)}var t=v().pdiv,z=a.newComment(d,a.getCurrentUser());z.pCommentId=b.id;null==b.replies&&(b.replies=[]);var x=g(z,b.replies,t,k+1);e?p():q()}if(m||!b.isResolved){G.style.display="none";var D=document.createElement("div");D.className="geCommentContainer";D.setAttribute("data-commentId",b.id);D.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(D.style.backgroundColor="ghostWhite");
-var A=document.createElement("div");A.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;A.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";A.appendChild(E);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,b.user.displayName||"");E.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",b.id);y(b,
-M);E.appendChild(M);D.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");D.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";A.appendChild(P);p||0!=k&&!l||z(mxResources.get("reply"),function(){x("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||p||(z(mxResources.get("edit"),function(){function d(){u(b,D,function(){B(D);b.editComment(b.content,
-function(){f(D)},function(b){c(D);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}d()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(D);b.deleteComment(function(){for(var a=v(b).replies,c=0;c<a.length;c++)t.removeChild(a[c]);for(c=0;c<d.length;c++)if(d[c]==b){d.splice(c,1);break}G.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){c(D);a.handleError(b,null,null,
-null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));p||0!=k||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function c(){var c=a.target;c.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(c,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var d=b.isResolved?"none":"",e=v(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),
-l=0;l<k.length;l++)k[l]!=c.parentNode&&(k[l].style.display=d);C||(e[g].style.display="none")}q()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,c,!1,!0):x(mxResources.get("markedAsResolved"),!1,c,!0)});D.appendChild(A);null!=e?t.insertBefore(D,e.nextSibling):t.appendChild(D);for(e=0;null!=b.replies&&e<b.replies.length;e++)A=b.replies[e],A.isResolved=b.isResolved,g(A,b.replies,null,k+1,m);null!=n&&(n.comment.id==b.id?(m=b.content,b.content=n.comment.content,u(b,D,n.saveCallback,n.deleteOnCancel),
+a.msgMarkers,d=this.remoteInvokeCallbacks[b.callbackId];if(null==d)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?d.error&&d.error(a.error.errResp):d.callback&&d.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,l){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);
+d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:l});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var d=mxUtils.bind(this,function(b,d){var c={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=d?c.error={errResp:d}:null!=b&&(c.resp=
+b);this.remoteWin.postMessage(JSON.stringify(c),"*")});try{var c=a.funtionName,e=this.remoteInvokableFns[c];if(null!=e&&"function"===typeof this[c]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+c+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){d(Array.prototype.slice.apply(arguments))}),m.push(function(a){d(null,a||"Unkown Error")}),this[c].apply(this,
+m);else{var q=this[c].apply(this,m);d([q])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(G){d(null,"Invalid Call: An error occured, "+G.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){try{var d=c.result;1>a.oldVersion&&d.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(d.createObjectStore("files",{keyPath:"title"}),
+d.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=b&&b(x)}};c.onsuccess=mxUtils.bind(this,function(b){var d=c.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a||"1"==urlParams.forceMigration){var b=document.createElement("iframe");
+b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(b);var d=!0,c=!1,e,f=0,g=mxUtils.bind(this,function(){c=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,
+a,mxUtils.bind(this,function(d){null==d||".scratchpad"==a&&d==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(N){console.log(N)}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(N){console.log(N)}});a=mxUtils.bind(this,function(a){try{if(a.source==
+b.contentWindow){var f={};try{f=JSON.parse(a.data)}catch(D){}"init"==f.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=f.event||c||(d?null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?(e=f.resp[0],d=!1,l()):g():null!=f.resp&&0<f.resp.length&&null!=f.resp[0]?m(f.resp[0]):k())}}catch(D){console.log(D)}});window.addEventListener("message",
+a)}})));a(d);d.onversionchange=function(){d.close()}});c.onerror=b;c.onblocked=function(){}}catch(l){null!=b&&b(l)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(A){null!=e&&e(A)}}),e)};
+EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=
+c}catch(x){null!=c&&c(x)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(x){null!=b&&b(x)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=
+c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(n){null!=b&&b(n)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():
+!1};EditorUi.prototype.getComments=function(a,b){var d=this.getCurrentFile();null!=d?d.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var d=this.getCurrentFile();
+return null!=d?d.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==
+DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&
+(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated",
+"1")}})();
+var CommentsWindow=function(a,b,e,c,k,m){function q(){for(var a=t.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==t&&b++;G.style.display=0==b?"block":"none"}function u(a,b,d,c){function e(){b.removeChild(k);b.removeChild(l);g.style.display="block";f.style.display="block"}n={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+"geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var l=document.createElement("div");l.className="geCommentEditBtns";var m=mxUtils.button(mxResources.get("cancel"),function(){c?(b.parentNode.removeChild(b),q()):e();n=null});m.className="geCommentEditBtn";l.appendChild(m);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();d(a);n=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(m.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";l.appendChild(p);b.insertBefore(l,f);g.style.display="none";f.style.display="none";k.focus()}function z(b,d){d.innerHTML="";var c=new Date(b.modifiedDate),e=a.timeSince(c);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[e],"{1} ago"));d.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString())}function B(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function d(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,c,e,k,m){function y(a,d,c){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});R.appendChild(e);c&&(e.style.display="none")}function v(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=D;a(b);return{pdiv:c,replies:d}}function x(c,e,l,m,n){function p(){B(D);b.addReply(t,function(a){t.id=a;b.replies.push(t);f(D);l&&l()},function(b){q();d(D);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function q(){u(t,D,function(a){p()},!0)}var y=v().pdiv,t=a.newComment(c,a.getCurrentUser());t.pCommentId=b.id;null==b.replies&&(b.replies=[]);var D=g(t,b.replies,y,k+1);e?q():p()}if(m||!b.isResolved){G.style.display="none";var D=document.createElement("div");D.className="geCommentContainer";D.setAttribute("data-commentId",b.id);D.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(D.style.backgroundColor="ghostWhite");
+var A=document.createElement("div");A.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=b.user.pictureUrl||Editor.userImage;A.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";A.appendChild(E);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,b.user.displayName||"");E.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",b.id);z(b,
+M);E.appendChild(M);D.appendChild(A);A=document.createElement("div");A.className="geCommentTxt";mxUtils.write(A,b.content||"");D.appendChild(A);A=document.createElement("div");A.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";A.appendChild(R);p||0!=k&&!l||y(mxResources.get("reply"),function(){x("",!0)},b.isResolved);E=a.getCurrentUser();null==E||E.id!=b.user.id||p||(y(mxResources.get("edit"),function(){function c(){u(b,D,function(){B(D);b.editComment(b.content,
+function(){f(D)},function(b){d(D);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),y(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){B(D);b.deleteComment(function(){for(var a=v(b).replies,d=0;d<a.length;d++)t.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}G.style.display=0==t.getElementsByTagName("div").length?"block":"none"},function(b){d(D);a.handleError(b,null,null,
+null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));p||0!=k||y(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function d(){var d=a.target;d.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(d,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var c=b.isResolved?"none":"",e=v(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var k=e[g].querySelectorAll(".geCommentAction"),
+l=0;l<k.length;l++)k[l]!=d.parentNode&&(k[l].style.display=c);C||(e[g].style.display="none")}q()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});D.appendChild(A);null!=e?t.insertBefore(D,e.nextSibling):t.appendChild(D);for(e=0;null!=b.replies&&e<b.replies.length;e++)A=b.replies[e],A.isResolved=b.isResolved,g(A,b.replies,null,k+1,m);null!=n&&(n.comment.id==b.id?(m=b.content,b.content=n.comment.content,u(b,D,n.saveCallback,n.deleteOnCancel),
 b.content=m):null==n.comment.id&&n.comment.pCommentId==b.id&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel)));return D}}var p=!a.canComment(),l=a.canReplyToReplies(),n=null,x=document.createElement("div");x.className="geCommentsWin";x.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var A=EditorUi.compactUi?"26px":"30px",t=document.createElement("div");t.className="geCommentsList";t.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;t.style.bottom=parseInt(A)+7+"px";x.appendChild(t);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=A;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!p){var E=A.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function d(){u(e,k,function(b){B(k);a.addComment(b,function(a){b.id=a;v.push(b);f(k)},function(b){c(k);d();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var e=a.newComment("",a.getCurrentUser()),k=g(e,v,null,0);d();b.preventDefault();mxEvent.consume(b)});z.appendChild(E)}E=A.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(E);a.commentsRefreshNeeded()&&
-(E=A.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(E));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){k();a.preventDefault();mxEvent.consume(a)}),z.appendChild(A));x.appendChild(z);var v=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var b=n.div.querySelector(".geCommentEditTxtArea"),c=n.div.querySelector(".geCommentEditBtns");n.comment.content=b.value;b.parentNode.removeChild(b);c.parentNode.removeChild(c)}catch(D){a.handleError(D)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var c=0;c<a.length;c++)b(a[c].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(G);G.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies),
-g(v[a],v,null,0,C);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var d=c[b.id];if(null!=d)for(y(b,d),d=0;null!=b.replies&&d<b.replies.length;d++)a(b.replies[d])}
-if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),c={},d=0;d<b.length;d++){var e=b[d];c[e.getAttribute("data-commentId")]=e}for(d=0;d<v.length;d++)a(v[d])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),x,b,e,d,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var c=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var L=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",L);this.destroy=function(){mxEvent.removeListener(window,"resize",L);this.window.destroy()}},ConfirmDialog=function(a,b,e,d,m,k,q,u,y,B,c){var f=document.createElement("div");f.style.textAlign="center";c=null!=c?c:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=c+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
-f.appendChild(g);null!=B&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",B),g.appendChild(b),f.appendChild(g));B=document.createElement("div");B.style.textAlign="center";B.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d(p.checked)});k.className="geBtn";null!=u&&(k.innerHTML=u+"<br>"+k.innerHTML,k.style.paddingBottom=
-"8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&B.appendChild(k);var l=mxUtils.button(m||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(p.checked)});B.appendChild(l);null!=q?(l.innerHTML=q+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(k);f.appendChild(B);y?(B.style.marginTop=
-"10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(p),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),g.appendChild(m),f.appendChild(g),mxEvent.addListener(m,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):B.style.marginTop="12px";this.init=function(){l.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+Dialog.backdropColor;t.style.bottom=parseInt(A)+7+"px";x.appendChild(t);var G=document.createElement("span");G.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(G,mxResources.get("noCommentsFound"));var y=document.createElement("div");y.className="geToolbarContainer geCommentsToolbar";y.style.height=A;y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";y.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(y.style.filter=
+"none");A=document.createElement("a");A.className="geButton";mxClient.IS_QUIRKS&&(A.style.filter="none");if(!p){var E=A.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(b){function c(){u(e,k,function(b){B(k);a.addComment(b,function(a){b.id=a;v.push(b);f(k)},function(b){d(k);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var e=a.newComment("",a.getCurrentUser()),k=g(e,v,null,0);c();b.preventDefault();mxEvent.consume(b)});y.appendChild(E)}E=A.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";H();a.preventDefault();mxEvent.consume(a)});y.appendChild(E);a.commentsRefreshNeeded()&&
+(E=A.cloneNode(),E.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',E.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(E.style.filter="invert(100%)"),mxEvent.addListener(E,"click",function(a){H();a.preventDefault();mxEvent.consume(a)}),y.appendChild(E));a.commentsSaveNeeded()&&(A=A.cloneNode(),A.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',A.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(A.style.filter="invert(100%)"),mxEvent.addListener(A,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),y.appendChild(A));x.appendChild(y);var v=[],H=mxUtils.bind(this,function(){this.hasError=!1;if(null!=n)try{n.div=n.div.cloneNode(!0);var b=n.div.querySelector(".geCommentEditTxtArea"),d=n.div.querySelector(".geCommentEditBtns");n.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}t.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});t.innerHTML="";t.appendChild(G);G.style.display="block";v=a;for(a=0;a<v.length;a++)b(v[a].replies),
+g(v[a],v,null,0,C);null!=n&&null==n.comment.id&&null==n.comment.pCommentId&&(t.appendChild(n.div),u(n.comment,n.div,n.saveCallback,n.deleteOnCancel))},mxUtils.bind(this,function(a){t.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):t.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});H();this.refreshComments=H;y=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(z(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])}
+if(this.window.isVisible()){for(var b=t.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<v.length;c++)a(v[c])}});setInterval(y,6E4);this.refreshCommentsTime=y;this.window=new mxWindow(mxResources.get("comments"),x,b,e,c,k,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(a,b){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var L=mxUtils.bind(this,function(){var a=this.window.getX(),
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",L);this.destroy=function(){mxEvent.removeListener(window,"resize",L);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,k,m,q,u,z,B,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
+f.appendChild(g);null!=B&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",B),g.appendChild(b),f.appendChild(g));B=document.createElement("div");B.style.textAlign="center";B.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(p.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom=
+"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&B.appendChild(m);var l=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(p.checked)});B.appendChild(l);null!=q?(l.innerHTML=q+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";a.editor.cancelFirst||B.appendChild(m);f.appendChild(B);z?(B.style.marginTop=
+"10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(p),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),g.appendChild(k),f.appendChild(g),mxEvent.addListener(k,"click",function(a){p.checked=!p.checked;mxEvent.consume(a)})):B.style.marginTop="12px";this.init=function(){l.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
 DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
 function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
 function SelectPage(a,b,e){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b),null!=e&&(b.viewState=e,this.neverShown=!1))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,d=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,d);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(a.root);
+SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,e=b.graph,c=Graph.compressNode(b.getGraphXml(!0));mxUtils.setTextContent(a.node,c);a.viewState=e.getViewState();a.root=e.model.root;null!=a.model&&a.model.rootChanged(a.root);e.view.clear(a.root,!0);e.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;e.model.prefix=Editor.guid()+"-";e.model.rootChanged(a.root);
 e.setViewState(a.viewState);e.gridEnabled=e.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);b.updateGraphComponents();e.view.validate();e.blockMathRender=!0;e.sizeDidChange();e.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,e.selectUnlockedLayer());b.graph.fireEvent(new mxEventObject(mxEvent.ROOT));b.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(a,b,e,d,m){SelectPage.call(this,a,e);this.relatedPage=b;this.index=d;this.previousIndex=null;this.noSelect=m}mxUtils.extend(ChangePage,SelectPage);
+function ChangePage(a,b,e,c,k){SelectPage.call(this,a,e);this.relatedPage=b;this.index=c;this.previousIndex=null;this.noSelect=k}mxUtils.extend(ChangePage,SelectPage);
 ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;
 EditorUi.prototype.getSelectedPageIndex=function(){var a=null;if(null!=this.pages&&null!=this.currentPage)for(var b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){a=b;break}return a};EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;
-this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var c=this.tabContainer.style.height;
+this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=null,c=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=e&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,
 a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):
-"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var d=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(d.setViewState(b),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+b.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+b.scrollTop,d.restoreSelection(e))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),d=parseFloat(a.getAttribute("pageWidth")),m=parseFloat(a.getAttribute("pageHeight")),k=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(y){console.log("ExtFonts format error: "+y.message)}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!=k&&0<k.length?k:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(d)||isNaN(m)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,d,m),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}};
+"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var c=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(c.setViewState(b),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+b.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+b.scrollTop,c.restoreSelection(e))};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),c=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(z){console.log("ExtFonts format error: "+z.message)}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!=m&&0<m.length?m:null,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(c)||isNaN(k)?"undefined"===
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}};
 Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
 null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",
 null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
 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,extFonts:this.extFonts}};
 Graph.prototype.setViewState=function(a,b){if(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=!this.isViewer()&&a.pageVisible;this.background=a.background;this.backgroundImage=a.backgroundImage;this.pageScale=a.pageScale;
-this.pageFormat=a.pageFormat;this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);var e=this.extFonts;this.extFonts=a.extFonts||[];if(b&&null!=e)for(var d=0;d<e.length;d++){var m=document.getElementById("extFont_"+e[d].name);null!=m&&m.parentNode.removeChild(m)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,!0);this.view.scale=null!=a.scale?
+this.pageFormat=a.pageFormat;this.view.currentRoot=a.currentRoot;this.defaultParent=a.defaultParent;this.connectionArrowsEnabled=a.arrows;this.setTooltips(a.tooltips);this.setConnectable(a.connect);var e=this.extFonts;this.extFonts=a.extFonts||[];if(b&&null!=e)for(var c=0;c<e.length;c++){var k=document.getElementById("extFont_"+e[c].name);null!=k&&k.parentNode.removeChild(k)}for(c=0;c<this.extFonts.length;c++)this.addExtFont(this.extFonts[c].name,this.extFonts[c].url,!0);this.view.scale=null!=a.scale?
 a.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=a.translate&&(this.view.translate=a.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat="undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:
 mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0,this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged",
 "state",a))};
-Graph.prototype.addExtFont=function(a,b,e){if(a&&b){var d="extFont_"+a;if(null==document.getElementById(d))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,d);else{document.getElementsByTagName("head");var m=document.createElement("style");m.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));m.setAttribute("id",d);document.getElementsByTagName("head")[0].appendChild(m)}if(!e){null==this.extFonts&&(this.extFonts=[]);e=this.extFonts;
-d=!0;for(m=0;m<e.length;m++)if(e[m].name==a){d=!1;break}d&&this.extFonts.push({name:a,url:b})}}};
-EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var e=this.editor.extractGraphModel(a.node,null,b),d=Editor.extractParserError(e);if(d)throw Error(d);null!=e?(a.graphModelNode=e,a.viewState=this.editor.graph.createViewState(e),d=new mxCodec(e.ownerDocument),a.root=d.decode(e).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){e=this.editor.extractGraphModel(a.node);if(d=Editor.extractParserError(e))throw Error(d);null!=e&&(a.graphModelNode=
+Graph.prototype.addExtFont=function(a,b,e){if(a&&b){var c="extFont_"+a;if(null==document.getElementById(c))if(0==b.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",b,null,c);else{document.getElementsByTagName("head");var k=document.createElement("style");k.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+a+'";\n\tsrc: url("'+b+'");\n}'));k.setAttribute("id",c);document.getElementsByTagName("head")[0].appendChild(k)}if(!e){null==this.extFonts&&(this.extFonts=[]);e=this.extFonts;
+c=!0;for(k=0;k<e.length;k++)if(e[k].name==a){c=!1;break}c&&this.extFonts.push({name:a,url:b})}}};
+EditorUi.prototype.updatePageRoot=function(a,b){if(null==a.root){var e=this.editor.extractGraphModel(a.node,null,b),c=Editor.extractParserError(e);if(c)throw Error(c);null!=e?(a.graphModelNode=e,a.viewState=this.editor.graph.createViewState(e),c=new mxCodec(e.ownerDocument),a.root=c.decode(e).root):a.root=this.editor.graph.model.createRoot()}else if(null==a.viewState){if(null==a.graphModelNode){e=this.editor.extractGraphModel(a.node);if(c=Editor.extractParserError(e))throw Error(c);null!=e&&(a.graphModelNode=
 e)}null!=a.graphModelNode&&(a.viewState=this.editor.graph.createViewState(a.graphModelNode))}return a};
-EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var m=new SelectPage(this,a,e);m.execute();d.add(m);d.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}}catch(k){this.handleError(k)}};
+EditorUi.prototype.selectPage=function(a,b,e){try{if(a!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b=null!=b?b:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var c=this.editor.graph.model.createUndoableEdit();c.ignoreEdit=!0;var k=new SelectPage(this,a,e);k.execute();c.add(k);c.notify();this.editor.graph.tooltipHandler.hide();b||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c))}}catch(m){this.handleError(m)}};
 EditorUi.prototype.selectNextPage=function(a){var b=this.currentPage;null!=b&&null!=this.pages&&(b=mxUtils.indexOf(this.pages,b),a?this.selectPage(this.pages[mxUtils.mod(b+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(b-1,this.pages.length)]))};
 EditorUi.prototype.insertPage=function(a,b){if(this.editor.graph.isEnabled()){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);a=null!=a?a:this.createPage(null,this.createPageId());b=null!=b?b:this.pages.length;var e=new ChangePage(this,a,a,b);this.editor.graph.model.execute(e)}return a};EditorUi.prototype.createPageId=function(){var a;do a=Editor.guid();while(null!=this.getPageById(a));return a};
 EditorUi.prototype.createPage=function(a,b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),b);e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},b=0;b<this.pages.length;b++){var e=this.pages[b].getName();null!=e&&0<e.length&&(a[e]=e)}b=this.pages.length;do e=mxResources.get("pageWithNumber",[++b]);while(null!=a[e]);return e};
-EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var d=this.currentPage;d==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,d=this.pages[e]):1>=this.pages.length&&(d=this.insertPage(),b.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,d))}finally{b.model.endUpdate()}}}catch(m){this.handleError(m)}return a};
-EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var m=a.node.cloneNode(!1);m.removeAttribute("id");e=new DiagramPage(m);e.root=d.cloneCell(d.model.root);e.viewState=d.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(k){this.handleError(k)}return e};
+EditorUi.prototype.removePage=function(a){try{var b=this.editor.graph,e=mxUtils.indexOf(this.pages,a);if(b.isEnabled()&&0<=e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);b.model.beginUpdate();try{var c=this.currentPage;c==a&&1<this.pages.length?(e==this.pages.length-1?e--:e++,c=this.pages[e]):1>=this.pages.length&&(c=this.insertPage(),b.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));b.model.execute(new ChangePage(this,a,c))}finally{b.model.endUpdate()}}}catch(k){this.handleError(k)}return a};
+EditorUi.prototype.duplicatePage=function(a,b){var e=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var k=a.node.cloneNode(!1);k.removeAttribute("id");e=new DiagramPage(k);e.root=c.cloneCell(c.model.root);e.viewState=c.getViewState();e.viewState.scale=1;e.viewState.scrollLeft=null;e.viewState.scrollTop=null;e.viewState.currentRoot=null;e.viewState.defaultParent=null;e.setName(b);e=this.insertPage(e,mxUtils.indexOf(this.pages,a)+1)}}catch(m){this.handleError(m)}return e};
 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.className="geTabContainer";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),m=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),m=d):mxEvent.consume(b)}));mxEvent.addListener(c,"dragend",mxUtils.bind(this,function(a){m=
-null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=m&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=m&&d!=m&&this.movePage(m,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(k,this.createTabForPage(this.pages[k],d,this.pages[k]!=this.currentPage,k+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();
-this.tabContainer.appendChild(d);d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var q=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");q.style.position="absolute";q.style.right=this.editor.chromeless?"29px":"55px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=this.createControlTab(4,"&nbsp;&#10095;");
-u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var y=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=y+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,y-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,y-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+e)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
+null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));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-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var q=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");q.style.position="absolute";q.style.right=this.editor.chromeless?"29px":"55px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var u=this.createControlTab(4,"&nbsp;&#10095;");
+u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var z=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=z+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,z-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,z-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
 EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
 "none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
 EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
-EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=
-0;d<this.pages.length;d++)mxUtils.bind(this,function(d){var c=a.addItem(this.pages[d].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[d])}),b);this.pages[d]==this.currentPage&&a.addCheckmark(c,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))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=
-mxEvent.getClientX(a),m=mxEvent.getClientY(a);b.popup(d,m,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,b,e,d){e=this.createTab(e);var m=a.getName()||mxResources.get("untitled"),k=a.getId();e.setAttribute("title",m+(null!=k?" ("+k+")":"")+" ["+d+"]");mxUtils.write(e,m);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,m=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;m=a==this.currentPage;e.isMouseDown||m||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(k)&&m||mxEvent.isPopupTrigger(k))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!d){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var u=mxEvent.getClientX(k),y=mxEvent.getClientY(k);q.popup(u,y,null,k);this.setCurrentMenu(q,b)}mxEvent.consume(k)}}))};
+EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;margin-top:5px;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.marginLeft="0px";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var c=
+0;c<this.pages.length;c++)mxUtils.bind(this,function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(c);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var 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))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var c=
+mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
+EditorUi.prototype.createTabForPage=function(a,b,e,c){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var q=new mxPopupMenu(this.createPageMenu(a));q.div.className+=" geMenubarMenu";q.smartSeparators=!0;q.showDisabled=!0;q.autoExpand=!0;q.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(q,arguments);this.resetCurrentMenu();q.destroy()});var u=mxEvent.getClientX(m),z=mxEvent.getClientY(m);q.popup(u,z,null,m);this.setCurrentMenu(q,b)}mxEvent.consume(m)}}))};
 EditorUi.prototype.getLinkForPage=function(a){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var e=this.getSearch("create title mode url drive splash state".split(" ")),e=e+((0==e.length?"?":"&")+"page-id="+a.getId());return window.location.protocol+"//"+window.location.host+"/"+e+"#"+b.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);var m=this.getLinkForPage(a);null!=m&&(e.addSeparator(d),e.addItem(mxResources.get("link"),null,
-mxUtils.bind(this,function(){var a=new EmbedDialog(this,m);this.showDialog(a.container,440,240,!0,!0);a.init()}),d));e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(d),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,
-null,null,!0,!0))}),d))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=a;return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,d){d.ui=a.ui;return e};a.afterDecode=function(a,e,d){a=d.previous;d.previous=d.name;d.name=a;return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,d,m){m.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(m.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.viewState&&m.setAttribute("viewState",JSON.stringify(d.relatedPage.viewState,function(a,d){return 0>mxUtils.indexOf(b,
-a)?d:void 0})),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,m));return m};a.beforeDecode=function(a,b,m){m.ui=a.ui;m.relatedPage=m.ui.getPageById(b.getAttribute("relatedPage"));if(null==m.relatedPage){var d=b.ownerDocument.createElement("diagram");d.setAttribute("id",b.getAttribute("relatedPage"));d.setAttribute("name",b.getAttribute("name"));m.relatedPage=new DiagramPage(d);d=b.getAttribute("viewState");null!=d&&(m.relatedPage.viewState=JSON.parse(d),b.removeAttribute("viewState"));
-b=b.cloneNode(!0);d=b.firstChild;if(null!=d)for(m.relatedPage.root=a.decodeCell(d,!1),m=d.nextSibling,d.parentNode.removeChild(d),d=m;null!=d;){m=d.nextSibling;if(d.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d.getAttribute("id");null==a.lookup(e)&&a.decodeCell(d)}d.parentNode.removeChild(d);d=m}}return b};a.afterDecode=function(a,b,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,k,q,u){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var d=k.slice(),m=[],c=0;c<k.length;c++){var f=this.getCurrentCellStyle(k[c]);"1"==mxUtils.getValue(f,"treeFolding","0")&&(this.traverse(k[c],!0,mxUtils.bind(this,function(a,b){null!=b&&m.push(b);a!=k[c]&&m.push(a);return a==
-k[c]||!this.model.isCollapsed(a)})),this.model.setCollapsed(k[c],b))}for(c=0;c<m.length;c++)this.model.setVisible(m[c],!b);k=d;k=a.apply(this,arguments)}finally{this.model.endUpdate()}return k};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return n.isVertex(a)&&e(a)}function b(a){var b=!1;null!=a&&(b="1"==l.getCurrentCellStyle(a).treeMoving);
+EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);var k=this.getLinkForPage(a);null!=k&&(e.addSeparator(c),e.addItem(mxResources.get("link"),null,
+mxUtils.bind(this,function(){var a=new EmbedDialog(this,k);this.showDialog(a.container,440,240,!0,!0);a.init()}),c));e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(c),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,
+null,null,!0,!0))}),c))})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){a=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=a;return c};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new RenamePage,["ui","page"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){a=c.previous;c.previous=c.name;c.name=a;return c};mxCodecRegistry.register(a)})();
+(function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,c,k){k.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(k.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(a,c){return 0>mxUtils.indexOf(b,
+a)?c:void 0})),null!=c.relatedPage.root&&a.encodeCell(c.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(k.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
+b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(k.relatedPage.root=a.decodeCell(c,!1),k=c.nextSibling,c.parentNode.removeChild(c),c=k;null!=c;){k=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var e=c.getAttribute("id");null==a.lookup(e)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var a=Graph.prototype.foldCells;Graph.prototype.foldCells=function(b,e,m,q,u){e=null!=e?e:!1;null==m&&(m=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var c=m.slice(),k=[],d=0;d<m.length;d++){var f=this.getCurrentCellStyle(m[d]);"1"==mxUtils.getValue(f,"treeFolding","0")&&(this.traverse(m[d],!0,mxUtils.bind(this,function(a,b){null!=b&&k.push(b);a!=m[d]&&k.push(a);return a==
+m[d]||!this.model.isCollapsed(a)})),this.model.setCollapsed(m[d],b))}for(d=0;d<k.length;d++)this.model.setVisible(k[d],!b);m=c;m=a.apply(this,arguments)}finally{this.model.endUpdate()}return m};var b=EditorUi.prototype.init;EditorUi.prototype.init=function(){b.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function a(a){return n.isVertex(a)&&e(a)}function b(a){var b=!1;null!=a&&(b="1"==l.getCurrentCellStyle(a).treeMoving);
 return b}function e(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function q(a){var b=!1;null!=a&&(a=n.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function u(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
-a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function y(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var c=l.model.getParent(a),d=l.getIncomingEdges(a),e=l.cloneCells([d[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(d[0],!0),!0);var f=u(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;l.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=l.getOutgoingEdges(l.model.getTerminal(d[0],
-!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<p.length;t++){var z=l.model.getTerminal(p[t],!1);if(f==u(z)){var v=l.view.getState(z);z!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(d=10+Math.max(d,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?g=0:d=0;for(t=0;t<p.length;t++)if(z=l.model.getTerminal(p[t],
-!1),f==u(z)&&(v=l.view.getState(z),z!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var x=[];l.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});l.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return l.addCells(e,c)}finally{l.model.endUpdate()}}function B(a){l.model.beginUpdate();try{var b=u(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);
-var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);l.moveCells(g,k,m);return l.addCells(d,e)}finally{l.model.endUpdate()}}function c(a,b){l.model.beginUpdate();try{var c=
-l.model.getParent(a),d=l.getIncomingEdges(a),e=u(a);0==d.length&&(d=[l.createEdge(c,null,"",null,null,l.createCurrentEdgeStyle())],e=b);var f=l.cloneCells([d[0],a]);l.model.setTerminal(f[0],a,!0);if(null==l.model.getTerminal(f[0],!1)){l.model.setTerminal(f[0],f[1],!1);var g=l.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),m;for(m in k)l.setCellStyles(m,k[m],[f[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&l.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?
-"vertical":"horizontal",[f[0]])}catch(Y){}}var d=l.getOutgoingEdges(a),n=c.geometry,g=[];l.view.currentRoot==c&&(n=new mxRectangle);for(k=0;k<d.length;k++){var p=l.model.getTerminal(d[k],!1);null!=p&&g.push(p)}var q=l.view.getBounds(g),t=l.view.translate,z=l.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(q.x+q.width)/z-t.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
-null==q?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(q.x+q.width)/z-t.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(q.y+q.height)/z-t.y+-n.y+10);return l.addCells(f,c)}finally{l.model.endUpdate()}}function f(a,b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=
-[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function g(a,b){var c=u(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=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(l.model.getTerminal(c[0],!0),d,a),c=l.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&l.setSelectionCell(d[c].cell)))))}var p=this,l=p.editor.graph,n=l.getModel(),x=p.menus.createPopupMenu;p.menus.createPopupMenu=function(b,c,d){x.apply(this,arguments);
-if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);b.addSeparator();0<e.length&&(a(l.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,d),this.addMenuItems(b,["selectDescendants"],null,d));a(l.getSelectionCell())&&(b.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,d))}};p.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);
-if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",
-function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var A=l.removeCells;l.removeCells=function(b,c){c=null!=
-c?c:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));c&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var d=[],f=0;f<b.length;f++){var g=b[f];n.isEdge(g)&&e(g)&&(d.push(g),g=n.getTerminal(g,!1));if(a(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(d=d.concat(k),g=l.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&d.push(b[f])}b=d;return A.apply(this,arguments)};p.hoverIcons.getStateAt=function(b,c,d){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,
-d))};var t=l.duplicateCells;l.duplicateCells=function(b,c){b=null!=b?b:this.getSelectionCells();for(var d=b.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&a(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=t.call(this,b,c);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(b[e]);if(0==m.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,
-l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var G=l.moveCells;l.moveCells=function(b,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,q=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var p=0;p<b.length;p++)if(a(b[p])||l.model.isEdge(b[p])&&null==l.model.getTerminal(b[p],!0)){f=l.model.getParent(b[p]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var t=l.getIncomingEdges(b[0]);
-if(0<t.length){var z=l.view.getState(l.model.getTerminal(t[0],!0));if(null!=z){var v=l.view.getState(n);null!=v&&(c=(v.getCenterX()-z.getCenterX())/l.view.scale,d=(v.getCenterY()-z.getCenterY())/l.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=b&&m.length==b.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))a(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p],n,!0);else if(a(b[p])&&(t=l.getIncomingEdges(b[p]),0<t.length))if(!e)a(n)&&0>mxUtils.indexOf(b,
-this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],n,!0);else if(0==l.getIncomingEdges(m[p]).length){q=n;if(null==q||q==l.model.getParent(b[p]))q=l.model.getTerminal(t[0],!0);e=this.cloneCell(t[0]);this.addEdge(e,l.getDefaultParent(),q,m[p])}}finally{this.model.endUpdate()}return m};if(null!=p.sidebar){var z=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(b,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=z.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
-null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.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")},C=p.onKeyDown;p.onKeyDown=function(b){try{if(l.isEnabled()&&!l.isEditing()&&a(l.getSelectionCell())&&1==l.getSelectionCount()){var d=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&
-(9==b.which?d=mxEvent.isShiftDown(b)?B(l.getSelectionCell()):c(l.getSelectionCell()):13==b.which&&(d=y(l.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=d&&0<d.length)1==d.length&&l.model.isEdge(d[0])?l.setSelectionCell(l.model.getTerminal(d[0],!1)):l.setSelectionCell(d[d.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=E[b.keyCode];
-null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(g(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(R){p.handleError(R)}mxEvent.isConsumed(b)||C.apply(this,arguments)};var v=l.connectVertex;l.connectVertex=
-function(b,d,e,f,g,k){var m=l.getIncomingEdges(b);return a(b)?(e=u(b),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,g=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d||0==m.length?c(b,d):f==g?B(b):y(b,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST)):v.call(this,b,d,e,f,g,k)};l.getSubtree=function(c){var d=[c];!b(c)&&!a(c)||q(c)||l.traverse(c,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};
-var I=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){I.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
+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 z(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=u(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=l.getOutgoingEdges(l.model.getTerminal(c[0],
+!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,y=g=c=0;y<p.length;y++){var t=l.model.getTerminal(p[y],!1);if(f==u(t)){var v=l.view.getState(t);t!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,v)&&(c=10+Math.max(c,(Math.min(n.x+n.width,v.x+v.width)-Math.max(n.x,v.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,v.y+v.height)-Math.max(n.y,v.y))/m))}}q?g=0:c=0;for(y=0;y<p.length;y++)if(t=l.model.getTerminal(p[y],
+!1),f==u(t)&&(v=l.view.getState(t),t!=a&&null!=v&&(q&&b!=v.getCenterX()<k.getCenterX()||!q&&b!=v.getCenterY()<k.getCenterY()))){var x=[];l.traverse(v.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});l.moveCells(x,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function B(a){l.model.beginUpdate();try{var b=u(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(d[0],c[1],!1);l.model.setTerminal(c[0],c[1],!0);l.model.setTerminal(c[0],a,!1);
+var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(c[1].geometry.x-=f.x,c[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);l.moveCells(g,k,m);return l.addCells(c,e)}finally{l.model.endUpdate()}}function d(a,b){l.model.beginUpdate();try{var d=
+l.model.getParent(a),c=l.getIncomingEdges(a),e=u(a);0==c.length&&(c=[l.createEdge(d,null,"",null,null,l.createCurrentEdgeStyle())],e=b);var f=l.cloneCells([c[0],a]);l.model.setTerminal(f[0],a,!0);if(null==l.model.getTerminal(f[0],!1)){l.model.setTerminal(f[0],f[1],!1);var g=l.getCellStyle(f[1]).newEdgeStyle;if(null!=g)try{var k=JSON.parse(g),m;for(m in k)l.setCellStyles(m,k[m],[f[0]]),"edgeStyle"==m&&"elbowEdgeStyle"==k[m]&&l.setCellStyles("elbow",e==mxConstants.DIRECTION_SOUTH||e==mxConstants.DIRECTION_NOTH?
+"vertical":"horizontal",[f[0]])}catch(Z){}}var c=l.getOutgoingEdges(a),n=d.geometry,g=[];l.view.currentRoot==d&&(n=new mxRectangle);for(k=0;k<c.length;k++){var p=l.model.getTerminal(c[k],!1);null!=p&&g.push(p)}var q=l.view.getBounds(g),y=l.view.translate,t=l.view.scale;e==mxConstants.DIRECTION_SOUTH?(f[1].geometry.x=null==q?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(q.x+q.width)/t-y.x-n.x+10,f[1].geometry.y+=f[1].geometry.height-n.y+40):e==mxConstants.DIRECTION_NORTH?(f[1].geometry.x=
+null==q?a.geometry.x+(a.geometry.width-f[1].geometry.width)/2:(q.x+q.width)/t-y.x+-n.x+10,f[1].geometry.y-=f[1].geometry.height+n.y+40):(f[1].geometry.x=e==mxConstants.DIRECTION_WEST?f[1].geometry.x-(f[1].geometry.width+n.x+40):f[1].geometry.x+(f[1].geometry.width-n.x+40),f[1].geometry.y=null==q?a.geometry.y+(a.geometry.height-f[1].geometry.height)/2:(q.y+q.height)/t-y.y+-n.y+10);return l.addCells(f,d)}finally{l.model.endUpdate()}}function f(a,b,d){a=l.getOutgoingEdges(a);d=l.view.getState(d);var c=
+[];if(null!=d&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,d.x+d.width)>=Math.max(f.x,d.x)||b&&Math.min(f.y+f.height,d.y+d.height)>=Math.max(f.y,d.y))&&c.push(f)}c.sort(function(a,d){return b?a.x+a.width-d.x-d.width:a.y+a.height-d.y-d.height})}return c}function g(a,b){var d=u(a),c=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST)==c&&d!=b?p.actions.get("selectParent").funct():
+d==b?(c=l.getOutgoingEdges(a),null!=c&&0<c.length&&l.setSelectionCell(l.model.getTerminal(c[0],!1))):(d=l.getIncomingEdges(a),null!=d&&0<d.length&&(c=f(l.model.getTerminal(d[0],!0),c,a),d=l.view.getState(a),null!=d&&(d=mxUtils.indexOf(c,d),0<=d&&(d+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=d&&d<=c.length-1&&l.setSelectionCell(c[d].cell)))))}var p=this,l=p.editor.graph,n=l.getModel(),x=p.menus.createPopupMenu;p.menus.createPopupMenu=function(b,d,c){x.apply(this,arguments);
+if(1==l.getSelectionCount()){d=l.getSelectionCell();var e=l.getOutgoingEdges(d);b.addSeparator();0<e.length&&(a(l.getSelectionCell())&&this.addMenuItems(b,["selectChildren"],null,c),this.addMenuItems(b,["selectDescendants"],null,c));a(l.getSelectionCell())&&(b.addSeparator(),0<l.getIncomingEdges(d).length&&this.addMenuItems(b,["selectSiblings","selectParent"],null,c))}};p.actions.addAction("selectChildren",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);
+if(null!=a){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");p.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],d=0;d<a.length;d++)b.push(l.model.getTerminal(a[d],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");p.actions.addAction("selectParent",
+function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");p.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,d){null!=d&&b.push(d);b.push(a);return!0});l.setSelectionCells(b)}},null,null,"Alt+Shift+D");var A=l.removeCells;l.removeCells=function(b,d){d=null!=
+d?d:!0;null==b&&(b=this.getDeletableCells(this.getSelectionCells()));d&&(b=this.getDeletableCells(this.addAllEdges(b)));for(var c=[],f=0;f<b.length;f++){var g=b[f];n.isEdge(g)&&e(g)&&(c.push(g),g=n.getTerminal(g,!1));if(a(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);k.push(a);return!0});0<k.length&&(c=c.concat(k),g=l.getIncomingEdges(b[f]),b=b.concat(g))}else null!=g&&c.push(b[f])}b=c;return A.apply(this,arguments)};p.hoverIcons.getStateAt=function(b,d,c){return a(b.cell)?null:this.graph.view.getState(this.graph.getCellAt(d,
+c))};var t=l.duplicateCells;l.duplicateCells=function(b,d){b=null!=b?b:this.getSelectionCells();for(var c=b.slice(0),e=0;e<c.length;e++){var f=l.view.getState(c[e]);if(null!=f&&a(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],b)}this.model.beginUpdate();try{var k=t.call(this,b,d);if(k.length==b.length)for(e=0;e<b.length;e++)if(a(b[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(b[e]);if(0==m.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,
+l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var G=l.moveCells;l.moveCells=function(b,d,c,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,p=this.getCurrentCellStyle(f);if(null!=b&&a(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<b.length;q++)if(a(b[q])||l.model.isEdge(b[q])&&null==l.model.getTerminal(b[q],!0)){f=l.model.getParent(b[q]);break}if(null!=n&&f!=n&&null!=this.view.getState(b[0])){var y=l.getIncomingEdges(b[0]);
+if(0<y.length){var t=l.view.getState(l.model.getTerminal(y[0],!0));if(null!=t){var v=l.view.getState(n);null!=v&&(d=(v.getCenterX()-t.getCenterX())/l.view.scale,c=(v.getCenterY()-t.getCenterY())/l.view.scale)}}}}m=G.apply(this,arguments);if(null!=m&&null!=b&&m.length==b.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))a(n)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],n,!0);else if(a(b[q])&&(y=l.getIncomingEdges(b[q]),0<y.length))if(!e)a(n)&&0>mxUtils.indexOf(b,
+this.model.getTerminal(y[0],!0))&&this.model.setTerminal(y[0],n,!0);else if(0==l.getIncomingEdges(m[q]).length){p=n;if(null==p||p==l.model.getParent(b[q]))p=l.model.getTerminal(y[0],!0);e=this.cloneCell(y[0]);this.addEdge(e,l.getDefaultParent(),p,m[q])}}finally{this.model.endUpdate()}return m};if(null!=p.sidebar){var y=p.sidebar.dropAndConnect;p.sidebar.dropAndConnect=function(b,d,c,e){var f=l.model,g=null;f.beginUpdate();try{if(g=y.apply(this,arguments),a(b))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&
+null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],b,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.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")},C=p.onKeyDown;p.onKeyDown=function(b){try{if(l.isEnabled()&&!l.isEditing()&&a(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&
+(9==b.which?c=mxEvent.isShiftDown(b)?B(l.getSelectionCell()):d(l.getSelectionCell()):13==b.which&&(c=z(l.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0],!1)):l.setSelectionCell(c[c.length-1]),null!=p.hoverIcons&&p.hoverIcons.update(l.view.getState(l.getSelectionCell())),l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=E[b.keyCode];
+null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(g(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(g(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(S){p.handleError(S)}mxEvent.isConsumed(b)||C.apply(this,arguments)};var v=l.connectVertex;l.connectVertex=
+function(b,c,e,f,g,k){var m=l.getIncomingEdges(b);return a(b)?(e=u(b),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c||0==m.length?d(b,c):f==g?B(b):z(b,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):v.call(this,b,c,e,f,g,k)};l.getSubtree=function(d){var c=[d];!b(d)&&!a(d)||q(d)||l.traverse(d,!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 H=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){H.apply(this,arguments);(b(this.state.cell)||a(this.state.cell))&&!q(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",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.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;p.hoverIcons.reset();mxEvent.consume(a)})))};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.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 H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){H.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){N.apply(this,arguments);null!=
+(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(a){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){N.apply(this,arguments);null!=
 this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var e=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=e.apply(this,arguments),b=this.graph;return a.concat([this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Parent",new mxGeometry(140,
-60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');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;b.insertEdge(e,!0);d.insertEdge(e,!1);a.insert(e);a.insert(b);a.insert(d);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;
-b.insertEdge(e,!0);d.insertEdge(e,!1);var m=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;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');m.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);m.insertEdge(c,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.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);f.insertEdge(g,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-p.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);p.insertEdge(l,!1);a.insert(e);a.insert(c);a.insert(g);a.insert(l);a.insert(b);a.insert(d);a.insert(m);a.insert(f);a.insert(p);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",
-new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');c.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;b.insertEdge(e,!0);c.insertEdge(e,!1);a.insert(e);a.insert(b);a.insert(c);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;
+b.insertEdge(e,!0);c.insertEdge(e,!1);var k=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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');k.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);k.insertEdge(d,!1);var f=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.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);f.insertEdge(g,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');p.vertex=!0;var l=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);p.insertEdge(l,!1);a.insert(e);a.insert(d);a.insert(g);a.insert(l);a.insert(b);a.insert(c);a.insert(k);a.insert(f);a.insert(p);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap mindmaps 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]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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 mindmaps 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;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":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;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-a.vertex=!0;var d=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-e.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");m.geometry.relative=!0;m.edge=!0;d.insertEdge(m,!0);e.insertEdge(m,!1);var B=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!0);B.insertEdge(c,!1);a.insert(m);a.insert(c);a.insert(d);a.insert(e);a.insert(B);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;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(a,"treeRoot",
+a.vertex=!0;var c=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");k.geometry.relative=!0;k.edge=!0;c.insertEdge(k,!0);e.insertEdge(k,!1);var B=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);B.insertEdge(d,!1);a.insert(k);a.insert(d);a.insert(c);a.insert(e);a.insert(B);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;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');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;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');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;treeFolding=1;treeMoving=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
-!0;e.edge=!0;d.insertEdge(e,!1);return sb.createVertexTemplateFromCells([b,e,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 m(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
-a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new m(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,b.container.clientHeight-30),function(b){function d(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+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;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
+!0;e.edge=!0;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([b,e,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(566,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0)):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&
+a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var d=Math.min(b.container.clientWidth-10,218);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,d-6,Math.min(650,b.container.clientHeight-30),function(b){function d(d,c){var f=a.menus.get(d),g=e.addMenu(c,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
 g.className="geTitle";b.appendChild(g);return g}var c=document.createElement("div");c.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;";c.className="geTitle";c.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';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(!Editor.enableCustomLibraries||
 "1"==urlParams.embed&&"1"!=urlParams.libraries)c.style.bottom="0";else 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.boxSizing="border-box",c.style.paddingRight="6px",c.style.paddingLeft="6px",c.style.height="32px",c.style.left="0",c=d("openLibraryFrom",mxResources.get("openLibraryFrom")),c.style.borderLeft="1px solid lightgray",c.style.boxSizing="border-box",c.style.paddingRight="6px",c.style.paddingLeft="6px",c.style.height="32px",c.style.left="50%";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.minimumSize=new mxRectangle(0,
 0,90,90);a.sidebarWindow.window.setVisible(!0);a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
-try{var d=document.createElement("style");d.type="text/css";d.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !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.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(d)}catch(n){}var m=function(a,b,c,d,e,f,g){var l=document.createElement("div");l.className="geSidebarContainer";l.style.position="absolute";l.style.width="100%";l.style.height="100%";l.style.border="1px solid whiteSmoke";l.style.overflowX="hidden";l.style.overflowY="auto";g(l);this.window=new mxWindow(b,l,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&
+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 table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select:none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity:0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding:2px;display:inline-block; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }.geToolbarContainer { background:#fff !important; }div.geSidebarContainer { background-color: #ffffff; }div.geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color: #A0A0A0 !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.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }"+
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"");document.getElementsByTagName("head")[0].appendChild(c)}catch(n){}var k=function(a,b,d,c,e,f,g){var k=document.createElement("div");k.className="geSidebarContainer";k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.border="1px solid whiteSmoke";k.style.overflowX="hidden";k.style.overflowY="auto";g(k);this.window=new mxWindow(b,k,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)};mxClient.IS_SF&&
 (this.window.div.onselectstart=mxUtils.bind(this,function(b){null==b&&(b=window.event);return null!=b&&a.isSelectionAllowed(b)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
 mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR=
 "#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor=
-"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var k=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");k.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
-e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):u.apply(this,arguments)};var y=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){y.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.apply(this,arguments)};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
+e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):u.apply(this,arguments)};var z=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){z.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
 "no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var B=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){B.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
 a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
 b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
 a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geMenuItem",b.style.marginLeft="6px",b.style.padding="6px",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.marginLeft="6px";b.style.padding="6px";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 c=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,d){var e=this.editorUi.editor.graph;a.smartSeparators=
-!0;c.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==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,d),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,d),this.addMenuItems(a,["collapsible","-",
-"lockUnlock","enterGroup"],null,d),a.addSeparator(),this.addSubmenu("layout",a)):e.isSelectionEmpty()&&e.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,d),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,d)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,d)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
+"geMenuItem";b.style.marginLeft="6px";b.style.padding="6px";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 d=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var e=this.editorUi.editor.graph;a.smartSeparators=
+!0;d.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==e.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-","editStyle","editGeometry","-"],null,c),e.isCellFoldable(e.getSelectionCell())&&this.addMenuItems(a,e.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["collapsible","-",
+"lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",a)):e.isSelectionEmpty()&&e.isEnabled()?(a.addSeparator(),this.addMenuItems(a,["editData"],null,c),a.addSeparator(),this.addSubmenu("layout",a),this.addSubmenu("view",a,null,mxResources.get("options")),a.addSeparator(),this.addSubmenu("insert",a),this.addMenuItems(a,["-","exitGroup"],null,c)):e.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(b){null!=this.formatWindow?
 this.formatWindow.window.setVisible(b?!1:!this.formatWindow.window.isVisible()):a(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var f=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&
 (this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),
 this.menus.findWindow=null);f.apply(this,arguments)};var g=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(a){g.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var p=Menus.prototype.init;Menus.prototype.init=function(){p.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("editDiagram").label=
@@ -3598,8 +3601,8 @@ c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);mxClient.IS_C
 ["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["save","makeCopy","-","rename","moveToFolder"],b):(c.menus.addMenuItems(a,["save","saveAs","-","rename"],b),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&this.addMenuItems(a,["upload"],b):c.menus.addMenuItems(a,["makeCopy"],b));c.menus.addMenuItems(a,["-","autosave"],b);null!=d&&d.isRevisionHistorySupported()&&
 c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){e.funct(a,b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||c.menus.addMenuItems(a,["publishLink"],b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b)})));var f=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=f&&c.menus.addSubmenu("language",a,b);c.menus.addSubmenu("units",
 a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),
-b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a,d){b.apply(this,arguments);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,
-b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):l(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],
+b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a,d){b.apply(this,arguments);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,
+b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],
 b)})))};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d,
 e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display=
 "inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?p.insertBefore(g,k.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",
@@ -3613,79 +3616,79 @@ b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;b
 d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
 640<=e?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
 null,640<=e?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==P&&(f=u.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
-"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(f),P=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=P&&(P.parentNode.removeChild(P),P=null))}l.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
+null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==R&&(f=u.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
+"pointer",f.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(f),R=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=R&&(R.parentNode.removeChild(R),R=null))}l.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
 null==urlParams.libs||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,u=new Menubar(k,p);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
-k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var y=k.descriptorChanged;k.descriptorChanged=function(){y.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var z=k.descriptorChanged;k.descriptorChanged=function(){z.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
 "gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};k.setStatusText(k.editor.getStatus());p.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
 k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,B=document.createElement("div");B.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var N=k.menus.get("viewZoom");
 if(null!=N){this.tabContainer.style.right="70px";var D=u.addMenu("100%",N.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none";
 D.style.right="0px";D.style.bottom="0px";D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.cursor="pointer";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";D.style.height=parseInt(k.tabContainerHeight)-1+"px";D.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";B.appendChild(D);N=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*
 k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,N);k.editor.addListener("resetGraphView",N);k.editor.addListener("pageSelected",N);var M=k.setGraphEnabled;k.setGraphEnabled=function(){M.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}B.appendChild(k.tabContainer);B.appendChild(p);B.appendChild(k.diagramContainer);
-g.appendChild(B);k.updateTabContainer();var P=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,d,m,k,q){this.file=a;this.id=b;this.content=e;this.modifiedDate=d;this.createdDate=m;this.isResolved=k;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,d,m){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,d,m){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=d;this.locale=m};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed:  / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters:  / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # %  * : < > ? /  { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
-Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
+g.appendChild(B);k.updateTabContainer();var R=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
+(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();DrawioComment=function(a,b,e,c,k,m,q){this.file=a;this.id=b;this.content=e;this.modifiedDate=c;this.createdDate=k;this.isResolved=m;this.user=q;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(a){null!=a&&this.replies.push(a)};DrawioComment.prototype.addReply=function(a,b,e,c,k){b()};DrawioComment.prototype.editComment=function(a,b,e){b()};DrawioComment.prototype.deleteComment=function(a,b){a()};DrawioUser=function(a,b,e,c,k){this.id=a;this.email=b;this.displayName=e;this.pictureUrl=c;this.locale=k};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About \naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed:  / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters:  / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # %  * : < > ? /  { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\npickGDriveFile=Pick Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished.\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. \npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully.\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="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="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#ffffff"/><add as="fontSize" value="11"/></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><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></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="edgeLabel" extend="text"><add as="labelBackgroundColor" value="#2a2a2a"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://app.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.center=!1;
 GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;
 GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=
 this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.pageId=this.graphConfig.pageId;
-this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var d=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,
-null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};
-mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var k=0;k<e.length;k++)if(this.pageId==e[k].getAttribute("id")){this.currentPage=k;break}var m=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=e[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+
-1:"pagecount"==a?e.length:m.apply(this,arguments)}}}this.diagrams=[];var c=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
-[];this.xmlNode!=c&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),c=this.xmlNode)});this.addListener("xmlNodeChanged",k);k();urlParams.page=d.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
+this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,
+null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=b&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};
+mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var e=this.xmlNode.getElementsByTagName("diagram");if(0<e.length){if(null!=this.pageId)for(var k=0;k<e.length;k++)if(this.pageId==e[k].getAttribute("id")){this.currentPage=k;break}var m=this.graph.getGlobalVariable,c=this;this.graph.getGlobalVariable=function(a){var b=e[c.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(c.currentPage+1):"pagenumber"==a?c.currentPage+
+1:"pagecount"==a?e.length:m.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.handlingResize||(this.currentPage=mxUtils.mod(a,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(a){for(var b=!1,c=0;c<this.diagrams.length;c++)if(this.diagrams[c].getAttribute("id")==a){this.selectPage(c);b=!0;break}return b};k=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=
+[];this.xmlNode!=d&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),d=this.xmlNode)});this.addListener("xmlNodeChanged",k);k();urlParams.page=c.currentPage;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=
 !0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=!1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title);this.addSizeHandler();this.showLayers(this.graph);
-this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");d.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||
-window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var m=this.getObservableParent(a),k=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(k.disconnect(),d())}));k.observe(m,{attributes:!0})}else d()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
+this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};c=this;this.graph.customLinkClicked=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");c.selectPageById(a.substring(b+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(a);return!0};this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||
+window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),m=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(m.disconnect(),c())}));m.observe(k,{attributes:!0})}else c()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
 GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){a=this.editor.extractGraphModel(a,!0);this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
 GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
 GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),
-d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");e=!1}}),m=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;d==m||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),
-this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},m=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",
-d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),
-!this.zoomEnabled&&this.autoFit){var k=m=null,d=mxUtils.bind(this,function(){window.clearTimeout(k);this.handlingResize||(k=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth=
-"100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)){var k=null;null!=e&&b.height+2*this.graph.border>e-2&&(k=(e-2*this.graph.border-2)/b.height);this.fitGraph(k)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),
-Math.floor(this.graph.border-b.y/this.graph.view.scale)),m=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();m=null;q()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),
+c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}else null!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px");e=!1}}),k=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var c=a.offsetWidth;c==k||this.handlingResize||(this.handlingResize=!0,"auto"==a.style.overflow&&(a.style.overflow="hidden"),this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=a.style.height)&&this.graph.center(),
+this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",c),this.graph.addListener("size",
+c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),
+!this.zoomEnabled&&this.autoFit){var m=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(m);this.handlingResize||(m=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",c):new ResizeSensor(this.graph.container,c))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",c);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth=
+"100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)){var m=null;null!=e&&b.height+2*this.graph.border>e-2&&(m=(e-2*this.graph.border-2)/b.height);this.fitGraph(m)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),
+Math.floor(this.graph.border-b.y/this.graph.view.scale)),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
 GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],d=this.graphConfig.layerIds,m=null!=d&&0<d.length;if(0<e.length||m||null!=b){var k=null!=b?b.getModel():null,q=a.getModel();q.beginUpdate();try{for(var u=q.getChildCount(q.root),y=0;y<u;y++)q.setVisible(q.getChildAt(q.root,y),null!=b?k.isVisible(k.getChildAt(k.root,y)):!1);if(null==k)if(m)for(y=0;y<d.length;y++)q.setVisible(q.getCell(d[y]),!0);else for(y=0;y<e.length;y++)q.setVisible(q.getChildAt(q.root,
-parseInt(e[y])),!0)}finally{q.endUpdate()}}};
-GraphViewer.prototype.addToolbar=function(){function a(a,b,d,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=d&&g.setAttribute("title",d);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
-function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);c++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,m=null,k=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(e,0);d=null;m=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";m=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),k())}));mxEvent.addListener(e,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var u=this.graph,y=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<y&&Math.abs(this.scrollTop-u.container.scrollTop)<y&&Math.abs(this.startX-b.getGraphX())<y&&Math.abs(this.startY-b.getGraphY())<y&&(0<parseFloat(e.style.opacity||0)?k():q(30))}})}for(var B=this.toolbarItems,c=0,f=null,g=null,p=0;p<B.length;p++){var l=B[p];if("pages"==l){g=b.ownerDocument.createElement("div");
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],c=this.graphConfig.layerIds,k=null!=c&&0<c.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,q=a.getModel();q.beginUpdate();try{for(var u=q.getChildCount(q.root),z=0;z<u;z++)q.setVisible(q.getChildAt(q.root,z),null!=b?m.isVisible(m.getChildAt(m.root,z)):!1);if(null==m)if(k)for(z=0;z<c.length;z++)q.setVisible(q.getCell(c[z]),!0);else for(z=0;z<e.length;z++)q.setVisible(q.getChildAt(q.root,
+parseInt(e[z])),!0)}finally{q.endUpdate()}}};
+GraphViewer.prototype.addToolbar=function(){function a(a,b,c,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);d++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,m=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(e,0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),q=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(q(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER?
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){q(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){q(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var u=this.graph,z=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<z&&Math.abs(this.scrollTop-u.container.scrollTop)<z&&Math.abs(this.startX-b.getGraphX())<z&&Math.abs(this.startY-b.getGraphY())<z&&(0<parseFloat(e.style.opacity||0)?m():q(30))}})}for(var B=this.toolbarItems,d=0,f=null,g=null,p=0;p<B.length;p++){var l=B[p];if("pages"==l){g=b.ownerDocument.createElement("div");
 g.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(g,70);var n=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");n.style.borderRightStyle="none";n.style.paddingLeft="0px";n.style.paddingRight="0px";e.appendChild(g);var x=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
 1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");x.style.paddingLeft="0px";x.style.paddingRight="0px";l=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";n.style.display=g.style.display;x.style.display=g.style.display});this.addListener("graphChanged",l);l()}else if("zoom"==l)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
 mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==l){if(this.layersEnabled){var A=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
 f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=t.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
 "px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");A.addListener(mxEvent.CHANGE,function(){t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"});t.style.display=1<A.getChildCount(A.root)?"inline-block":"none"}}else"lightbox"==l?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(l=this.graphConfig["toolbar-buttons"][l],
-null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*c);null!=this.graphConfig.title&&(B=b.ownerDocument.createElement("div"),B.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",B.setAttribute("title",this.graphConfig.title),mxUtils.write(B,this.graphConfig.title),mxUtils.setOpacity(B,
-70),e.appendChild(B));this.minToolbarWidth=34*c;var G=b.style.border,B=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
+null!=l&&a(null==l.enabled||l.enabled?l.handler:function(){},l.image,l.title,l.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(B=b.ownerDocument.createElement("div"),B.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",B.setAttribute("title",this.graphConfig.title),mxUtils.write(B,this.graphConfig.title),mxUtils.setOpacity(B,
+70),e.appendChild(B));this.minToolbarWidth=34*d;var G=b.style.border,B=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
 c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==G&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),
 f=null);b.style.border=G});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==f)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",B):B()};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var m=mxEvent.getSource(e);"a"==m.nodeName.toLowerCase()&&(d=m.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
-a.customLinkClicked(d)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,c){if(null==c){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(c=k.getAttribute("href"))}null!=b?null==c||a.isCustomLink(c)?mxEvent.consume(e):a.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null!=c&&null==b&&a.isCustomLink(c)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
+a.customLinkClicked(c)&&mxEvent.consume(e)}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
 GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
 (e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="app.diagrams.net";"1"==urlParams.dev&&(e.dev="1",
 e.drawdev="1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
 GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
-var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){m.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
-this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=
-"lightboxDropShadow";var m=new EditorUi(new Editor(!0),document.createElement("div"),!0);m.editor.editBlankUrl=this.editBlankUrl;m.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=d;m.refresh=function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&m.destroy()}),q=m.destroy;m.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
-!0;q.apply(this,arguments)};var u=m.editor.graph,y=u.container;y.style.overflow="hidden";this.lightboxChrome?(y.style.border="1px solid #c0c0c0",y.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");var B=this;u.getImageFromBundles=function(a){return B.getImageUrl(a)};var c=m.createTemporaryGraph;m.createTemporaryGraph=function(){var a=c.apply(this,arguments);a.getImageFromBundles=function(a){return B.getImageUrl(a)};return a};
-this.graphConfig.move&&(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(y.style,"border-radius","4px"),y.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(y.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(y.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,m);window.setTimeout(mxUtils.bind(this,function(){y.style.outline="none";
-y.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(y);document.body.appendChild(e);m.setFileData(this.xml);mxUtils.setPrefixedStyle(y.style,"transform","rotateY(0deg)");m.chromelessToolbar.style.bottom="60px";m.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(m.chromelessToolbar);m.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(y.style.position="absolute",y.style.display="block",y.style.left=
-a.x+"px",y.style.top=a.y+"px",y.style.width=document.body.clientWidth-80+"px",y.style.height=document.body.clientHeight-80+"px",y.style.backgroundColor="white",m.chromelessToolbar.style.display="block",m.chromelessToolbar.style.position="absolute",m.chromelessToolbar.style.bottom="",m.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");m.lightboxFit();m.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){m.destroy()})}),0);return m};
+var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
+this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var c=Graph.prototype.shadowId;Graph.prototype.shadowId=
+"lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=c;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),q=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
+!0;q.apply(this,arguments)};var u=k.editor.graph,z=u.container;z.style.overflow="hidden";this.lightboxChrome?(z.style.border="1px solid #c0c0c0",z.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var B=this;u.getImageFromBundles=function(a){return B.getImageUrl(a)};var d=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return B.getImageUrl(a)};return a};
+this.graphConfig.move&&(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(z.style,"border-radius","4px"),z.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(z.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(z.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,k);window.setTimeout(mxUtils.bind(this,function(){z.style.outline="none";
+z.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(z);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(z.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(z.style.position="absolute",z.style.display="block",z.style.left=
+a.x+"px",z.style.top=a.y+"px",z.style.width=document.body.clientWidth-80+"px",z.style.height=document.body.clientHeight-80+"px",z.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
 GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var m=d[e].className;null!=m&&0<m.length&&(m=m.split(" "),0<=mxUtils.indexOf(m,a)&&b.push(d[e]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),m=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){m(a)}):m(d.xml)}};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}};
 GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
-GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function m(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function k(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
-new m,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==k(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var q=!1,t=function(){b.resizedAttached&&(q&&(b.resizedAttached.call(),q=!1),a(t))};a(t);var u,y,B,C,v=function(){if((B=b.offsetWidth)!=u||(C=b.offsetHeight)!=y)q=!0,u=B,y=C;g()},I=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",v);I(f,"scroll",v)}var u=function(){GraphViewer.resizeSensorEnabled&&d()},y=Object.prototype.toString.call(e),B="[object Array]"===y||"[object NodeList]"===y||"[object HTMLCollection]"===y||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(B)for(var y=0,c=e.length;y<c;y++)q(e[y],u);else q(e,u);this.detach=function(){if(B)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function q(b,c){if(!b.resizedAttached)b.resizedAttached=
+new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var q=!1,t=function(){b.resizedAttached&&(q&&(b.resizedAttached.call(),q=!1),a(t))};a(t);var u,y,z,B,v=function(){if((z=b.offsetWidth)!=u||(B=b.offsetHeight)!=y)q=!0,u=z,y=B;g()},H=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};H(d,"scroll",v);H(f,"scroll",v)}var u=function(){GraphViewer.resizeSensorEnabled&&c()},z=Object.prototype.toString.call(e),B="[object Array]"===z||"[object NodeList]"===z||"[object HTMLCollection]"===z||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(B)for(var z=0,d=e.length;z<d;z++)q(e[z],u);else q(e,u);this.detach=function(){if(B)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
 b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
 (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txt
index 5e1c46d65..9c1b9b3a5 100644
--- a/src/main/webapp/resources/dia_lt.txt
+++ b/src/main/webapp/resources/dia_lt.txt
@@ -1,328 +1,328 @@
 # *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*
 # https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
-about=About 
-aboutDrawio=About draw.io
-accessDenied=Access Denied
-action=Action
-actualSize=Actual Size
-add=Add
-addAccount=Add account
-addedFile=Added {1}
-addImages=Add Images
-addImageUrl=Add Image URL
-addLayer=Add Layer
-addProperty=Add Property
-address=Address
-addToExistingDrawing=Add to Existing Drawing
-addWaypoint=Add Waypoint
-adjustTo=Adjust to
-advanced=Advanced
-align=Align
-alignment=Alignment
-allChangesLost=All changes will be lost!
-allPages=All Pages
-allProjects=All Projects
+about=Apie
+aboutDrawio=Apie draw.io
+accessDenied=Prieiga draudžiama
+action=Veiksmas
+actualSize=Esamas dydis
+add=PridÄ—ti
+addAccount=PridÄ—ti paskyrÄ…
+addedFile=PridÄ—ta
+addImages=Pridėti paveikslėlį
+addImageUrl=PridÄ—ti paveikslÄ—lio nuorodÄ…
+addLayer=Pridėti sluoksnį
+addProperty=PridÄ—ti savybÄ™
+address=Adresas
+addToExistingDrawing=Pridėti prie esamo piešinio
+addWaypoint=Pridėti atskaitos tašką
+adjustTo=Pritaikyti
+advanced=IÅ¡plÄ—stinis
+align=Lygiuoti
+alignment=Lygiavimas
+allChangesLost=Visi pakeitimai bus prarasti!
+allPages=Visi puslapiai
+allProjects=Visi projektai
 allSpaces=All Spaces
-allTags=All Tags
-anchor=Anchor
+allTags=Visos žymės
+anchor=Inkaras
 android=Android
-angle=Angle
-arc=Arc
-areYouSure=Are you sure?
-ensureDataSaved=Please ensure your data is saved before closing.
-allChangesSaved=All changes saved
-allChangesSavedInDrive=All changes saved in Drive
-allowPopups=Allow pop-ups to avoid this dialog.
-allowRelativeUrl=Allow relative URL
-alreadyConnected=Nodes already connected
-apply=Apply
+angle=Kampas
+arc=Lankas
+areYouSure=Ar tu tuo tikras?
+ensureDataSaved=Prieš uždarydami įsitikinkite, kad jūsų duomenys buvo išsaugoti.
+allChangesSaved=Visi pakeitimai išsaugoti
+allChangesSavedInDrive=Visi pakeitimai išsaugoti diske
+allowPopups=Leiskite iššokantiems langams, kad išvengti šio dialogo lango.
+allowRelativeUrl=Leisti susijusį adresą
+alreadyConnected=Mazgai jau prijungti
+apply=Pritaikyti
 archiMate21=ArchiMate 2.1
-arrange=Arrange
-arrow=Arrow
-arrows=Arrows
-asNew=As New
-atlas=Atlas
-author=Author
-authorizationRequired=Authorization required
-authorizeThisAppIn=Authorize this app in {1}:
-authorize=Authorize
-authorizing=Authorizing
-automatic=Automatic
-autosave=Autosave
-autosize=Autosize
-attachments=Attachments
+arrange=Surūšiuoti
+arrow=RodyklÄ—
+arrows=RodyklÄ—s
+asNew=Kaip naujas
+atlas=Atlasas
+author=Autorius
+authorizationRequired=Reikalingas leidimas
+authorizeThisAppIn=Įgaliokite šią programą per {1}:
+authorize=Leisti
+authorizing=Leidimas
+automatic=Automatinis
+autosave=Automatinis išsaugojimas
+autosize=Automatizuoti
+attachments=Priedai
 aws=AWS
 aws3d=AWS 3D
 azure=Azure
-back=Back
-background=Background
-backgroundColor=Background Color
-backgroundImage=Background Image
-basic=Basic
-blankDrawing=Blank Drawing
-blankDiagram=Blank Diagram
-block=Block
-blockquote=Blockquote
+back=Atgal
+background=Fonas
+backgroundColor=Fono spalva
+backgroundImage=Fono pavaikslÄ—lis
+basic=Pagrindinis
+blankDrawing=Naujas piešinys
+blankDiagram=Nauja diagrama
+block=Blokas
+blockquote=Citata
 blog=Blog
-bold=Bold
+bold=Ryškus
 bootstrap=Bootstrap
-border=Border
-borderColor=Border Color
-borderWidth=Border Width
-bottom=Bottom
-bottomAlign=Bottom Align
-bottomLeft=Bottom Left
-bottomRight=Bottom Right
+border=Linija
+borderColor=Linijos spalva
+borderWidth=Linijos storis
+bottom=Apačia
+bottomAlign=ApatinÄ— lygiuotÄ—
+bottomLeft=Apačia kairė
+bottomRight=Apačia dešinė
 bpmn=BPMN
-browser=Browser
-bulletedList=Bulleted List
-business=Business
-busy=Operation in progress
-cabinets=Cabinets
-cancel=Cancel
-center=Center
-cannotLoad=Load attempts failed. Please try again later.
-cannotLogin=Log in attempts failed. Please try again later.
-cannotOpenFile=Cannot open file
-change=Change
-changeOrientation=Change Orientation
-changeUser=Change user
-changeStorage=Change storage
-changesNotSaved=Changes have not been saved
+browser=Naršyklė
+bulletedList=Išvardytas sąrašas
+business=Verslas
+busy=Veiksmas vykdomas
+cabinets=SpintelÄ—s
+cancel=Baigti
+center=Centruoti
+cannotLoad=Nepavyko įkelti. Pabandykite dar kartą vėliau.
+cannotLogin=Nepavyko prisijungti. Pabandykite dar kartÄ… vÄ—liau.
+cannotOpenFile=Nepavyko atidaryti failo
+change=Pakeisti
+changeOrientation=Keisti orientacijÄ…
+changeUser=Pakeisti vartotojÄ…
+changeStorage=Pakeisti saugyklÄ…
+changesNotSaved=Pakeitimai neišsaugoti
 classDiagram=Class Diagram
-userJoined={1} has joined
-userLeft={1} has left
-chatWindowTitle=Chat
-chooseAnOption=Choose an option
-chromeApp=Chrome App
-collaborativeEditingNotice=Important Notice for Collaborative Editing
-compressed=Compressed
-commitMessage=Commit Message
-configLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!
-configLinkConfirm=Click OK to configure and restart draw.io.
+userJoined={1} prisijungÄ—
+userLeft={1} paliko
+chatWindowTitle=Pokalbis
+chooseAnOption=Pasirinkite variantÄ…
+chromeApp= Chrome programa
+collaborativeEditingNotice=Svarbus pranešimas dėl bendro redagavimo
+compressed=Suspaustas
+commitMessage=Įsitraukti pranešimą
+configLinkWarn=Ši nuoroda sukonfigūruoja draw.io. Spustelėkite Gerai tik tada, jei pasitikite tuo, kas jums ją davė!
+configLinkConfirm=Spustelėkite Gerai, kad sukonfigūruotumėte ir paleistumėte draw.io iš naujo.
 csv=CSV
-dark=Dark
-diagramXmlDesc=XML File
-diagramHtmlDesc=HTML File
+dark=Tamsi
+diagramXmlDesc=XML failas
+diagramHtmlDesc=HTML failas
 diagramPngDesc=Editable Bitmap Image
 diagramSvgDesc=Editable Vector Image
 didYouMeanToExportToPdf=Did you mean to export to PDF?
-draftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.
-selectDraft=Select a draft to continue editing:
-dragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?
-dropboxCharsNotAllowed=The following characters are not allowed: \ / : ? * " |
-check=Check
+draftFound=Rastas '{1}' juodraštis. Įkelkite jį į redaktorių arba išmeskite, kad galėtumėte tęsti.
+selectDraft=Pasirinkite juodraštį, kad galėtumėte tęsti redagavimą:
+dragAndDropNotSupported=Vaizdų vilkimas nepalaikomas. Ar norėtumėte importuoti?
+dropboxCharsNotAllowed=Šie simboliai neleidžiami: \ /:? * “|
+check=Patikrink
 checksum=Checksum
-circle=Circle
+circle=Ratas
 cisco=Cisco
-classic=Classic
-clearDefaultStyle=Clear Default Style
-clearWaypoints=Clear Waypoints
-clipart=Clipart
-close=Close
+classic=Klasikinis
+clearDefaultStyle=Išvalyti numatytąjį stilių
+clearWaypoints=Išvalyti kelio taškus
+clipart=Iliustracijos
+close=Uždarytis
 closingFile=Closing file
-collaborator=Collaborator
-collaborators=Collaborators
-collapse=Collapse
-collapseExpand=Collapse/Expand
+collaborator=Pagalbininkas
+collaborators=Pagalbininkai
+collapse=Sutrauktas
+collapseExpand=Sutraukti / išplėsti
 collapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size
-collapsible=Collapsible
+collapsible=Sudedamas
 comic=Comic
-comment=Comment
-commentsNotes=Comments/Notes
-compress=Compress
+comment=Komentaras
+commentsNotes=Komentarai/Pastabos
+compress=Suspausti
 configuration=Configuration
-connect=Connect
-connecting=Connecting
-connectWithDrive=Connect with Google Drive
-connection=Connection
-connectionArrows=Connection Arrows
-connectionPoints=Connection Points
-constrainProportions=Constrain Proportions
-containsValidationErrors=Contains validation errors
-copiedToClipboard=Copied to clipboard
-copy=Copy
-copyConnect=Copy on connect
+connect=Prisijungti
+connecting=Prisijungiama
+connectWithDrive=Prisijungti prie Google Disko
+connection=Jungtis
+connectionArrows=Sujungimo rodyklÄ—s
+connectionPoints=Sujungimo taškai
+constrainProportions=Sumažinkite proporcijas
+containsValidationErrors=Yra patvirtinimo klaidų
+copiedToClipboard=Nukopijuota į mainų sritį
+copy=Kopijuoti
+copyConnect=Kopijuoti prisijungus
 copyCreated=A copy of the file was created.
-copyOf=Copy of {1}
-copyOfDrawing=Copy of Drawing
-copySize=Copy Size
-copyStyle=Copy Style
-create=Create
-createNewDiagram=Create New Diagram
-createRevision=Create Revision
-createShape=Create Shape
-crop=Crop
-curved=Curved
-custom=Custom
-current=Current
-currentPage=Current page
-cut=Cut
-dashed=Dashed
-decideLater=Decide later
-default=Default
-delete=Delete
-deleteColumn=Delete Column
-deleteLibrary401=Insufficient permissions to delete this library
-deleteLibrary404=Selected library could not be found
-deleteLibrary500=Error deleting library
-deleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?
-deleteRow=Delete Row
-description=Description
-device=Device
-diagram=Diagram
-diagramContent=Diagram Content
-diagramLocked=Diagram has been locked to prevent further data loss.
-diagramLockedBySince=The diagram is locked by {1} since {2} ago
-diagramName=Diagram Name
-diagramIsPublic=Diagram is public
-diagramIsNotPublic=Diagram is not public
-diamond=Diamond
-diamondThin=Diamond (thin)
-didYouKnow=Did you know...
-direction=Direction
-discard=Discard
-discardChangesAndReconnect=Discard Changes and Reconnect
-googleDriveMissingClickHere=Google Drive missing? Click here!
-discardChanges=Discard Changes
-disconnected=Disconnected
-distribute=Distribute
-done=Done
-doNotShowAgain=Do not show again
-dotted=Dotted
-doubleClickOrientation=Doubleclick to change orientation
-doubleClickTooltip=Doubleclick to insert text
-doubleClickChangeProperty=Doubleclick to change property name
-download=Download
-downloadDesktop=Get Desktop
-downloadAs=Download as
-clickHereToSave=Click here to save.
+copyOf=Kopija {1}
+copyOfDrawing=Dokumento kopija
+copySize=Kopijuoti dydį
+copyStyle=Kopijuoti stilių
+create=Sukurti
+createNewDiagram=Sukurkite naujÄ… schemÄ…
+createRevision=Sukurti versijÄ…
+createShape=Sukurti figūrą
+crop=Apkarpyti
+curved=IÅ¡lenktas
+custom=Nustatyti
+current=Esamas
+currentPage=Esamas puslapis
+cut=IÅ¡kirpti
+dashed=Punktyras
+decideLater=Pasirinkti vÄ—liau
+default=Pagal nutylÄ—jima
+delete=IÅ¡trinti
+deleteColumn=Ištrinti stulpelį
+deleteLibrary401=Neturite teisių ištrinti šią biblioteką
+deleteLibrary404=Pasirinkta biblioteka nerasta
+deleteLibrary500=Bibliotekos ištrynimo klaida
+deleteLibraryConfirm=Ketinate visam laikui ištrinti šią biblioteką. Ar tikrai norite tai padaryti?
+deleteRow=IÅ¡trinti eilutÄ™
+description=Apibūdinimas
+device=Įrenginys
+diagram=Diagrama
+diagramContent=Diagramos turinys
+diagramLocked=Diagrama buvo užrakinta, kad būtų išvengta tolesnio duomenų praradimo.
+diagramLockedBySince=Diagramą užrakino {1} nuo {2}
+diagramName=Diagramos vardas
+diagramIsPublic=Diagrama yra vieša
+diagramIsNotPublic=Diagrama nėra vieša
+diamond=Rombas
+diamondThin=Rombas (plonas)
+didYouKnow=Ar tu žinai...
+direction=Kryptis
+discard=Atmesti
+discardChangesAndReconnect=Atmesti pakeitimus ir vÄ—l prisijungti
+googleDriveMissingClickHere=Trūksta Google disko? Paspauskite čia!
+discardChanges=Atmesti pakeitimus
+disconnected=Atsijungta
+distribute=Paskirstyti
+done=Atlikta
+doNotShowAgain=Daugiau neberodyti
+dotted=Taškinis
+doubleClickOrientation=NorÄ—dami pakeisti orientacijÄ…, dukart spustelÄ—kite
+doubleClickTooltip=Norėdami įterpti tekstą, dukart spustelėkite
+doubleClickChangeProperty=NorÄ—dami pakeisti nuosavybÄ—s pavadinimÄ…, dukart spustelÄ—kite
+download=Parsiųsti
+downloadDesktop=Įkelti darbalaukį
+downloadAs=Atsisiųsti kaip
+clickHereToSave=Paspausk čia, kad išsaugotum.
 dpi=DPI
-draftDiscarded=Draft discarded
-draftSaved=Draft saved
-dragElementsHere=Drag elements here
-dragImagesHere=Drag images or URLs here
-dragUrlsHere=Drag URLs here
+draftDiscarded=Juodraštis pašalintas
+draftSaved=Juodraštis išsaugotas
+dragElementsHere=Nuvilkite elementus čia
+dragImagesHere=Nuvilkite paveikslėlius arba nuorodas čia
+dragUrlsHere=Nuvilkite nuorodas čia
 draw.io=draw.io
-drawing=Drawing{1}
-drawingEmpty=Drawing is empty
-drawingTooLarge=Drawing is too large
-drawioForWork=Draw.io for GSuite
+drawing=Brėžinys{1}
+drawingEmpty=Brėžinys tuščias
+drawingTooLarge=Brėžinys per didelis
+drawioForWork=Draw.io skirtas GSuite
 dropbox=Dropbox
-duplicate=Duplicate
-duplicateIt=Duplicate {1}
-divider=Divider
+duplicate=Dubliuoti
+duplicateIt=Dubliuoti {1}
+divider=Skirtukas
 dx=Dx
 dy=Dy
-east=East
-edit=Edit
-editData=Edit Data
-editDiagram=Edit Diagram
-editGeometry=Edit Geometry
-editImage=Edit Image
-editImageUrl=Edit Image URL
-editLink=Edit Link
-editShape=Edit Shape
-editStyle=Edit Style
-editText=Edit Text
-editTooltip=Edit Tooltip
-glass=Glass
-googleImages=Google Images
-imageSearch=Image Search
+east=Rytai
+edit=Redaguoti
+editData=Redaguoti duomenis
+editDiagram=Redaguoti schemÄ…
+editGeometry=Redaguoti geometrijÄ…
+editImage=Redaguoti pavaikslėlį
+editImageUrl=Redaguoti paveikslÄ—lio nuorodÄ…
+editLink=Redaguoti nuorodÄ…
+editShape=Redaguoti formÄ…
+editStyle=Redaguoti stilių
+editText=Readguoti tekstÄ…
+editTooltip=Redaguoti patarimÄ…
+glass=Stiklas
+googleImages=Google paveikslÄ—liai
+imageSearch=Paveikslėlių paieška
 eip=EIP
-embed=Embed
-embedImages=Embed Images
-mainEmbedNotice=Paste this into the page
-electrical=Electrical
-ellipse=Ellipse
-embedNotice=Paste this once at the end of the page
-enterGroup=Enter Group
-enterName=Enter Name
-enterPropertyName=Enter Property Name
-enterValue=Enter Value
-entityRelation=Entity Relation
+embed=Įterpti
+embedImages=Įterpti paveikslėlius
+mainEmbedNotice=Įklijuokite tai į puslapį
+electrical=Elektros
+ellipse=ElipsÄ—
+embedNotice=Įklijuokite tai vieną kartą puslapio pabaigoje
+enterGroup=PridÄ—ti grupÄ™
+enterName=PridÄ—ti vardÄ…
+enterPropertyName=Įveskite savybės vardą
+enterValue=Įveskite vertę
+entityRelation=Subjekto santykis
 entityRelationshipDiagram=Entity Relationship Diagram
-error=Error
-errorDeletingFile=Error deleting file
-errorLoadingFile=Error loading file
-errorRenamingFile=Error renaming file
-errorRenamingFileNotFound=Error renaming file. File was not found.
-errorRenamingFileForbidden=Error renaming file. Insufficient access rights.
-errorSavingDraft=Error saving draft
-errorSavingFile=Error saving file
-errorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.
-errorSavingFileForbidden=Error saving file. Insufficient access rights.
-errorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.
-errorSavingFileNotFound=Error saving file. File was not found.
-errorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.
-errorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.
-errorSendingFeedback=Error sending feedback.
-errorUpdatingPreview=Error updating preview.
-exit=Exit
-exitGroup=Exit Group
-expand=Expand
-export=Export
-exporting=Exporting
-exportAs=Export as
-exportOptionsDisabled=Export options disabled
-exportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.
-externalChanges=External Changes
-extras=Extras
+error=Klaida
+errorDeletingFile=Klaida ištrinant failą
+errorLoadingFile=Klaida įkeliant failą
+errorRenamingFile=Klaida pervardinant failÄ…
+errorRenamingFileNotFound=Klaida pervardinant failÄ…. Failas nerastas.
+errorRenamingFileForbidden=Klaida pervardijant failÄ…. Nepakankamos prieigos teisÄ—s.
+errorSavingDraft=Klaida išsaugant juodraštį
+errorSavingFile=Klaida išsaugant failą
+errorSavingFileUnknown=Klaida suteikiant prieigą prie Google serverių. Įkelkite puslapį iš naujo, kad pabandytumėte dar kartą.
+errorSavingFileForbidden=Klaida išsaugojant failą. Nepakankamos prieigos teisės.
+errorSavingFileNameConflict=Nepavyko išsaugoti diagramos. Dabartiniame puslapyje jau yra failas pavadinimu '{1}'.
+errorSavingFileNotFound=Klaida išsaugojant failą. Failas nerastas.
+errorSavingFileReadOnlyMode=Nepavyko išsaugoti diagramos, kai aktyvus tik skaitymo režimas.
+errorSavingFileSessionTimeout=Jūsų sesija baigėsi. Prašau <a target='_blank' href='{1}'> {2} </a> ir grįžkite į šį skirtuką, kad pabandytumėte išsaugoti dar kartą.
+errorSendingFeedback=Siunčiant atsiliepimą įvyko klaida.
+errorUpdatingPreview=Atnaujinant peržiūrą įvyko klaida.
+exit=IÅ¡eiti
+exitGroup=Išeiti iš grupės
+expand=IÅ¡skleisti
+export=Exportuoti
+exporting=Eksportuoja
+exportAs=Exportuoti kaip
+exportOptionsDisabled=Eksportavimo parinktys neleidžiamos
+exportOptionsDisabledDetails=Savininkas išjungė šio failo komentatorių ir žiūrinčiųjų atsisiuntimo, spausdinimo ar kopijavimo parinktis.
+externalChanges=Failas pakeistas
+extras=Priedai
 facebook=Facebook
-failedToSaveTryReconnect=Failed to save, trying to reconnect
-featureRequest=Feature Request
-feedback=Feedback
-feedbackSent=Feedback successfully sent.
-floorplans=Floorplans
-file=File
-fileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?
-fileChangedSyncDialog=The file has been modified. Do you want to synchronize those changes?
-fileChangedSync=The file has been modified. Click here to synchronize.
-overwrite=Overwrite
-synchronize=Synchronize
-filename=Filename
-fileExists=File already exists
-fileMovedToTrash=File was moved to trash
-fileNearlyFullSeeFaq=File nearly full, please see FAQ
-fileNotFound=File not found
-repositoryNotFound=Repository not found
-fileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.
-fileNotLoaded=File not loaded
-fileNotSaved=File not saved
-fileOpenLocation=How would you like to open these file(s)?
-filetypeHtml=.html causes file to save as HTML with redirect to cloud URL
-filetypePng=.png causes file to save as PNG with embedded data
-filetypeSvg=.svg causes file to save as SVG with embedded data
-fileWillBeSavedInAppFolder={1} will be saved in the app folder.
-fill=Fill
-fillColor=Fill Color
-filterCards=Filter Cards
-find=Find
-fit=Fit
-fitContainer=Resize Container
-fitIntoContainer=Fit into Container
-fitPage=Fit Page
-fitPageWidth=Fit Page Width
-fitTo=Fit to
-fitToSheetsAcross=sheet(s) across
-fitToBy=by
-fitToSheetsDown=sheet(s) down
-fitTwoPages=Two Pages
-fitWindow=Fit Window
-flip=Flip
-flipH=Flip Horizontal
-flipV=Flip Vertical
-flowchart=Flowchart
-folder=Folder
-font=Font
-fontColor=Font Color
-fontFamily=Font Family
-fontSize=Font Size
-forbidden=You are not authorized to access this file
-format=Format
-formatPanel=Format Panel
-formatted=Formatted
-formattedText=Formatted Text
+failedToSaveTryReconnect=Nepavyko išsaugoti, bandoma prisijungti iš naujo
+featureRequest=Funkcijos užklausa
+feedback=Atsiliepimai
+feedbackSent=Atsiliepimai sėkmingai išsiųsti.
+floorplans=Aukštų planai
+file=Failas
+fileChangedOverwriteDialog=Failas buvo modifikuotas. Ar norite išsaugoti failą ir perrašyti tuos pakeitimus?
+fileChangedSyncDialog=Failas buvo modifikuotas. Ar norite sinchronizuoti tuos pakeitimus?
+fileChangedSync=Failas buvo modifikuotas. Spustelėkite čia norėdami sinchronizuoti.
+overwrite=Perrašyti
+synchronize=Sinchronizuoti
+filename=Failo vardas
+fileExists=Failas jau yra
+fileMovedToTrash=Failas perkeltas į šiukšliadėžę
+fileNearlyFullSeeFaq=Byla beveik pilna, skaitykite DUK
+fileNotFound=Failas nerastas
+repositoryNotFound=Saugykla nerasta
+fileNotFoundOrDenied=Failas nerastas. Jo nÄ—ra arba neturite prieigos.
+fileNotLoaded=Failas neįkeltas
+fileNotSaved=Failas neišsaugotas
+fileOpenLocation=Kaip norÄ—tumÄ—te atidaryti Å¡iuos failÄ…(us)?
+filetypeHtml=Plėtinys .html sukelia failo išsaugojimą kaip HTML su peradresavimu į debesies nuorodą
+filetypePng=Plėtinys .png sukelia failo išsaugojimą kaip PNG su įterptais duomenimis
+filetypeSvg=Plėtinys .svg sukelia failo išsaugojimą kaip PNG su įterptais duomenimis
+fileWillBeSavedInAppFolder={1} bus išsaugotas programos aplanke.
+fill=Užpildas
+fillColor=Užpildo spalva
+filterCards=Filtruoti korteles
+find=Rasti
+fit=Pritaikyti
+fitContainer=Keisti konteinerio dydį
+fitIntoContainer=Pritaikyti į konteinerį
+fitPage=Pagal puslapio dydį
+fitPageWidth=Pagal puslapio plotį
+fitTo=Pritaikyti prie
+fitToSheetsAcross=lapas (ai) skersai
+fitToBy=į
+fitToSheetsDown=lapas (ai) žemyn
+fitTwoPages=Du puslapiai
+fitWindow=Talpinti į langą
+flip=Apversti
+flipH=Pasukiti iš kairės į dešinę
+flipV=Apverskiti į apačią
+flowchart=BlokinÄ— schema
+folder=Katalogas
+font=Å riftas
+fontColor=Å rifto spalva
+fontFamily=Šriftų šeima
+fontSize=Å rifto dydis
+forbidden=Jums nÄ—ra suteikta prieiga prie Å¡io failo
+format=Formatas
+formatPanel=Formatavimo juosta
+formatted=Suformatuota
+formattedText=Suformatuotas tekstas
 formatPng=PNG
 formatGif=GIF
 formatJpg=JPEG
@@ -330,248 +330,248 @@ formatPdf=PDF
 formatSql=SQL
 formatSvg=SVG
 formatHtmlEmbedded=HTML
-formatSvgEmbedded=SVG (with XML)
+formatSvgEmbedded=SVG (su XML)
 formatVsdx=VSDX
 formatVssx=VSSX
-formatXmlPlain=XML (Plain)
+formatXmlPlain=XML (standartinis)
 formatXml=XML
-forum=Discussion/Help Forums
+forum=Diskusijų / pagalbos forumai
 freehand=Freehand
-fromTemplate=From Template
-fromTemplateUrl=From Template URL
-fromText=From Text
-fromUrl=From URL
-fromThisPage=From this page
-fullscreen=Fullscreen
-gap=Gap
+fromTemplate=IÅ¡ Å¡ablono
+fromTemplateUrl=IÅ¡ Å¡ablono pagal nuorodÄ…
+fromText=IÅ¡ teksto
+fromUrl=IÅ¡ nuorodos
+fromThisPage=IÅ¡ Å¡ito puslapio
+fullscreen=Per visÄ… ekranÄ…
+gap=Tarpas
 gcp=GCP
-general=General
+general=Pagrindinis
 github=GitHub
 gitlab=GitLab
 gliffy=Gliffy
-global=Global
+global=Pasaulinis
 googleDocs=Google Docs
 googleDrive=Google Drive
 googleGadget=Google Gadget
 googlePlus=Google+
-googleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:
-googleSlides=Google Slides
-googleSites=Google Sites
+googleSharingNotAvailable=Bendrinimas galimas tik naudojant Google diskÄ…. SpustelÄ—kite nuorodÄ… Atidaryti ir bendrinkite naudodami meniu komandas:
+googleSlides=Google skaidrÄ—s
+googleSites=Google svetainÄ—s
 googleSheets=Google Sheets
-gradient=Gradient
-gradientColor=Color
-grid=Grid
-gridColor=Grid Color
-gridSize=Grid Size
-group=Group
-guides=Guides
-hateApp=I hate draw.io
-heading=Heading
-height=Height
-help=Help
-helpTranslate=Help us translate this application
-hide=Hide
-hideIt=Hide {1}
-hidden=Hidden
-home=Home
-horizontal=Horizontal
-horizontalFlow=Horizontal Flow
-horizontalTree=Horizontal Tree
-howTranslate=How good is the translation in your language?
+gradient=Gradientas
+gradientColor=Spalva
+grid=Tinklelis
+gridColor=Tinklelio spalva
+gridSize=Tinklelio dydis
+group=Grupuoti
+guides=Kreiptuvai
+hateApp=Dabar negaliu draw.io
+heading=Antraštė
+height=Aukštis
+help=Pagalba
+helpTranslate=Padėkite mums išversti šią programą
+hide=PaslÄ—pti
+hideIt=PaslÄ—pti {1}
+hidden=PaslÄ—ptas
+home=Į pagrindinį
+horizontal=Horizontalus
+horizontalFlow=Horizontalusis srautas
+horizontalTree=Horizontalus medis
+howTranslate=Ar geras vertimas į jūsų kalbą?
 html=HTML
-htmlText=HTML Text
+htmlText=HTML tekstas
 id=ID
 iframe=IFrame
-ignore=Ignore
-image=Image
-imageUrl=Image URL
-images=Images
-imagePreviewError=This image couldn't be loaded for preview. Please check the URL.
-imageTooBig=Image too big
+ignore=Nepaisyti
+image=PaveikslÄ—lis
+imageUrl=PaveikslÄ—lio nuoroda
+images=PaveikslÄ—liai
+imagePreviewError=Nepavyko įkelti šio vaizdo peržiūrai. Patikrinkite nuorodą.
+imageTooBig=PaveikslÄ—lis per didelis
 imgur=Imgur
-import=Import
-importFrom=Import from
-includeCopyOfMyDiagram=Include a copy of my diagram
-increaseIndent=Increase Indent
-decreaseIndent=Decrease Indent
-insert=Insert
-insertColumnBefore=Insert Column Left
-insertColumnAfter=Insert Column Right
-insertEllipse=Insert Ellipse
-insertImage=Insert Image
-insertHorizontalRule=Insert Horizontal Rule
-insertLink=Insert Link
-insertPage=Insert Page
-insertRectangle=Insert Rectangle
-insertRhombus=Insert Rhombus
-insertRowBefore=Insert Row Above
-insertRowAfter=Insert Row After
+import=Importuoti
+importFrom=Importuoti iš
+includeCopyOfMyDiagram=Įtraukite mano schemos kopiją
+increaseIndent=Padidinti įtrauką
+decreaseIndent=Sumažinti įtrauką
+insert=Įterpti
+insertColumnBefore=Įterpti stulpelį kairėje
+insertColumnAfter=Įterpti stulpelį dešinėje
+insertEllipse=Įdėkite elipsę
+insertImage=Įterpti paveikslėlį
+insertHorizontalRule=Įdėkite horizontalų kreipiklį
+insertLink=Įdėti nuorodą
+insertPage=Įdėti puslapį
+insertRectangle=Įdėkite stačiakampį
+insertRhombus=Įdėkite rombą
+insertRowBefore=Įterpti eilutę aukščiau
+insertRowAfter=Įterpti eilutę žemiau
 insertText=Insert Text
-inserting=Inserting
+inserting=Įterpimas
 installApp=Install App
-invalidFilename=Diagram names must not contain the following characters: \ / | : ; { } < > & + ? = "
-invalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.
-invalidInput=Invalid input
-invalidName=Invalid name
-invalidOrMissingFile=Invalid or missing file
-invalidPublicUrl=Invalid public URL
-isometric=Isometric
-ios=iOS
-italic=Italic
+invalidFilename=Diagramos pavadinimuose neturi būti šių simbolių: \ / | :; {} <> & +? = "
+invalidLicenseSeeThisPage=Jūsų licencija negalioja. Peržiūrėkite šį <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin"> puslapį </a>.
+invalidInput=Neteisinga įvestis
+invalidName=Neteisingas vardas
+invalidOrMissingFile=Netinkamas failas arba jo nÄ—ra
+invalidPublicUrl=Neteisinga nuoroda
+isometric=Izometrinis
+ios=IOS
+italic=Kursyvas
 kennedy=Kennedy
-keyboardShortcuts=Keyboard Shortcuts
-layers=Layers
-landscape=Landscape
-language=Language
-leanMapping=Lean Mapping
-lastChange=Last change {1} ago
-lessThanAMinute=less than a minute
-licensingError=Licensing Error
-licenseHasExpired=The license for {1} has expired on {2}. Click here.
-licenseWillExpire=The license for {1} will expire on {2}. Click here.
+keyboardShortcuts=Spartieji klavišai
+layers=Sluoksniai
+landscape=Peizažas
+language=Kalba
+leanMapping=VertÄ—s srautai
+lastChange=Paskutinis pakeitimas prieš {1}
+lessThanAMinute=mažiau nei minutė
+licensingError=Licencijavimo klaida
+licenseHasExpired={1} licencijos galiojimas baigėsi {2}. Paspauskite čia.
+licenseWillExpire={1} licencijos galiojimas baigsis {2}. Paspauskite čia.
 lineJumps=Line jumps
-linkAccountRequired=If the diagram is not public a Google account is required to view the link.
-linkText=Link Text
-list=List
+linkAccountRequired=Jei schema nėra vieša, norint peržiūrėti saitą reikia Google paskyros.
+linkText=Nuorodos tekstas
+list=Sąrašas
 minute=minute
-minutes=minutes
-hours=hours
-days=days
-months=months
-years=years
-restartForChangeRequired=Changes will take effect after a restart of the application.
-laneColor=Lanecolor
-lastModified=Last modified
-layout=Layout
-left=Left
-leftAlign=Left Align
-leftToRight=Left to right
-libraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.
-lightbox=Lightbox
-line=Line
-lineend=Line end
-lineheight=Line Height
-linestart=Line start
-linewidth=Linewidth
-link=Link
-links=Links
-loading=Loading
-lockUnlock=Lock/Unlock
-loggedOut=Logged Out
-logIn=log in
-loveIt=I love {1}
+minutes=minučių
+hours=valandų
+days=dienų
+months=mėnesių
+years=metų
+restartForChangeRequired=Pakeitimai įsigalios iš naujo paleidus programą.
+laneColor=Takelio spalva
+lastModified=Paskutiniai pakeitimai
+layout=IÅ¡dÄ—stymas
+left=KairÄ—je
+leftAlign=Lygiuoti kairÄ—je
+leftToRight=Iš kairės į dešinę
+libraryTooltip=Nuvilkite figūras čia arba spustelėkite +, kad įterptumėte. Dukart spustelėkite, jei norite redaguoti.
+lightbox=Galerija
+line=Linija
+lineend=Linijos galas
+lineheight=Linijos aukštis
+linestart=Linijos pradžia
+linewidth=Linijos storis
+link=Nuoroda
+links=Nuorodos
+loading=Įkėlimas
+lockUnlock=Užrakinti/Atrakinti
+loggedOut=Atsijungęs
+logIn=Prisijungti
+loveIt=Man patinka {1}
 lucidchart=Lucidchart
-maps=Maps
-mathematicalTypesetting=Mathematical Typesetting
-makeCopy=Make a Copy
-manual=Manual
+maps=Žemėlapiai
+mathematicalTypesetting=Matematinis rinkinys
+makeCopy=Sukurti kopijÄ…
+manual=Rankinis
 mermaid=Mermaid
 microsoftOffice=Microsoft Office
 microsoftExcel=Microsoft Excel
 microsoftPowerPoint=Microsoft PowerPoint
 microsoftWord=Microsoft Word
-middle=Middle
-minimal=Minimal
-misc=Misc
-mockups=Mockups
-modificationDate=Modification date
-modifiedBy=Modified by
-more=More
-moreResults=More Results
-moreShapes=More Shapes
-move=Move
-moveToFolder=Move to Folder
-moving=Moving
-moveSelectionTo=Move selection to {1}
-name=Name
-navigation=Navigation
-network=Network
-networking=Networking
-new=New
-newLibrary=New Library
-nextPage=Next Page
+middle=Vidurys
+minimal=Minimalus
+misc=Įvairūs
+mockups=Maketai
+modificationDate=Pakeitimo data
+modifiedBy=Pakeistas
+more=Daugiau
+moreResults=Daugiau rezultatų
+moreShapes=Daugiau figūrų
+move=Perkelti
+moveToFolder=Perkelti į aplanką
+moving=Perkeliu
+moveSelectionTo=Perkelti pasirinkinktą į {1}
+name=Pavadinimas
+navigation=Navigacija
+network=Tinklas
+networking=Tinkle
+new=Sukurti
+newLibrary=Nauja biblioteka
+nextPage=Kitas puslapis
 no=Ne
-noPickFolder=No, pick folder
-noAttachments=No attachments found
-noColor=No Color
-noFiles=No Files
-noFileSelected=No file selected
-noLibraries=No libraries found
-noMoreResults=No more results
-none=None
-noOtherViewers=No other viewers
-noPlugins=No plugins
-noPreview=No preview
-noResponse=No response from server
-noResultsFor=No results for '{1}'
-noRevisions=No revisions
-noSearchResults=No search results found
-noPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet
-normal=Normal
-north=North
-notADiagramFile=Not a diagram file
-notALibraryFile=Not a library file
-notAvailable=Not available
-notAUtf8File=Not a UTF-8 file
-notConnected=Not connected
-note=Note
+noPickFolder=Ne, rinkis aplankÄ…
+noAttachments=Nerasta jokių priedų
+noColor=Bespalvis
+noFiles=Nėra failų
+noFileSelected=Nepasirinktas failas
+noLibraries=Nerasta bibliotekų
+noMoreResults=Nėra kitų rezultatų
+none=Nieko
+noOtherViewers=Jokių kitų žiūrovų
+noPlugins=Nėra papildinių
+noPreview=Nėra peržiūros
+noResponse=Serveris neatsako
+noResultsFor=Rezultatų nėra '{1}'
+noRevisions=Nereikia taisyti
+noSearchResults=Paieškos rezultatų nerasta
+noPageContentOrNotSaved=Šiame puslapyje nerasta jokių žymių arba jis dar neišsaugotas
+normal=Paprastas
+north=Å iaurÄ—
+notADiagramFile=Ne schemos failas
+notALibraryFile=Ne bibliotekos failas
+notAvailable=Nepasiekiamas
+notAUtf8File=Failo koduotÄ— ne UTF-8
+notConnected=Neprisijungta
+note=Pastaba
 notSatisfiedWithImport=Not satisfied with the import?
-notUsingService=Not using {1}?
-numberedList=Numbered list
-offline=Offline
+notUsingService=Ar nenorite naudoti {1}?
+numberedList=Sunumeruotas sąrašas
+offline=Neprisijungęs
 ok=OK
 oneDrive=OneDrive
-online=Online
-opacity=Opacity
-open=Open
-openArrow=Open Arrow
-openExistingDiagram=Open Existing Diagram
-openFile=Open File
-openFrom=Open from
-openLibrary=Open Library
-openLibraryFrom=Open Library from
-openLink=Open Link
-openInNewWindow=Open in New Window
-openInThisWindow=Open in This Window
-openIt=Open {1}
-openRecent=Open Recent
-openSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy
-options=Options
-organic=Organic
+online=Prisijungęs
+opacity=Neskaidrus
+open=Atverti
+openArrow=Nedažyta rodyklė
+openExistingDiagram=Atverti savo schemÄ…
+openFile=Atverti failÄ…
+openFrom=Atverti iš
+openLibrary=Atverti bibliotekÄ…
+openLibraryFrom=Averti biblioteką iš
+openLink=Atverti nuorodÄ…
+openInNewWindow=Atverti naujame lange
+openInThisWindow=Atidarykite Å¡iame lange
+openIt=Atverti {1}
+openRecent=Atidaryti naujausiÄ…
+openSupported=Palaikomi formatai yra failai, išsaugoti iš šios programinės įrangos (.xml), .vsdx ir .gliffy
+options=Parametrai
+organic=Susistemintas
 orgChart=Org Chart
-orthogonal=Orthogonal
-otherViewer=other viewer
-otherViewers=other viewers
-outline=Outline
-oval=Oval
-page=Page
-pageContent=Page Content
-pageNotFound=Page not found
-pageWithNumber=Page-{1}
-pages=Pages
-pageView=Page View
-pageSetup=Page Setup
-pageScale=Page Scale
-pan=Pan
-panTooltip=Space+Drag to pan
-paperSize=Paper Size
-pattern=Pattern
-paste=Paste
-pasteHere=Paste here
-pasteSize=Paste Size
-pasteStyle=Paste Style
-perimeter=Perimeter
-permissionAnyone=Anyone can edit
-permissionAuthor=Owner and admins can edit
-pickFolder=Pick a folder
-pickLibraryDialogTitle=Select Library
-publicDiagramUrl=Public URL of the diagram
+orthogonal=Statūs kampai
+otherViewer=kitas žiūrovas
+otherViewers=kiti žiūrovai
+outline=Kontūras
+oval=Ovalus
+page=Puslapis
+pageContent=Puslapio turinys
+pageNotFound=Puslapis nerastas
+pageWithNumber=Puslapis-{1}
+pages=Puslapiai
+pageView=Puslapio peržiūra
+pageSetup=Puslapio nustatymai
+pageScale=Puslapio mastelis
+pan=Panorama
+panTooltip=Laikykite nuspaudę tarpo klavišą ir judinkite žymeklį, norėdami slinkti per schemą
+paperSize=Popieriaus dydis
+pattern=Å ablonas
+paste=Įklijuoti
+pasteHere=Įklijuoti čia
+pasteSize=Įklijuoti dydį
+pasteStyle=Įklijuoti stilių
+perimeter=Perimetras
+permissionAnyone=Redaguoti gali bet kas
+permissionAuthor=Redaguoti gali tik savininkas arba administratorius
+pickFolder=Pasirinkite aplankÄ…
+pickLibraryDialogTitle=Pasirinkite BibliotekÄ…
+publicDiagramUrl=Vieša nuoroda į schemą
 placeholders=Placeholders
 plantUml=PlantUML
-plugins=Plugins
-pluginUrl=Plugin URL
+plugins=Papildiniai
+pluginUrl=Papildinio nuoroda
 pluginWarning=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
-plusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).
+plusTooltip=Spustelėkite, jei norite prisijungti ir klonuoti („Ctrl“ + spustelėkite, jei norite klonuoti, „Shift“ + spustelėkite, norėdami prisijungti). Vilkite, kad prisijungtumėte („Ctrl“ + vilkite, norėdami klonuoti).
 portrait=Portrait
 position=Position
 posterPrint=Poster Print
diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txt
index 3da6d6479..42c517ab5 100644
--- a/src/main/webapp/resources/dia_nl.txt
+++ b/src/main/webapp/resources/dia_nl.txt
@@ -98,17 +98,17 @@ chromeApp=Chrome App
 collaborativeEditingNotice=Belangrijke opmerking i.v.m. gezamenlijk bewerken 
 compressed=Gecomprimeerd
 commitMessage=Bericht vastleggen
-configLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!
-configLinkConfirm=Click OK to configure and restart draw.io.
+configLinkWarn=Deze koppeling verwijst naar de instellingen van draw.io. Klik hier alleen op als je degene van wie je deze hebt gekregen vertrouwt.
+configLinkConfirm=Klik OK om draw.io in te stellen en opnieuw te starten.
 csv=CSV
 dark=Donker
-diagramXmlDesc=XML File
-diagramHtmlDesc=HTML File
-diagramPngDesc=Editable Bitmap Image
-diagramSvgDesc=Editable Vector Image
-didYouMeanToExportToPdf=Did you mean to export to PDF?
+diagramXmlDesc=XML-bestand
+diagramHtmlDesc=HTML-bestand
+diagramPngDesc=Bewerkbaar bitmap-bestand
+diagramSvgDesc=Bewerkbaar vector-bestand
+didYouMeanToExportToPdf=Wil je exporteren naar PDF?
 draftFound=Een concept van '{1}' is gevonden. Laad het in de editor of negeer het om door te gaan.
-selectDraft=Select a draft to continue editing:
+selectDraft=Selecteer een concept om door te gaan met bewerken:
 dragAndDropNotSupported=Slepen en plaatsen is niet beschikbaar voor afbeeldingen. Wilt u in plaats daarvan importeren?
 dropboxCharsNotAllowed=De volgende tekens zijn niet toegestaan: \ / : ? * " |
 check=Controleren
@@ -156,7 +156,7 @@ crop=Bijsnijden
 curved=Gewelfd
 custom=Aangepast
 current=Huidig
-currentPage=Current page
+currentPage=Huidige pagina
 cut=Knippen
 dashed=Gestreept
 decideLater=Later beslissen
@@ -188,7 +188,7 @@ discardChanges=Wijzigingen negeren
 disconnected=Verbinding verbroken
 distribute=Distribueren
 done=Klaar
-doNotShowAgain=Do not show again
+doNotShowAgain=Dit niet meer laten zien
 dotted=Gestippeld
 doubleClickOrientation=Dubbelklik om oriëntatie te wijzigen
 doubleClickTooltip=Dubbelklik om tekst in te voegen
@@ -241,7 +241,7 @@ enterName=Naam invullen
 enterPropertyName=Eigenschapsnaam invullen
 enterValue=Waarde invullen
 entityRelation=Entiteitsrelatie
-entityRelationshipDiagram=Entity Relationship Diagram
+entityRelationshipDiagram=Entiteitsrelatie-diagram
 error=Fout
 errorDeletingFile=Fout bij verwijderen bestand
 errorLoadingFile=Fout bij laden bestand
@@ -282,7 +282,7 @@ overwrite=Overschrijven
 synchronize=Synchroniseren
 filename=Bestandsnaam
 fileExists=Bestand bestaat al
-fileMovedToTrash=File was moved to trash
+fileMovedToTrash=Bestand is naar prullenbak verplaatst
 fileNearlyFullSeeFaq=Bestand bijna vol, bekijk Veelgestelde vragen
 fileNotFound=Bestand niet gevonden
 repositoryNotFound=Opslaglocatie niet gevonden
@@ -336,7 +336,7 @@ formatVssx=VSSX
 formatXmlPlain=XML (basis)
 formatXml=XML
 forum=Discussie-/Helpforums
-freehand=Vrije hand
+freehand=Uit de vrije hand
 fromTemplate=Van sjabloon
 fromTemplateUrl=Van sjabloon-URL
 fromText=Van tekst
@@ -408,7 +408,7 @@ insertRowBefore=Rij bovenaan invoegen
 insertRowAfter=Rij onderaan invoegen
 insertText=Tekst invoegen
 inserting=Invoegen
-installApp=Install App
+installApp=App installeren
 invalidFilename=Een Diagramnaam mag niet de volgende tekens bevatten: \ / | : ; { } < > & + ? = "
 invalidLicenseSeeThisPage=Uw licentie is ongeldig, bekijk deze <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">pagina</a>.
 invalidInput=Ingeldige invoer
@@ -515,7 +515,7 @@ notAvailable=Niet beschikbaar
 notAUtf8File=Geen UTF-8-bestand
 notConnected=Niet verbonden
 note=Opmerking
-notSatisfiedWithImport=Not satisfied with the import?
+notSatisfiedWithImport=Niet tevreden over deze import?
 notUsingService=Gebruikt u {1} niet?
 numberedList=Genummerde lijst
 offline=Offline
@@ -538,7 +538,7 @@ openRecent=Recent geopend
 openSupported=Ondersteunde formaten zijn bestanden opgeslagen vanuit deze software (,xml), .vsdx en .gliffy
 options=Opties
 organic=Organisch
-orgChart=Org Chart
+orgChart=Organigram
 orthogonal=Orthogonaal
 otherViewer=andere bekijker
 otherViewers=andere bekijkers
@@ -553,7 +553,7 @@ pageView=Paginaweergave
 pageSetup=Pagina-instelling
 pageScale=Paginaschaal
 pan=Zoomen
-panTooltip=Spatie+slepen om te zoomen
+panTooltip=Spatie + slepen om te zoomen
 paperSize=Papiergrootte
 pattern=Patroon
 paste=Plakken
@@ -645,7 +645,7 @@ saveDiagramFirst=Sla het diagram eerst op
 saveDiagramsTo=Diagrammen opslaan naar
 saveLibrary403=Onvoldoende rechten om deze bibliotheek te bewerken
 saveLibrary500=Er is een fout opgetreden bij het opslaan van de bibliotheek
-saveLibraryReadOnly=Could not save library while read-only mode is active
+saveLibraryReadOnly=De bibliotheek kan niet worden opgeslagen in alleen-lezen modus
 saving=Opslaan
 scratchpad=Pallet
 scrollbars=Schuifbalken
@@ -701,7 +701,7 @@ subscript=Subscript
 summary=Samenvatting
 superscript=Superscript
 support=Ondersteuning
-swimlaneDiagram=Swimlane Diagram
+swimlaneDiagram=Swimlane-diagram
 sysml=SysML
 tags=Labels
 table=Tabel
@@ -862,7 +862,7 @@ confEditedExt=Diagram/pagina extern bewerkt
 diagNotFound=Diagram niet aangetroffen
 confEditedExtRefresh=Diagram/pagina is extern bewerkt. Ververs de pagina.
 confCannotEditDraftDelOrExt=Kan diagrammen in een conceptpagina niet bewerken, diagram wordt van de pagina verwijderd of diagram wordt extern bewerkt. Controleer alstublieft de pagina.
-retBack=Keer terug
+retBack=Terug
 confDiagNotPublished=Het diagram hoort niet bij een gepubliceerde pagina
 createdByDraw=Gemaakt door draw.io
 filenameShort=Bestandsnaam is te kort
@@ -881,10 +881,10 @@ invalidCallFnNotFound=Ongeldige oproep: {1} niet gevonden
 invalidCallErrOccured=Ongeldige oproep: Er is een fout opgetreden, {1}
 anonymous=Anoniem
 confGotoPage=Ga naar interne pagina
-showComments=Commentar weergeven
+showComments=Commentaar weergeven
 confError=Fout: {1}
 gliffyImport=Gliffy importeren
-gliffyImportInst1=Klik op de knop "Import starten" om alle Gliffy-diagrammen naar draw.io te importeren.
+gliffyImportInst1=Klik op de knop "Start importeren" om alle Gliffy-diagrammen naar draw.io te importeren.
 gliffyImportInst2=Houd er rekening mee dat de importprocedure enige tijd duurt en dat het browservenster open moet blijven totdat de import is voltooid.
 startImport=Start importeren
 drawConfig=draw.io configuratie
@@ -970,50 +970,50 @@ units=Eenheden
 points=Punt
 inches=Inch
 millimeters=Millimeter
-confEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.
-confDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session's modifications.
-macroNotFound=Macro Not Found
-confAInvalidPageIdsFormat=Incorrect Page IDs file format
-confACollectingCurPages=Collecting current pages
-confABuildingPagesMap=Building pages mapping
-confAProcessDrawDiag=Started processing imported draw.io diagrams
-confAProcessDrawDiagDone=Finished processing imported draw.io diagrams
-confAProcessImpPages=Started processing imported pages
-confAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"
-confAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"
-confAImpDiagram=Importing diagram "{1}"
-confAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. 
-confAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.
-confAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.
-confImpDiagramSuccess=Updating diagram "{1}" done successfully.
-confANoLnksInDrgm=No links to update in: {1}
-confAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"
-confAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"
-confAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"
-confAPageIdsImpDone=Page IDs Import finished.
-confAPrcsMacrosInPage=Processing draw.io macros in page "{1}"
-confAErrFetchPage=Error fetching page "{1}"
-confAFixingMacro=Fixing macro of diagram "{1}"
-confAErrReadingExpFile=Error reading export file
-confAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished
-confAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported. 
-pageIdsExpTrg=Export target
+confEditDraftDelOrExt=Dit diagram staat op een conceptpagina, wordt van de pagina verwijderd of wordt extern bewerkt. Het wordt opgeslagen als een nieuwe bijlageversie en wordt mogelijk niet weergegeven op de pagina.
+confDiagEditedExt=Diagram wordt bewerkt in een andere sessie. Het wordt opgeslagen als een nieuwe bijlageversie, maar de pagina toont de wijzigingen van andere sessies.
+macroNotFound=Macro niet aangetroffen
+confAInvalidPageIdsFormat=Ongeldig Pagina-ID bestandsformaat
+confACollectingCurPages=Huidige pagina's verzamelen
+confABuildingPagesMap=Paginaverwijzingen opbouwen
+confAProcessDrawDiag=Verwerken van geïmporteerde Draw.io-diagrammen
+confAProcessDrawDiagDone=Verwerking van geïmporteerde Draw.io-diagrammen voltooid
+confAProcessImpPages=Verwerken van geïmporteerde pagina's
+confAErrPrcsDiagInPage=Fout bij het verwerken van draw.io diagrammen op pagina "{1}"
+confAPrcsDiagInPage=Verwerken van draw.io diagrammen op pagina "{1}"
+confAImpDiagram=Importeren van Diagram "{1}"
+confAImpDiagramFailed=Importeren van Diagram "{1}" is mislukt. De Pagina-ID is niet aangetroffen. Mogelijk verwijst het naar een pagina die niet is geïmporteerd.
+confAImpDiagramError=Fout bij het importeren van diagram "{1}". Het diagram kan niet worden geladen of opgeslagen. Ongeldige koppeling kan niet worden verholpen.
+confAUpdateDgrmCCFailed=Het vernieuwen van de koppeling naar diagran "{1}" is mislukt.
+confImpDiagramSuccess=Diagram "{1}" is met succes vernieuwd.
+confANoLnksInDrgm=Geen koppelingen te vernieuwen in: "{1}"
+confAUpdateLnkToPg=Koppeling naar pagina "{1}" vernieuwd in diagram "{2}"
+confAUpdateLBLnkToPg=Lightbox-link naar pagina bijgewerkt: '{1}' in diagram: '{2}'
+confAUpdateLnkBase=Basis-URL bijgewerkt van: "{1}" naar: "{2}" in diagram: "{3}"
+confAPageIdsImpDone=Importeren van Pagina-ID's voltooid.
+confAPrcsMacrosInPage=draw.io-macro's verwerken op pagina "{1}"
+confAErrFetchPage=Fout bij het ophalen van pagina "{1}"
+confAFixingMacro=Macro voor diagram "{1}" repareren
+confAErrReadingExpFile=Fout bij het inlezen van exportbestand
+confAPrcsDiagInPageDone=Verwerking van draw.io-diagrammen op pagina "{1}" voltooid
+confAFixingMacroSkipped=Reparatie van macro voor diagram "{1}" is mislukt. De Pagina-ID is niet aangetroffen. Mogelijk verwijst het naar een pagina die niet is geïmporteerd.
+pageIdsExpTrg=Exportbestemming
 confALucidDiagImgImported={2} diagram "{1}" image extracted successfully.
 confASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed.
-confGetInfoFailed=Fetching file info from {1} failed.
-confCheckCacheFailed=Cannot get cached file info.
-confReadFileErr=Cannot read "{1}" file from {2}.
-confSaveCacheFailed=Unexpected error. Cannot save cached file
-orgChartType=Org Chart Type
-linear=Linear
-hanger2=Hanger 2
-hanger4=Hanger 4
-fishbone1=Fishbone 1
-fishbone2=Fishbone 2
-1ColumnLeft=Single Column Left
-1ColumnRight=Single Column Right
-smart=Smart
-parentChildSpacing=Parent Child Spacing
-siblingSpacing=Sibling Spacing
-confNoPermErr=Sorry, you don't have enough permissions to view this embedded diagram from page {1}
-copyAsImage=Copy as Image
+confGetInfoFailed=Het ophalen van bestandsinformatie van {1} is mislukt.
+confCheckCacheFailed=Kan bestandsinformatie niet ophalen.
+confReadFileErr=Kan bestand "{1}" van {2} niet lezen.
+confSaveCacheFailed=Onverwachte fout. Bestand in cache is niet opgeslagen
+orgChartType=Organigram-type
+linear=Lineair
+hanger2=Boomstructuur 1
+hanger4=Boomstructuur 2
+fishbone1=Visgraat 1
+fishbone2=Visgraat 2
+1ColumnLeft=Enkele kolom links
+1ColumnRight=Enkele kolom rechts
+smart=Slim
+parentChildSpacing=Marge tussen niveaus
+siblingSpacing=Marge binnen niveaus
+confNoPermErr=Sorry, je hebt niet genoeg rechten om dit ingesloten diagram vanaf pagina {1} te bekijken
+copyAsImage=Als afbeelding kopiëren
diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txt
index bf9de74e3..950e1407d 100644
--- a/src/main/webapp/resources/dia_uk.txt
+++ b/src/main/webapp/resources/dia_uk.txt
@@ -3,23 +3,23 @@
 about=Про застосунок 
 aboutDrawio=Про застосунок draw.io
 accessDenied=Доступ заборонено
-action=Action
+action=Дія
 actualSize=Поточний розмір
 add=Додати
-addAccount=Add account
+addAccount=Додати профіль
 addedFile=Додано {1}
 addImages=Додати малюнки
 addImageUrl=Додати URL-адресу малюнка
 addLayer=Додати шар
 addProperty=Додати властивість
 address=Адреса
-addToExistingDrawing=Додати до креслення, яке існує
+addToExistingDrawing=Додати до наявного креслення
 addWaypoint=Додати точку шляху
 adjustTo=Прив'язати до
 advanced=Розширені
 align=Вирівняти
 alignment=Вирівнювання
-allChangesLost=Усі зміни буде втрачено!
+allChangesLost=Всі зміни буде втрачено!
 allPages=Всі сторінки
 allProjects=Всі проєкти
 allSpaces=Всі простори
@@ -27,13 +27,13 @@ allTags=Всі мітки
 anchor=Якір
 android=Android
 angle=Кут
-arc=Arc
+arc=Дуга
 areYouSure=Ви впевнені?
 ensureDataSaved=Перед виходом, будь ласка, переконайтеся, що ваші дані збережено.
 allChangesSaved=Всі зміни збережено
 allChangesSavedInDrive=Всі зміни збережено на Диску
 allowPopups=Дозвольте відкриття спливаючих вікон, щоб уникнути появи цього повідомлення.
-allowRelativeUrl=Allow relative URL
+allowRelativeUrl=Дозволити відносні адреси
 alreadyConnected=Вузли вже підключено
 apply=Застосувати
 archiMate21=ArchiMate 2.1
@@ -43,26 +43,26 @@ arrows=Стрілки
 asNew=Як нове
 atlas=Атлас
 author=Творець
-authorizationRequired=Мусите ся назвати
+authorizationRequired=Необхідна авторизація
 authorizeThisAppIn=Вкажіть себе у {1}
-authorize=Назвати себе
-authorizing=Вказування себе
-automatic=Самодійно
-autosave=Самозбереження
-autosize=Саморозмір
+authorize=Авторизувати
+authorizing=Авторизація
+automatic=Автоматично
+autosave=Автозбереження
+autosize=Автоматичний розмір
 attachments=Вкладення
 aws=AWS
 aws3d=AWS 3D
 azure=Azure
-back=Back
+back=Назад
 background=Тло
 backgroundColor=Колір тла
 backgroundImage=Малюнок тла
 basic=Основні
 blankDrawing=Нове креслення
 blankDiagram=Нова діаграма
-block=Шмат
-blockquote=Чужий вислів
+block=Блок
+blockquote=Цитата
 blog=Життєпис
 bold=Напівжирний
 bootstrap=Bootstrap
@@ -74,9 +74,9 @@ bottomAlign=Вирівняти по нижньому краю
 bottomLeft=Лівий нижній
 bottomRight=Правий нижній
 bpmn=BPMN
-browser=Оглядач осідків
+browser=Браузер
 bulletedList=Список з позначками
-business=Справа
+business=Бізнес
 busy=Дія триває
 cabinets=Шафи та стійки
 cancel=Скасувати
@@ -87,29 +87,29 @@ cannotOpenFile=Неможливо відкрити файл
 change=Змінити
 changeOrientation=Змінити напрямок
 changeUser=Змінити користувача
-changeStorage=Change storage
+changeStorage=Змінити сховище
 changesNotSaved=Зміни не було збережено
-classDiagram=Class Diagram
+classDiagram=Клас діаграм
 userJoined={1} приєднався
 userLeft={1} вийшов
 chatWindowTitle=Теревеня
-chooseAnOption=Оберіть можливість
+chooseAnOption=Оберіть варіант
 chromeApp=Застосунок Chrome
-collaborativeEditingNotice=Важливе повідомлення про спільне змінювання
+collaborativeEditingNotice=Важлива примітка щодо спільного редагування
 compressed=Стисло
-commitMessage=Повідомлення про надане
+commitMessage=Повідомлення при коміті
 configLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!
 configLinkConfirm=Click OK to configure and restart draw.io.
 csv=CSV
-dark=Темно
-diagramXmlDesc=XML File
-diagramHtmlDesc=HTML File
-diagramPngDesc=Editable Bitmap Image
-diagramSvgDesc=Editable Vector Image
-didYouMeanToExportToPdf=Did you mean to export to PDF?
-draftFound=Знайдено чернетку '{1}'. Завантажте її в виправник або відмовтеся, щоб продовжити.
-selectDraft=Select a draft to continue editing:
-dragAndDropNotSupported=Перетягування зображень не підтримуємо. Чи бажаєте натомість привнести його?
+dark=Темне
+diagramXmlDesc=XML файл
+diagramHtmlDesc=HTML файл
+diagramPngDesc=Зображення Bitmap
+diagramSvgDesc=Векторне зображення
+didYouMeanToExportToPdf=Можливо ви мали на увазі експорт в PDF?
+draftFound=Знайдено чернетку '{1}'. Завантажте її в редактор або відмовтеся, щоб продовжити.
+selectDraft=Вибрати чернетку для редагування:
+dragAndDropNotSupported=Перетягування зображень не підтримується. Чи бажаєте натомість привнести його?
 dropboxCharsNotAllowed=Перелічені знаки не підтримувані: \ / : ? * " |
 check=Перевірити
 checksum=Перевірювальне число
@@ -350,14 +350,14 @@ github=GitHub
 gitlab=GitLab
 gliffy=Gliffy
 global=Світовий
-googleDocs=Google Docs
-googleDrive=Google Drive
-googleGadget=Google Gadget
+googleDocs=Google Документи
+googleDrive=Google Диск
+googleGadget=Гаджети Google
 googlePlus=Google+
 googleSharingNotAvailable=Поширення можливе лише до Диску Google. Кляцніть, будь ласка, Відкрити нижче і поширте за допомогою вибору більшої кількості дій.
-googleSlides=Google Slides
-googleSites=Google Sites
-googleSheets=Google Sheets
+googleSlides=Google Презентації
+googleSites=Сайти Google
+googleSheets=Google Таблиці
 gradient=Градієнт
 gradientColor=Колір
 grid=Сітка
@@ -379,14 +379,14 @@ horizontalFlow=Пообрійний потік
 horizontalTree=Вздовжобрійне дерево
 howTranslate=Чи задоволені ви перекладом на вашу мову?
 html=HTML
-htmlText=письмо HTML
+htmlText=HTML текст
 id=ID
 iframe=IFrame
 ignore=Нехтувати
 image=Зображення одне
 imageUrl=Ланка до зображення
 images=Зображення декілька
-imagePreviewError=Це зображення не можна завантажити для передперегляду. Будь ласка, перевірте ланку.
+imagePreviewError=Це зображення не можна завантажити для передперегляду. Будь ласка, перевірте посилання.
 imageTooBig=Зображення завелике
 imgur=Imgur
 import=Привніс
@@ -408,15 +408,15 @@ insertRowBefore=Вставити рядок зверху
 insertRowAfter=Вставити рядок внизу
 insertText=Вставити письмо
 inserting=Вставляю
-installApp=Install App
-invalidFilename=Назва діаграма не повинна мати такі знаки:  \ / | : ; { } < > & + ? = "
-invalidLicenseSeeThisPage=Ваш дозвіл на використання недійсний, будь ласка,прочитайте це <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.
-invalidInput=Хибний ввод
+installApp=Встановити застосунок
+invalidFilename=Назва діаграми не повинна мати такі знаки:  \ / | : ; { } < > & + ? = "
+invalidLicenseSeeThisPage=Ваш дозвіл на використання недійсний, будь ласка, прочитайте цю <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">сторінку</a>.
+invalidInput=Хибне введення
 invalidName=Хибне ім'я
 invalidOrMissingFile=Файл хибний або відсутній
-invalidPublicUrl=Хибна ланка до джерела
+invalidPublicUrl=Хибне посилання до джерела
 isometric=Ізометричний
-ios=Ä°OS
+ios=iOS
 italic=Рукописний
 kennedy=Кеннеді
 keyboardShortcuts=Скорочення набірниці
@@ -525,7 +525,7 @@ online=Наживо
 opacity=Непрозорість
 open=Відкрити
 openArrow=Стрілка відкриття
-openExistingDiagram=Відкрити діаграму, яка вже існує
+openExistingDiagram=Відкрити наявну діаграму
 openFile=Відкрити файл
 openFrom=Відкрити з
 openLibrary=Відкрити бібліотеку
@@ -569,7 +569,7 @@ publicDiagramUrl=Загальнодоступна ланка до діаграм
 placeholders=Тримач місця
 plantUml=PlantUML
 plugins=Вбудови
-pluginUrl=Ланка до вбудови
+pluginUrl=Посилання до вбудови
 pluginWarning=Сторінка запитує дозвіл на завантаження наступного(-них) вбудованого(-них) модуля (-ів):\n                   \n                                                                                                                                                                        {1}\n                                                                                                                                                                      \n                                                                                                                                                                         Чи хочете ви завантажити цю (ці) вбудову(-и) зараз?\n                                                          \n                                                                                                                                                             ПРИМІТКА: Погоджуйтесь лише якщо цілком розумієте неявні ризики, пов'язані з безпекою.\n                                                                                                                                                                                                           
 plusTooltip=Кляцніть щоб підключити та заподобати (Ctrl+кляцок щоб заподобати, Shift+кляцок щоб підключити). Перетягніть щоб підключити (Ctrl+кляцок щоб заподобати).
 portrait=Портретний
@@ -642,7 +642,7 @@ saveAs=Зберегти як
 saveAsXmlFile=Зберегти як XML-файл?
 saved=Збережено
 saveDiagramFirst=Please save the diagram first
-saveDiagramsTo=Зберегти діаграми в 
+saveDiagramsTo=Зберігати діаграми в
 saveLibrary403=Недостатньо повноважень, щоб редагувати цю бібліотеку
 saveLibrary500=При збереженні бібліотеки виникла помилка
 saveLibraryReadOnly=Could not save library while read-only mode is active
@@ -790,13 +790,13 @@ webLink=Веб-посилання
 wireframes=Макети інтерфейсу
 property=Property
 value=Value
-showMore=Show More
-showLess=Show Less
-myDiagrams=My Diagrams
-allDiagrams=All Diagrams
+showMore=Показати більше
+showLess=Показати менше
+myDiagrams=Мої діаграми
+allDiagrams=Всі діаграми
 recentlyUsed=Recently used
-listView=List view
-gridView=Grid view
+listView=Перегляд списком
+gridView=Перегляд сіткою
 resultsFor=Results for '{1}'
 oneDriveCharsNotAllowed=The following characters are not allowed: ~ " # %  * : < > ? / \ { | }
 oneDriveInvalidDeviceName=The specified device name is invalid
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index c7df7e451..d80fb760a 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,11 +6,11 @@ if (workbox)
 	workbox.precaching.precacheAndRoute([
   {
     "url": "js/app.min.js",
-    "revision": "dc34a72a738efefe1ea171f99d996b50"
+    "revision": "df18d2c945284fdad9a6c680f353cc4d"
   },
   {
     "url": "js/extensions.min.js",
-    "revision": "1508d25f049980ca928fe2596d422ba0"
+    "revision": "98655f6a208f911f78f5cb3611e7ca31"
   },
   {
     "url": "js/stencils.min.js",
@@ -86,7 +86,7 @@ if (workbox)
   },
   {
     "url": "resources/dia_uk.txt",
-    "revision": "9a9f8133ff3d7a194b97526b2859c2ef"
+    "revision": "4bb396c915aafaa941e5367c59e50a94"
   },
   {
     "url": "resources/dia_bg.txt",
@@ -246,7 +246,7 @@ if (workbox)
   },
   {
     "url": "resources/dia_lt.txt",
-    "revision": "9e0e545f83cac1912e6c300e40c72b3b"
+    "revision": "039cd731db8d574ebb94688ec4ce9174"
   },
   {
     "url": "resources/dia_lv.txt",
@@ -262,7 +262,7 @@ if (workbox)
   },
   {
     "url": "resources/dia_nl.txt",
-    "revision": "05528f9d16f3221cb7466b43221c4b6e"
+    "revision": "9f286466dceb97c0eeecce0daab35c50"
   },
   {
     "url": "resources/dia_fil.txt",
diff --git a/src/main/webapp/styles/dark-default.xml b/src/main/webapp/styles/dark-default.xml
index 07d0d8336..1303f3c28 100644
--- a/src/main/webapp/styles/dark-default.xml
+++ b/src/main/webapp/styles/dark-default.xml
@@ -29,6 +29,10 @@
 		<add as="align" value="left"/>
 		<add as="verticalAlign" value="top"/>
 	</add>
+	<add as="edgeLabel" extend="text">
+		<add as="labelBackgroundColor" value="#2a2a2a"/>
+		<add as="fontSize" value="11"/>
+	</add>
 	<add as="label">
 		<add as="fontStyle" value="1"/>
 		<add as="align" value="left"/>
diff --git a/src/main/webapp/styles/default.xml b/src/main/webapp/styles/default.xml
index 1f53abaf1..cb9b484a3 100644
--- a/src/main/webapp/styles/default.xml
+++ b/src/main/webapp/styles/default.xml
@@ -22,6 +22,90 @@
 		<add as="strokeColor" value="#000000"/>
 		<add as="fontColor" value="#000000"/>
 	</add>
+	<add as="text">
+		<add as="fillColor" value="none"/>
+		<add as="gradientColor" value="none"/>
+		<add as="strokeColor" value="none"/>
+		<add as="align" value="left"/>
+		<add as="verticalAlign" value="top"/>
+	</add>
+	<add as="edgeLabel" extend="text">
+		<add as="labelBackgroundColor" value="#ffffff"/>
+		<add as="fontSize" value="11"/>
+	</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>
 	<add as="fancy">
 		<add as="shadow" value="1"/>
 		<add as="glass" value="1"/>
@@ -116,84 +200,4 @@
 		<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>
-- 
GitLab