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

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2018-05-23 18:03:38 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2018-05-23 18:03:38 +0300
commitb7b7fa81500c5fe1fd27769a7d38f28faf8ca983 (patch)
treeea8a992b2cfe8089532dbf3c8ec92eaf6705f798
parentebc4f80e77387d60676383ba84f84ac1d028e10f (diff)
8.6.7 releasev8.6.7
Former-commit-id: b31e393da47bee732c5290c002267f255932202f
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/js/app.min.js1412
-rw-r--r--src/main/webapp/js/atlas-viewer.min.js1300
-rw-r--r--src/main/webapp/js/atlas.min.js1916
-rw-r--r--src/main/webapp/js/diagramly/App.js33
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js2
-rw-r--r--src/main/webapp/js/diagramly/DriveClient.js6
-rw-r--r--src/main/webapp/js/diagramly/DropboxClient.js2
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js519
-rw-r--r--src/main/webapp/js/diagramly/GitHubClient.js2
-rw-r--r--src/main/webapp/js/diagramly/Menus.js33
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js139
-rw-r--r--src/main/webapp/js/diagramly/OneDriveClient.js2
-rw-r--r--src/main/webapp/js/diagramly/TrelloClient.js2
-rw-r--r--src/main/webapp/js/diagramly/vsdx/importer.js255
-rw-r--r--src/main/webapp/js/embed-static.min.js2
-rw-r--r--src/main/webapp/js/extensions.min.js4
-rw-r--r--src/main/webapp/js/reader.min.js2
-rw-r--r--src/main/webapp/js/viewer.min.js1300
-rw-r--r--src/main/webapp/plugins/update.js218
-rw-r--r--src/main/webapp/templates/business/accd.pngbin2602 -> 2289 bytes
-rw-r--r--src/main/webapp/templates/business/archimate.pngbin1773 -> 1509 bytes
-rw-r--r--src/main/webapp/templates/business/bpmn.pngbin1319 -> 1220 bytes
-rw-r--r--src/main/webapp/templates/business/business_model_1.pngbin4366 -> 4041 bytes
-rw-r--r--src/main/webapp/templates/business/business_model_2.pngbin2441 -> 2152 bytes
-rw-r--r--src/main/webapp/templates/business/business_model_canvas_1.pngbin0 -> 1685 bytes
-rw-r--r--src/main/webapp/templates/business/business_model_canvas_1.xml1
-rw-r--r--src/main/webapp/templates/business/ishikawa_1.pngbin3270 -> 2827 bytes
-rw-r--r--src/main/webapp/templates/business/ishikawa_2.pngbin2886 -> 2537 bytes
-rw-r--r--src/main/webapp/templates/business/pert_1.pngbin2824 -> 2517 bytes
-rw-r--r--src/main/webapp/templates/business/pert_2.pngbin1231 -> 1139 bytes
-rw-r--r--src/main/webapp/templates/business/swimlane.xml1
-rw-r--r--src/main/webapp/templates/business/timeline_1.pngbin7118 -> 6405 bytes
-rw-r--r--src/main/webapp/templates/business/timeline_2.pngbin2815 -> 2148 bytes
-rw-r--r--src/main/webapp/templates/business/timeline_2.xml3
-rw-r--r--src/main/webapp/templates/business/timeline_3.pngbin0 -> 2275 bytes
-rw-r--r--src/main/webapp/templates/business/timeline_3.xml1
-rw-r--r--src/main/webapp/templates/business/timeline_4.pngbin0 -> 3191 bytes
-rw-r--r--src/main/webapp/templates/business/timeline_4.xml1
-rw-r--r--src/main/webapp/templates/charts/bar_chart_1.pngbin0 -> 1063 bytes
-rw-r--r--src/main/webapp/templates/charts/bar_chart_1.xml1
-rw-r--r--src/main/webapp/templates/charts/coc.pngbin2002 -> 1807 bytes
-rw-r--r--src/main/webapp/templates/charts/org_chart_1.pngbin946 -> 3132 bytes
-rw-r--r--src/main/webapp/templates/charts/org_chart_1.xml3
-rw-r--r--src/main/webapp/templates/charts/org_chart_2.pngbin903 -> 798 bytes
-rw-r--r--src/main/webapp/templates/charts/work_breakdown_structure.pngbin0 -> 3730 bytes
-rw-r--r--src/main/webapp/templates/charts/work_breakdown_structure.xml1
-rw-r--r--src/main/webapp/templates/engineering/cabinet.pngbin1995 -> 1754 bytes
-rw-r--r--src/main/webapp/templates/engineering/cabinet.xml3
-rw-r--r--src/main/webapp/templates/engineering/electrical_1.pngbin1144 -> 1029 bytes
-rw-r--r--src/main/webapp/templates/engineering/electrical_2.pngbin1171 -> 1062 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/cross_functional_flowchart.pngbin1258 -> 0 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.pngbin0 -> 1141 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.xml (renamed from src/main/webapp/templates/flowcharts/cross_functional_flowchart.xml)0
-rw-r--r--src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.pngbin0 -> 1866 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.xml2
-rw-r--r--src/main/webapp/templates/flowcharts/data_flow_1.pngbin1457 -> 1249 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/data_flow_2.pngbin1192 -> 1036 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/data_flow_3.pngbin4663 -> 4162 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/epc.pngbin2198 -> 1962 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/flowchart_1.pngbin0 -> 2241 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/flowchart_1.xml1
-rw-r--r--src/main/webapp/templates/flowcharts/flowchart_2.pngbin0 -> 2323 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/flowchart_2.xml1
-rw-r--r--src/main/webapp/templates/flowcharts/workflow_1.pngbin0 -> 2931 bytes
-rw-r--r--src/main/webapp/templates/flowcharts/workflow_1.xml2
-rw-r--r--src/main/webapp/templates/index.xml30
-rw-r--r--src/main/webapp/templates/layout/blog_wireframe.pngbin3133 -> 2762 bytes
-rw-r--r--src/main/webapp/templates/layout/bootstrap.pngbin3191 -> 2773 bytes
-rw-r--r--src/main/webapp/templates/layout/wireframe.pngbin4137 -> 0 bytes
-rw-r--r--src/main/webapp/templates/layout/wireframe_1.pngbin0 -> 3679 bytes
-rw-r--r--src/main/webapp/templates/layout/wireframe_1.xml (renamed from src/main/webapp/templates/layout/wireframe.xml)0
-rw-r--r--src/main/webapp/templates/layout/wireframe_2.pngbin0 -> 3082 bytes
-rw-r--r--src/main/webapp/templates/layout/wireframe_2.xml2
-rw-r--r--src/main/webapp/templates/maps/concept_map.pngbin2521 -> 0 bytes
-rw-r--r--src/main/webapp/templates/maps/concept_map_1.pngbin0 -> 2168 bytes
-rw-r--r--src/main/webapp/templates/maps/concept_map_1.xml (renamed from src/main/webapp/templates/maps/concept_map.xml)0
-rw-r--r--src/main/webapp/templates/maps/concept_map_2.pngbin0 -> 4644 bytes
-rw-r--r--src/main/webapp/templates/maps/concept_map_2.xml2
-rw-r--r--src/main/webapp/templates/maps/living_beings_mind_map.pngbin0 -> 4597 bytes
-rw-r--r--src/main/webapp/templates/maps/living_beings_mind_map.xml1
-rw-r--r--src/main/webapp/templates/maps/mind_map.pngbin0 -> 2244 bytes
-rw-r--r--src/main/webapp/templates/maps/mind_map.xml1
-rw-r--r--src/main/webapp/templates/maps/site_map.pngbin3774 -> 3034 bytes
-rw-r--r--src/main/webapp/templates/maps/site_map.xml3
-rw-r--r--src/main/webapp/templates/network/active_directory.pngbin3703 -> 3294 bytes
-rw-r--r--src/main/webapp/templates/network/aws.pngbin2970 -> 2688 bytes
-rw-r--r--src/main/webapp/templates/network/aws_3d.pngbin3571 -> 3298 bytes
-rw-r--r--src/main/webapp/templates/network/azure.pngbin3205 -> 0 bytes
-rw-r--r--src/main/webapp/templates/network/azure_1.pngbin0 -> 2683 bytes
-rw-r--r--src/main/webapp/templates/network/azure_1.xml (renamed from src/main/webapp/templates/network/azure.xml)0
-rw-r--r--src/main/webapp/templates/network/azure_2.pngbin0 -> 5316 bytes
-rw-r--r--src/main/webapp/templates/network/azure_2.xml1
-rw-r--r--src/main/webapp/templates/network/cisco.pngbin3065 -> 0 bytes
-rw-r--r--src/main/webapp/templates/network/cisco.xml2
-rw-r--r--src/main/webapp/templates/network/cisco_1.pngbin0 -> 5296 bytes
-rw-r--r--src/main/webapp/templates/network/cisco_1.xml1
-rw-r--r--src/main/webapp/templates/network/cisco_2.pngbin0 -> 5271 bytes
-rw-r--r--src/main/webapp/templates/network/cisco_2.xml2
-rw-r--r--src/main/webapp/templates/network/citrix.pngbin4543 -> 4320 bytes
-rw-r--r--src/main/webapp/templates/network/enterprise_1.pngbin0 -> 5891 bytes
-rw-r--r--src/main/webapp/templates/network/enterprise_1.xml1
-rw-r--r--src/main/webapp/templates/network/ibm_bda_reference_architecture.pngbin5285 -> 4639 bytes
-rw-r--r--src/main/webapp/templates/network/ibm_cognitive_conversation.pngbin5222 -> 4438 bytes
-rw-r--r--src/main/webapp/templates/network/ibm_cognitive_discovery.pngbin6225 -> 5148 bytes
-rw-r--r--src/main/webapp/templates/network/ibm_iot_architecture.pngbin5551 -> 4909 bytes
-rw-r--r--src/main/webapp/templates/network/ibm_microservices.pngbin5752 -> 4968 bytes
-rw-r--r--src/main/webapp/templates/network/ibm_private_cloud.pngbin5492 -> 4850 bytes
-rw-r--r--src/main/webapp/templates/network/ibm_vcenter_server_platform.pngbin4478 -> 3812 bytes
-rw-r--r--src/main/webapp/templates/network/internet.pngbin3326 -> 2838 bytes
-rw-r--r--src/main/webapp/templates/network/lan.pngbin3548 -> 3001 bytes
-rw-r--r--src/main/webapp/templates/network/telecomm.pngbin3483 -> 3163 bytes
-rw-r--r--src/main/webapp/templates/network/veeam.pngbin2874 -> 2539 bytes
-rw-r--r--src/main/webapp/templates/network/wireless_home_network.pngbin4317 -> 4052 bytes
-rw-r--r--src/main/webapp/templates/other/block.pngbin2428 -> 2032 bytes
-rw-r--r--src/main/webapp/templates/other/cycle_1.pngbin0 -> 2590 bytes
-rw-r--r--src/main/webapp/templates/other/cycle_1.xml1
-rw-r--r--src/main/webapp/templates/other/decision_tree.pngbin1080 -> 898 bytes
-rw-r--r--src/main/webapp/templates/other/educational.pngbin1138 -> 947 bytes
-rw-r--r--src/main/webapp/templates/other/floor_plan.pngbin3095 -> 2557 bytes
-rw-r--r--src/main/webapp/templates/other/infographic_1.pngbin4608 -> 4184 bytes
-rw-r--r--src/main/webapp/templates/other/infographic_1.xml2
-rw-r--r--src/main/webapp/templates/other/infographic_2.pngbin6290 -> 3584 bytes
-rw-r--r--src/main/webapp/templates/other/infographic_2.xml2
-rw-r--r--src/main/webapp/templates/other/infographic_3.pngbin0 -> 2613 bytes
-rw-r--r--src/main/webapp/templates/other/infographic_3.xml1
-rw-r--r--src/main/webapp/templates/other/infographic_4.pngbin0 -> 2548 bytes
-rw-r--r--src/main/webapp/templates/other/infographic_4.xml1
-rw-r--r--src/main/webapp/templates/other/lan_plan.pngbin3908 -> 3260 bytes
-rw-r--r--src/main/webapp/templates/software/class_1.pngbin2062 -> 1923 bytes
-rw-r--r--src/main/webapp/templates/software/class_2.pngbin1507 -> 1373 bytes
-rw-r--r--src/main/webapp/templates/software/component.pngbin1199 -> 1112 bytes
-rw-r--r--src/main/webapp/templates/software/data_flow_1.xml2
-rw-r--r--src/main/webapp/templates/software/database_1.pngbin2738 -> 2382 bytes
-rw-r--r--src/main/webapp/templates/software/database_2.pngbin3384 -> 3045 bytes
-rw-r--r--src/main/webapp/templates/software/database_3.pngbin2980 -> 2661 bytes
-rw-r--r--src/main/webapp/templates/software/eip.pngbin1872 -> 1586 bytes
-rw-r--r--src/main/webapp/templates/software/entity_relationship.pngbin1690 -> 1553 bytes
-rw-r--r--src/main/webapp/templates/tables/authority_matrix.pngbin1876 -> 1648 bytes
-rw-r--r--src/main/webapp/templates/tables/gantt_1.pngbin3434 -> 2892 bytes
-rw-r--r--src/main/webapp/templates/tables/gantt_1.xml3
-rw-r--r--src/main/webapp/templates/tables/gantt_2.pngbin654 -> 593 bytes
-rw-r--r--src/main/webapp/templates/tables/gantt_2.xml3
-rw-r--r--src/main/webapp/templates/tables/gantt_3.pngbin1017 -> 859 bytes
-rw-r--r--src/main/webapp/templates/uml/activity_diagram_1.pngbin1788 -> 1620 bytes
-rw-r--r--src/main/webapp/templates/uml/activity_diagram_1.xml3
-rw-r--r--src/main/webapp/templates/uml/activity_diagram_2.pngbin1823 -> 1663 bytes
-rw-r--r--src/main/webapp/templates/uml/sequence_1.pngbin1468 -> 1314 bytes
-rw-r--r--src/main/webapp/templates/uml/sequence_2.pngbin2481 -> 2103 bytes
-rw-r--r--src/main/webapp/templates/uml/state_machine.pngbin1478 -> 1276 bytes
-rw-r--r--src/main/webapp/templates/uml/sysml.pngbin1500 -> 1328 bytes
-rw-r--r--src/main/webapp/templates/uml/uml_1.pngbin2811 -> 2561 bytes
-rw-r--r--src/main/webapp/templates/uml/uml_2.pngbin1689 -> 1546 bytes
-rw-r--r--src/main/webapp/templates/uml/uml_2.xml3
-rw-r--r--src/main/webapp/templates/venn/spider_1.pngbin3130 -> 2695 bytes
-rw-r--r--src/main/webapp/templates/venn/spider_2.pngbin3246 -> 3112 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_1.pngbin3097 -> 3072 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_1.xml3
-rw-r--r--src/main/webapp/templates/venn/venn_2.pngbin2983 -> 2967 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_2.xml3
-rw-r--r--src/main/webapp/templates/venn/venn_3.pngbin4037 -> 3945 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_3.xml3
-rw-r--r--src/main/webapp/templates/venn/venn_4.pngbin4026 -> 4706 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_4.xml3
-rw-r--r--src/main/webapp/templates/venn/venn_5.pngbin4842 -> 2881 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_5.xml3
-rw-r--r--src/main/webapp/templates/venn/venn_6.pngbin0 -> 3430 bytes
-rw-r--r--src/main/webapp/templates/venn/venn_6.xml1
170 files changed, 3777 insertions, 3486 deletions
diff --git a/ChangeLog b/ChangeLog
index 51eeb499..5980cfad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+23-MAY-2018: 8.6.7
+
+- Adds #S parameter for loading from CSV source
+- Adds support for VSD files in cloud storage
+- Adds Lucidchart support for #U parameter
+
22-MAY-2018: 8.6.6
- Fixes enabled state for some menu items
diff --git a/VERSION b/VERSION
index 271309ca..108b87d8 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.6.6 \ No newline at end of file
+8.6.7 \ No newline at end of file
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 1b5ab9c5..e0377f76 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 05/22/2018 06:17 PM
+# 05/23/2018 04:43 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 350e8a30..a6b3b1a1 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -6782,20 +6782,20 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
StorageFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable()){var e=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(f){null!=c&&c(f)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
[a]),e,c):e()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,b,d){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,b)}),d)});null!=e?this.ui.confirm(mxResources.get("replaceIt",[a]),f,d):f()})):b()};
StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,d){StorageFile.call(this,a,b,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,v,u,p,f){function w(){mxEvent.addListener(t,"click",null!=f?f:function(){v!=App.MODE_GOOGLE||a.isDriveDomain()?v==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(v,g.checked);b()})):(a.setMode(v,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var t=document.createElement("a");t.style.overflow="hidden";t.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";t.className="geBaseButton";t.style.boxSizing="border-box";t.style.fontSize="11px";t.style.position="relative";t.style.margin="4px";t.style.padding="8px 10px 12px 10px";t.style.width="88px";t.style.height="100px";t.style.whiteSpace="nowrap";t.setAttribute("title",e);mxClient.IS_QUIRKS&&(t.style.cssFloat="left",t.style.zoom="1");var q=document.createElement("div");q.style.textOverflow="ellipsis";q.style.overflow="hidden";if(null!=c){var k=document.createElement("img");
-k.setAttribute("src",c);k.setAttribute("border","0");k.setAttribute("align","absmiddle");k.style.width="60px";k.style.height="60px";k.style.paddingBottom="6px";t.appendChild(k)}else q.style.paddingTop="5px",q.style.whiteSpace="normal",mxClient.IS_IOS?(t.style.padding="0px 10px 20px 10px",t.style.top="6px"):mxClient.IS_FF&&(q.style.paddingTop="0px",q.style.marginTop="-2px");t.appendChild(q);mxUtils.write(q,e);if(null!=p)for(c=0;c<p.length;c++)mxUtils.br(q),mxUtils.write(q,p[c]);if(null!=u&&null==a[u]){k.style.visibility=
-"hidden";mxUtils.setOpacity(q,10);var z=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(t);var n=window.setTimeout(function(){null==a[u]&&(z.stop(),t.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[u]&&(window.clearTimeout(n),mxUtils.setOpacity(q,100),k.style.visibility="",z.stop(),w(),"drive"==u&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else w();
-m.appendChild(t);++h>=d&&(mxUtils.br(m),h=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target","_blank");f.style.position=
-"absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";f.appendChild(k);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";
-n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};e.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
-!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var h=0,l=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.paddingTop=
+StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,e,f,t,w,u){function q(){mxEvent.addListener(p,"click",null!=u?u:function(){f!=App.MODE_GOOGLE||a.isDriveDomain()?f==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(f,g.checked);b()})):(a.setMode(f,g.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var p=document.createElement("a");p.style.overflow="hidden";p.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.boxSizing="border-box";p.style.fontSize="11px";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 10px 12px 10px";p.style.width="88px";p.style.height="100px";p.style.whiteSpace="nowrap";p.setAttribute("title",e);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");var v=document.createElement("div");v.style.textOverflow="ellipsis";v.style.overflow="hidden";if(null!=c){var y=document.createElement("img");
+y.setAttribute("src",c);y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="60px";y.style.height="60px";y.style.paddingBottom="6px";p.appendChild(y)}else v.style.paddingTop="5px",v.style.whiteSpace="normal",mxClient.IS_IOS?(p.style.padding="0px 10px 20px 10px",p.style.top="6px"):mxClient.IS_FF&&(v.style.paddingTop="0px",v.style.marginTop="-2px");p.appendChild(v);mxUtils.write(v,e);if(null!=w)for(c=0;c<w.length;c++)mxUtils.br(v),mxUtils.write(v,w[c]);if(null!=t&&null==a[t]){y.style.visibility=
+"hidden";mxUtils.setOpacity(v,10);var z=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(p);var k=window.setTimeout(function(){null==a[t]&&(z.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(k),mxUtils.setOpacity(v,100),y.style.visibility="",z.stop(),q(),"drive"==t&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();
+m.appendChild(p);++h>=d&&(mxUtils.br(m),h=0)}d=null!=d?d:2;var e=document.createElement("div");e.style.textAlign="center";e.style.whiteSpace="nowrap";e.style.paddingTop="0px";e.style.paddingBottom="20px";var f=a.addLanguageMenu(e,!0);null!=f&&(f.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){f=document.createElement("a");f.setAttribute("href","https://about.draw.io/support/");f.setAttribute("title",mxResources.get("help"));f.setAttribute("target","_blank");f.style.position=
+"absolute";f.style.textDecoration="none";f.style.cursor="pointer";f.style.fontSize="12px";f.style.bottom="28px";f.style.left="26px";f.style.color="gray";var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";f.appendChild(k);mxUtils.write(f,mxResources.get("help"));e.appendChild(f)}var l=document.createElement("div");l.style.position="absolute";l.style.cursor="pointer";l.style.fontSize="12px";
+l.style.bottom="28px";l.style.color="gray";mxUtils.write(l,mxResources.get("decideLater"));a.isOfflineApp()?l.style.right="20px":(mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)"),l.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)l.style.marginLeft=-Math.round(l.clientWidth/2)+"px"};e.appendChild(l);mxEvent.addListener(l,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
+!0);Editor.useLocalStorage=b});var m=document.createElement("div");mxClient.IS_QUIRKS&&(m.style.whiteSpace="nowrap",m.style.cssFloat="left");m.style.border="1px solid #d3d3d3";m.style.borderWidth="1px 0px 1px 0px";m.style.padding="12px 0px 12px 0px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;var h=0,n=document.createElement("p"),f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.paddingTop=
"4px";f.style.paddingBottom="16px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,mxResources.get("saveDiagramsTo")+":");e.appendChild(f);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",
mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);e.appendChild(m);f=document.createElement("p");f.style.marginTop="12px";f.style.marginBottom="6px";f.appendChild(g);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));f.appendChild(k);mxUtils.br(f);var q=a.getRecent();if(null!=q&&
-0<q.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var p=document.createElement("option");p.setAttribute("value","");p.setAttribute("selected","selected");p.style.textAlign="center";mxUtils.write(p,mxResources.get("openRecent")+"...");t.appendChild(p);for(p=0;p<q.length;p++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,
-a.title+" ("+mxResources.get(b)+")");t.appendChild(c)})(q[p]);f.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else f.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+0<q.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var p=document.createElement("option");p.setAttribute("value","");p.setAttribute("selected","selected");p.style.textAlign="center";mxUtils.write(p,mxResources.get("openRecent")+"...");u.appendChild(p);for(p=0;p<q.length;p++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,
+a.title+" ("+mxResources.get(b)+")");u.appendChild(c)})(q[p]);f.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else f.style.marginTop="20px",m.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),f.appendChild(q),m.style.paddingBottom="4px");m.appendChild(f);mxEvent.addListener(k,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(l))},5E3);this.container=
+document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",e.appendChild(n))},5E3);this.container=
e},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
"gray";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);c.style.marginRight="2px";d.appendChild(c);mxUtils.write(d,mxResources.get("help"));b.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="40px";
c.style.height="40px";c.style.marginRight="12px";c.style.paddingBottom="4px";var e="";a.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",e=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",e=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",e=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",e=mxResources.get("github")):a.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+
@@ -6806,230 +6806,230 @@ a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mx
function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});f.appendChild(c)},c=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=c?(k.style.marginBottom="24px",e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="6px",mxUtils.write(e,mxResources.get("changeUser")+" ("+c.displayName+")"),k.style.marginBottom="16px",f.style.paddingBottom="18px",mxEvent.addListener(e,"click",function(){a.hideDialog();a.drive.clearUserId();
a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),f.appendChild(e)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?e(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?e(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&e(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&e(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),e=document.createElement("a"),e.setAttribute("href","javascript:void(0)"),e.style.display="block",e.style.marginTop="8px",mxUtils.write(e,mxResources.get("notUsingService",[d])),mxEvent.addListener(e,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
-f.appendChild(e));b.appendChild(f);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,k,n,m){var g=document.createElement("div");g.style.textAlign="center";var h=document.createElement("div");h.style.padding="6px";h.style.overflow="auto";h.style.maxHeight="44px";mxClient.IS_QUIRKS&&(h.style.height="60px");mxUtils.write(h,b);g.appendChild(h);h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";var l=document.createElement("input");l.setAttribute("type","checkbox");
-f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(l.checked)});f.className="geBtn";null!=n&&(f.innerHTML=n+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&h.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(l.checked)});h.appendChild(e);null!=k?(e.innerHTML=k+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",
-e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(f);g.appendChild(h);m?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(l),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),h.appendChild(k),g.appendChild(h),mxEvent.addListener(k,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container=
-g},ErrorDialog=function(a,b,d,c,e,f,k,n,m,g,h){m=null!=m?m:!0;var l=document.createElement("div");l.style.textAlign="center";if(null!=b){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,b);l.appendChild(q)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;l.appendChild(b);d=document.createElement("div");
-d.style.marginTop="16px";d.style.textAlign="center";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=h&&h()}),g.className="geBtn",d.appendChild(g));var t=mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});t.className="geBtn";d.appendChild(t);null!=k&&(c=mxUtils.button(k,function(){m&&a.hideDialog();null!=n&&n()}),c.className="geBtn gePrimaryBtn",
-d.appendChild(c));this.init=function(){t.focus()};l.appendChild(d);this.container=l},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,a.formatFileSize(b.length));c.appendChild(k);var n=document.createElement("textarea");
-n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");c.appendChild(n);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(n.value=b,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),
-function(){var c=5E5>b.length?n.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");h.close()}}),m.className="geBtn",k.appendChild(m));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";k.appendChild(g)}if(f&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var h=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(b)}catch(q){a.handleError({message:q.message||
+f.appendChild(e));b.appendChild(f);this.container=b},ConfirmDialog=function(a,b,d,c,e,f,k,l,m){var g=document.createElement("div");g.style.textAlign="center";var h=document.createElement("div");h.style.padding="6px";h.style.overflow="auto";h.style.maxHeight="44px";mxClient.IS_QUIRKS&&(h.style.height="60px");mxUtils.write(h,b);g.appendChild(h);h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";var n=document.createElement("input");n.setAttribute("type","checkbox");
+f=mxUtils.button(f||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(n.checked)});f.className="geBtn";null!=l&&(f.innerHTML=l+"<br>"+f.innerHTML,f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.style.width="40%");a.editor.cancelFirst&&h.appendChild(f);e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(n.checked)});h.appendChild(e);null!=k?(e.innerHTML=k+"<br>"+e.innerHTML+"<br>",e.style.paddingBottom="8px",e.style.paddingTop="8px",
+e.style.height="auto",e.className="geBtn",e.style.width="40%"):e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||h.appendChild(f);g.appendChild(h);m?(h.style.marginTop="10px",h=document.createElement("p"),h.style.marginTop="20px",h.appendChild(n),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),h.appendChild(k),g.appendChild(h),mxEvent.addListener(k,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)})):h.style.marginTop="16px";this.container=
+g},ErrorDialog=function(a,b,d,c,e,f,k,l,m,g,h){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="center";if(null!=b){var q=document.createElement("div");q.style.padding="0px";q.style.margin="0px";q.style.fontSize="18px";q.style.paddingBottom="16px";q.style.marginBottom="16px";q.style.borderBottom="1px solid #c0c0c0";q.style.color="gray";mxUtils.write(q,b);n.appendChild(q)}b=document.createElement("div");b.style.padding="6px";b.innerHTML=d;n.appendChild(b);d=document.createElement("div");
+d.style.marginTop="16px";d.style.textAlign="center";null!=f&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();f()}),b.className="geBtn",d.appendChild(b),d.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=h&&h()}),g.className="geBtn",d.appendChild(g));var u=mxUtils.button(c,function(){m&&a.hideDialog();null!=e&&e()});u.className="geBtn";d.appendChild(u);null!=k&&(c=mxUtils.button(k,function(){m&&a.hideDialog();null!=l&&l()}),c.className="geBtn gePrimaryBtn",
+d.appendChild(c));this.init=function(){u.focus()};n.appendChild(d);this.container=n},EmbedDialog=function(a,b,d,c,e){c=document.createElement("div");var f=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?f?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,a.formatFileSize(b.length));c.appendChild(k);var l=document.createElement("textarea");
+l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.marginTop="10px";l.style.resize="none";l.style.height="150px";l.style.width="440px";l.style.border="1px solid gray";l.value=mxResources.get("updatingDocument");c.appendChild(l);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(l.value=b,l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+l.select():document.execCommand("selectAll",!1,null)):(l.setAttribute("readonly","true"),l.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!f||navigator.standalone||!(f||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(mxResources.get(5E5>b.length?"preview":"openInNewWindow"),
+function(){var c=5E5>b.length?l.value:b;if(null!=e)e(c);else if(f)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");h.close()}}),m.className="geBtn",k.appendChild(m));if(!f||7500<b.length){var g=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",b,"text/plain")});g.className="geBtn";k.appendChild(g)}if(f&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var h=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||
mxResources.get("drawingTooLarge")})}}),g=document.createElement("img");g.setAttribute("src",Editor.facebookImage);g.setAttribute("width","18");g.setAttribute("height","18");g.setAttribute("border","0");h.appendChild(g);h.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");h.style.verticalAlign="bottom";h.style.paddingTop="4px";h.style.minWidth="46px";h.className="geBtn";k.appendChild(h)}7168>b.length&&(h=mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+
-encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",h.appendChild(g),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign=
-"bottom",h.style.paddingTop="4px",h.style.minWidth="46px",h.className="geBtn",k.appendChild(h))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(g);h=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?
+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(l.value);a.openLink(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),g=document.createElement("img"),g.setAttribute("src",Editor.tweetImage),g.setAttribute("width","18"),g.setAttribute("height","18"),g.setAttribute("border","0"),g.style.marginBottom="5px",h.appendChild(g),h.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),h.style.verticalAlign=
+"bottom",h.style.paddingTop="4px",h.style.minWidth="46px",h.className="geBtn",k.appendChild(h))}g=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(g);h=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>b.length?mxClient.IS_SF||null!=document.documentMode?
g.className="geBtn gePrimaryBtn":(k.appendChild(h),h.className="geBtn gePrimaryBtn",g.className="geBtn"):(k.appendChild(m),g.className="geBtn",m.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,b){function d(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(G.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<F.length&&(b+="&s="+F);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=l.value&&(b+="&height="+l.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(x.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+
-(u.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1");v.checked?b+="&edit=_blank":z.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else A.constructor==DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(h.value),b+="&height="+a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),k=e.view.scale,n=Math.floor(f.x/k-e.view.translate.x),m=Math.floor(f.y/k-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);
-mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.setAttribute("size","4");h.style.marginRight="16px";h.style.marginLeft="4px";h.value=n;c.appendChild(h);mxUtils.write(c,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type",
-"text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(f.height/k);c.appendChild(l);mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=b||"";
-c.appendChild(q);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";c.appendChild(t);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var x=document.createElement("input");
-x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("zoom")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";z.setAttribute("title",window.location.href);c.appendChild(z);mxUtils.write(c,mxResources.get("edit")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";c.appendChild(u);mxUtils.write(c,mxResources.get("resize")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
-"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(p,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(q,"change",d);d();
+var GoogleSitesDialog=function(a,b){function d(){var a=null!=x.getTitle()?x.getTitle():this.defaultFilename;if(F.checked&&""!=q.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<D.length&&(b+="&s="+D);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(v.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+
+(t.checked?"1":"0");b+="&x0="+Number(h.value);b+="&y0="+m;e.mathEnabled&&(b+="&math=1");z.checked?b+="&edit=_blank":y.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=b}else x.constructor==DriveFile||x.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?b+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(b+=x.getHash().substring(1),b=x.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(h.value),b+="&height="+a),g.value=b):g.value=""}var c=document.createElement("div"),e=a.editor.graph,f=e.getGraphBounds(),k=e.view.scale,l=Math.floor(f.x/k-e.view.translate.x),m=Math.floor(f.y/k-e.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";c.appendChild(g);
+mxUtils.br(c);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.setAttribute("size","4");h.style.marginRight="16px";h.style.marginLeft="4px";h.value=l;c.appendChild(h);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type",
+"text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(f.height/k);c.appendChild(n);mxUtils.br(c);f=document.createElement("hr");f.setAttribute("size","1");f.style.marginBottom="16px";f.style.marginTop="16px";c.appendChild(f);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=b||"";
+c.appendChild(q);mxUtils.br(c);mxUtils.write(c,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";c.appendChild(u);mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");
+v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);c.appendChild(y);mxUtils.write(c,mxResources.get("edit")+" ");var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.marginLeft="8px";c.appendChild(z);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("resize")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("fit")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft=
+"8px";c.appendChild(F);mxUtils.write(c,mxResources.get("embed")+" ");var D=a.getBasenames().join(";"),x=a.getCurrentFile();mxEvent.addListener(p,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(z,"change",d);mxEvent.addListener(F,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(q,"change",d);d();
mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";f.appendChild(k);c.appendChild(f);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign=
"right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);c.appendChild(b);var f=new Graph(b);f.setCellsCloneable(!0);f.setPanning(!0);f.setAllowDanglingEdges(!1);f.connectionHandler.select=!1;f.view.setTranslate(20,20);f.border=20;f.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";f.cellRenderer.installCellOverlayListeners=
function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};f.getAllConnectionConstraints=function(){return null};f.connectionHandler.marker.highlight.keepOnTop=
-!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=f.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),g;l(function(){g=f.insertVertex(n,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(g);f.view.refresh(g);
-f.insertEdge(n,null,"",a,g,k)},function(){f.scrollCellToVisible(g)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(n,null,"Start",
+!1;f.connectionHandler.createEdgeState=function(a){a=f.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var l=f.getDefaultParent(),m=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){f.connectionHandler.reset();f.clearSelection();var d=f.getCellGeometry(a),g;n(function(){g=f.insertVertex(l,null,"Entry",d.x,d.y,80,30,"rounded=1;");m(g);f.view.refresh(g);
+f.insertEdge(l,null,"",a,g,k)},function(){f.scrollCellToVisible(g)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");f.popupMenuHandler.hideMenu();f.stopEditing(!1);var g=mxUtils.convertPoint(f.container,mxEvent.getClientX(c),mxEvent.getClientY(c));f.connectionHandler.start(d,g.x,g.y);f.isMouseDown=!0;f.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});f.addCellOverlay(a,b)});f.getModel().beginUpdate();var g;try{g=f.insertVertex(l,null,"Start",
0,0,80,30,"ellipse"),m(g)}finally{f.getModel().endUpdate()}var h;"horizontalTree"==d?(h=new mxCompactTreeLayout(f),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(h=new mxCompactTreeLayout(f,!1),h.edgeRouting=!1,h.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(h=new mxRadialTreeLayout(f,!1),h.edgeRouting=!1,h.levelDistance=80):"verticalFlow"==d?h=new mxHierarchicalLayout(f,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?h=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==d?(h=new mxFastOrganicLayout(f,!1),h.forceConstant=80):"circle"==d&&(h=new mxCircleLayout(f));if(null!=h){var l=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),h.execute(f.getDefaultParent(),g)}catch(u){throw u;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,b,c,d,g){q.apply(this,arguments);l()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&c.appendChild(t);var p=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,g=d.getBounds(c);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(t)};this.container=c};
+d?h=new mxHierarchicalLayout(f,mxConstants.DIRECTION_WEST):"organic"==d?(h=new mxFastOrganicLayout(f,!1),h.forceConstant=80):"circle"==d&&(h=new mxCircleLayout(f));if(null!=h){var n=function(a,b){f.getModel().beginUpdate();try{null!=a&&a(),h.execute(f.getDefaultParent(),g)}catch(t){throw t;}finally{var c=new mxMorphing(f);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){f.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,d,g){q.apply(this,arguments);n()};f.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};f.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&c.appendChild(u);var p=mxUtils.button(mxResources.get("insert"),function(){f.clearCellOverlays();
+var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(f.getModel().getChildren(f.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,g=d.getBounds(c);g.x-=d.translate.x;g.y-=d.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=b.parentNode&&(f.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(u)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
var BackgroundImageDialog=function(a,b){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,e=document.createElement("input");e.setAttribute("type","text");e.style.marginTop="4px";e.style.marginBottom="4px";e.style.width="350px";e.value=
-null!=c?c.src:"";var f=!1,k=function(){f||""==e.value||a.isOffline()?(n.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){n.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";n.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
+null!=c?c.src:"";var f=!1,k=function(){f||""==e.value||a.isOffline()?(l.value="",m.value=""):a.loadImage(mxUtils.trim(e.value),function(a){l.value=a.width;m.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));e.value="";l.value="";m.value=""})};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=d.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=
c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,b,c,d,g,h){e.value=a;k()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),k())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var n=document.createElement("input");
-n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=c?c.width:"";d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.height:"";d.appendChild(m);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";n.value="";m.value="";f=!1});mxEvent.addListener(c,"mousedown",
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&(e.value=decodeURIComponent(d),k())}b.stopPropagation();b.preventDefault()}),!1)}};d.appendChild(e);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var l=document.createElement("input");
+l.setAttribute("type","text");l.style.width="60px";l.style.marginLeft="4px";l.style.marginRight="16px";l.value=null!=c?c.width:"";d.appendChild(l);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="16px";m.value=null!=c?c.height:"";d.appendChild(m);c=mxUtils.button(mxResources.get("reset"),function(){e.value="";l.value="";m.value="";f=!1});mxEvent.addListener(c,"mousedown",
function(){f=!0});mxEvent.addListener(c,"touchstart",function(){f=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(e,"change",k);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(e.value=a.url,k()));e.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var g=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
g.className="geBtn";a.editor.cancelFirst&&c.appendChild(g);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var h=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
h.className="geBtn";c.appendChild(h);null!=a.drive&&"1"==urlParams.photos&&(h=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),h.className="geBtn",c.appendChild(h))}h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),n.value,m.value):null)});h.className="geBtn gePrimaryBtn";c.appendChild(h);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b,d){function c(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),h.className="geBtn",c.appendChild(h))}h=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b(""!=e.value?new mxImage(mxUtils.trim(e.value),l.value,m.value):null)});h.className="geBtn gePrimaryBtn";c.appendChild(h);a.editor.cancelFirst||c.appendChild(g);d.appendChild(c);this.container=d},ParseDialog=function(a,b,d){function c(b,c){var d=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
c||"plantUmlTxt"==c){var d="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var h=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=h(c1&63);r+=h(c2&63);r+=h(c3&63);return r+=
-h(c4&63)},l=new XMLHttpRequest;l.open("GET",d+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+e(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+e(a.charCodeAt(k),0,0):r+e(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(l.responseType="blob");l.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null,
-null,"<pre>"+this.response+"</pre>",f.x,f.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var h=d.width,l=d.height;if(0==h&&0==l){var e=c.target.result,u=e.indexOf(","),e=decodeURIComponent(escape(atob(e.substring(u+1)))),e=mxUtils.parseXml(e).getElementsByTagName("svg");
-0<e.length&&(h=parseFloat(e[0].getAttribute("width")),l=parseFloat(e[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,f.x,f.y,h,l,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},d.onerror=function(b){a.handleError(b)};else a.spinner.stop(),a.handleError(d)};l.onerror=
-function(b){a.handleError(b)};l.send()}}else if("table"==c){for(var u=null,w=[],q=0,k=0;k<d.length;k++)if(l=mxUtils.trim(d[k]),"create table"==l.substring(0,12).toLowerCase())l=mxUtils.trim(l.substring(12)),"("==l.charAt(l.length-1)&&(l=l.substring(0,l.lastIndexOf(" "))),u=new mxCell(l,new mxGeometry(q,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
-u.vertex=!0,w.push(u),l=a.editor.graph.getPreferredSizeForCell(m),null!=l&&(u.geometry.width=l.width+10);else if(null!=u&&")"==l.charAt(0))q+=u.geometry.width+40,u=null;else if("("!=l&&null!=u&&(l=l.substring(0,","==l.charAt(l.length-1)?l.length-1:l.length),"primary key"!=l.substring(0,11).toLowerCase())){var n=l.toLowerCase().indexOf("primary key"),l=l.replace(/primary key/i,""),m=new mxCell(l,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-m.vertex=!0;l=sb.cloneCell(m,0<n?"PK":"");l.connectable=!1;l.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";l.geometry.width=30;l.geometry.height=26;m.insert(l);l=a.editor.graph.getPreferredSizeForCell(m);null!=l&&u.geometry.width<l.width+10&&(u.geometry.width=Math.min(220,l.width+10));u.insert(m);u.geometry.height+=26}0<w.length&&(g=a.editor.graph,
-d=g.view,l=g.getGraphBounds(),g.setSelectionCells(g.importCells(w,Math.ceil(Math.max(0,l.x/d.scale-d.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(l.y+l.height)/d.scale-d.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==c){if(0<d.length){g=a.editor.graph;u=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-u.vertex=!0;l=g.getPreferredSizeForCell(u);null!=l&&u.geometry.width<l.width+10&&(u.geometry.width=l.width+10);m=[u];if(1<d.length)for(k=1;k<d.length;k++)"--"==d[k]?(l=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),l.vertex=!0,u.geometry.height+=l.geometry.height,u.insert(l),m.push(l)):0<d[k].length&&";"!=d[k].charAt(0)&&(q=new mxCell(d[k],
-new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),q.vertex=!0,l=g.getPreferredSizeForCell(q),null!=l&&q.geometry.width<l.width&&(q.geometry.width=l.width),u.geometry.width=Math.max(u.geometry.width,q.geometry.width),u.geometry.height+=q.geometry.height,u.insert(q),m.push(q));g.getModel().beginUpdate();try{u=g.importCells([u],f.x,f.y)[0],g.fireEvent(new mxEventObject("cellsInserted",
-"cells",[u].concat(u.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(u);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var m=function(a){var b=E[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,E[a]=b,w.push(b));return b},E={},w=[],k=0;k<d.length;k++)if(";"!=d[k].charAt(0)){var B=d[k].split("->");2<=B.length&&(q=m(B[0]),n=m(B[B.length-1]),B=new mxCell(2<B.length?B[1]:"",new mxGeometry),B.edge=!0,q.insertEdge(B,!0),n.insertEdge(B,!1),
-w.push(B))}if(0<w.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);g=new Graph(d);g.getModel().beginUpdate();try{w=g.importCells(w);for(k=0;k<w.length;k++)g.getModel().isVertex(w[k])&&(l=g.getPreferredSizeForCell(w[k]),w[k].geometry.width=Math.max(w[k].geometry.width,l.width),w[k].geometry.height=Math.max(w[k].geometry.height,l.height));u=new mxFastOrganicLayout(g);u.disableEdgeStyle=!1;u.forceConstant=120;u.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();
-m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();d.parentNode.removeChild(d)}}}function e(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
-"table"==n.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
-"plantUmlSvg"==n.value||"plantUmlTxt"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
-"354px";k.style.marginBottom="16px";var n=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));n.appendChild(m);null!=d&&"fromText"!=d||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("table"));n.appendChild(m);"formatSql"==d&&m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","diagram");
-mxUtils.write(m,mxResources.get("diagram"));n.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&m.setAttribute("selected","selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");
-mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(n.appendChild(m),n.appendChild(d),n.appendChild(g));var h=e();k.value=h;b.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];
-var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));b.appendChild(n);mxEvent.addListener(n,"change",function(){var a=e();if(0==k.value.length||k.value==h)h=a,k.value=h});d=mxUtils.button(mxResources.get("close"),function(){k.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);m=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();c(k.value,n.value)});
-b.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(d);this.container=b},NewDialog=function(a,b,d,c,e,f,k,n,m,g,h,l,q,t,p){function x(){for(var a=!0;E<M.length&&(a||0!=mxUtils.mod(E,30));)a=M[E++],u(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function z(){if(O)d||a.hideDialog(),t(O,N,D.value);else if(c)d||a.hideDialog(),c(T,D.value);else{var b=D.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==
-App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},null,c)})}}function v(a,b,c,d,g){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");B.removeAttribute("disabled");T=b;V=c;R=a;O=d;N=g;R.style.backgroundColor=n;R.style.border=m}function u(a,b,c,d,g,h,l,e){var u=document.createElement("div");u.className="geTemplate";u.style.height=
-S+"px";u.style.width=Y+"px";null!=d&&0<d.length&&u.setAttribute("title",d);if(null!=h)u.style.backgroundImage="url("+h+")",u.style.backgroundSize="contain",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",mxEvent.addListener(u,"click",function(b){v(u,null,null,a,l)}),mxEvent.addListener(u,"dblclick",function(a){z()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);u.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";u.style.backgroundPosition=
-"center center";u.style.backgroundRepeat="no-repeat";var f=!1;mxEvent.addListener(u,"click",function(c){B.setAttribute("disabled","disabled");u.style.backgroundColor="transparent";u.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(v(u,a.getText(),b),f&&z())}))});mxEvent.addListener(u,"dblclick",function(a){f=!0})}else u.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+
-"</td></tr></table>",g&&v(u),null!=e?mxEvent.addListener(u,"click",e):(mxEvent.addListener(u,"click",function(a){v(u)}),mxEvent.addListener(u,"dblclick",function(a){z()}));L.appendChild(u)}function w(){mxEvent.addListener(L,"scroll",function(a){L.scrollTop+L.clientHeight>=L.scrollHeight&&(x(),mxEvent.consume(a))});var a=null,b;for(b in I){var c=document.createElement("div"),d=mxResources.get(b),h=I[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");
-c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+h.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);Q.appendChild(c);null==a&&(a=c,a.style.backgroundColor=k);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=k,L.scrollTop=0,L.innerHTML="",E=0,M=I[b],y=null,x())})})(b,c)}x()}d=null!=
-d?d:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";n=null!=n?n:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";h=null!=h?h:TEMPLATE_PATH+"/index.xml";var G=document.createElement("div");G.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";d&&G.appendChild(F);var A=document.createElement("img");A.setAttribute("border","0");A.setAttribute("align","absmiddle");A.style.width="40px";A.style.height="40px";A.style.marginRight="10px";A.style.paddingBottom="4px";A.src=
-a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&F.appendChild(A);d&&mxUtils.write(F,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
-mxResources.get("filename"))+":");A=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?A=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?A=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?A=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?A=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(A=a.trello.extension);var D=document.createElement("input");D.setAttribute("value",a.defaultFilename+A);D.style.marginRight="20px";D.style.marginLeft="10px";D.style.width=
-b?"220px":"430px";this.init=function(){d&&(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?D.select():document.execCommand("selectAll",!1,null))};d&&F.appendChild(D);var F=!1,E=0,B=mxUtils.button(mxResources.get("create"),function(){B.setAttribute("disabled","disabled");z();B.removeAttribute("disabled")});B.className="geBtn gePrimaryBtn";if(l||q){var K=[],y=null,H=function(a){B.setAttribute("disabled","disabled");for(var b=0;b<K.length;b++)K[b].className=b==
-a?"geBtn gePrimaryBtn":"geBtn"},F=!0,A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);var C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";L.style.left="160px";H(0);L.scrollTop=0;L.innerHTML="";E=0;y!=M&&(M=y,x(),y=null)});K.push(C);A.appendChild(C);var J=function(a){Q.style.display="none";L.style.left="30px";H(a?-1:1);null==y&&(y=M);L.scrollTop=0;L.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,
-radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(L);E=0;var c=function(a,c){b.stop();M=a;c?L.innerHTML=c:0==a.length?L.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(L.innerHTML="",x())};a?q(P.value,c):l(c)};l&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){J()}),A.appendChild(C),K.push(C));if(q){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxResources.get("search")+":";A.appendChild(C);
-var P=document.createElement("input");P.style.marginRight="10px";P.style.marginLeft="10px";P.style.width="220px";mxEvent.addListener(P,"keypress",function(a){13==a.keyCode&&J(!0)});A.appendChild(P);C=mxUtils.button(mxResources.get("search"),function(){J(!0)});C.className="geBtn";A.appendChild(C)}H(0)}var V=null,T=null,R=null,O=null,N=null,L=document.createElement("div");L.style.border="1px solid #d3d3d3";L.style.position="absolute";L.style.left="160px";L.style.right="34px";F=(d?72:40)+(F?30:0);L.style.top=
-F+"px";L.style.bottom="68px";L.style.margin="6px 0 0 -1px";L.style.padding="6px";L.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+F+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,I={},aa=1;I.basic=[{title:"blankDiagram",select:!0}];var M=I.basic;if(!b){G.appendChild(Q);G.appendChild(L);var X=!1;mxUtils.get(h,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==
-typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=I[b];null==c&&(aa++,c=[],I[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}w()}})}mxEvent.addListener(D,"keypress",function(a){13==a.keyCode&&z()});h=document.createElement("div");h.style.marginTop=b?"4px":"16px";h.style.textAlign="right";h.style.position="absolute";h.style.left="40px";h.style.bottom=
-"24px";h.style.right="40px";F=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});F.className="geBtn";!a.editor.cancelFirst||e&&null==f||h.appendChild(F);b||a.isOffline()||!d||null!=c||e||(A=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),A.className="geBtn",h.appendChild(A));b||"1"==urlParams.embed||e||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,
-"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(D.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",h.appendChild(b));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple",
-"multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),p.className="geBtn",h.appendChild(p));h.appendChild(B);a.editor.cancelFirst||null!=c||e&&null==f||h.appendChild(F);G.appendChild(h);this.container=G},CreateDialog=function(a,b,d,c,e,f,k,n,m,g,h,l,q,t,p){function x(c,d,g,h){function u(){mxEvent.addListener(e,"click",function(){var c=g;if(k){var d=w.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:A.value,
-l="";c==App.MODE_GOOGLE?l=a.drive.extension:c==App.MODE_GITHUB?l=a.gitHub.extension:c==App.MODE_TRELLO?l=a.trello.extension:c==App.MODE_DROPBOX?l=a.dropbox.extension:c==App.MODE_ONEDRIVE?l=a.oneDrive.extension:c==App.MODE_DEVICE&&(l=".xml");0<=h&&(d=d.substring(0,h));w.value=d+l}}z(g)})}var e=document.createElement("a");e.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom=
-"6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(f);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var p=document.createElement("div");e.appendChild(p);mxUtils.write(p,d);if(null!=h&&null==a[h]){f.style.visibility="hidden";mxUtils.setOpacity(p,10);var v=new Spinner({lines:12,
-length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(e);var t=window.setTimeout(function(){null==a[h]&&(v.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(t),mxUtils.setOpacity(p,100),f.style.visibility="",v.stop(),u())}))}else u();G.appendChild(e);++F==l&&(mxUtils.br(G),F=0)}function z(b){var c=w.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,
-b)}k=null!=k?k:!0;n=null!=n?n:!0;l=null!=l?l:4;var v=document.createElement("div");null==c&&a.addLanguageMenu(v);var u=document.createElement("h2");mxUtils.write(u,e||mxResources.get("create"));u.style.marginTop="0px";u.style.marginBottom="24px";v.appendChild(u);mxUtils.write(v,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",b);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};v.appendChild(w);null!=q&&null!=t&&"image/"==t.substring(0,6)&&(w.style.width="160px",e=null,"image/svg+xml"==t&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(q),q=e.getElementsByTagName("svg")[0],t=parseInt(q.getAttribute("width")),p=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+t+" "+p),q.setAttribute("width","120px"),q.setAttribute("height","80px")):
-(e=document.createElement("img"),e.setAttribute("src","data:"+t+(p?";base64,":";utf8,")+q)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),v.appendChild(e),m&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){z("_blank")})));mxUtils.br(v);var G=document.createElement("div");G.style.textAlign="center";var F=0;G.style.marginTop=
-"6px";v.appendChild(G);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),A.appendChild(e),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),
-mxUtils.write(e,mxResources.get("oneDrive")),A.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),A.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
-App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),A.appendChild(e),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),A.appendChild(e),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));
-if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),A.appendChild(e),a.mode!=App.MODE_DEVICE&&n||e.setAttribute("selected","selected"),h&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),
-mxUtils.write(n,mxResources.get("browser")),A.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="center";null!=g&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),e.className="geBtn",n.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),
-window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&n.appendChild(e);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),q.className="geBtn",n.appendChild(q));m&&Editor.popupsAllowed&&(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),m.className="geBtn",n.appendChild(m));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){z(h?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",
-n.appendChild(f));a.editor.cancelFirst||n.appendChild(e);mxEvent.addListener(w,"keypress",function(b){13==b.keyCode?z(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});v.appendChild(n);this.container=v},PopupDialog=function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();
-null!=c&&c()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";f.appendChild(k);mxUtils.br(f);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});n.className="geBtn gePrimaryBtn";n.style.width=k.style.width;f.appendChild(n);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var k=a.editor.graph,n=document.createElement("div");
-mxUtils.write(n,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",d);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize",
+h(c4&63)},n=new XMLHttpRequest;n.open("GET",d+function(a){r="";for(k=0;k<a.length;k+=3)r=k+2==a.length?r+e(a.charCodeAt(k),a.charCodeAt(k+1),0):k+1==a.length?r+e(a.charCodeAt(k),0,0):r+e(a.charCodeAt(k),a.charCodeAt(k+1),a.charCodeAt(k+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);"plantUmlTxt"!=c&&(n.responseType="blob");n.onload=function(d){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){a.spinner.stop();g.getModel().beginUpdate();try{cell=g.insertVertex(null,
+null,"<pre>"+this.response+"</pre>",f.x,f.y,1,1,"text;html=1;overflow=fill;"),g.updateCellSize(cell,!0)}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())}else d=new FileReader,d.readAsDataURL(this.response),d.onload=function(c){var d=new Image;d.onload=function(){a.spinner.stop();var h=d.width,n=d.height;if(0==h&&0==n){var t=c.target.result,e=t.indexOf(","),t=decodeURIComponent(escape(atob(t.substring(e+1)))),t=mxUtils.parseXml(t).getElementsByTagName("svg");
+0<t.length&&(h=parseFloat(t[0].getAttribute("width")),n=parseFloat(t[0].getAttribute("height")))}g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,f.x,f.y,h,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};d.src=c.target.result},d.onerror=function(b){a.handleError(b)};else a.spinner.stop(),a.handleError(d)};n.onerror=
+function(b){a.handleError(b)};n.send()}}else if("table"==c){for(var t=null,w=[],q=0,k=0;k<d.length;k++)if(n=mxUtils.trim(d[k]),"create table"==n.substring(0,12).toLowerCase())n=mxUtils.trim(n.substring(12)),"("==n.charAt(n.length-1)&&(n=n.substring(0,n.lastIndexOf(" "))),t=new mxCell(n,new mxGeometry(q,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
+t.vertex=!0,w.push(t),n=a.editor.graph.getPreferredSizeForCell(m),null!=n&&(t.geometry.width=n.width+10);else if(null!=t&&")"==n.charAt(0))q+=t.geometry.width+40,t=null;else if("("!=n&&null!=t&&(n=n.substring(0,","==n.charAt(n.length-1)?n.length-1:n.length),"primary key"!=n.substring(0,11).toLowerCase())){var l=n.toLowerCase().indexOf("primary key"),n=n.replace(/primary key/i,""),m=new mxCell(n,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+m.vertex=!0;n=sb.cloneCell(m,0<l?"PK":"");n.connectable=!1;n.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";n.geometry.width=30;n.geometry.height=26;m.insert(n);n=a.editor.graph.getPreferredSizeForCell(m);null!=n&&t.geometry.width<n.width+10&&(t.geometry.width=Math.min(220,n.width+10));t.insert(m);t.geometry.height+=26}0<w.length&&(g=a.editor.graph,
+d=g.view,n=g.getGraphBounds(),g.setSelectionCells(g.importCells(w,Math.ceil(Math.max(0,n.x/d.scale-d.translate.x)+4*g.gridSize),Math.ceil(Math.max(0,(n.y+n.height)/d.scale-d.translate.y)+4*g.gridSize))),g.scrollCellToVisible(g.getSelectionCell()))}else if("list"==c){if(0<d.length){g=a.editor.graph;t=new mxCell(d[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+t.vertex=!0;n=g.getPreferredSizeForCell(t);null!=n&&t.geometry.width<n.width+10&&(t.geometry.width=n.width+10);m=[t];if(1<d.length)for(k=1;k<d.length;k++)"--"==d[k]?(n=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),n.vertex=!0,t.geometry.height+=n.geometry.height,t.insert(n),m.push(n)):0<d[k].length&&";"!=d[k].charAt(0)&&(q=new mxCell(d[k],
+new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),q.vertex=!0,n=g.getPreferredSizeForCell(q),null!=n&&q.geometry.width<n.width&&(q.geometry.width=n.width),t.geometry.width=Math.max(t.geometry.width,q.geometry.width),t.geometry.height+=q.geometry.height,t.insert(q),m.push(q));g.getModel().beginUpdate();try{t=g.importCells([t],f.x,f.y)[0],g.fireEvent(new mxEventObject("cellsInserted",
+"cells",[t].concat(t.children)))}finally{g.getModel().endUpdate()}g.setSelectionCell(t);g.scrollCellToVisible(g.getSelectionCell())}}else{for(var m=function(a){var b=A[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,A[a]=b,w.push(b));return b},A={},w=[],k=0;k<d.length;k++)if(";"!=d[k].charAt(0)){var C=d[k].split("->");2<=C.length&&(q=m(C[0]),l=m(C[C.length-1]),C=new mxCell(2<C.length?C[1]:"",new mxGeometry),C.edge=!0,q.insertEdge(C,!0),l.insertEdge(C,!1),
+w.push(C))}if(0<w.length){d=document.createElement("div");d.style.visibility="hidden";document.body.appendChild(d);g=new Graph(d);g.getModel().beginUpdate();try{w=g.importCells(w);for(k=0;k<w.length;k++)g.getModel().isVertex(w[k])&&(n=g.getPreferredSizeForCell(w[k]),w[k].geometry.width=Math.max(w[k].geometry.width,n.width),w[k].geometry.height=Math.max(w[k].geometry.height,n.height));t=new mxFastOrganicLayout(g);t.disableEdgeStyle=!1;t.forceConstant=120;t.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();
+m=[];a.editor.graph.getModel().beginUpdate();try{m=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(m[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();d.parentNode.removeChild(d)}}}function e(){return"list"==l.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+"table"==l.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==l.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
+"plantUmlSvg"==l.value||"plantUmlTxt"==l.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();b=document.createElement("div");b.style.textAlign="right";var k=document.createElement("textarea");k.style.resize="none";k.style.width="100%";k.style.height=
+"354px";k.style.marginBottom="16px";var l=document.createElement("select"),m=document.createElement("option");m.setAttribute("value","list");mxUtils.write(m,mxResources.get("list"));l.appendChild(m);null!=d&&"fromText"!=d||m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value","table");mxUtils.write(m,mxResources.get("formatSql"));l.appendChild(m);"formatSql"==d&&m.setAttribute("selected","selected");m=document.createElement("option");m.setAttribute("value",
+"diagram");mxUtils.write(m,mxResources.get("diagram"));l.appendChild(m);m=document.createElement("option");m.setAttribute("value","plantUmlSvg");mxUtils.write(m,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&m.setAttribute("selected","selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");
+mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(l.appendChild(m),l.appendChild(d),l.appendChild(g));var h=e();k.value=h;b.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];
+var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));b.appendChild(l);mxEvent.addListener(l,"change",function(){var a=e();if(0==k.value.length||k.value==h)h=a,k.value=h});d=mxUtils.button(mxResources.get("close"),function(){k.value==h?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);m=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();c(k.value,l.value)});
+b.appendChild(m);m.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(d);this.container=b},NewDialog=function(a,b,d,c,e,f,k,l,m,g,h,n,q,u,p){function v(){for(var a=!0;A<Q.length&&(a||0!=mxUtils.mod(A,30));)a=Q[A++],t(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function y(){if(S)d||a.hideDialog(),u(S,O,E.value);else if(c)d||a.hideDialog(),c(Z,E.value);else{var b=E.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==
+App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,Z,null!=X&&0<X.length?X:null,null,function(){a.hideDialog()},null,c)})}}function z(a,b,c,d,g){null!=N&&(N.style.backgroundColor="transparent",N.style.border="1px solid transparent");C.removeAttribute("disabled");Z=b;X=c;N=a;S=d;O=g;N.style.backgroundColor=l;N.style.border=m}function t(a,b,c,d,g,h,t,n){var e=document.createElement("div");e.className="geTemplate";e.style.height=
+R+"px";e.style.width=T+"px";null!=d&&0<d.length&&e.setAttribute("title",d);if(null!=h)e.style.backgroundImage="url("+h+")",e.style.backgroundSize="contain",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",mxEvent.addListener(e,"click",function(b){z(e,null,null,a,t)}),mxEvent.addListener(e,"dblclick",function(a){y()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);e.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";e.style.backgroundPosition=
+"center center";e.style.backgroundRepeat="no-repeat";var f=!1;mxEvent.addListener(e,"click",function(c){C.setAttribute("disabled","disabled");e.style.backgroundColor="transparent";e.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(z(e,a.getText(),b),f&&y())}))});mxEvent.addListener(e,"dblclick",function(a){f=!0})}else e.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+
+"</td></tr></table>",g&&z(e),null!=n?mxEvent.addListener(e,"click",n):(mxEvent.addListener(e,"click",function(a){z(e)}),mxEvent.addListener(e,"dblclick",function(a){y()}));I.appendChild(e)}function w(){mxEvent.addListener(I,"scroll",function(a){I.scrollTop+I.clientHeight>=I.scrollHeight&&(v(),mxEvent.consume(a))});var a=null,b;for(b in V){var c=document.createElement("div"),d=mxResources.get(b),h=V[b];null==d&&(d=b.substring(0,1).toUpperCase()+b.substring(1));18<d.length&&(d=d.substring(0,18)+"&hellip;");
+c.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";c.setAttribute("title",d+" ("+h.length+")");mxUtils.write(c,c.getAttribute("title"));null!=g&&(c.style.padding=g);W.appendChild(c);null==a&&(a=c,a.style.backgroundColor=k);(function(b,d){mxEvent.addListener(c,"click",function(){a!=d&&(a.style.backgroundColor="",a=d,a.style.backgroundColor=k,I.scrollTop=0,I.innerHTML="",A=0,Q=V[b],B=null,v())})})(b,c)}v()}d=null!=
+d?d:!0;e=null!=e?e:!1;k=null!=k?k:"#ebf2f9";l=null!=l?l:"#e6eff8";m=null!=m?m:"1px solid #ccd9ea";h=null!=h?h:TEMPLATE_PATH+"/index.xml";var F=document.createElement("div");F.style.height="100%";var D=document.createElement("div");D.style.whiteSpace="nowrap";D.style.height="46px";d&&F.appendChild(D);var x=document.createElement("img");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.width="40px";x.style.height="40px";x.style.marginRight="10px";x.style.paddingBottom="4px";x.src=
+a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&D.appendChild(x);d&&mxUtils.write(D,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
+mxResources.get("filename"))+":");x=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?x=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?x=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?x=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?x=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(x=a.trello.extension);var E=document.createElement("input");E.setAttribute("value",a.defaultFilename+x);E.style.marginRight="20px";E.style.marginLeft="10px";E.style.width=
+b?"220px":"430px";this.init=function(){d&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?E.select():document.execCommand("selectAll",!1,null))};d&&D.appendChild(E);var D=!1,A=0,C=mxUtils.button(mxResources.get("create"),function(){C.setAttribute("disabled","disabled");y();C.removeAttribute("disabled")});C.className="geBtn gePrimaryBtn";if(n||q){var J=[],B=null,L=function(a){C.setAttribute("disabled","disabled");for(var b=0;b<J.length;b++)J[b].className=b==
+a?"geBtn gePrimaryBtn":"geBtn"},D=!0,x=document.createElement("div");x.style.whiteSpace="nowrap";x.style.height="30px";F.appendChild(x);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){W.style.display="";I.style.left="160px";L(0);I.scrollTop=0;I.innerHTML="";A=0;B!=Q&&(Q=B,v(),B=null)});J.push(H);x.appendChild(H);var G=function(a){W.style.display="none";I.style.left="30px";L(a?-1:1);null==B&&(B=Q);I.scrollTop=0;I.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,
+radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(I);A=0;var c=function(a,c){b.stop();Q=a;c?I.innerHTML=c:0==a.length?I.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(I.innerHTML="",v())};a?q(M.value,c):n(c)};n&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){G()}),x.appendChild(H),J.push(H));if(q){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";x.appendChild(H);
+var M=document.createElement("input");M.style.marginRight="10px";M.style.marginLeft="10px";M.style.width="220px";mxEvent.addListener(M,"keypress",function(a){13==a.keyCode&&G(!0)});x.appendChild(M);H=mxUtils.button(mxResources.get("search"),function(){G(!0)});H.className="geBtn";x.appendChild(H)}L(0)}var X=null,Z=null,N=null,S=null,O=null,I=document.createElement("div");I.style.border="1px solid #d3d3d3";I.style.position="absolute";I.style.left="160px";I.style.right="34px";D=(d?72:40)+(D?30:0);I.style.top=
+D+"px";I.style.bottom="68px";I.style.margin="6px 0 0 -1px";I.style.padding="6px";I.style.overflow="auto";var W=document.createElement("div");W.style.cssText="position:absolute;left:30px;width:128px;top:"+D+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var R=140,T=140,V={},K=1;V.basic=[{title:"blankDiagram",select:!0}];var Q=V.basic;if(!b){F.appendChild(W);F.appendChild(I);var P=!1;mxUtils.get(h,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==
+typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=V[b];null==c&&(K++,c=[],V[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}w()}})}mxEvent.addListener(E,"keypress",function(a){13==a.keyCode&&y()});h=document.createElement("div");h.style.marginTop=b?"4px":"16px";h.style.textAlign="right";h.style.position="absolute";h.style.left="40px";h.style.bottom=
+"24px";h.style.right="40px";D=mxUtils.button(mxResources.get("cancel"),function(){null!=f&&f();a.hideDialog(!0)});D.className="geBtn";!a.editor.cancelFirst||e&&null==f||h.appendChild(D);b||a.isOffline()||!d||null!=c||e||(x=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),x.className="geBtn",h.appendChild(x));b||"1"==urlParams.embed||e||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,
+"",mxResources.get("create"),function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",h.appendChild(b));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){var b=document.createElement("input");b.setAttribute("multiple",
+"multiple");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(c){a.openFiles(b.files,!0)});b.click()}),p.className="geBtn",h.appendChild(p));h.appendChild(C);a.editor.cancelFirst||null!=c||e&&null==f||h.appendChild(D);F.appendChild(h);this.container=F},CreateDialog=function(a,b,d,c,e,f,k,l,m,g,h,n,q,u,p){function v(c,d,g,h){function t(){mxEvent.addListener(e,"click",function(){var c=g;if(k){var d=w.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:x.value,
+e="";c==App.MODE_GOOGLE?e=a.drive.extension:c==App.MODE_GITHUB?e=a.gitHub.extension:c==App.MODE_TRELLO?e=a.trello.extension:c==App.MODE_DROPBOX?e=a.dropbox.extension:c==App.MODE_ONEDRIVE?e=a.oneDrive.extension:c==App.MODE_DEVICE&&(e=".xml");0<=h&&(d=d.substring(0,h));w.value=d+e}}y(g)})}var e=document.createElement("a");e.style.overflow="hidden";var f=document.createElement("img");f.src=c;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom=
+"6px";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.className="geBaseButton";e.style.position="relative";e.style.margin="4px";e.style.padding="8px 8px 10px 8px";e.style.whiteSpace="nowrap";e.appendChild(f);mxClient.IS_QUIRKS&&(e.style.cssFloat="left",e.style.zoom="1");e.style.color="gray";e.style.fontSize="11px";var q=document.createElement("div");e.appendChild(q);mxUtils.write(q,d);if(null!=h&&null==a[h]){f.style.visibility="hidden";mxUtils.setOpacity(q,10);var u=new Spinner({lines:12,
+length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(e);var p=window.setTimeout(function(){null==a[h]&&(u.stop(),e.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(p),mxUtils.setOpacity(q,100),f.style.visibility="",u.stop(),t())}))}else t();F.appendChild(e);++D==n&&(mxUtils.br(F),D=0)}function y(b){var c=w.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,
+b)}k=null!=k?k:!0;l=null!=l?l:!0;n=null!=n?n:4;var z=document.createElement("div");null==c&&a.addLanguageMenu(z);var t=document.createElement("h2");mxUtils.write(t,e||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom="24px";z.appendChild(t);mxUtils.write(z,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",b);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};z.appendChild(w);null!=q&&null!=u&&"image/"==u.substring(0,6)&&(w.style.width="160px",e=null,"image/svg+xml"==u&&mxClient.IS_SVG?(e=document.createElement("div"),e.innerHTML=mxUtils.trim(q),q=e.getElementsByTagName("svg")[0],u=parseInt(q.getAttribute("width")),p=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+u+" "+p),q.setAttribute("width","120px"),q.setAttribute("height","80px")):
+(e=document.createElement("img"),e.setAttribute("src","data:"+u+(p?";base64,":";utf8,")+q)),e.style.position="absolute",e.style.top="70px",e.style.right="100px",e.style.maxWidth="120px",e.style.maxHeight="80px",mxUtils.setPrefixedStyle(e.style,"transform","translate(50%,-50%)"),z.appendChild(e),m&&Editor.popupsAllowed&&(e.style.cursor="pointer",mxEvent.addListener(e,"click",function(){y("_blank")})));mxUtils.br(z);var F=document.createElement("div");F.style.textAlign="center";var D=0;F.style.marginTop=
+"6px";z.appendChild(F);var x=document.createElement("select");x.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(e,mxResources.get("googleDrive")),x.appendChild(e),v(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_ONEDRIVE),
+mxUtils.write(e,mxResources.get("oneDrive")),x.appendChild(e),a.mode==App.MODE_ONEDRIVE&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(e,mxResources.get("dropbox")),x.appendChild(e),a.mode==App.MODE_DROPBOX&&e.setAttribute("selected","selected"),v(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
+App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_GITHUB),mxUtils.write(e,mxResources.get("github")),x.appendChild(e),v(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(e=document.createElement("option"),e.setAttribute("value",App.MODE_TRELLO),mxUtils.write(e,mxResources.get("trello")),x.appendChild(e),v(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));
+if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)e=document.createElement("option"),e.setAttribute("value",App.MODE_DEVICE),mxUtils.write(e,mxResources.get("device")),x.appendChild(e),a.mode!=App.MODE_DEVICE&&l||e.setAttribute("selected","selected"),h&&v(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);l&&isLocalStorage&&"0"!=urlParams.browser&&(l=document.createElement("option"),l.setAttribute("value",App.MODE_BROWSER),
+mxUtils.write(l,mxResources.get("browser")),x.appendChild(l),a.mode==App.MODE_BROWSER&&l.setAttribute("selected","selected"),v(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="center";null!=g&&(e=mxUtils.button(mxResources.get("help"),function(){a.openLink(g)}),e.className="geBtn",l.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),
+window.close(),window.location.href=a.getUrl())});e.className="geBtn";a.editor.cancelFirst&&l.appendChild(e);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),q.className="geBtn",l.appendChild(q));m&&Editor.popupsAllowed&&(m=mxUtils.button(mxResources.get("openInNewWindow"),function(){y("_blank")}),m.className="geBtn",l.appendChild(m));mxClient.IS_IOS||(f=mxUtils.button(f||mxResources.get("create"),function(){y(h?"download":App.MODE_DEVICE)}),f.className="geBtn gePrimaryBtn",
+l.appendChild(f));a.editor.cancelFirst||l.appendChild(e);mxEvent.addListener(w,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});z.appendChild(l);this.container=z},PopupDialog=function(a,b,d,c,e){e=null!=e?e:!0;var f=document.createElement("div");f.style.textAlign="left";mxUtils.write(f,mxResources.get("fileOpenLocation"));mxUtils.br(f);mxUtils.br(f);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){e&&a.hideDialog();
+null!=c&&c()});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(){e&&a.hideDialog();null!=d&&d();a.openLink(b)});l.className="geBtn gePrimaryBtn";l.style.width=k.style.width;f.appendChild(l);mxUtils.br(f);mxUtils.br(f);mxUtils.write(f,mxResources.get("allowPopups"));this.container=f},ImageDialog=function(a,b,d,c,e,f){f=null!=f?f:!0;var k=a.editor.graph,l=document.createElement("div");
+mxUtils.write(l,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var m=document.createElement("input");m.setAttribute("value",d);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize",
"off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?
-"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});b.appendChild(m);b.appendChild(d);n.appendChild(b);var g=function(b,d,g,h){var l="data:"==b.substring(0,5);!a.isOffline()||l&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var e=!1===h?1:null!=d&&null!=g?Math.max(d/
-l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));f&&(b=a.convertDataUri(b));c(b,Math.round(Number(l.width)*e),Math.round(Number(l.height)*e))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},h=function(b,d){if(null!=b){var h=e?null:k.getModel().getGeometry(k.getSelectionCell());null!=h?g(b,h.width,
-h.height,d):g(b,null,null,d)}else a.hideDialog(),c(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=n.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));
-mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,g,l,e,f){h(a,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&
+"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){m.value="";m.focus()});b.appendChild(m);b.appendChild(d);l.appendChild(b);var g=function(b,d,g,h){var e="data:"==b.substring(0,5);!a.isOffline()||e&&"undefined"===typeof chrome?0<b.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(e){a.spinner.stop();a.hideDialog();var n=!1===h?1:null!=d&&null!=g?Math.max(d/
+e.width,g/e.height):Math.min(1,Math.min(520/e.width,520/e.height));f&&(b=a.convertDataUri(b));c(b,Math.round(Number(e.width)*n),Math.round(Number(e.height)*n))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),c(b)):(b=a.convertDataUri(b),d=null==d?120:d,g=null==g?100:g,a.hideDialog(),c(b,d,g))},h=function(b,d){if(null!=b){var h=e?null:k.getModel().getGeometry(k.getSelectionCell());null!=h?g(b,h.width,
+h.height,d):g(b,null,null,d)}else a.hideDialog(),c(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=l.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));
+mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,g,e,n,f){h(a,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&
h(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(m.value=
-a.url));m.focus()};if(Graph.fileSupport){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(l,"change",function(b){a.importFiles(l.files,0,0,a.maxImageSize,function(a,b,c,d,g,l){h(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){l.click()});q.className="geBtn";d.appendChild(q)}}document.createElement("canvas").getContext&&
+a.url));m.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,c,d,g,e){h(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var q=mxUtils.button(mxResources.get("open"),function(){n.click()});q.className="geBtn";d.appendChild(q)}}document.createElement("canvas").getContext&&
"data:image/"==m.value.substring(0,11)&&"data:image/svg"!=m.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,m.value,function(a){m.value=a});a.showDialog(b.container,200,180,!0,!0);b.init()}),q.className="geBtn",d.appendChild(q));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),q.className="geBtn",d.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&(q=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),q.className="geBtn",d.appendChild(q)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&h(m.value)});q=mxUtils.button(mxResources.get("apply"),function(){h(m.value)});q.className="geBtn gePrimaryBtn";d.appendChild(q);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
-"center 65%",n.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),n.appendChild(b));n.appendChild(d);this.container=n},LinkDialog=function(a,b,d,c,e){function f(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
-b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);z.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var m=document.createElement("input");
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),q.className="geBtn",d.appendChild(q)));mxEvent.addListener(m,"keypress",function(a){13==a.keyCode&&h(m.value)});q=mxUtils.button(mxResources.get("apply"),function(){h(m.value)});q.className="geBtn gePrimaryBtn";d.appendChild(q);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition=
+"center 65%",l.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),l.appendChild(b));l.appendChild(d);this.container=l},LinkDialog=function(a,b,d,c,e){function f(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);y.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var l=document.createElement("div");l.className="geTitle";l.style.backgroundColor="transparent";l.style.borderColor="transparent";l.style.whiteSpace="nowrap";l.style.textOverflow="clip";l.style.cursor="default";mxClient.IS_VML||(l.style.paddingRight="20px");var m=document.createElement("input");
m.setAttribute("placeholder",mxResources.get("dragUrlsHere"));m.setAttribute("type","text");m.style.marginTop="6px";m.style.width="400px";m.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";var g=document.createElement("div");g.setAttribute("title",mxResources.get("reset"));g.style.position="relative";g.style.left="-16px";g.style.width="12px";g.style.height="14px";g.style.cursor="pointer";
-g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){m.value="";m.focus()});var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
-l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(m.setAttribute("value",b),h.setAttribute("checked","checked"),h.defaultChecked=!0);m.style.width="380px";n.appendChild(h);n.appendChild(m);n.appendChild(g);mxUtils.br(n);n.appendChild(l);e=!1;for(g=0;g<a.pages.length;g++){var t=
-document.createElement("option");mxUtils.write(t,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));t.setAttribute("value","data:page/id,"+a.pages[g].getId());b==t.getAttribute("value")&&(t.setAttribute("selected","selected"),e=!0);q.appendChild(t)}if(!e&&l.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");q.appendChild(p);mxEvent.addListener(q,
-"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}n.appendChild(q)}else m.setAttribute("value",b),n.appendChild(m),n.appendChild(g);k.appendChild(n);var x=mxUtils.button(d,function(){a.hideDialog();c(l.checked?"pageNotFound"!==q.value?q.value:b:m.value,LinkDialog.selectedDocs)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){l.checked?q.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(m,"focus",function(){l.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
-mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),h.setAttribute("checked","checked"),h.checked=!0,x.click());a.stopPropagation();a.preventDefault()}),!1)}};var z=document.createElement("div");
-z.style.marginTop="20px";z.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&z.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
+g.style.display=mxClient.IS_VML?"inline":"inline-block";g.style.top=(mxClient.IS_VML?0:3)+"px";g.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(g,"click",function(){m.value="";m.focus()});var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(e&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(m.setAttribute("value",b),h.setAttribute("checked","checked"),h.defaultChecked=!0);m.style.width="380px";l.appendChild(h);l.appendChild(m);l.appendChild(g);mxUtils.br(l);l.appendChild(n);e=!1;for(g=0;g<a.pages.length;g++){var u=
+document.createElement("option");mxUtils.write(u,a.pages[g].getName()||mxResources.get("pageWithNumber",[g+1]));u.setAttribute("value","data:page/id,"+a.pages[g].getId());b==u.getAttribute("value")&&(u.setAttribute("selected","selected"),e=!0);q.appendChild(u)}if(!e&&n.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");q.appendChild(p);mxEvent.addListener(q,
+"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}l.appendChild(q)}else m.setAttribute("value",b),l.appendChild(m),l.appendChild(g);k.appendChild(l);var v=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==q.value?q.value:b:m.value,LinkDialog.selectedDocs)});v.style.verticalAlign="middle";v.className="geBtn gePrimaryBtn";this.init=function(){n.checked?q.focus():(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+m.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(m,"focus",function(){n.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
+mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(m.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),h.setAttribute("checked","checked"),h.checked=!0,v.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");
+y.style.marginTop="20px";y.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&y.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
"https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);m.value=b;m.focus()}else LinkDialog.selectedDocs=null;m.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&f(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(d).addView(g).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&f(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){m.value=a[0].link;m.focus()}})});null!=a.oneDrive&&f(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){m.value=b.value[0].webUrl;
-m.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(l.checked?q.value:m.value,LinkDialog.selectedDocs))});z.appendChild(x);a.editor.cancelFirst||z.appendChild(d);k.appendChild(z);this.container=
+m.focus()})});null!=a.gitHub&&f(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");m.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;m.focus()}})});mxEvent.addListener(m,"keypress",function(b){13==b.keyCode&&(a.hideDialog(),c(n.checked?q.value:m.value,LinkDialog.selectedDocs))});y.appendChild(v);a.editor.cancelFirst||y.appendChild(d);k.appendChild(y);this.container=
k},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
"/logo-flat.png"));b.appendChild(d);mxUtils.br(b);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
b},FeedbackDialog=function(a){var b=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var e=mxUtils.button(mxResources.get("sendMessage"),
function(){var b=(k.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+m.value+b),
function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});e.className="geBtn gePrimaryBtn";e.setAttribute("disabled","disabled");var f=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change",
function(){0<c.value.length&&0<f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&f.test(c.value)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b.appendChild(c);this.init=function(){c.focus()};var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(k);
-var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(n);mxEvent.addListener(n,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes"));
-b.appendChild(m);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(d.appendChild(n),d.appendChild(e)):(d.appendChild(e),d.appendChild(n));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
+var l=document.createElement("span");mxUtils.write(l," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(l);mxEvent.addListener(l,"click",function(a){k.checked=!k.checked;mxEvent.consume(a)});b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));b.appendChild(d);var m=document.createElement("textarea");m.style.resize="none";m.style.width="600px";m.style.height="140px";m.style.marginTop="6px";m.setAttribute("placeholder",mxResources.get("commentsNotes"));
+b.appendChild(m);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst?(d.appendChild(l),d.appendChild(e)):(d.appendChild(e),d.appendChild(l));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("revisionHistory"));c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";c.appendChild(f);var 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);c.appendChild(k);var n=new Graph(k);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var m=0,g=null,h=0,l=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[h]?g[h].getAttribute("name"):"pagenumber"==a?h+1:l.apply(this,arguments)};n.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=a.getCurrentFile(),p=null,x=null,z=null,v=null,u=mxUtils.button("",function(){null!=z&&n.zoomIn()});u.className="geSprite geSprite-zoomin";u.setAttribute("title",mxResources.get("zoomIn"));
-u.style.outline="none";u.style.border="none";u.style.margin="2px";u.setAttribute("disabled","disabled");mxUtils.setOpacity(u,20);var w=mxUtils.button("",function(){null!=z&&n.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var G=mxUtils.button("",function(){null!=z&&(n.maxFitScale=8,n.fit(8),n.center())});G.className=
-"geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var F=mxUtils.button("",function(){null!=z&&(n.zoomActual(),n.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 A=
-document.createElement("div");A.style.position="absolute";A.style.textAlign="right";A.style.color="gray";A.style.marginTop="10px";A.style.backgroundColor="transparent";A.style.top="440px";A.style.right="32px";A.style.maxWidth="380px";A.style.cursor="default";var D=mxUtils.button(mxResources.get("download"),function(){if(null!=z){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(z.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
-(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});D.className="geBtn";D.setAttribute("disabled","disabled");var E=mxUtils.button(mxResources.get("restore"),function(){null!=z&&null!=v&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(v):a.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(v);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});E.className="geBtn";E.setAttribute("disabled","disabled");var B=document.createElement("select");B.setAttribute("disabled","disabled");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";var K=null;mxEvent.addListener(B,"change",function(a){null!=
-K&&(K(a),mxEvent.consume(a))});var y=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=z&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(z.documentElement)),window.openWindow(a.getUrl()))});y.className="geBtn";y.setAttribute("disabled","disabled");null!=d&&(y.style.display="none");var H=mxUtils.button(mxResources.get("show"),function(){null!=x&&a.openLink(x.getUrl())});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled",
-"disabled");null!=d&&(H.style.display="none",E.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var J=null;if(null!=b&&0<b.length){k.style.cursor="move";var P=document.createElement("table");P.style.border=
-"1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var R=b.length-1;0<=R;R--){var O=function(c){var d=new Date(c.modifiedDate),l=null;if(0<=d.getTime()){var e=function(b){q.stop();var c=mxUtils.parseXml(b),e=a.editor.extractGraphModel(c.documentElement,!0);if(null!=e){var f=function(b){null!=b&&(b=
-p(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},p=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,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};B.style.display="none";B.innerHTML="";z=c;v=b;g=parseSelectFunction=null;h=0;if("mxfile"==e.nodeName){c=e.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]);
-h=Math.min(m,g.length-1);0<g.length&&f(g[h]);if(1<g.length)for(B.removeAttribute("disabled"),B.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),B.appendChild(c);K=function(){h=m=parseInt(B.value);f(g[m])}}else p(e);A.innerHTML="";mxUtils.write(A,d.toLocaleDateString()+" "+d.toLocaleTimeString());A.setAttribute("title",l.getAttribute("title"));
-u.removeAttribute("disabled");w.removeAttribute("disabled");G.removeAttribute("disabled");F.removeAttribute("disabled");null!=t&&t.isRestricted()||(a.editor.graph.isEnabled()&&E.removeAttribute("disabled"),D.removeAttribute("disabled"),H.removeAttribute("disabled"),y.removeAttribute("disabled"));mxUtils.setOpacity(u,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(F,60)}else B.style.display="none",B.innerHTML="",A.innerHTML="",mxUtils.write(A,mxResources.get("errorLoadingFile"))},
-l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var f=document.createElement("td");f.style.padding="6px";f.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(f,mxResources.get("current")):d.toDateString()===T?mxUtils.write(f,d.toLocaleTimeString()):mxUtils.write(f,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(f);l.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
-(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){x!=c&&(q.stop(),null!=p&&(p.style.backgroundColor=""),x=c,p=l,p.style.backgroundColor="#ebf2f9",v=z=null,A.removeAttribute("title"),A.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",n.getModel().clear(),E.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),F.setAttribute("disabled",
-"disabled"),G.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),mxUtils.setOpacity(u,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(F,20),q.spin(k),c.getXml(function(a){x==c&&e(a)},function(a){q.stop();B.style.display="none";B.innerHTML="";A.innerHTML="";mxUtils.write(A,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){H.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(l)}return l}(b[R]);null!=O&&R==b.length-1&&(J=O)}P.appendChild(V);f.appendChild(P)}else null==t||null==a.drive&&t.constructor==window.DriveFile||null==a.dropbox&&t.constructor==window.DropboxFile?(k.style.display="none",C.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",C.style.display="none",mxUtils.write(f,
-mxResources.get("noRevisions")));this.init=function(){null!=J&&J.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";C.appendChild(B);C.appendChild(u);C.appendChild(w);C.appendChild(F);C.appendChild(G);a.editor.cancelFirst?(e.appendChild(f),e.appendChild(D),e.appendChild(y),e.appendChild(E),e.appendChild(H)):(e.appendChild(D),e.appendChild(y),e.appendChild(E),e.appendChild(H),e.appendChild(f));c.appendChild(e);c.appendChild(C);c.appendChild(A);this.container=
-c},DraftDialog=function(a,b,d,c,e,f,k,n){var m=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);m.appendChild(g);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.marginTop="10px";h.style.width="640px";h.style.top="46px";h.style.bottom="74px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);m.appendChild(h);var l=new Graph(h);
-l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;b=mxUtils.parseXml(d);var q=a.editor.extractGraphModel(b.documentElement,!0),t=0,p=null,x=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=p&&null!=p[t]?p[t].getAttribute("name"):"pagenumber"==a?t+1:x.apply(this,arguments)};l.getLinkForCell=function(){return null};b=mxUtils.button("",function(){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";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){l.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",
-mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var z=mxUtils.button("",function(){l.zoomActual();l.center()});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";mxUtils.setOpacity(z,60);e=mxUtils.button(k||mxResources.get("discard"),e);e.className="geBtn";var v=document.createElement("select");v.style.maxWidth="80px";v.style.position=
-"relative";v.style.top="-2px";v.style.verticalAlign="bottom";v.style.marginRight="6px";v.style.display="none";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(v,"change",function(a){t=parseInt(v.value);c(p[t]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram");
-p=[];for(var g=0;g<d.length;g++)p.push(d[g]);0<p.length&&c(p[t]);if(1<p.length)for(v.style.display="",g=0;g<p.length;g++)d=document.createElement("option"),mxUtils.write(d,p[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==t&&d.setAttribute("selected","selected"),v.appendChild(d)}else b(q)};k.appendChild(v);k.appendChild(b);k.appendChild(d);k.appendChild(z);k.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
-"geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=n&&f.appendChild(n),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=n&&f.appendChild(n),f.appendChild(b));m.appendChild(f);m.appendChild(k);this.container=m},FindWindow=function(a,b,d,c,e){function f(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var g=
-mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function k(){var a=m.model.getDescendants(m.model.getRoot()),b=q.value.toLowerCase(),c=t.checked?new RegExp(b):null,d=null;g!=b&&(g=b,h=null);var l=null==h;if(0<b.length)for(var e=0;e<a.length;e++){var k=m.view.getState(a[e]);if(null!=k&&null!=k.cell.value&&(l||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)?
-(p.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([p])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,k.cell,b))||null!=c&&(c.test(label)||f(c,k.cell,b))))if(l){d=k;break}else null==d&&(d=k);l=l||k==h}null!=d?(h=d,m.scrollCellToVisible(h.cell),m.isEnabled()?m.setSelectionCell(h.cell):m.highlightCell(h.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}
-var n=a.actions.get("find"),m=a.editor.graph,g=null,h=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";l.appendChild(q);mxUtils.br(l);var t=document.createElement("input");
-t.setAttribute("type","checkbox");t.style.marginRight="4px";l.appendChild(t);mxUtils.write(l,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(l);var x=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=h=null;q.focus()});x.setAttribute("title",mxResources.get("reset"));x.style.marginTop="6px";x.style.marginRight="4px";x.className="geBtn";l.appendChild(x);x=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=
-k()?"":"#ffcfcf"}catch(z){a.handleError(z)}});x.setAttribute("title",mxResources.get("find")+" (Enter)");x.style.marginTop="6px";x.className="geBtn gePrimaryBtn";l.appendChild(x);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(v){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&
-a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(n.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),l,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},
-TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:n.model.getDescendants(n.model.getRoot());for(var b=h.value.split(" "),c=[],d=0;d<a.length;d++)if(n.model.isVertex(a[d])||n.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(m)||""):"",l=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),e=0;e<b.length&&l;e++)var f=mxUtils.trim(b[e]).toLowerCase(),l=l&&(0==f.length||0<=mxUtils.indexOf(g,f));else l=0==mxUtils.trim(h.value).length;
-l&&c.push(a[d])}return c}function k(a,b){n.model.beginUpdate();try{for(var c=0;c<a.length;c++)n.model.setVisible(a[c],b)}finally{n.model.endUpdate()}}var n=a.editor.graph,m="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var h=document.createElement("input");h.setAttribute("placeholder",mxResources.get("allTags"));h.setAttribute("type","text");h.style.marginTop="4px";h.style.width="260px";h.style.fontSize="12px";
-h.style.borderRadius="4px";h.style.padding="6px";g.appendChild(h);if(!a.isOffline()||mxClient.IS_CHROMEAPP){h.style.width="240px";var l=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");l.firstChild.style.marginBottom="6px";l.style.marginLeft="6px";g.appendChild(l)}mxEvent.addListener(h,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,
-300,80,!0,!0);b.init()});h.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);l=mxUtils.button(mxResources.get("hide"),function(){k(f(),!1)});l.setAttribute("title",mxResources.get("hide"));l.style.marginTop="8px";l.style.marginRight="4px";l.className="geBtn";g.appendChild(l);l=mxUtils.button(mxResources.get("show"),function(){var a=f();k(a,!0);n.isEnabled()&&n.setSelectionCells(a)});l.setAttribute("title",mxResources.get("show"));l.style.marginTop="8px";l.style.marginRight=
-"4px";l.className="geBtn";g.appendChild(l);var q=a.actions.get("tags"),l=mxUtils.button(mxResources.get("close"),function(){q.funct()});l.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");l.style.marginTop="8px";l.className="geBtn gePrimaryBtn";g.appendChild(l);mxEvent.addListener(h,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
-this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(h.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,
-mxResources.get("authorizationRequired"));var k="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";b==a.drive?(k=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(k=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(k=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):b==a.gitHub?(k=mxResources.get("github"),n.src=IMAGE_PATH+
-"/github-logo-white.svg"):b==a.trello&&(k=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var m=document.createElement("input");m.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){c(m.checked)});k.insertBefore(n,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";e.appendChild(f);e.appendChild(a);e.appendChild(k);d&&(d=document.createElement("p"),
+"376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);c.appendChild(k);var l=new Graph(k);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;var m=0,g=null,h=0,n=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a&&null!=g&&null!=g[h]?g[h].getAttribute("name"):"pagenumber"==a?h+1:n.apply(this,arguments)};l.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+l.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(l.container)}));var q=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),u=a.getCurrentFile(),p=null,v=null,y=null,z=null,t=mxUtils.button("",function(){null!=y&&l.zoomIn()});t.className="geSprite geSprite-zoomin";t.setAttribute("title",mxResources.get("zoomIn"));
+t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var w=mxUtils.button("",function(){null!=y&&l.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var F=mxUtils.button("",function(){null!=y&&(l.maxFitScale=8,l.fit(8),l.center())});F.className=
+"geSprite geSprite-fit";F.setAttribute("title",mxResources.get("fit"));F.style.outline="none";F.style.border="none";F.style.margin="2px";F.setAttribute("disabled","disabled");mxUtils.setOpacity(F,20);var D=mxUtils.button("",function(){null!=y&&(l.zoomActual(),l.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var x=
+document.createElement("div");x.style.position="absolute";x.style.textAlign="right";x.style.color="gray";x.style.marginTop="10px";x.style.backgroundColor="transparent";x.style.top="440px";x.style.right="32px";x.style.maxWidth="380px";x.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=y){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(y.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
+(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var A=mxUtils.button(mxResources.get("restore"),function(){null!=y&&null!=z&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(z):a.spinner.spin(document.body,mxResources.get("restoring"))&&u.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(z);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});A.className="geBtn";A.setAttribute("disabled","disabled");var C=document.createElement("select");C.setAttribute("disabled","disabled");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";var J=null;mxEvent.addListener(C,"change",function(a){null!=
+J&&(J(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=y&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(y.documentElement)),window.openWindow(a.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=d&&(B.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=v&&a.openLink(v.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
+"disabled");null!=d&&(L.style.display="none",A.className="geBtn gePrimaryBtn");e=document.createElement("div");e.style.position="absolute";e.style.top="482px";e.style.width="640px";e.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var G=null;if(null!=b&&0<b.length){k.style.cursor="move";var M=document.createElement("table");M.style.border=
+"1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var X=document.createElement("tbody"),Z=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var N=b.length-1;0<=N;N--){var S=function(c){var d=new Date(c.modifiedDate),e=null;if(0<=d.getTime()){var n=function(b){q.stop();var c=mxUtils.parseXml(b),n=a.editor.extractGraphModel(c.documentElement,!0);if(null!=n){var f=function(b){null!=b&&(b=
+p(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},p=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};C.style.display="none";C.innerHTML="";y=c;z=b;g=parseSelectFunction=null;h=0;if("mxfile"==n.nodeName){c=n.getElementsByTagName("diagram");g=[];for(b=0;b<c.length;b++)g.push(c[b]);
+h=Math.min(m,g.length-1);0<g.length&&f(g[h]);if(1<g.length)for(C.removeAttribute("disabled"),C.style.display="",b=0;b<g.length;b++)c=document.createElement("option"),mxUtils.write(c,g[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),C.appendChild(c);J=function(){h=m=parseInt(C.value);f(g[m])}}else p(n);x.innerHTML="";mxUtils.write(x,d.toLocaleDateString()+" "+d.toLocaleTimeString());x.setAttribute("title",e.getAttribute("title"));
+t.removeAttribute("disabled");w.removeAttribute("disabled");F.removeAttribute("disabled");D.removeAttribute("disabled");null!=u&&u.isRestricted()||(a.editor.graph.isEnabled()&&A.removeAttribute("disabled"),E.removeAttribute("disabled"),L.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(t,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(F,60);mxUtils.setOpacity(D,60)}else C.style.display="none",C.innerHTML="",x.innerHTML="",mxUtils.write(x,mxResources.get("errorLoadingFile"))},
+e=document.createElement("tr");e.style.borderBottom="1px solid lightGray";e.style.fontSize="12px";e.style.cursor="pointer";var f=document.createElement("td");f.style.padding="6px";f.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(f,mxResources.get("current")):d.toDateString()===Z?mxUtils.write(f,d.toLocaleTimeString()):mxUtils.write(f,d.toLocaleDateString()+" "+d.toLocaleTimeString());e.appendChild(f);e.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+
+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(e,"click",function(a){v!=c&&(q.stop(),null!=p&&(p.style.backgroundColor=""),v=c,p=e,p.style.backgroundColor="#ebf2f9",z=y=null,x.removeAttribute("title"),x.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",l.getModel().clear(),A.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),D.setAttribute("disabled",
+"disabled"),F.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),mxUtils.setOpacity(t,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(F,20),mxUtils.setOpacity(D,20),q.spin(k),c.getXml(function(a){v==c&&n(a)},function(a){q.stop();C.style.display="none";C.innerHTML="";x.innerHTML="";mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(e,"dblclick",function(a){L.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);X.appendChild(e)}return e}(b[N]);null!=S&&N==b.length-1&&(G=S)}M.appendChild(X);f.appendChild(M)}else null==u||null==a.drive&&u.constructor==window.DriveFile||null==a.dropbox&&u.constructor==window.DropboxFile?(k.style.display="none",H.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"))):(k.style.display="none",H.style.display="none",mxUtils.write(f,
+mxResources.get("noRevisions")));this.init=function(){null!=G&&G.click()};f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn";H.appendChild(C);H.appendChild(t);H.appendChild(w);H.appendChild(D);H.appendChild(F);a.editor.cancelFirst?(e.appendChild(f),e.appendChild(E),e.appendChild(B),e.appendChild(A),e.appendChild(L)):(e.appendChild(E),e.appendChild(B),e.appendChild(A),e.appendChild(L),e.appendChild(f));c.appendChild(e);c.appendChild(H);c.appendChild(x);this.container=
+c},DraftDialog=function(a,b,d,c,e,f,k,l){var m=document.createElement("div"),g=document.createElement("div");g.style.marginTop="0px";g.style.whiteSpace="nowrap";g.style.overflow="auto";mxUtils.write(g,b);m.appendChild(g);var h=document.createElement("div");h.style.position="absolute";h.style.border="1px solid lightGray";h.style.marginTop="10px";h.style.width="640px";h.style.top="46px";h.style.bottom="74px";h.style.overflow="hidden";mxEvent.disableContextMenu(h);m.appendChild(h);var n=new Graph(h);
+n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var q=a.editor.extractGraphModel(b.documentElement,!0),u=0,p=null,v=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=p&&null!=p[u]?p[u].getAttribute("name"):"pagenumber"==a?u+1:v.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className=
+"geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);g=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});g.className="geSprite geSprite-fit";g.setAttribute("title",
+mxResources.get("fit"));g.style.outline="none";g.style.border="none";g.style.margin="2px";mxUtils.setOpacity(g,60);var y=mxUtils.button("",function(){n.zoomActual();n.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,60);e=mxUtils.button(k||mxResources.get("discard"),e);e.className="geBtn";var z=document.createElement("select");z.style.maxWidth="80px";z.style.position=
+"relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";c=mxUtils.button(f||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.position="absolute";f.style.bottom="30px";f.style.width="640px";f.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";h.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(z,"change",function(a){u=parseInt(z.value);c(p[u]);mxEvent.consume(a)});if("mxfile"==q.nodeName){var d=q.getElementsByTagName("diagram");
+p=[];for(var g=0;g<d.length;g++)p.push(d[g]);0<p.length&&c(p[u]);if(1<p.length)for(z.style.display="",g=0;g<p.length;g++)d=document.createElement("option"),mxUtils.write(d,p[g].getAttribute("name")||mxResources.get("pageWithNumber",[g+1])),d.setAttribute("value",g),g==u&&d.setAttribute("selected","selected"),z.appendChild(d)}else b(q)};k.appendChild(z);k.appendChild(b);k.appendChild(d);k.appendChild(y);k.appendChild(g);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className=
+"geBtn";l=null!=l?mxUtils.button(mxResources.get("ignore"),l):null;null!=l&&(l.className="geBtn");a.editor.cancelFirst?(f.appendChild(b),null!=l&&f.appendChild(l),f.appendChild(e),f.appendChild(c)):(f.appendChild(c),f.appendChild(e),null!=l&&f.appendChild(l),f.appendChild(b));m.appendChild(f);m.appendChild(k);this.container=m},FindWindow=function(a,b,d,c,e){function f(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var d=0;d<b.length;d++)if("label"!=b[d].nodeName){var g=
+mxUtils.trim(b[d].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&g.substring(0,c.length)===c||null!=a&&a.test(g))return!0}}return!1}function k(){var a=m.model.getDescendants(m.model.getRoot()),b=q.value.toLowerCase(),c=u.checked?new RegExp(b):null,d=null;g!=b&&(g=b,h=null);var e=null==h;if(0<b.length)for(var n=0;n<a.length;n++){var k=m.view.getState(a[n]);if(null!=k&&null!=k.cell.value&&(e||null==d)&&(m.model.isVertex(k.cell)||m.model.isEdge(k.cell))&&(m.isHtmlLabel(k.cell)?
+(p.innerHTML=m.getLabel(k.cell),label=mxUtils.extractTextWithWhitespace([p])):label=m.getLabel(k.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==c&&(label.substring(0,b.length)===b||f(c,k.cell,b))||null!=c&&(c.test(label)||f(c,k.cell,b))))if(e){d=k;break}else null==d&&(d=k);e=e||k==h}null!=d?(h=d,m.scrollCellToVisible(h.cell),m.isEnabled()?m.setSelectionCell(h.cell):m.highlightCell(h.cell)):m.isEnabled()&&m.clearSelection();return 0==b.length||null!=d}
+var l=a.actions.get("find"),m=a.editor.graph,g=null,h=null,n=document.createElement("div");n.style.userSelect="none";n.style.overflow="hidden";n.style.padding="10px";n.style.height="100%";var q=document.createElement("input");q.setAttribute("placeholder",mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width="200px";q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";n.appendChild(q);mxUtils.br(n);var u=document.createElement("input");
+u.setAttribute("type","checkbox");u.style.marginRight="4px";n.appendChild(u);mxUtils.write(n,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(n);var v=mxUtils.button(mxResources.get("reset"),function(){q.value="";q.style.backgroundColor="";g=h=null;q.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.className="geBtn";n.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{q.style.backgroundColor=
+k()?"":"#ffcfcf"}catch(y){a.handleError(y)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.className="geBtn gePrimaryBtn";n.appendChild(v);mxEvent.addListener(q,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)l.funct();else if(g!=q.value.toLowerCase()||13==a.keyCode)try{q.style.backgroundColor=k()?"":"#ffcfcf"}catch(z){q.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(n,"keydown",function(b){70==b.keyCode&&
+a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(l.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),n,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},
+TagsWindow=function(a,b,d,c,e){function f(a){a=null!=a?a:l.model.getDescendants(l.model.getRoot());for(var b=h.value.split(" "),c=[],d=0;d<a.length;d++)if(l.model.isVertex(a[d])||l.model.isEdge(a[d])){var g=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(m)||""):"",e=!0;if(0<g.length)for(var g=g.toLowerCase().split(" "),n=0;n<b.length&&e;n++)var f=mxUtils.trim(b[n]).toLowerCase(),e=e&&(0==f.length||0<=mxUtils.indexOf(g,f));else e=0==mxUtils.trim(h.value).length;
+e&&c.push(a[d])}return c}function k(a,b){l.model.beginUpdate();try{for(var c=0;c<a.length;c++)l.model.setVisible(a[c],b)}finally{l.model.endUpdate()}}var l=a.editor.graph,m="tags",g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var h=document.createElement("input");h.setAttribute("placeholder",mxResources.get("allTags"));h.setAttribute("type","text");h.style.marginTop="4px";h.style.width="260px";h.style.fontSize="12px";
+h.style.borderRadius="4px";h.style.padding="6px";g.appendChild(h);if(!a.isOffline()||mxClient.IS_CHROMEAPP){h.style.width="240px";var n=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");n.firstChild.style.marginBottom="6px";n.style.marginLeft="6px";g.appendChild(n)}mxEvent.addListener(h,"dblclick",function(){var b=new FilenameDialog(a,m,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(m=a)}),mxResources.get("enterPropertyName"));a.showDialog(b.container,
+300,80,!0,!0);b.init()});h.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(g);n=mxUtils.button(mxResources.get("hide"),function(){k(f(),!1)});n.setAttribute("title",mxResources.get("hide"));n.style.marginTop="8px";n.style.marginRight="4px";n.className="geBtn";g.appendChild(n);n=mxUtils.button(mxResources.get("show"),function(){var a=f();k(a,!0);l.isEnabled()&&l.setSelectionCells(a)});n.setAttribute("title",mxResources.get("show"));n.style.marginTop="8px";n.style.marginRight=
+"4px";n.className="geBtn";g.appendChild(n);var q=a.actions.get("tags"),n=mxUtils.button(mxResources.get("close"),function(){q.funct()});n.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");n.style.marginTop="8px";n.className="geBtn gePrimaryBtn";g.appendChild(n);mxEvent.addListener(h,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),g,b,d,c,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
+this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(h.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)):l.container.focus()}))},AuthDialog=function(a,b,d,c){var e=document.createElement("div");e.style.textAlign="center";var f=document.createElement("p");f.style.fontSize="16pt";f.style.padding="0px";f.style.margin="0px";f.style.color="gray";mxUtils.write(f,
+mxResources.get("authorizationRequired"));var k="Unknown",l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.marginRight="10px";b==a.drive?(k=mxResources.get("googleDrive"),l.src=IMAGE_PATH+"/google-drive-logo-white.svg"):b==a.dropbox?(k=mxResources.get("dropbox"),l.src=IMAGE_PATH+"/dropbox-logo-white.svg"):b==a.oneDrive?(k=mxResources.get("oneDrive"),l.src=IMAGE_PATH+"/onedrive-logo-white.svg"):b==a.gitHub?(k=mxResources.get("github"),l.src=IMAGE_PATH+
+"/github-logo-white.svg"):b==a.trello&&(k=mxResources.get("trello"),l.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[k]));var m=document.createElement("input");m.setAttribute("type","checkbox");k=mxUtils.button(mxResources.get("authorize"),function(){c(m.checked)});k.insertBefore(l,k.firstChild);k.style.marginTop="6px";k.className="geBigButton";e.appendChild(f);e.appendChild(a);e.appendChild(k);d&&(d=document.createElement("p"),
d.style.marginTop="20px",d.appendChild(m),f=document.createElement("span"),mxUtils.write(f," "+mxResources.get("rememberMe")),d.appendChild(f),e.appendChild(d),m.checked=!0,m.defaultChecked=!0,mxEvent.addListener(f,"click",function(a){m.checked=!m.checked;mxEvent.consume(a)}));this.container=e},MoreShapesDialog=function(a,b,d){d=null!=d?d:a.sidebar.entries;var c=document.createElement("div");if(b){b=document.createElement("div");b.className="geDialogTitle";mxUtils.write(b,mxResources.get("shapes"));
b.style.position="absolute";b.style.top="0px";b.style.left="0px";b.style.lineHeight="40px";b.style.height="40px";b.style.right="0px";mxClient.IS_QUIRKS&&(b.style.width="718px");var e=document.createElement("div"),f=document.createElement("div");e.style.position="absolute";e.style.top="40px";e.style.left="0px";e.style.width="202px";e.style.bottom="60px";e.style.overflow="auto";mxClient.IS_QUIRKS&&(e.style.height="437px",e.style.marginTop="1px");f.style.position="absolute";f.style.left="202px";f.style.right=
-"0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var k=null,n=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=m.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=m.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.checked=a.sidebar.isEntryVisible(b.id);h.defaultChecked=h.checked;c.appendChild(h);mxUtils.write(c," "+b.title);e.appendChild(c);var l=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=k&&(k.style.backgroundColor=""),k=c,k.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",l);mxEvent.addListener(c,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});n.push(function(){return h.checked?b.id:null});0==g&&0==d&&l()})(b.entries[d])})(d[g]);
+"0px";f.style.top="40px";f.style.bottom="60px";f.style.overflow="auto";f.style.borderLeft="1px solid rgb(211, 211, 211)";f.style.textAlign="center";mxClient.IS_QUIRKS&&(f.style.width=parseInt(b.style.width)-202+"px",f.style.height=e.style.height,f.style.marginTop=e.style.marginTop);var k=null,l=[],m=document.createElement("div");m.style.position="relative";m.style.left="0px";m.style.right="0px";for(var g=0;g<d.length;g++)(function(b){var c=m.cloneNode(!1);c.style.fontWeight="bold";c.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";c.style.padding="6px 0px 6px 20px";mxUtils.write(c,b.title);e.appendChild(c);for(var d=0;d<b.entries.length;d++)(function(b){var c=m.cloneNode(!1);c.style.cursor="pointer";c.style.padding="4px 0px 4px 20px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.checked=a.sidebar.isEntryVisible(b.id);h.defaultChecked=h.checked;c.appendChild(h);mxUtils.write(c," "+b.title);e.appendChild(c);var n=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
+b.imageCallback?b.imageCallback(f):null!=b.image?f.innerHTML='<img border="0" src="'+b.image+'"/>':(f.innerHTML="<br>",mxUtils.write(f,mxResources.get("noPreview"))),null!=k&&(k.style.backgroundColor=""),k=c,k.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});l.push(function(){return h.checked?b.id:null});0==g&&0==d&&n()})(b.entries[d])})(d[g]);
c.style.padding="30px";c.appendChild(b);c.appendChild(e);c.appendChild(f);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var h=document.createElement("input");h.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=
-document.createElement("span"),b.style.paddingRight="20px",b.appendChild(h),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),h.checked=!0,h.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=h&&(h.checked=!h.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var b=[],c=0;c<n.length;c++){var d=n[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),h.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),t=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var p=document.createElement("tr");q.style.width="100%";b=document.createElement("td");var l=document.createElement("td"),x=document.createElement("td"),z=mxUtils.bind(this,function(b,
-c,d){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});p.appendChild(b);p.appendChild(l);p.appendChild(x);t.appendChild(p);q.appendChild(t);for(var n=
-[],v=0,g=0;g<d.length;g++)for(t=0;t<d[g].entries.length;t++)v++;for(var u=[b,l,x],w=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];n.push(z(u[Math.floor(w/(v/3))],c.title,c.id));w++}})(d[g]);c.appendChild(q);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";h=document.createElement("input");isLocalStorage&&(h.setAttribute("type","checkbox"),h.checked=!0,h.defaultChecked=!0,d.appendChild(h),b=document.createElement("span"),
-mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<n.length;c++){var d=n[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",h.checked);a.hideDialog()});l.className=
-"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(l)):(d.appendChild(l),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var f=document.createElement("span");f.className="geSprite geSprite-delete";
+document.createElement("span"),b.style.paddingRight="20px",b.appendChild(h),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),h.checked=!0,h.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=h&&(h.checked=!h.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),
+function(){a.hideDialog();for(var b=[],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),h.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),u=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var p=document.createElement("tr");q.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),v=document.createElement("td"),y=mxUtils.bind(this,function(b,
+c,d){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(g);c.appendChild(h);mxEvent.addListener(h,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return g.checked?d:null}});p.appendChild(b);p.appendChild(n);p.appendChild(v);u.appendChild(p);q.appendChild(u);for(var l=
+[],z=0,g=0;g<d.length;g++)for(u=0;u<d[g].entries.length;u++)z++;for(var t=[b,n,v],w=0,g=0;g<d.length;g++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];l.push(y(t[Math.floor(w/(z/3))],c.title,c.id));w++}})(d[g]);c.appendChild(q);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";h=document.createElement("input");isLocalStorage&&(h.setAttribute("type","checkbox"),h.checked=!0,h.defaultChecked=!0,d.appendChild(h),b=document.createElement("span"),
+mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=["search"],c=0;c<l.length;c++){var d=l[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",h.checked);a.hideDialog()});n.className=
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==e.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var d=0;d<e.length;d++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var f=document.createElement("span");f.className="geSprite geSprite-delete";
f.style.position="relative";f.style.cursor="pointer";f.style.top="5px";f.style.marginRight="4px";f.style.display="inline-block";g.appendChild(f);mxUtils.write(g,e[d]);c.appendChild(g);mxUtils.br(c);mxEvent.addListener(f,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+e[c]+'"?',function(){e.splice(c,1);b()})}}(d))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var e=mxSettings.getPlugins().slice();
d.appendChild(c);b();var f=mxUtils.button(mxResources.get("add"),function(){var c="",d=urlParams.p;if(null!=d&&0<d.length){for(var g=d.split(";"),d=0;d<g.length;d++){var f=App.pluginRegistry[g[d]];null!=f&&(c+=f+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){g=a.split(";");for(a=0;a<g.length;a++){var c=g[a],d=App.pluginRegistry[c];null!=d&&(c=d);0<c.length&&0>mxUtils.indexOf(e,c)&&e.push(c)}b()}},mxResources.get("enterValue")+
-" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
-m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(k),g.appendChild(m),g.appendChild(f),g.appendChild(n)):(g.appendChild(m),g.appendChild(f),g.appendChild(n),g.appendChild(k));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),
-k=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");k.appendChild(n);f.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();
-h.select()};g.appendChild(h);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";g.appendChild(l);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";g.appendChild(t);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");
-m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);k.appendChild(g);f.appendChild(k);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=new Image,z=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=x.width,
-e=x.height,f=parseInt(h.value),k=parseInt(l.value),g=Math.max(1,g-f-parseInt(q.value)),e=Math.max(1,e-k-parseInt(t.value));b.width=g;b.height=e;p.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(x,f,k,g,e,0,0,g,e);d(b.toDataURL())});z.setAttribute("disabled","disabled");x.onload=function(){z.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+x.width+" "+mxResources.get("height")+
-": "+x.height)};x.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&z.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(z)):(b.appendChild(z),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),
-n=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=c?c.x:"";this.init=function(){h.focus();h.select()};g.appendChild(h);n.appendChild(m);n.appendChild(g);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
-":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c?c.y:"";g.appendChild(l);n.appendChild(m);n.appendChild(g);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";g.appendChild(q);n.appendChild(m);n.appendChild(g);k.appendChild(n);
-n=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";g.appendChild(t);n.appendChild(m);n.appendChild(g);k.appendChild(n);n=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var p=document.createElement("input");
-p.setAttribute("type","text");p.style.width="100px";p.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(p);n.appendChild(m);n.appendChild(g);k.appendChild(n);f.appendChild(k);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&
-(0<mxUtils.trim(h.value).length&&(g.x=Number(h.value)),0<mxUtils.trim(l.value).length&&(g.y=Number(l.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(q.value).length&&(g.width=Number(q.value)),0<mxUtils.trim(t.value).length&&(g.height=Number(t.value))),d.getModel().setGeometry(b[c],g));0<mxUtils.trim(p.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&x.click()});f=document.createElement("div");
-f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(x)):(f.appendChild(x),f.appendChild(c));e.appendChild(f);this.container=e},LibraryDialog=function(a,b,d,c,e,f){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function n(b,c,d,g,l,e,f,q,v){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&
-null!=f||null==x[b]){var m=function(){E.innerHTML="";E.style.cursor="pointer";E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=B.title&&0<B.title.length?B.title:mxResources.get("untitled"));E.style.color=null==B.title||0==B.title.length?"#d0d0d0":""};t.style.backgroundImage="";p.style.display="none";var y=l,F=e;if(l>a.maxImageSize||e>a.maxImageSize){var A=Math.min(1,Math.min(a.maxImageSize/Math.max(1,l)),a.maxImageSize/Math.max(1,e));l*=A;e*=A}y>F?(F=Math.round(100*
-F/y),y=100):(y=Math.round(100*y/F),F=100);var C=document.createElement("div");C.setAttribute("draggable","true");C.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";C.style.position="relative";C.style.cursor="move";mxUtils.setPrefixedStyle(C.style,"transition","transform .1s ease-in-out");if(null!=b){var D=document.createElement("img");D.setAttribute("src",w.convert(b));D.style.width=y+"px";D.style.height=F+"px";D.style.margin="10px";D.style.paddingBottom=Math.floor((100-F)/2)+"px";D.style.paddingLeft=
-Math.floor((100-y)/2)+"px";C.appendChild(D)}else if(null!=f){var H=a.stringToCells(a.editor.graph.decompress(f.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,C,null,!0,!1),C.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",C.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position=
-"absolute";J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(J,"click",function(d){x[b]=null;for(var g=0;g<h.length;g++)if(null!=h[g].data&&h[g].data==b||null!=h[g].xml&&null!=c&&h[g].xml==c.xml){h.splice(g,1);break}C.parentNode.removeChild(a);0==h.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(d)});mxEvent.addListener(J,
-"dblclick",function(a){mxEvent.consume(a)})})(C,b,f);C.appendChild(J);C.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left="10px";E.style.right="10px";E.style.backgroundColor="#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var B=null;null!=b?(B={data:b,w:l,h:e,title:v},null!=q&&(B.aspect=q),x[b]=D,h.push(B)):null!=f&&(f.aspect="fixed",h.push(f),B=f);mxEvent.addListener(E,"keydown",
-function(a){13==a.keyCode&&null!=u&&(u(),u=null,mxEvent.consume(a))});m();C.appendChild(E);mxEvent.addListener(E,"mousedown",function(a){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,B.title||"",mxResources.get("ok"),function(a){null!=a&&(B.title=a,m())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();
-mxEvent.consume(b)}else if("true"!=E.getAttribute("contentEditable")){null!=u&&(u(),u=null);if(null==B.title||0==B.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable","true");E.focus();document.execCommand("selectAll",!1,null);u=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";B.title=E.innerHTML;m()};mxEvent.consume(b)}};mxEvent.addListener(E,"click",H);mxEvent.addListener(C,"dblclick",
-H);t.appendChild(C);mxEvent.addListener(C,"dragstart",function(a){null==b&&null!=f&&(J.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);z=k(a);mxClient.IS_GC&&(C.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(C.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(C,30);J.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(C,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility=
-"",E.style.visibility="");z=null;mxUtils.setOpacity(C,100);mxUtils.setPrefixedStyle(C.style,"transform",null)})}else G||(G=!0,a.handleError({message:mxResources.get("fileExists")}));else{l=!1;try{if(a.spinner.stop(),y=mxUtils.parseXml(b),"mxlibrary"==y.documentElement.nodeName){F=JSON.parse(mxUtils.getTextContent(y.documentElement));if(null!=F&&0<F.length)for(var K=0;K<F.length;K++)null!=F[K].xml?n(null,null,0,0,0,0,F[K]):n(F[K].data,null,0,0,F[K].w,F[K].h,null,"fixed",F[K].title);l=!0}else if("mxfile"==
-y.documentElement.nodeName){for(var P=y.documentElement.getElementsByTagName("diagram"),K=0;K<P.length;K++){var F=mxUtils.getTextContent(P[K]),H=a.stringToCells(a.editor.graph.decompress(F)),X=a.editor.graph.getBoundingBoxFromGeometry(H);n(null,null,0,0,0,0,{xml:F,w:X.width,h:X.height})}l=!0}}catch(Z){}l||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function m(a){a.dataTransfer.dropEffect=null!=z?"move":"copy";a.stopPropagation();a.preventDefault()}
-function g(b){b.stopPropagation();b.preventDefault();G=!1;v=k(b);if(null!=z)null!=v&&v<t.children.length?(h.splice(v>z?v-1:v,0,h.splice(z,1)[0]),t.insertBefore(t.children[z],t.children[v])):(h.push(h.splice(z,1)[0]),t.appendChild(t.children[z]));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){n(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var h=[];d=document.createElement("div");d.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";d.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",
-b);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==e||e.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};l.appendChild(q);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";
-t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==h.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var x={},z=null,v=null,u=null;
-b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=u&&(u(),u=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",b);mxEvent.addListener(t,"pointerdown",b);mxEvent.addListener(t,"touchstart",b);var w=new mxUrlConverter,G=!1;if(null!=c)for(b=0;b<c.length;b++)l=c[b],n(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(t,"dragleave",function(a){p.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==p){a.stopPropagation();a.preventDefault();
-break}b=b.parentNode}});var F=function(b){return function(c,d,g,h,l,e,u,f,p){null!=p&&(/(\.vsdx)($|\?)/i.test(p.name)||/(\.vssx)($|\?)/i.test(p.name))?a.importVisio(p,mxUtils.bind(this,function(c){a.spinner.stop();n(c,d,g,h,l,e,u,"fixed",mxEvent.isAltDown(b)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," "))})):null!=p&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,p.name)?a.parseFile(p,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=
-c.status&&(n(c.responseText,d,g,h,l,e,u,"fixed",mxEvent.isAltDown(b)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(n(c,d,g,h,l,e,u,"fixed",mxEvent.isAltDown(b)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",m);mxEvent.addListener(t,"drop",g);mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",g);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";
-c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(h),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,
-"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";c.appendChild(l);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){G=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,c,d,g,h,l,e,u,f){F(b)(a,c,d,g,h,l,e,u,f);A.value=""});t.scrollTop=t.scrollHeight}),l=mxUtils.button(mxResources.get("import"),function(){null!=u&&(u(),u=null);A.click()}),l.setAttribute("id",
-"btnAddImage"),l.className="geBtn",c.appendChild(l));l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=u&&(u(),u=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){G=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}n(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";c.appendChild(l);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b,
-c,d,g)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=u&&(u(),u=null);this.saveBtnClickHandler(q.value,h,e,f)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";c.appendChild(l);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,k,n=document.createElement("table"),m=document.createElement("tbody");n.style.cellPadding="4px";f=document.createElement("tr");k=
+" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});f.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(e);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});l.className="geBtn gePrimaryBtn";var m=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+m.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(m.style.display="none");var g=document.createElement("div");g.style.marginTop="14px";g.style.textAlign="right";a.editor.cancelFirst?(g.appendChild(k),g.appendChild(m),g.appendChild(f),g.appendChild(l)):(g.appendChild(m),g.appendChild(f),g.appendChild(l),g.appendChild(k));d.appendChild(g);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),e=document.createElement("table"),f=document.createElement("tbody"),
+k=document.createElement("tr"),l=document.createElement("td");l.style.whiteSpace="nowrap";l.setAttribute("colspan","2");mxUtils.write(l,mxResources.get("loading")+"...");k.appendChild(l);f.appendChild(k);var k=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");e.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";this.init=function(){h.focus();
+h.select()};g.appendChild(h);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";g.appendChild(n);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("right")+
+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value="0";g.appendChild(q);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";g.appendChild(u);k.appendChild(m);k.appendChild(g);f.appendChild(k);k=document.createElement("tr");
+m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("circle")+":");k.appendChild(m);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);k.appendChild(g);f.appendChild(k);e.appendChild(f);c.appendChild(e);var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),g=v.width,
+e=v.height,f=parseInt(h.value),k=parseInt(n.value),g=Math.max(1,g-f-parseInt(q.value)),e=Math.max(1,e-k-parseInt(u.value));b.width=g;b.height=e;p.checked&&(c.fillStyle="#000000",c.arc(g/2,e/2,Math.min(g/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(v,f,k,g,e,0,0,g,e);d(b.toDataURL())});y.setAttribute("disabled","disabled");v.onload=function(){y.removeAttribute("disabled");l.innerHTML="";mxUtils.write(l,mxResources.get("width")+": "+v.width+" "+mxResources.get("height")+
+": "+v.height)};v.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&y.click()});b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(e),b.appendChild(y)):(b.appendChild(y),b.appendChild(e));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,e=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),
+l=document.createElement("tr"),m=document.createElement("td"),g=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(m,mxResources.get("left")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=c?c.x:"";this.init=function(){h.focus();h.select()};g.appendChild(h);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("top")+
+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=c?c.y:"";g.appendChild(n);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";g.appendChild(q);l.appendChild(m);l.appendChild(g);k.appendChild(l);
+l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";g.appendChild(u);l.appendChild(m);l.appendChild(g);k.appendChild(l);l=document.createElement("tr");m=document.createElement("td");g=document.createElement("td");mxUtils.write(m,mxResources.get("rotation")+":");var p=document.createElement("input");
+p.setAttribute("type","text");p.style.width="100px";p.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(p);l.appendChild(m);l.appendChild(g);k.appendChild(l);f.appendChild(k);e.appendChild(f);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var g=d.getCellGeometry(b[c]);null!=g&&(g=g.clone(),d.isCellMovable(b[c])&&
+(0<mxUtils.trim(h.value).length&&(g.x=Number(h.value)),0<mxUtils.trim(n.value).length&&(g.y=Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(q.value).length&&(g.width=Number(q.value)),0<mxUtils.trim(u.value).length&&(g.height=Number(u.value))),d.getModel().setGeometry(b[c],g));0<mxUtils.trim(p.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&v.click()});f=document.createElement("div");
+f.style.marginTop="20px";f.style.textAlign="right";a.editor.cancelFirst?(f.appendChild(c),f.appendChild(v)):(f.appendChild(v),f.appendChild(c));e.appendChild(f);this.container=e},LibraryDialog=function(a,b,d,c,e,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 c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function l(b,c,d,g,e,n,f,q,m){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&
+null!=f||null==v[b]){var z=function(){G.innerHTML="";G.style.cursor="pointer";G.style.whiteSpace="nowrap";G.style.textOverflow="ellipsis";mxUtils.write(G,null!=C.title&&0<C.title.length?C.title:mxResources.get("untitled"));G.style.color=null==C.title||0==C.title.length?"#d0d0d0":""};u.style.backgroundImage="";p.style.display="none";var B=e,D=n;if(e>a.maxImageSize||n>a.maxImageSize){var x=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,n));e*=x;n*=x}B>D?(D=Math.round(100*
+D/B),B=100):(B=Math.round(100*B/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 A=document.createElement("img");A.setAttribute("src",w.convert(b));A.style.width=B+"px";A.style.height=D+"px";A.style.margin="10px";A.style.paddingBottom=Math.floor((100-D)/2)+"px";A.style.paddingLeft=
+Math.floor((100-B)/2)+"px";E.appendChild(A)}else if(null!=f){var H=a.stringToCells(a.editor.graph.decompress(f.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var L=document.createElement("img");L.setAttribute("src",Editor.closeImage);L.setAttribute("border","0");L.setAttribute("title",mxResources.get("delete"));L.setAttribute("align","top");L.style.paddingTop="4px";L.style.position=
+"absolute";L.style.marginLeft="-12px";L.style.zIndex="1";L.style.cursor="pointer";mxEvent.addListener(L,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(L,"click",function(d){v[b]=null;for(var g=0;g<h.length;g++)if(null!=h[g].data&&h[g].data==b||null!=h[g].xml&&null!=c&&h[g].xml==c.xml){h.splice(g,1);break}E.parentNode.removeChild(a);0==h.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(d)});mxEvent.addListener(L,
+"dblclick",function(a){mxEvent.consume(a)})})(E,b,f);E.appendChild(L);E.style.marginBottom="30px";var G=document.createElement("div");G.style.position="absolute";G.style.boxSizing="border-box";G.style.bottom="-18px";G.style.left="10px";G.style.right="10px";G.style.backgroundColor="#ffffff";G.style.overflow="hidden";G.style.textAlign="center";var C=null;null!=b?(C={data:b,w:e,h:n,title:m},null!=q&&(C.aspect=q),v[b]=A,h.push(C)):null!=f&&(f.aspect="fixed",h.push(f),C=f);mxEvent.addListener(G,"keydown",
+function(a){13==a.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(a))});z();E.appendChild(G);mxEvent.addListener(G,"mousedown",function(a){"true"!=G.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,C.title||"",mxResources.get("ok"),function(a){null!=a&&(C.title=a,z())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();
+mxEvent.consume(b)}else if("true"!=G.getAttribute("contentEditable")){null!=t&&(t(),t=null);if(null==C.title||0==C.title.length)G.innerHTML="";G.style.textOverflow="";G.style.whiteSpace="";G.style.cursor="text";G.style.color="";G.setAttribute("contentEditable","true");G.focus();document.execCommand("selectAll",!1,null);t=function(){G.removeAttribute("contentEditable");G.style.cursor="pointer";C.title=G.innerHTML;z()};mxEvent.consume(b)}};mxEvent.addListener(G,"click",H);mxEvent.addListener(E,"dblclick",
+H);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==b&&null!=f&&(L.style.visibility="hidden",G.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.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);L.style.visibility="";G.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==L.style.visibility&&(L.style.visibility=
+"",G.style.visibility="");y=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else F||(F=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),B=mxUtils.parseXml(b),"mxlibrary"==B.documentElement.nodeName){D=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=D&&0<D.length)for(var J=0;J<D.length;J++)null!=D[J].xml?l(null,null,0,0,0,0,D[J]):l(D[J].data,null,0,0,D[J].w,D[J].h,null,"fixed",D[J].title);e=!0}else if("mxfile"==
+B.documentElement.nodeName){for(var M=B.documentElement.getElementsByTagName("diagram"),J=0;J<M.length;J++){var D=mxUtils.getTextContent(M[J]),H=a.stringToCells(a.editor.graph.decompress(D)),P=a.editor.graph.getBoundingBoxFromGeometry(H);l(null,null,0,0,0,0,{xml:D,w:P.width,h:P.height})}e=!0}}catch(ba){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function m(a){a.dataTransfer.dropEffect=null!=y?"move":"copy";a.stopPropagation();a.preventDefault()}
+function g(b){b.stopPropagation();b.preventDefault();F=!1;z=k(b);if(null!=y)null!=z&&z<u.children.length?(h.splice(z>y?z-1:z,0,h.splice(y,1)[0]),u.insertBefore(u.children[y],u.children[z])):(h.push(h.splice(y,1)[0]),u.appendChild(u.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,D(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 h=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",
+b);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==e||e.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==e||e.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};n.appendChild(q);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";
+u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";0==h.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var v={},y=null,z=null,t=null;
+b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=t&&(t(),t=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",b);mxEvent.addListener(u,"pointerdown",b);mxEvent.addListener(u,"touchstart",b);var w=new mxUrlConverter,F=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],l(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(a){p.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==p){a.stopPropagation();a.preventDefault();
+break}b=b.parentNode}});var D=function(b){return function(c,d,g,h,e,n,t,f,w){null!=w&&(/(\.vsdx)($|\?)/i.test(w.name)||/(\.vssx)($|\?)/i.test(w.name))?a.importVisio(w,mxUtils.bind(this,function(c){a.spinner.stop();l(c,d,g,h,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))})):null!=w&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,w.name)?a.parseFile(w,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=
+c.status&&(l(c.responseText,d,g,h,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(l(c,d,g,h,e,n,t,"fixed",mxEvent.isAltDown(b)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",m);mxEvent.addListener(u,"drop",g);mxEvent.addListener(p,"dragover",m);mxEvent.addListener(p,"drop",g);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";
+c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(h),c=q.value;/(\.xml)$/i.test(c)||(c+=".xml");a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,
+"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var x=document.createElement("input");x.setAttribute("multiple","multiple");x.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(x,"change",function(b){F=!1;a.importFiles(x.files,0,0,a.maxImageSize,function(a,c,d,g,h,e,n,t,f){D(b)(a,c,d,g,h,e,n,t,f);x.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);x.click()}),n.setAttribute("id",
+"btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){F=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+a.substring(d+1))}l(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,g){a.saveLibrary(b,
+c,d,g)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(q.value,h,e,f)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=function(a,b,d,c,e){c=null!=c?c:300;e=null!=e?e:120;var f,k,l=document.createElement("table"),m=document.createElement("tbody");l.style.cellPadding="4px";f=document.createElement("tr");k=
document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);f.appendChild(k);m.appendChild(f);f=document.createElement("tr");k=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=c-200+"px";g.style.height=e+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};k.appendChild(g);f.appendChild(k);k=document.createElement("td");d=document.createElement("div");d.style.position=
-"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);k.appendChild(d);var h=new Graph(d);h.setEnabled(!1);var l=a.editor.graph.cloneCells([b])[0];h.addCells([l]);d=h.view.getState(l);var q="";null!=d.shape&&null!=d.shape.stencil&&(q=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,q||"");d=h.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);h.view.scaleAndTranslate(e,
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=e+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);k.appendChild(d);var h=new Graph(d);h.setEnabled(!1);var n=a.editor.graph.cloneCells([b])[0];h.addCells([n]);d=h.view.getState(n);var q="";null!=d.shape&&null!=d.shape.stencil&&(q=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(g,q||"");d=h.getGraphBounds();e=Math.min(160/d.width,(e-40)/d.height);h.view.scaleAndTranslate(e,
20/e-d.x,20/e-d.y);f.appendChild(k);m.appendChild(f);f=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&k.appendChild(e);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-d.className="geBtn",k.appendChild(d));var t=function(b,c,d){var h=g.value,l=mxUtils.parseXml(h),h=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),l=!b.model.contains(c),!d||l||h!=q){h=a.editor.graph.compress(h);b.getModel().beginUpdate();try{if(l){var e=a.editor.graph.getInsertPoint();c.geometry.x=e.x;
-c.geometry.y=e.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(G){throw G;}finally{b.getModel().endUpdate()}l&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){t(h,l,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){t(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";k.appendChild(d);a.editor.cancelFirst||k.appendChild(e);f.appendChild(k);m.appendChild(f);n.appendChild(m);this.container=
-n},CustomDialog=function(a,b,d,c,e,f,k,n){var m=document.createElement("div");m.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=k&&b.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});k.className="geBtn";n&&(k.style.display="none");a.editor.cancelFirst&&b.appendChild(k);a.isOffline()||null==f||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),n.className="geBtn",b.appendChild(n));
+d.className="geBtn",k.appendChild(d));var u=function(b,c,d){var h=g.value,e=mxUtils.parseXml(h),h=mxUtils.getPrettyXml(e.documentElement),e=e.documentElement.getElementsByTagName("parsererror");if(null!=e&&0<e.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(d&&a.hideDialog(),e=!b.model.contains(c),!d||e||h!=q){h=a.editor.graph.compress(h);b.getModel().beginUpdate();try{if(e){var n=a.editor.graph.getInsertPoint();c.geometry.x=n.x;
+c.geometry.y=n.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+h+")",[c])}catch(F){throw F;}finally{b.getModel().endUpdate()}e&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){u(h,n,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){u(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";k.appendChild(d);a.editor.cancelFirst||k.appendChild(e);f.appendChild(k);m.appendChild(f);l.appendChild(m);this.container=
+l},CustomDialog=function(a,b,d,c,e,f,k,l){var m=document.createElement("div");m.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="center";null!=k&&b.appendChild(k);k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});k.className="geBtn";l&&(k.style.display="none");a.editor.cancelFirst&&b.appendChild(k);a.isOffline()||null==f||(l=mxUtils.button(mxResources.get("help"),function(){a.openLink(f)}),l.className="geBtn",b.appendChild(l));
e=mxUtils.button(e||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});b.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(k);m.appendChild(b);this.cancelBtn=k;this.okButton=e;this.container=m};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,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":
@@ -7053,27 +7053,27 @@ Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(func
asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,
mxUtils.bind(this,function(a,b){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var g=document.createElement("script");g.type="text/javascript";g.src=a;d[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,d,g){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==g&&b.push(g);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var e=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-n.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),
+var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var b=this.editorUi,c=b.editor.graph,d=this.createOption(mxResources.get("shadow"),
function(){return c.shadowVisible},function(a){var d=new ChangePageSetup(b);d.ignoreColor=!0;d.ignoreImage=!0;d.shadowVisible=a;c.model.execute(d)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});Editor.shadowOptionEnabled||(d.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(d,60));a.appendChild(d)}return a};var g=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(a){a=g.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var d=b.getCurrentFile();null!=d&&d.isAutosaveOptional()&&(d=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(d))}if(this.isMathOptionVisible()&&
c.isEnabled()&&"undefined"!==typeof MathJax){d=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});d.style.paddingTop="0px";a.appendChild(d);var h=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
h.style.position="relative";h.style.top="4px";d.appendChild(h)}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",
gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var h=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+
-")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return l.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=
-mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),l=0;l<h.length;l++)g=mxUtils.removeStylename(g,h[l]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,
+StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+
+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=
+mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var g=d.getModel().getStyle(c[b]),e=0;e<h.length;e++)g=mxUtils.removeStylename(g,h[e]);null!=a?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,a.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,a.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,
"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],g)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+
a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");g.appendChild(b)}g.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(g),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace=
-"nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var h="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var l=document.createElement("div");l.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(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(l),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(l);c(e);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+"nowrap";g.style.paddingLeft="24px";g.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(g);var h="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var n=document.createElement("div");n.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(n));mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(e);c(n);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,g=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("title",mxResources.get("editShape")),b.style.marginBottom="2px",null==c?b.style.width="202px":(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b)):b.image&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==c?b.style.width="202px":
(c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var q=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}q.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;
this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,
-b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
+b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
b,c){b=null!=b?b:mxConstants.DEFAULT_VALID_COLOR;c=null!=c?c:1E3;a=this.view.getState(a);if(null!=a){var d=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),g=new mxCellHighlight(this,b,d,!1);g.highlight(a);window.setTimeout(function(){null!=g.shape&&(mxUtils.setPrefixedStyle(g.shape.node.style,"transition","all 1200ms ease-in-out"),g.shape.node.style.opacity=0);window.setTimeout(function(){g.destroy()},1200)},c)}};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;
var d=a.ownerDocument,g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");g.setAttribute("id",this.shadowId);var h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha");h.setAttribute("stdDeviation",this.svgShadowBlur);h.setAttribute("result","blur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");
h.setAttribute("in","blur");h.setAttribute("dx",this.svgShadowSize);h.setAttribute("dy",this.svgShadowSize);h.setAttribute("result","offsetBlur");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");h.setAttribute("flood-color",this.svgShadowColor);h.setAttribute("flood-opacity",this.svgShadowOpacity);h.setAttribute("result","offsetColor");g.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):
@@ -7086,47 +7086,47 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
-STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var p=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,h,l,e,f,k){if(null!=c&&null==mxMarker.markers[c]){var u=this.getPackageForType(c);
-null!=u&&mxStencilRegistry.getStencil(u)}return p.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){n.value=Math.max(1,Math.min(e,Math.max(parseInt(n.value),parseInt(t.value))));t.value=Math.max(1,Math.min(e,Math.min(parseInt(n.value),parseInt(t.value))))}function d(b){function c(b,c,g){var h=b.getGraphBounds(),l=0,e=0,f=Z.get(),u=1/b.pageScale,p=z.checked;if(p)var u=parseInt(M.value),k=parseInt(X.value),u=Math.min(f.height*k/(h.height/b.view.scale),f.width*u/(h.width/
-b.view.scale));else u=parseInt(x.value)/(100*b.pageScale),isNaN(u)&&(d=1/b.pageScale,x.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*d);f.height=Math.ceil(f.height*d);u*=d;!p&&b.pageVisible?(h=b.getPageLayout(),l-=h.x*f.width,e-=h.y*f.height):p=!0;if(null==c){c=PrintDialog.createPrintPreview(b,u,f,0,l,e,p);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var q=c.writeHead;c.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("undefined"!==typeof MathJax){var t=c.renderPage;c.renderPage=function(a,b,c,d,g,h){var l=t.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:l.className="geDisableMathJax";return l}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=p;c.appendGraph(b,u,l,e,g,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value=
-"100 %");var d=.75*d,h=t.value,l=n.value,e=!k.checked,u=null;e&&(e=h==f&&l==f);if(!e&&null!=a.pages&&a.pages.length){var p=0,e=a.pages.length-1;k.checked||(p=parseInt(h)-1,e=parseInt(l)-1);for(var q=p;q<=e;q++){var w=a.pages[q],h=w==a.currentPage?g:null;if(null==h){var h=a.createTemporaryGraph(g.getStylesheet()),l=!0,p=!1,m=null,v=null;null==w.viewState&&null==w.mapping&&null==w.root&&a.updatePageRoot(w);null!=w.viewState?(l=w.viewState.pageVisible,p=w.viewState.mathEnabled,m=w.viewState.background,
-v=w.viewState.backgroundImage):null!=w.mapping&&null!=w.mapping.diagramMap&&(p="0"!=w.mapping.diagramMap.get("mathEnabled"),m=w.mapping.diagramMap.get("background"),v=w.mapping.diagramMap.get("backgroundImage"),v=null!=v&&0<v.length?JSON.parse(v):null);h.background=m;h.backgroundImage=null!=v?new mxImage(v.src,v.width,v.height):null;h.pageVisible=l;h.mathEnabled=p;var y=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?w.getName():"pagenumber"==a?q+1:y.apply(this,arguments)};document.body.appendChild(h.container);
-a.updatePageRoot(w);h.model.setRoot(w.root)}u=c(h,u,q!=e);h!=g&&h.container.parentNode.removeChild(h.container)}}else u=c(g);u.mathEnabled&&(e=u.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),b&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));u.closeDocument();!u.mathEnabled&&b&&PrintDialog.printPreview(u)}
-var g=a.editor.graph,h=document.createElement("div"),l=document.createElement("h3");l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,b||mxResources.get("print"));h.appendChild(l);var e=1,f=1,p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");
-k.setAttribute("name","pages-printdialog");p.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("printAllPages"));p.appendChild(l);mxUtils.br(p);var q=k.cloneNode(!0);k.setAttribute("checked","checked");q.setAttribute("value","range");p.appendChild(q);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+":");p.appendChild(l);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";p.appendChild(t);l=document.createElement("span");mxUtils.write(l,mxResources.get("to"));p.appendChild(l);var n=t.cloneNode(!0);p.appendChild(n);mxEvent.addListener(t,"focus",function(){q.checked=!0});mxEvent.addListener(n,"focus",function(){q.checked=!0});mxEvent.addListener(t,"change",c);mxEvent.addListener(n,"change",c);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){f=l+
-1;t.value=f;n.value=f;break}t.setAttribute("max",e);n.setAttribute("max",e);1<e&&h.appendChild(p);var m=document.createElement("div");m.style.marginBottom="10px";var v=document.createElement("input");v.style.marginRight="8px";v.setAttribute("value","adjust");v.setAttribute("type","radio");v.setAttribute("name","printZoom");m.appendChild(v);l=document.createElement("span");mxUtils.write(l,mxResources.get("adjustTo"));m.appendChild(l);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";
-x.setAttribute("value","100 %");x.style.width="50px";m.appendChild(x);mxEvent.addListener(x,"focus",function(){v.checked=!0});h.appendChild(m);var p=p.cloneNode(!1),z=v.cloneNode(!0);z.setAttribute("value","fit");v.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";l.appendChild(z);p.appendChild(l);m=document.createElement("table");m.style.display="inline-block";var R=document.createElement("tbody"),
-O=document.createElement("tr"),N=O.cloneNode(!0),L=document.createElement("td"),Q=L.cloneNode(!0),S=L.cloneNode(!0),Y=L.cloneNode(!0),I=L.cloneNode(!0),aa=L.cloneNode(!0);L.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";Q.appendChild(M);l=document.createElement("span");mxUtils.write(l,
-mxResources.get("fitToSheetsAcross"));S.appendChild(l);mxUtils.write(Y,mxResources.get("fitToBy"));var X=M.cloneNode(!0);I.appendChild(X);mxEvent.addListener(M,"focus",function(){z.checked=!0});mxEvent.addListener(X,"focus",function(){z.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));aa.appendChild(l);O.appendChild(L);O.appendChild(Q);O.appendChild(S);N.appendChild(Y);N.appendChild(I);N.appendChild(aa);R.appendChild(O);R.appendChild(N);m.appendChild(R);
-p.appendChild(m);h.appendChild(p);p=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));p.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);p.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));p.appendChild(l);
-var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";p.appendChild(U);h.appendChild(p);l=document.createElement("div");l.style.cssText="text-align:right;margin:62px 0 0 0;";p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&l.appendChild(p);a.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-m.className="geBtn",l.appendChild(m));PrintDialog.previewEnabled&&(m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),m.className="geBtn",l.appendChild(m));m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(p);h.appendChild(l);this.container=h};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&
+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 p=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,g,h,e,n,f,k){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);
+null!=t&&mxStencilRegistry.getStencil(t)}return p.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){p.value=Math.max(1,Math.min(n,Math.max(parseInt(p.value),parseInt(l.value))));l.value=Math.max(1,Math.min(n,Math.min(parseInt(p.value),parseInt(l.value))))}function d(b){function c(b,c,g){var h=b.getGraphBounds(),e=0,n=0,f=ba.get(),t=1/b.pageScale,k=z.checked;if(k)var t=parseInt(Q.value),q=parseInt(P.value),t=Math.min(f.height*q/(h.height/b.view.scale),f.width*t/(h.width/
+b.view.scale));else t=parseInt(y.value)/(100*b.pageScale),isNaN(t)&&(d=1/b.pageScale,y.value="100 %");f=mxRectangle.fromRectangle(f);f.width=Math.ceil(f.width*d);f.height=Math.ceil(f.height*d);t*=d;!k&&b.pageVisible?(h=b.getPageLayout(),e-=h.x*f.width,n-=h.y*f.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,t,f,0,e,n,k);c.pageSelector=!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var w=c.writeHead;c.writeHead=function(b){w.apply(this,arguments);null!=a.editor.fontCss&&
+(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=c.renderPage;c.renderPage=function(a,b,c,d,g,h){var e=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}c.open(null,null,g,!0)}else{f=b.background;if(null==f||""==f||f==mxConstants.NONE)f="#ffffff";c.backgroundColor=f;c.autoOrigin=k;c.appendGraph(b,t,e,n,g,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value=
+"100 %");var d=.75*d,h=l.value,e=p.value,n=!q.checked,t=null;n&&(n=h==f&&e==f);if(!n&&null!=a.pages&&a.pages.length){var k=0,n=a.pages.length-1;q.checked||(k=parseInt(h)-1,n=parseInt(e)-1);for(var u=k;u<=n;u++){var w=a.pages[u],h=w==a.currentPage?g:null;if(null==h){var h=a.createTemporaryGraph(g.getStylesheet()),e=!0,k=!1,v=null,m=null;null==w.viewState&&null==w.mapping&&null==w.root&&a.updatePageRoot(w);null!=w.viewState?(e=w.viewState.pageVisible,k=w.viewState.mathEnabled,v=w.viewState.background,
+m=w.viewState.backgroundImage):null!=w.mapping&&null!=w.mapping.diagramMap&&(k="0"!=w.mapping.diagramMap.get("mathEnabled"),v=w.mapping.diagramMap.get("background"),m=w.mapping.diagramMap.get("backgroundImage"),m=null!=m&&0<m.length?JSON.parse(m):null);h.background=v;h.backgroundImage=null!=m?new mxImage(m.src,m.width,m.height):null;h.pageVisible=e;h.mathEnabled=k;var B=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?w.getName():"pagenumber"==a?u+1:B.apply(this,arguments)};document.body.appendChild(h.container);
+a.updatePageRoot(w);h.model.setRoot(w.root)}t=c(h,t,u!=n);h!=g&&h.container.parentNode.removeChild(h.container)}}else t=c(g);t.mathEnabled&&(n=t.wnd.document,n.writeln('<script type="text/x-mathjax-config">'),n.writeln("MathJax.Hub.Config({"),n.writeln('messageStyle: "none",'),n.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),n.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),n.writeln("TeX: {"),n.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+n.writeln("},"),n.writeln("tex2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("},"),n.writeln("asciimath2jax: {"),n.writeln('\tignoreClass: "geDisableMathJax"'),n.writeln("}"),n.writeln("});"),b&&(n.writeln("MathJax.Hub.Queue(function () {"),n.writeln("window.print();"),n.writeln("});")),n.writeln("\x3c/script>"),n.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&b&&PrintDialog.printPreview(t)}
+var g=a.editor.graph,h=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,b||mxResources.get("print"));h.appendChild(e);var n=1,f=1,k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");
+q.setAttribute("name","pages-printdialog");k.appendChild(q);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));k.appendChild(e);mxUtils.br(k);var u=q.cloneNode(!0);q.setAttribute("checked","checked");u.setAttribute("value","range");k.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");k.appendChild(e);var l=document.createElement("input");l.style.cssText="margin:0 8px 0 8px;";l.setAttribute("value","1");l.setAttribute("type",
+"number");l.setAttribute("min","1");l.style.width="50px";k.appendChild(l);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));k.appendChild(e);var p=l.cloneNode(!0);k.appendChild(p);mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(p,"focus",function(){u.checked=!0});mxEvent.addListener(l,"change",c);mxEvent.addListener(p,"change",c);if(null!=a.pages&&(n=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){f=e+
+1;l.value=f;p.value=f;break}l.setAttribute("max",n);p.setAttribute("max",n);1<n&&h.appendChild(k);var v=document.createElement("div");v.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");v.appendChild(m);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));v.appendChild(e);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";
+y.setAttribute("value","100 %");y.style.width="50px";v.appendChild(y);mxEvent.addListener(y,"focus",function(){m.checked=!0});h.appendChild(v);var k=k.cloneNode(!1),z=m.cloneNode(!0);z.setAttribute("value","fit");m.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(z);k.appendChild(e);v=document.createElement("table");v.style.display="inline-block";var N=document.createElement("tbody"),
+S=document.createElement("tr"),O=S.cloneNode(!0),I=document.createElement("td"),W=I.cloneNode(!0),R=I.cloneNode(!0),T=I.cloneNode(!0),V=I.cloneNode(!0),K=I.cloneNode(!0);I.style.textAlign="right";T.style.textAlign="right";mxUtils.write(I,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";W.appendChild(Q);e=document.createElement("span");mxUtils.write(e,
+mxResources.get("fitToSheetsAcross"));R.appendChild(e);mxUtils.write(T,mxResources.get("fitToBy"));var P=Q.cloneNode(!0);V.appendChild(P);mxEvent.addListener(Q,"focus",function(){z.checked=!0});mxEvent.addListener(P,"focus",function(){z.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));K.appendChild(e);S.appendChild(I);S.appendChild(W);S.appendChild(R);O.appendChild(T);O.appendChild(V);O.appendChild(K);N.appendChild(S);N.appendChild(O);v.appendChild(N);
+k.appendChild(v);h.appendChild(k);k=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));k.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var ba=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));k.appendChild(e);
+var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";k.appendChild(U);h.appendChild(k);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&e.appendChild(k);a.isOffline()||(v=mxUtils.button(mxResources.get("help"),function(){g.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+v.className="geBtn",e.appendChild(v));PrintDialog.previewEnabled&&(v=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),v.className="geBtn",e.appendChild(v));v=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});v.className="geBtn gePrimaryBtn";e.appendChild(v);a.editor.cancelFirst||e.appendChild(k);h.appendChild(e);this.container=h};var v=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(v.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=
-b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(u){}try{var b=document.createElement("canvas"),c=new Image;c.onload=function(){try{b.getContext("2d").drawImage(c,0,0);var a=
+b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};c.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(u){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,h){var l=!1;this.active||(g.call(this,c),this.active=!0,null!=h&&(l=document.createElement("div"),l.style.position="absolute",l.style.whiteSpace="nowrap",l.style.background="#4B4243",l.style.color="white",l.style.fontFamily="Helvetica, Arial",l.style.fontSize=
-"9pt",l.style.padding="6px",l.style.paddingLeft="10px",l.style.paddingRight="10px",l.style.zIndex=2E9,l.style.left=Math.max(0,a)+"px",l.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(l.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(l.style,"boxShadow","2px 2px 3px 0px #ddd"),l.innerHTML=h+"...",c.appendChild(l),d.status=l,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(l.style.left=
-Math.round(Math.max(0,a-l.offsetWidth/2))+"px",l.style.top=Math.round(Math.max(0,b+70-l.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),l=!0);return l};var h=d.stop;d.stop=function(){h.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
-b){var c=h;h+=b;return a.substring(c,h)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var l=d(a,4);if(null!=b&&b(h-8,l,c))break;value=d(a,c);d(a,4);if("IEND"==l)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,
+function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=d.spin;d.spin=function(c,e){var h=!1;this.active||(g.call(this,c),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize=
+"9pt",h.style.padding="6px",h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),h.innerHTML=e+"...",c.appendChild(h),d.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(h.style.left=
+Math.round(Math.max(0,a-h.offsetWidth/2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,e)}));this.stop();return a}),h=!0);return h};var e=d.stop;d.stop=function(){e.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
+b){var c=h;h+=b;return a.substring(c,h)}function g(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=g(a);var e=d(a,4);if(null!=b&&b(h-8,e,c))break;value=d(a,c);d(a,4);if("IEND"==e)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,
!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(q){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var g=b.lastIndexOf("&lt;/mxfile&gt;");g>d&&(c=b.substring(d,g+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(b),f=this.editor.extractGraphModel(e.documentElement,
-null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(x){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
+null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(v){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var g=d.length-1;0<=g;g--){var e=this.updatePageRoot(new DiagramPage(d[g]));null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[g+1]));b.model.execute(new ChangePage(this,e,0==g?e:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(g=0;g<c.length;g++)b.model.execute(new ChangePage(this,c[g],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(a,b,c,d,e,f,k,n,m,u){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var g,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":h=g=d;if(null==a)return"";var l=a;if("mxfile"!=l.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),l=b.compress(p);if(b.decompress(l)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,l);l=a.ownerDocument.createElement("mxfile");l.appendChild(p)}u?(l=l.cloneNode(!0),l.removeAttribute("userAgent"),
-l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.setAttribute("userAgent",navigator.userAgent),l.setAttribute("version",EditorUi.VERSION),l.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&l.setAttribute("type",a));a=mxUtils.getXml(l);if(!f&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(l),b,null!=c?c.getTitle():null,g,h);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
-App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,n,m,h);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){var h=
-this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=h&&h.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(h.graphModel),h.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),h.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,k,n,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=f?f:!1);m=null!=m?m:this.getCurrentFile();
-f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var g=f.getGlobalVariable,h=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(h.root)}a=this.createFileData(k,f,m,window.location.href,a,b,c,d,e,n);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);
-return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;f=Math.floor(g.x/l-b.view.translate.x);l=Math.floor(g.y/l-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0",l)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+function(a,b,c,d,e,f,k,l,m,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;m=null!=m?m:!0;var g,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?g="_blank":h=g=d;if(null==a)return"";var n=a;if("mxfile"!=n.nodeName.toLowerCase()){var q=b.zapGremlins(mxUtils.getXml(a)),n=b.compress(q);if(b.decompress(n)!=q)return q;q=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,n);n=a.ownerDocument.createElement("mxfile");n.appendChild(q)}t?(n=n.cloneNode(!0),n.removeAttribute("userAgent"),
+n.removeAttribute("version"),n.removeAttribute("editor"),n.removeAttribute("type")):(n.setAttribute("userAgent",navigator.userAgent),n.setAttribute("version",EditorUi.VERSION),n.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&n.setAttribute("type",a));a=mxUtils.getXml(n);if(!f&&!e&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(n),b,null!=c?c.getTitle():null,g,h);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,l,m,h);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var g=0;g<this.pages.length;g++){var e=
+this.pages[g].mapping;this.currentPage!=this.pages[g]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[g].node,d),e.needsUpdate=!1);c.appendChild(this.pages[g].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,k,l,m){e=null!=e?e:!0;k=null!=k?k:this.getXmlFileData(e,null!=f?f:!1);m=null!=m?m:this.getCurrentFile();
+f=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());var g=f.getGlobalVariable,h=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(h.root)}a=this.createFileData(k,f,m,window.location.href,a,b,c,d,e,l);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);
+return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),n=b.view.scale;f=Math.floor(g.x/n-b.view.translate.x);n=Math.floor(g.y/n-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",f);a.setAttribute("y0",n)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==e?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=g&&g!=mxConstants.NONE?' style="background-color:'+g+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+h+'">\x3c/script>':
'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
@@ -7134,243 +7134,250 @@ this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compati
mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f,k){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),h=g+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,a,l,"text/xml")}else if("html"==
-a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(h,a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=g+".png":"jpeg"==a&&(h=g+".jpg"),this.saveRequest(h,a,mxUtils.bind(this,function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var h=this.createDownloadRequest(b,a,d,c,k);this.editor.graph.pageVisible=g;return h}catch(y){this.handleError(y)}}));else{var p=null,
-n=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var q=this.editor.graph.background;if(k||q==mxConstants.NONE)q=null;var t=this.editor.graph.getSvg(q,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(t);this.convertImages(t,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
-n('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else h=g+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();n(a)}),d)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var h="";if(g.width*g.height>MAX_AREA||c.length>
-MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var l=0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){h="&from="+l;break}l=this.editor.graph.background;"png"==b&&e&&(l=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+h+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+d+"&embedXml="+g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=
-function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=
-window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();
-this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){null!=window.console&&console.log("error in fileLoaded:",a,
-t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(p){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(l){}};
-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=
-function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);
-delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=
-JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:
-null;this.removeLibrarySidebar(a.getHash());var g=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var d=0;d<b.length;d++){var e=b[d],l=e.data;if(null!=l){var l=this.convertDataUri(l),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==e.aspect&&(h+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(h+"image="+l,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(l=this.stringToCells(this.editor.graph.decompress(e.xml)),0<l.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(l,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=
-this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);c=null!=c&&0<c.length?c:
-a.getTitle();var l=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var f=l.parentNode.previousSibling;c=f.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var u=document.createElement("div");u.style.position="absolute";u.style.right="0px";u.style.top="0px";u.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(u.style.backgroundColor="inherit");f.style.position=
-"relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)u.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,A=null,D=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,b,a,a.getMode());mxEvent.consume(c)}),E=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=k.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",
-A.style.marginRight="2px",A.style.marginTop="-2px",u.insertBefore(A,u.firstChild),f.style.paddingRight=18*u.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),f.style.paddingRight=18*u.childNodes.length+"px")})):null==n&&(n=k.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),u.insertBefore(n,u.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,
-function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(f.style.paddingRight=18*u.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(c)})),f.style.paddingRight=18*u.childNodes.length+"px")}),B=mxUtils.bind(this,function(a,c,d,e){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var h=0;h<a.length;h++){var f=m.getCellGeometry(a[h]);null!=f&&f.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);E(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),K=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;B(b,c)}mxEvent.consume(a)});l.style.border="3px solid transparent";mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":l.style.border="3px dotted rgb(254, 137, 12)",
-l.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(l.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),l.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),
-m.isMouseDown=!1,m.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",l.style.border="3px solid transparent",l.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":l.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.border="3px solid transparent";l.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,f,u,k,p,n,m){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,u,k),c)],c[0].vertex=!0,B(c,new mxRectangle(0,0,u,k),a,mxEvent.isAltDown(a)?null:p.substring(0,p.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var q=!1,w=mxUtils.bind(this,function(c,
-d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var f=JSON.parse(mxUtils.getTextContent(h.documentElement));e(f,l);b=b.concat(f);E(a);this.spinner.stop();q=!0}catch(U){}else if("mxfile"==h.documentElement.nodeName)try{for(var u=h.documentElement.getElementsByTagName("diagram"),h=0;h<u.length;h++){var f=mxUtils.getTextContent(u[h]),k=this.stringToCells(this.editor.graph.decompress(f)),p=this.editor.graph.getBoundingBoxFromGeometry(k);B(k,new mxRectangle(0,
-0,p.width,p.height),a)}q=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}q||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=m&&null!=p&&(/(\.vsdx)($|\?)/i.test(p)||/(\.vssx)($|\?)/i.test(p)||/(\.vsd)($|\?)/i.test(p))?this.importVisio(m,function(a){w(a,"text/xml")},null,p):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,p)&&
-null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?w(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):w(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(l.style.border="3px solid transparent",l.style.cursor="");a.stopPropagation();
-a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));u.insertBefore(k,u.firstChild);mxEvent.addListener(k,"click",D);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&D(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));u.insertBefore(c,u.firstChild);mxEvent.addListener(c,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||
-(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),u.insertBefore(c,u.firstChild))}f.appendChild(u);f.style.paddingRight=18*u.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&
-(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat=
-"right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=
-3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=
-null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage=
-"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f,k){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),h=g+"."+a;if("xml"==a){var n='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,a,n,"text/xml")}else if("html"==
+a)n=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(h,a,n,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=g+".png":"jpeg"==a&&(h=g+".jpg"),this.saveRequest(h,a,mxUtils.bind(this,function(b,c){try{var g=this.editor.graph.pageVisible;null!=f&&(this.editor.graph.pageVisible=f);var e=this.createDownloadRequest(b,a,d,c,k);this.editor.graph.pageVisible=g;return e}catch(B){this.handleError(B)}}));else{var q=null,
+l=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var v=this.editor.graph.background;if(k||v==mxConstants.NONE)v=null;var u=this.editor.graph.getSvg(v,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
+l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else h=g+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),d)}}catch(E){this.handleError(E)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d,e){var g=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var h="";if(g.width*g.height>MAX_AREA||c.length>
+MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};g="0";if("xmlpng"==b&&(g="1",b="png",null!=this.pages&&null!=this.currentPage))for(var n=0;n<this.pages.length;n++)if(this.pages[n]==this.currentPage){h="&from="+n;break}n=this.editor.graph.background;"png"==b&&e&&(n=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+h+"&bg="+(null!=n?n:mxConstants.NONE)+"&base64="+d+"&embedXml="+g+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=
+function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,g=mxUtils.bind(this,function(c){var g=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<g.length&&(g+="\n"),g+=c);c=new LocalFile(this,"csv"!=a.format&&0<g.length?g:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==a.format&&this.importCsv(g,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,h=null,n=mxUtils.bind(this,function(){var b=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){b===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),f()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+f=mxUtils.bind(this,function(){window.clearTimeout(h);h=window.setTimeout(n,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){f();n()}));f();n()}null!=b&&b()});if(null!=a.url){var e=a.url;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){g(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else g(a.data)};EditorUi.prototype.updateDiagram=function(a){function b(a){var b=new mxCellOverlay(a.image||
+d.warningImage,a.tooltip,a.align,a.valign,a.offset);b.addListener(mxEvent.CLICK,function(b,c){editorUi.alert(a.tooltip)});return b}var c=null;if(null!=a&&0<a.length&&(c=mxUtils.parseXml(a),a=null!=c?c.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,g=d.getModel();g.beginUpdate();var e=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var f=g.getCell(a.getAttribute("id"));if(null!=f){try{var k=a.getAttribute("value");if(null!=k){var l=mxUtils.parseXml(k).documentElement;
+if(null!=l)if("1"==l.getAttribute("replace-value"))g.setValue(f,l);else for(var t=l.attributes,w=0;w<t.length;w++)d.setAttributeForCell(f,t[w].nodeName,0<t[w].nodeValue.length?t[w].nodeValue:null)}}catch(B){null!=window.console&&console.log("Error in value for "+f.id+": "+B)}try{var m=a.getAttribute("style");null!=m&&d.model.setStyle(f,m)}catch(B){null!=window.console&&console.log("Error in style for "+f.id+": "+B)}try{var D=a.getAttribute("icon");if(null!=D){var x=0<D.length?JSON.parse(D):null;null!=
+x&&x.append||d.removeCellOverlays(f);null!=x&&d.addCellOverlay(f,b(x))}}catch(B){null!=window.console&&console.log("Error in icon for "+f.id+": "+B)}try{var E=a.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),A=d.getCellGeometry(f);if(null!=A){A=A.clone();for(key in E){var C=parseFloat(E[key]);"dx"==key?A.x+=C:"dy"==key?A.y+=C:"dw"==key?A.width+=C:"dh"==key?A.height+=C:A[key]=parseFloat(E[key])}d.model.setGeometry(f,A)}}}catch(B){null!=window.console&&console.log("Error in icon for "+f.id+
+": "+B)}}}else if("model"==a.nodeName){for(var J=a.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(a.firstChild)).decode(J,g)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(e=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
+1);a=a.nextSibling}}finally{g.endUpdate()}null!=e&&this.chromelessResize&&this.chromelessResize(!0,e)}return c};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();
+this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
+this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
+this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(u){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(u){}}catch(u){null!=
+window.console&&console.log("error in fileLoaded:",a,u);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=u&&null!=u.message?":err:"+encodeURIComponent(u.message):"")+(null!=u&&null!=u.stack?"&stack="+encodeURIComponent(u.stack):"")}catch(p){}this.handleError(u,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+
+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(n){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,d,e,f,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
+function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=
+function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
+(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var g=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var d=
+0;d<b.length;d++){var e=b[d],h=e.data;if(null!=h){var h=this.convertDataUri(h),n="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(n+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(n+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(h,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
+b)for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));
+return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[h]);c=null!=c&&0<c.length?c:a.getTitle();var n=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var f=n.parentNode.previousSibling;c=f.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top=
+"0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");f.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("valign","absmiddle");k.setAttribute("border","0");k.style.margin="0 3px";var l=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var m=this.editor.graph,x=null,E=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),n,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=x&&null!=x.parentNode&&x.parentNode.removeChild(x),x=k.cloneNode(!1),
+x.setAttribute("src",Editor.spinImage),x.setAttribute("title",mxResources.get("saving")),x.style.cursor="default",x.style.marginRight="2px",x.style.marginTop="-2px",t.insertBefore(x,t.firstChild),f.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=x&&null!=x.parentNode&&(x.parentNode.removeChild(x),f.style.paddingRight=18*t.childNodes.length+"px")})):null==l&&(l=k.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",
+mxResources.get("save")),t.insertBefore(l,t.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(f.style.paddingRight=18*t.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),f.style.paddingRight=18*t.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,c,d,e){a=m.cloneCells(mxUtils.sortCells(m.model.getTopmostCells(a)));for(var h=
+0;h<a.length;h++){var f=m.getCellGeometry(a[h]);null!=f&&f.translate(-c.x,-c.y)}n.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),J=mxUtils.bind(this,function(a){if(m.isSelectionEmpty())m.getRubberband().isActive()?(m.getRubberband().execute(a),
+m.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=m.getSelectionCells(),c=m.view.getBounds(b),d=m.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=m.view.translate.x;c.y-=m.view.translate.y;C(b,c)}mxEvent.consume(a)});n.style.border="3px solid transparent";mxEvent.addGestureListeners(n,function(){},mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility=
+"hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)",n.style.cursor="copy",m.panningManager.stop(),m.autoScroll=!1,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!1),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.panningManager&&null!=m.graphHandler&&(n.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),
+n.style.cursor="default",this.sidebar.showTooltips=!0,m.panningManager.stop(),m.graphHandler.reset(),m.isMouseDown=!1,m.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(n,"mouseleave",mxUtils.bind(this,function(a){m.isMouseDown&&null!=m.graphHandler.shape&&(m.graphHandler.shape.node.style.visibility="visible",n.style.border="3px solid transparent",n.style.cursor="",m.autoScroll=!0,null!=m.graphHandler.guide&&m.graphHandler.guide.setVisible(!0),null!=m.graphHandler.hint&&(m.graphHandler.hint.style.visibility=
+"visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(n,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":n.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";n.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"drop",mxUtils.bind(this,function(a){n.style.border="3px solid transparent";n.style.cursor="";null!=g&&(g.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,h,f,t,k,l,q,w){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,t,k),c)],c[0].vertex=!0,C(c,new mxRectangle(0,0,t,k),a,mxEvent.isAltDown(a)?null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&
+0<b.length&&(g.parentNode.removeChild(g),g=null);else{var m=!1,v=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var h=mxUtils.parseXml(c);if("mxlibrary"==h.documentElement.nodeName)try{var f=JSON.parse(mxUtils.getTextContent(h.documentElement));e(f,n);b=b.concat(f);A(a);this.spinner.stop();m=!0}catch(U){}else if("mxfile"==h.documentElement.nodeName)try{for(var t=h.documentElement.getElementsByTagName("diagram"),h=0;h<t.length;h++){var f=mxUtils.getTextContent(t[h]),k=this.stringToCells(this.editor.graph.decompress(f)),
+l=this.editor.graph.getBoundingBoxFromGeometry(k);C(k,new mxRectangle(0,0,l.width,l.height),a)}m=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=w&&null!=l&&(/(\.vsdx?)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l))?this.importVisio(w,function(a){v(a,"text/xml")},null,l):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,l)&&null!=w?this.parseFile(w,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?v(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):v(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(n,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(n.style.border="3px solid transparent",
+n.style.cursor="");a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));t.insertBefore(k,t.firstChild);mxEvent.addListener(k,"click",E);mxEvent.addListener(n,"dblclick",function(a){mxEvent.getSource(a)==n&&E(a)});c=k.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",J);this.isOffline()||".scratchpad"!=
+a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}f.appendChild(t);f.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=
+4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position=
+"relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),
+Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",
+Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor=
+"#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,
!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,e){a=new LibraryDialog(this,a,b,c,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,
-function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=g||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=g)if(null!=g.retry&&(e=mxResources.get("cancel"),l=function(){d();g.retry()}),"undefined"!=
-typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==g.code||404==g.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),
-a+=' <a href="https://drive.google.com/open?id='+h+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=g.message?a=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error&&(a=mxUtils.htmlEntities(g.response.error));this.showError(b,a,e,c,l)}else null!=c&&c()};EditorUi.prototype.showError=
-function(a,b,c,d,e,f,k,n,m,u,w,G){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,f,k,G,n,m);this.showDialog(a.container,u||340,w||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){g();null!=
+function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var g=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(g=mxResources.get("cancel"),h=function(){d();e.retry()}),"undefined"!=
+typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var n=window.location.hash;null!=n&&"#G"==n.substring(0,2)&&(n=n.substring(2),
+a+=' <a href="https://drive.google.com/open?id='+n+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,g,c,h)}else null!=c&&c()};EditorUi.prototype.showError=
+function(a,b,c,d,e,f,k,l,m,t,w,F){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),d,e,f,k,F,l,m);this.showDialog(a.container,t||340,w||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,e){var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){g();null!=
b&&b()},function(){g();null!=c&&c()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
-b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,g=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(g,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
+b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),
-c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),l=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(mxClient.IS_GC)var h=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),l=65==(h?parseInt(h[2],
-10):!1)?!1:l;if(l||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));l?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(v){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
-c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,g=Math.ceil(d/1024),e=Array(g),h=0;h<g;++h){for(var f=1024*h,k=Math.min(f+1024,d),u=Array(k-f),n=0;f<k;++n,++f)u[n]=c[f].charCodeAt(0);e[h]=new Uint8Array(u)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,k){f=null!=f?f:!1;k=null!=k?k:"vsdx"!=e&&
-(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,g){try{if("_blank"==g)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var e=window.open("about:blank");null==e?mxUtils.popup(a,!0):(e.document.write(mxUtils.htmlEntities(a,!1)),e.document.close())}else this.openInNewWindow(a,c,d);else g==App.MODE_DEVICE||"download"==g?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(g,
-mxUtils.bind(this,function(e){try{this.exportFile(a,b,c,d,g,e)}catch(G){this.handleError(G)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,k,null,1<e,4<e&&(!f||6>e)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
+c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var g=document.createElement("a"),h=!mxClient.IS_SF&&"undefined"!==typeof g.download;if(mxClient.IS_GC)var n=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),h=65==(n?parseInt(n[2],
+10):!1)?!1:h;if(h||this.isOffline()){g.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?g.download=b:g.setAttribute("target","_blank");document.body.appendChild(g);try{window.setTimeout(function(){URL.revokeObjectURL(g.href)},0),g.click(),g.parentNode.removeChild(g)}catch(z){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+c?"&mime="+c:"")+(null!=e?"&format="+e:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),g=Array(e),h=0;h<e;++h){for(var f=1024*h,k=Math.min(f+1024,d),t=Array(k-f),l=0;f<k;++l,++f)t[l]=c[f].charCodeAt(0);g[h]=new Uint8Array(t)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e,f,k){f=null!=f?f:!1;k=null!=k?k:"vsdx"!=e&&
+(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE||"download"==e?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,
+mxUtils.bind(this,function(g){try{this.exportFile(a,b,c,d,e,g)}catch(F){this.handleError(F)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,k,null,1<e,4<e&&(!f||6>e)?3:4,a,c,d);this.showDialog(b.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=
null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign=
"center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=d.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
+this.exportDialog.style.zIndex=d.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,g){if("_blank"==g||null!=
-a&&0<a.length){var e=c("_blank"==g?null:a,g==App.MODE_DEVICE||"download"==g||null==g||"_blank"==g?"0":"1");null!=e&&(g==App.MODE_DEVICE||"download"==g||"_blank"==g?e.simulate(document,"_blank"):this.pickFolder(g,mxUtils.bind(this,function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,f,!0,g,c)}catch(F){this.handleError(F)}else this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&
-299>=e.getStatus())try{this.exportFile(e.getText(),a,f,!0,g,c)}catch(F){this.handleError(F)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<g,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,k,n,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var l=this.editor.graph.getSvg(g,a,k,n,null,c);d&&this.editor.graph.addSvgShadow(l);var h=this.getBaseFilename()+".svg",
-p=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,l,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(l,p,this.thumbImageCache)):p(l)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=
+Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,g){return this.createEchoRequest(c,a,d,e,b,g)}),c,e,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,e,f,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var g=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=
+a&&0<a.length){var g=c("_blank"==e?null:a,e==App.MODE_DEVICE||"download"==e||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"download"==e||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,f,!0,e,c)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&
+299>=g.getStatus())try{this.exportFile(g.getText(),a,f,!0,e,c)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<g,4<g?3:4,d,f,e);this.showDialog(a.container,380,g==(mxClient.IS_IOS?0:1)?160:4<g?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
+EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,e,f,k,l,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;g=b?null:this.editor.graph.background;g==mxConstants.NONE&&(g=null);null==g&&0==b&&(g="#ffffff");var h=this.editor.graph.getSvg(g,a,k,l,null,c);d&&this.editor.graph.addSvgShadow(h);var n=this.getBaseFilename()+".svg",
+q=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var d='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.convertMath(this.editor.graph,h,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,q,this.thumbImageCache)):q(h)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=
document.createElement("input");g.style.marginRight="8px";g.style.marginTop="16px";g.setAttribute("type","checkbox");c&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d&&g.setAttribute("disabled","disabled");f&&(a.appendChild(g),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),e||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=g.getAttribute("disabled")&&(g.checked=!g.checked,mxEvent.consume(a))})));return g};EditorUi.prototype.addEditButton=
-function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),g="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(g=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");
-d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,g,mxResources.get("ok"),function(a){null!=a?g=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
-b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":g:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));d.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));d.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));d.appendChild(g);b&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(g));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();h.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,k,n){var g=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),f&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&h.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(g=this.getCurrentFile(),n||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?
+function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));g.appendChild(d);d=document.createElement("option");
+d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");g.appendChild(d);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||
+b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var g="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=a;c()});mxEvent.consume(a)}));c();h.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return g},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,k,l){var g=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+
+a),null!=b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),f&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&h.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(g=this.getCurrentFile(),l||null==g||g.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?
this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+g.getHash(),a=!1));a&&null!=g&&null!=g.getTitle()&&g.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(g.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,
-b,c,d,e,f,k,n,m,u,w){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);m||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];k&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);n&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),g.toolbar=c.join(" "));null!=u&&0<u.length&&(g.edit=u);null!=
+b,c,d,e,f,k,l,m,t,w){this.getBasenames();var g={};""!=e&&e!=mxConstants.NONE&&(g.highlight=e);"auto"!==d&&(g.target=d);m||(g.lightbox=!1);g.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(g.zoom=c/100);c=[];k&&(c.push("pages"),g.resize=!0,null!=this.pages&&null!=this.currentPage&&(g.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),g.resize=!0);l&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),g.toolbar=c.join(" "));null!=t&&0<t.length&&(g.edit=t);null!=
a?g.url=a:g.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(g))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var g=document.createElement("div");g.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(e);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");e=l.cloneNode(!0);e.setAttribute("value","copy");h.appendChild(e);var f=document.createElement("span");mxUtils.write(f,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(f);mxUtils.br(h);h.appendChild(l);f=document.createElement("span");mxUtils.write(f,mxResources.get("publicDiagramUrl"));h.appendChild(f);var u=this.getCurrentFile();null==c&&null!=u&&u.constructor==window.DriveFile&&(f=
-document.createElement("a"),f.style.paddingLeft="12px",f.style.color="gray",f.setAttribute("href","javascript:void(0);"),mxUtils.write(f,mxResources.get("share")),h.appendChild(f),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(u.getId())})));e.setAttribute("checked","checked");null==c&&l.setAttribute("disabled","disabled");g.appendChild(h);var k=this.addLinkSection(g),n=this.addCheckbox(g,mxResources.get("zoom"),!0,null,!0);mxUtils.write(g,
-":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value="100%";g.appendChild(m);var q=this.addCheckbox(g,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(g,mxResources.get("allPages"),h,!h),E=this.addCheckbox(g,mxResources.get("layers"),!0),B=this.addCheckbox(g,mxResources.get("lightbox"),!0),K=this.addEditButton(g,B),y=K.getEditInput();
-y.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled");y.checked&&B.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,g,mxUtils.bind(this,function(){d(l.checked?c:null,n.checked,m.value,k.getTarget(),k.getColor(),q.checked,D.checked,E.checked,B.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);e.focus()};
-EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(h);var l=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",
-u=document.createElement("div");u.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));u.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));k.style.marginTop="12px";k.className="geBtn";u.appendChild(k);g.appendChild(u);k=document.createElement("a");
-k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));u.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
-this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,m=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",g.appendChild(n),mxUtils.write(g,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",
-m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",g.appendChild(m),mxUtils.br(g);var p=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var q=null;if(null==l||l.constructor!=window.DriveFile||b)q=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var t=this.addCheckbox(g,mxResources.get("lightbox"),!0),B=this.addEditButton(g,t),K=B.getEditInput(),y=this.addCheckbox(g,mxResources.get("layers"),!0);y.style.marginLeft=K.style.marginLeft;y.style.marginBottom="16px";
-y.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?(y.removeAttribute("disabled"),K.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&t.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(p.getTarget(),p.getColor(),null==q?!0:q.checked,t.checked,B.getLink(),y.checked,null!=n?n.value:null,null!=
-m?m.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,254+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var g=document.createElement("div");g.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-g.appendChild(e);var h=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,f=d?null:this.addCheckbox(g,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=f&&(f.style.marginBottom="16px");a=new CustomDialog(this,g,mxUtils.bind(this,function(){c(!h.checked,null!=l?l.checked:!1,null!=f?f.checked:!1)}),null,a,b);this.showDialog(a.container,
-300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,k,n){k=null!=k?k:!0;var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=this.editor.graph,l="jpeg"==n?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width=
-"60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";g.appendChild(p);mxUtils.write(g,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";g.appendChild(q);mxUtils.br(g);var t=this.addCheckbox(g,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=
-n),x=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,h.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");f&&(g.appendChild(z),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),l+=26,mxEvent.addListener(x,"change",function(){x.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(z.setAttribute("checked",
-"checked"),z.defaultChecked=!0);var K=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(g.appendChild(y),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),l+=26);var H=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=n),C=null!=this.pages&&1<this.pages.length,
-J=this.addCheckbox(g,C?mxResources.get("allPages"):"",C,!C,null,"jpeg"!=n);J.style.marginLeft="24px";J.style.marginBottom="16px";C||(J.style.visibility="hidden");mxEvent.addListener(H,"change",function(){H.checked&&C?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});k&&C||J.setAttribute("disabled","disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;e(p.value,t.checked,!x.checked,K.checked,H.checked,y.checked,
-q.value,z.checked,!J.checked)}),null,c,d);this.showDialog(a.container,340,l,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var l=document.createElement("h3");mxUtils.write(l,b);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-g.appendChild(l)}var f=this.addCheckbox(g,mxResources.get("fit"),!0),k=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible&&d,!d),n=this.addCheckbox(g,c),m=this.addCheckbox(g,mxResources.get("lightbox"),!0),q=this.addEditButton(g,m),t=q.getEditInput(),D=1<h.model.getChildCount(h.model.getRoot()),E=this.addCheckbox(g,mxResources.get("layers"),D,!D);E.style.marginLeft=t.style.marginLeft;E.style.marginBottom="12px";E.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?
-(D&&E.removeAttribute("disabled"),t.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&m.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){a(f.checked,k.checked,n.checked,m.checked,q.getLink(),E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,c,d,e,f,k,n){function g(b){var g=" ",l="";d&&(g=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");
-a&&(l+="max-width:100%;");var u="";c&&(u=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+u+(""!=l?' style="'+l+'"':"")+g+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),
-h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var l="";c&&(l="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+l+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?g("data:image/png;base64,"+m.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,c,d,e,f,k){var g=this.editor.graph.getSvg(),h=g.getElementsByTagName("a");if(null!=h)for(var l=0;l<h.length;l++){var n=h[l].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==h[l].getAttribute("target")&&h[l].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var m=" ",p="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",d&&(g.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=p&&g.setAttribute("style",p),k(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");g=f.cloneNode(!0);g.setAttribute("value","copy");h.appendChild(g);var n=document.createElement("span");mxUtils.write(n,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(n);mxUtils.br(h);h.appendChild(f);n=document.createElement("span");mxUtils.write(n,mxResources.get("publicDiagramUrl"));h.appendChild(n);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(n=
+document.createElement("a"),n.style.paddingLeft="12px",n.style.color="gray",n.setAttribute("href","javascript:void(0);"),mxUtils.write(n,mxResources.get("share")),h.appendChild(n),mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));g.setAttribute("checked","checked");null==c&&f.setAttribute("disabled","disabled");e.appendChild(h);var k=this.addLinkSection(e),l=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value="100%";e.appendChild(m);var q=this.addCheckbox(e,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),h,!h),A=this.addCheckbox(e,mxResources.get("layers"),!0),C=this.addCheckbox(e,mxResources.get("lightbox"),!0),J=this.addEditButton(e,C),B=J.getEditInput();
+B.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&C.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(f.checked?c:null,l.checked,m.value,k.getTarget(),k.getColor(),q.checked,E.checked,A.checked,C.checked,J.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};
+EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(h);var n=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=n&&n.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",
+t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));t.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(n.getId())}));k.style.marginTop="12px";k.className="geBtn";t.appendChild(k);g.appendChild(t);k=document.createElement("a");
+k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));t.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
+this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,m=null;if(null!=c||null!=d)a+=30,mxUtils.write(g,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",g.appendChild(l),mxUtils.write(g,mxResources.get("height")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.width="50px",
+m.style.marginLeft="6px",m.style.marginBottom="10px",m.value=d+"px",g.appendChild(m),mxUtils.br(g);var q=this.addLinkSection(g,f);c=null!=this.pages&&1<this.pages.length;var p=null;if(null==n||n.constructor!=window.DriveFile||b)p=this.addCheckbox(g,mxResources.get("allPages"),c,!c);var u=this.addCheckbox(g,mxResources.get("lightbox"),!0),C=this.addEditButton(g,u),J=C.getEditInput(),B=this.addCheckbox(g,mxResources.get("layers"),!0);B.style.marginLeft=J.style.marginLeft;B.style.marginBottom="16px";
+B.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(B.removeAttribute("disabled"),J.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&u.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){e(q.getTarget(),q.getColor(),null==p?!0:p.checked,u.checked,C.getLink(),B.checked,null!=l?l.value:null,null!=
+m?m.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+e.appendChild(g);var h=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,n=d?null:this.addCheckbox(e,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=n&&(n.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!h.checked,null!=f?f.checked:!1,null!=n?n.checked:!1)}),null,a,b);this.showDialog(a.container,
+300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f,k,l){k=null!=k?k:!0;var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=this.editor.graph,n="jpeg"==l?196:300,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(m);mxUtils.write(g,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width=
+"60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";g.appendChild(q);mxUtils.write(g,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";g.appendChild(v);mxUtils.br(g);var p=this.addCheckbox(g,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=
+l),u=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.style.marginLeft="24px";y.setAttribute("disabled","disabled");y.setAttribute("type","checkbox");f&&(g.appendChild(y),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),n+=26,mxEvent.addListener(u,"change",function(){u.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(y.setAttribute("checked",
+"checked"),y.defaultChecked=!0);var J=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");b&&(g.appendChild(B),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),n+=26);var L=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),H=null!=this.pages&&1<this.pages.length,
+G=this.addCheckbox(g,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=l);G.style.marginLeft="24px";G.style.marginBottom="16px";H||(G.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&H?G.removeAttribute("disabled"):G.setAttribute("disabled","disabled")});k&&H||G.setAttribute("disabled","disabled");a=new CustomDialog(this,g,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=q.value;e(q.value,p.checked,!u.checked,J.checked,L.checked,B.checked,
+v.value,y.checked,!G.checked)}),null,c,d);this.showDialog(a.container,340,n,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,e){var g=document.createElement("div");g.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var f=document.createElement("h3");mxUtils.write(f,b);f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+g.appendChild(f)}var n=this.addCheckbox(g,mxResources.get("fit"),!0),k=this.addCheckbox(g,mxResources.get("shadow"),h.shadowVisible&&d,!d),l=this.addCheckbox(g,c),m=this.addCheckbox(g,mxResources.get("lightbox"),!0),q=this.addEditButton(g,m),u=q.getEditInput(),E=1<h.model.getChildCount(h.model.getRoot()),A=this.addCheckbox(g,mxResources.get("layers"),E,!E);A.style.marginLeft=u.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?
+(E&&A.removeAttribute("disabled"),u.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&m.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,g,mxUtils.bind(this,function(){a(n.checked,k.checked,l.checked,m.checked,q.getLink(),A.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,b,c,d,e,f,k,l){function g(b){var g=" ",n="";d&&(g=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");
+a&&(n+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+t+(""!=n?' style="'+n+'"':"")+g+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");g(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),
+h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var n="";c&&(n="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+n+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?g("data:image/png;base64,"+m.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+b,c,d,e,f,k){var g=this.editor.graph.getSvg(),h=g.getElementsByTagName("a");if(null!=h)for(var n=0;n<h.length;n++){var l=h[n].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==h[n].getAttribute("target")&&h[n].removeAttribute("target")}d&&g.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(g);if(c){var m=" ",q="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");this.convertImages(g,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",d&&(g.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(f?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),a&&(a=parseInt(g.getAttribute("width")),b=parseInt(g.getAttribute("height")),g.setAttribute("viewBox","0 0 "+a+" "+b),q+="max-width:100%;max-height:"+b+"px;",g.removeAttribute("height")),""!=q&&g.setAttribute("style",q),k(mxUtils.getXml(g))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<
-d.length){var c=d[0],g=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:g.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(p){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
-g=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),g=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),e=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==g&&(g=this.getFileData(!0));var e=c.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(e.substring(e.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(u){null!=b&&b(u)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(p){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
+e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),g=d.getGlobalVariable,h=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(d.container);
+d.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var g=c.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(g.substring(g.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
function(a,b,c,d,e,f,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,f);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,k,n,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,n):null,m)}catch(G){"Invalid image"==G.message?this.downloadFile(m):this.handleError(G)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,k)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,g={},e=mxUtils.bind(this,function(){if(0==d){for(var e=[c[0]],h=1;h<c.length;h++){var f=
-c[h].indexOf(")");e.push('url("');e.push(g[b(c[h].substring(0,f))]);e.push('"'+c[h].substring(f))}this.editor.resolvedFontCss=e.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var k=c[f].indexOf(")"),n=null,u=c[f].indexOf("format(",k);0<u&&(n=b(c[f].substring(u+7,c[f].indexOf(")",u))));mxUtils.bind(this,function(a){if(null==g[a]){g[a]=a;d++;var b="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){g[a]=b;d--;e()}),mxUtils.bind(this,
-function(a){d--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,k)),n)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,k,n,m,u,w,G,F,A){f=null!=f?f:!0;G=null!=G?G:this.editor.graph;F=null!=F?F:0;var g=m?null:G.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==m&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(G.getSvg(g,null,null,A,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,
-function(){try{var h=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=f?Math.min(1,Math.min(3*b/(4*k),b/l)):b/l);l=Math.ceil(n*l)+2*F;k=Math.ceil(n*k)+2*F;h.setAttribute("width",l);h.setAttribute("height",k);var u=h.getContext("2d");null!=g&&(u.beginPath(),u.rect(0,0,l,k),u.fillStyle=g,u.fill());u.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){u.drawImage(d,F/n,F/n);a(h)},0):(u.drawImage(d,F/n,F/n),a(h))}catch(P){null!=
-e&&e(P)}});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.graph.addSvgShadow(c);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(G,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(y){null!=e&&e(y)}}),c,w)};EditorUi.prototype.createImageUrlConverter=
-function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var g="http://"==d.substring(0,7)||"https://"==d.substring(0,8);g&&!navigator.onLine?d=c.svgBrokenImage.src:!g||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==
-d&&(d=this.createImageUrlConverter());var g=0,e=c||{};c=mxUtils.bind(this,function(c,h){for(var f=a.getElementsByTagName(c),l=0;l<f.length;l++)mxUtils.bind(this,function(c){var f=d.convert(c.getAttribute(h));if(null!=f&&"data:"!=f.substring(0,5)){var l=e[f];null==l?(g++,this.convertImageToDataUri(f,function(d){null!=d&&(e[f]=d,c.setAttribute(h,d));g--;0==g&&b(a)})):c.setAttribute(h,l)}else null!=f&&c.setAttribute(h,f)})(f[l])});c("image","xlink:href");c("img","src");0==g&&b(a)};EditorUi.prototype.loadUrl=
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f,k,l,m){m=null!=m?m:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c,l):null,m)}catch(F){"Invalid image"==F.message?this.downloadFile(m):this.handleError(F)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,f,k)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var g=[c[0]],h=1;h<c.length;h++){var f=
+c[h].indexOf(")");g.push('url("');g.push(e[b(c[h].substring(0,f))]);g.push('"'+c[h].substring(f))}this.editor.resolvedFontCss=g.join("");a()}});if(0<c.length)for(var f=1;f<c.length;f++){var k=c[f].indexOf(")"),l=null,t=c[f].indexOf("format(",k);0<t&&(l=b(c[f].substring(t+7,c[f].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))b=
+"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;g()}),mxUtils.bind(this,
+function(a){d--;g()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[f].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,k,l,m,t,w,F,D,x){f=null!=f?f:!0;F=null!=F?F:this.editor.graph;D=null!=D?D:0;var g=m?null:F.background;g==mxConstants.NONE&&(g=null);null==g&&(g=d);null==g&&0==m&&(g=this.editor.graph.defaultPageBackgroundColor);this.convertImages(F.getSvg(g,null,null,x,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,
+function(){try{var h=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=f?Math.min(1,Math.min(3*b/(4*k),b/n)):b/n);n=Math.ceil(l*n)+2*D;k=Math.ceil(l*k)+2*D;h.setAttribute("width",n);h.setAttribute("height",k);var t=h.getContext("2d");null!=g&&(t.beginPath(),t.rect(0,0,n,k),t.fillStyle=g,t.fill());t.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){t.drawImage(d,D/l,D/l);a(h)},0):(t.drawImage(d,D/l,D/l),a(h))}catch(M){null!=
+e&&e(M)}});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.graph.addSvgShadow(c);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(F,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(B){null!=e&&e(B)}}),c,w)};EditorUi.prototype.createImageUrlConverter=
+function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==
+d&&(d=this.createImageUrlConverter());var e=0,g=c||{};c=mxUtils.bind(this,function(c,h){for(var f=a.getElementsByTagName(c),n=0;n<f.length;n++)mxUtils.bind(this,function(c){var f=d.convert(c.getAttribute(h));if(null!=f&&"data:"!=f.substring(0,5)){var n=g[f];null==n?(e++,this.convertImageToDataUri(f,function(d){null!=d&&(g[f]=d,c.setAttribute(h,d));e--;0==e&&b(a)})):c.setAttribute(h,n)}else null!=f&&c.setAttribute(h,f)})(f[n])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=
function(a,b,c,d,e,f){try{var g=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var h=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=
-String.fromCharCode(a[e]);d=d.join("")}f=null!=f?f:"data:image/png;base64,";d=f+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(v){null!=c&&c(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
+String.fromCharCode(a[e]);d=d.join("")}f=null!=f?f:"data:image/png;base64,";d=f+this.base64Encode(d)}b(d)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},g,this.timeout,function(){e&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,
-d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(x){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),l=this.editor.extractGraphModel(h.documentElement,
-null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){f.model.beginUpdate();try{for(a=0;a<k.length;a++){var n=this.updatePageRoot(new DiagramPage(k[a])),m=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,n,n,m))}}finally{f.model.endUpdate()}}}null!=l&&"mxGraphModel"===
-l.nodeName&&(g=f.importGraphModel(l,b,c,d))}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return g};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType=
-"blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{this.doImportVisio(g.response,b,c)}catch(z){c(z)}else c({})});g.send(e)}else try{this.doImportVisio(a,b,c)}catch(z){c(z)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(x){this.handleError(x)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
+d=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=c.height;a.width=c.width;e.drawImage(c,0,0);try{b(a.toDataURL())}catch(v){b(d.svgBrokenImage.src)}};c.onerror=function(){b(d.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var g=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),n=this.editor.extractGraphModel(h.documentElement,
+null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var k=n.getElementsByTagName("diagram");if(1==k.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){f.model.beginUpdate();try{for(a=0;a<k.length;a++){var l=this.updatePageRoot(new DiagramPage(k[a])),m=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[m+1]));f.model.execute(new ChangePage(this,l,l,m))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===
+n.nodeName&&(g=f.importGraphModel(n,b,c,d))}}catch(D){throw e||this.handleError(D,mxResources.get("invalidOrMissingFile")),D;}return g};EditorUi.prototype.importVisio=function(a,b,c,d){d=null!=d?d:a.name;c=null!=c?c:mxUtils.bind(this,function(a){this.handleError(a)});var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var e=new FormData;e.append("file1",a,d);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType=
+"blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{this.doImportVisio(g.response,b,c)}catch(y){c(y)}else c({})});g.send(e)}else try{this.doImportVisio(a,b,c)}catch(y){c(y)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(h){this.handleError(h)}});
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,d,e){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,e)}catch(v){this.handleError(v)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(g,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
mxscript("js/diagramly/Extensions.js",g):mxscript("js/extensions.min.js",g))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var g in e.Pages)a.push(e.Pages[g]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var f=this.currentPage;
for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f,k){f=null!=f?f:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
-b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),l=this.importXml(h,b,c,f,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),l=this.importXml(h,b,c,f,!0),0<l.length)return l}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
+b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),n=this.importXml(h,b,c,f,!0);if(0<n.length)return n}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+
+1)),n=this.importXml(h,b,c,f,!0),0<n.length)return n}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",
[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,f);else{g=this.editor.graph;e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html=1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=
a,g.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&&g.setLinkForCell(e,e.value),e.geometry.width+=g.gridSize,e.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+
-" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,k,n,m,u,w){u=null!=u?u:!0;var g=!1,h=null,l=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,
-10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,u);null!=n&&n(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,u),m=!0)),m||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),u&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,u);null!=n&&n(a)})):null!=m&&null!=k&&(/(\.vsdx)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k)||/(\.vsd)($|\?)/i.test(k))?(g=!0,this.importVisio(m,l)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(g=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-(200<=a.status&&299>=a.status?l(a.responseText):null!=n&&n(null))}),k)):/(\.vsd)($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,u));g||null==n||n(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,f;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}g=a.charCodeAt(c++);
-if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}f=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&
-15)<<2|(f&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,k,n,m,u,w,G){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var g=null!=b&&null!=c,h=!0,l=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=w||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>p){l=!0;break}var t=mxUtils.bind(this,function(){var l=this.editor.graph,
-m=l.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,h,l,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,e,f,h,l,k,g,G)});f=null!=f?f:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,t=[],v=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--q){this.spinner.stop();if(null!=n)n(t);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<t.length;d++){var e=t[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}f(c)}}),x=0;x<p;x++)mxUtils.bind(this,function(g){var f=a[g],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==k||k(f))if("image/"==f.type.substring(0,6))if("image/svg"==f.type.substring(0,9)){var n=a.target.result,p=n.indexOf(","),q=decodeURIComponent(escape(atob(n.substring(p+1)))),t=mxUtils.parseXml(q),q=t.getElementsByTagName("svg");if(0<q.length){var q=q[0],y=G?null:q.getAttribute("content");
-null!=y&&"<"!=y.charAt(0)&&"%"!=y.charAt(0)&&(y=unescape(window.atob?atob(y):Base64.decode(y,!0)));null!=y&&"%"==y.charAt(0)&&(y=decodeURIComponent(y));null==y||"<mxfile "!==y.substring(0,8)&&"<mxGraphModel "!==y.substring(0,14)?v(g,mxUtils.bind(this,function(){try{if(n.substring(0,p+1),null!=t){var a=t.getElementsByTagName("svg");if(0<a.length){var k=a[0],u=parseFloat(k.getAttribute("width")),w=parseFloat(k.getAttribute("height")),q=k.getAttribute("viewBox");if(null==q||0==q.length)k.setAttribute("viewBox",
-"0 0 "+u+" "+w);else if(isNaN(u)||isNaN(w)){var y=q.split(" ");3<y.length&&(u=parseFloat(y[2]),w=parseFloat(y[3]))}n=this.createSvgDataUri(mxUtils.getXml(k));var v=Math.min(1,Math.min(d/Math.max(1,u)),d/Math.max(1,w)),x=e(n,f.type,b+g*m,c+g*m,Math.max(1,Math.round(u*v)),Math.max(1,Math.round(w*v)),f.name,h);if(isNaN(u)||isNaN(w)){var C=new Image;C.onload=mxUtils.bind(this,function(){u=Math.max(1,C.width);w=Math.max(1,C.height);x[0].geometry.width=u;x[0].geometry.height=w;k.setAttribute("viewBox",
-"0 0 "+u+" "+w);n=this.createSvgDataUri(mxUtils.getXml(k));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));l.setCellStyles("image",n,[x[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(k))}return x}}}catch(ka){}return null})):v(g,mxUtils.bind(this,function(){return e(y,"text/xml",b+g*m,c+g*m,0,0,f.name)}))}}else{q=!1;if("image/png"==f.type){var x=G?null:this.extractGraphModelFromPng(a.target.result);if(null!=x&&0<x.length){var C=new Image;C.src=a.target.result;v(g,
-mxUtils.bind(this,function(){return e(x,"text/xml",b+g*m,c+g*m,C.width,C.height,f.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,a.target.result,mxUtils.bind(this,function(l,
-k,n){v(g,mxUtils.bind(this,function(){if(null!=l&&l.length<u){var p=h&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/k,d/n)):1;return e(l,f.type,b+g*m,c+g*m,Math.round(k*p),Math.round(n*p),f.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,f.type,b+g*m,c+g*m,240,160,f.name,function(a){v(g,function(){return a})})});/(\.vsdx)($|\?)/i.test(f.name)||
-/(\.vssx)($|\?)/i.test(f.name)||/(\.vsd)($|\?)/i.test(f.name)?e(null,f.type,b+g*m,c+g*m,240,160,f.name,function(a){v(g,function(){return a})},f):"image"==f.type.substring(0,5)?n.readAsDataURL(f):n.readAsText(f)})(x)});l?this.confirmImageResize(function(a){h=a;t()},m):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+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):
-e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),h=Math.max(1,a.height);if(d&&this.isResampleImage(b,
-f))try{var l=Math.max(g/e,h/e);if(1<l){var k=Math.round(g/l),n=Math.round(h/l),m=document.createElement("canvas");m.width=k;m.height=n;m.getContext("2d").drawImage(a,0,0,k,n);var p=m.toDataURL();if(p.length<b.length){var q=document.createElement("canvas");q.width=k;q.height=n;var t=q.toDataURL();p!==t&&(b=p,g=k,h=n)}}}catch(E){}c(b,g,h)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=
-function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function g(a,b){var c=l;l+=b;return a.substring(c,l)}function f(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(g(a,8)!=String.fromCharCode(137)+
-"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,l);do{var k=f(a);if("IDAT"==g(a,4)){e=a.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(l-8,a.length);break}e+=a.substring(l-8,l-4+k);g(a,k);g(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,
-!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&
-"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(t){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&
-(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<
-c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,g){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};e.call(this,b,d,g)};f.apply(this,arguments);mxClient.IS_SVG&&
-this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var k=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:k.apply(this,arguments)};var n=
-c.createLinkForHint;c.createLinkForHint=function(d,e){var g=c.isPageLink(d);if(g){var f=d.indexOf(",");0<f&&(f=b.getPageById(d.substring(f+1)),e=null!=f?f.getName():mxResources.get("pageNotFound"))}f=n.call(this,d,e);g&&mxEvent.addListener(f,"click",function(b){a(d);mxEvent.consume(b)});return f};var m=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isPageLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))m.apply(this,arguments);else{if(!c.isEnabled()||
-null!=b&&c.isCellLocked(b.cell))a(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable){var u=function(){window.setTimeout(function(){w.innerHTML="&nbsp;";w.focus();document.execCommand("selectAll",!1,
-null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=
-a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var g=c.items;for(index in g){var f=g[index];if("file"===f.kind){if(b.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],
-h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML="&nbsp;";var G=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,
-function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||G||(w.style.left=c.container.scrollLeft+10+"px",w.style.top=c.container.scrollTop+10+"px",c.container.appendChild(w),G=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll",!1,null)},0):(w.focus(),document.execCommand("selectAll",
-!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!G||224!=b&&17!=b&&91!=b||(G=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(w),u())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(w,!0),
-u())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(w.innerHTML="&nbsp;",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML="&nbsp;"}),0))}),!0);var F=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==w?!0:F.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||
-0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,
-"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?
-this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&
-document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){v=document.createElement("div");v.style.position="absolute";v.style.top="95px";v.style.left="250px";v.style.width="2000px";v.style.height="30px";v.style.background="whiteSmoke";document.body.appendChild(v);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";A.style.width=
-"30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var D=document.createElement("div");D.style.position="absolute";D.style.top="95px";D.style.left="220px";D.style.width="30px";D.style.height="30px";D.style.background="whiteSmoke";document.body.appendChild(D);this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,v,!1)}if("1"==urlParams.test){v=document.getElementById("geFooter");null!=v&&(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)})),v.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 E=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:E.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&
-(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,
-"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;mxEvent.isAltDown(a)&&(f=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=l;var k=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(l=b[0].getAttribute("href")));var n=!0,u=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(l,g,f,!0,k,null,n))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;u()},mxEvent.isControlDown(a)):u()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,
-null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
-EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
-mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
-mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;
-if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===
-c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var f=e.lastIndexOf("%3E");0<=f&&f<e.length-3&&(e=e.substring(0,f+3))}catch(v){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);
-this.isCompatibleString(h)&&(g=!0,e=h)}catch(v){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&
-this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
-12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
-else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):
-0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,
-e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
-var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=
-e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var g=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(w){this.handleError(w,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
-e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=
-function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),
-this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),
-c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),g=0;g<e;g++)this.addBasenamesForCell(d.model.getChildAt(a,g),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&
-(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
-this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
-function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){function k(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(J){}return a}if(g.source==(window.opener||window.parent)){var h=g.data;if("json"==urlParams.proto){try{h=
-JSON.parse(h)}catch(C){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&f.postMessage(JSON.stringify({event:"prompt",
-value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):k(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,
-function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(C){f.postMessage(JSON.stringify({event:"draft",
-error:C.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,n=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?f.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=
-a;f.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;f.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){f.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==
-h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var m=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==h.action){if("png"==
-h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var p=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(p);f.postMessage(JSON.stringify(b),"*")}),x=mxUtils.bind(this,function(a){null==
-a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),z=q.getGlobalVariable,y=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?y.getName():"pagenumber"==a?1:z.apply(this,arguments)};document.body.appendChild(q.container);
-q.model.setRoot(y.root)}this.exportToCanvas(mxUtils.bind(this,function(a){x(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){x(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):x(null)}),mxUtils.bind(this,function(){x(null)}))}}else{null!=
-h.xml&&0<h.xml.length&&this.setFileData(h.xml);m=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null,!0,null,null,null,l),m.format=h.format;else if("html"==h.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);f.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));f.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}f.postMessage(JSON.stringify(m),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
-h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{f.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}h=k(h);c=!0;try{a(h,g)}catch(C){this.handleError(C)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var H=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=H();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=H();if(d!=e&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
-b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||f.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var f=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";f.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
-"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,f="",k="auto",n="auto",m=null,w=null,G=40,F=40,A=0,D=this.editor.graph;
-D.getGraphBounds();for(var E=function(){D.setSelectionCells(U);D.scrollCellToVisible(D.getSelectionCell())},B=D.getFreeInsertPoint(),K=B.x,y=B.y,B=y,H=null,C="auto",J=[],P=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var O=mxUtils.trim(a.substring(1,R)),N=mxUtils.trim(a.substring(R+1));"label"==O?H=D.sanitizeHtml(N):
-"style"==O?e=N:"identity"==O&&0<N.length&&"-"!=N?g=N:"namespace"==O&&0<N.length&&"-"!=N?f=N:"width"==O?k=N:"height"==O?n=N:"left"==O&&0<N.length?m=N:"top"==O&&0<N.length?w=N:"ignore"==O?V=N.split(","):"connect"==O?J.push(JSON.parse(N)):"link"==O?P=N:"padding"==O?A=parseFloat(N):"edgespacing"==O?G=parseFloat(N):"nodespacing"==O?F=parseFloat(N):"layout"==O&&(C=N)}}}var L=this.editor.csvToArray(b[T]);a=null;if(null!=g)for(var Q=0;Q<L.length;Q++)if(g==L[Q]){a=Q;break}null==H&&(H="%"+L[0]+"%");if(null!=
-J)for(var S=0;S<J.length;S++)null==d[J[S].to]&&(d[J[S].to]={});D.model.beginUpdate();try{for(Q=T+1;Q<b.length;Q++){var Y=this.editor.csvToArray(b[Q]);if(Y.length==L.length){var I=null,aa=null!=a?f+Y[a]:null;null!=aa&&(I=D.model.getCell(aa));null==I&&(I=new mxCell(H,new mxGeometry(K,B,0,0),e||"whiteSpace=wrap;html=1;"),I.vertex=!0,I.id=aa);for(var M=0;M<Y.length;M++)D.setAttributeForCell(I,L[M],Y[M]);D.setAttributeForCell(I,"placeholders","1");I.style=D.replacePlaceholders(I,I.style);for(S=0;S<J.length;S++)d[J[S].to][I.getAttribute(J[S].to)]=
-I;null!=P&&"link"!=P&&(D.setLinkForCell(I,I.getAttribute(P)),D.setAttributeForCell(I,P,null));D.fireEvent(new mxEventObject("cellsInserted","cells",[I]));var X=this.editor.graph.getPreferredSizeForCell(I);I.vertex&&(null!=m&&null!=I.getAttribute(m)&&(I.geometry.x=K+parseFloat(I.getAttribute(m))),null!=w&&null!=I.getAttribute(w)&&(I.geometry.y=y+parseFloat(I.getAttribute(w))),"@"==k.charAt(0)&&null!=I.getAttribute(k.substring(1))?I.geometry.width=parseFloat(I.getAttribute(k.substring(1))):I.geometry.width=
-"auto"==k?X.width+A:parseFloat(k),"@"==n.charAt(0)&&null!=I.getAttribute(n.substring(1))?I.geometry.height=parseFloat(I.getAttribute(n.substring(1))):I.geometry.height="auto"==n?X.height+A:parseFloat(n),B+=I.geometry.height+F);c.push(D.addCell(I))}}for(var Z=c.slice(),U=c.slice(),S=0;S<J.length;S++)for(var W=J[S],Q=0;Q<c.length;Q++){var I=c[Q],ha=I.getAttribute(W.from);if(null!=ha){D.setAttributeForCell(I,W.from,null);for(var ia=ha.split(","),M=0;M<ia.length;M++){var ba=d[W.to][ia[M]];null!=ba&&(H=
-W.label,null!=W.fromlabel&&(H=(I.getAttribute(W.fromlabel)||"")+(H||"")),null!=W.tolabel&&(H=(H||"")+(ba.getAttribute(W.tolabel)||"")),U.push(D.insertEdge(null,null,H||"",W.invert?ba:I,W.invert?I:ba,W.style||D.createCurrentEdgeStyle())),mxUtils.remove(W.invert?I:ba,Z))}}}if(null!=V)for(Q=0;Q<c.length;Q++)for(I=c[Q],M=0;M<V.length;M++)D.setAttributeForCell(I,mxUtils.trim(V[M]),null);var da=new mxParallelEdgeLayout(D);da.spacing=G;var ja=function(){da.execute(D.getDefaultParent());for(var a=0;a<c.length;a++){var b=
-D.getCellGeometry(c[a]);b.x=Math.round(D.snap(b.x));b.y=Math.round(D.snap(b.y));"auto"==k&&(b.width=Math.round(D.snap(b.width)));"auto"==n&&(b.height=Math.round(D.snap(b.height)))}};if("circle"==C){var ea=new mxCircleLayout(D);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(D.getDefaultParent());ja()},!0,E);E=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&U.length==
-2*c.length-1&&1==Z.length){D.view.validate();var fa=new mxCompactTreeLayout(D,"horizontaltree"==C);fa.levelDistance=F;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(D.getDefaultParent(),0<Z.length?Z[0]:null)},!0,E);E=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==Z.length){D.view.validate();var ga=new mxHierarchicalLayout(D,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(D.getDefaultParent(),
-U);D.moveCells(U,K,y)},!0,E);E=null}else if("organic"==C||"auto"==C&&U.length>c.length){D.view.validate();var ca=new mxFastOrganicLayout(D);ca.forceConstant=3*F;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(D);da.spacing=G;this.executeLayout(function(){ca.execute(D.getDefaultParent());ja()},!0,E);E=null}this.hideDialog()}finally{D.model.endUpdate()}null!=E&&E()}}catch(ma){this.handleError(ma)}};
-EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
-b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,g=b.outline;g.pageScale=e.pageScale;g.pageFormat=
+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,k,l,m,t,w){t=null!=t?t:!0;var g=!1,h=null,n=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,
+10)?this.loadLibrary(new LocalLibrary(this,a,k)):b=this.importXml(a,c,d,t);null!=l&&l(b)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,t),m=!0)),m||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,e,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,d,t);null!=l&&l(a)})):null!=m&&null!=k&&(/(\.vsdx?)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k))?(g=!0,this.importVisio(m,n)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(g=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&
+299>=a.status?n(a.responseText):null!=l&&l(null))}),k)):/(\.vsd)($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));g||null==l||l(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,g,f;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}g=a.charCodeAt(c++);if(c==d){b+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);b+="=";break}f=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&
+15)<<2|(f&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,k,l,m,t,w,F){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var g=null!=b&&null!=c,h=!0,n=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var q=w||this.resampleThreshold,v=0;v<a.length;v++)if("image/"==a[v].type.substring(0,6)&&a[v].size>q){n=!0;break}var p=mxUtils.bind(this,function(){var n=this.editor.graph,
+m=n.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,h,k,n){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,e,f,h,k,n,g,F)});f=null!=f?f:mxUtils.bind(this,function(a){n.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,v=q,p=[],u=mxUtils.bind(this,function(a,b){p[a]=b;if(0==--v){this.spinner.stop();if(null!=l)l(p);else{var c=[];n.getModel().beginUpdate();
+try{for(var d=0;d<p.length;d++){var e=p[d]();null!=e&&(c=c.concat(e))}}finally{n.getModel().endUpdate()}}f(c)}}),x=0;x<q;x++)mxUtils.bind(this,function(g){var f=a[g],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(f))if("image/"==f.type.substring(0,6))if("image/svg"==f.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),v=decodeURIComponent(escape(atob(l.substring(q+1)))),p=mxUtils.parseXml(v),v=p.getElementsByTagName("svg");if(0<v.length){var v=v[0],B=F?null:v.getAttribute("content");
+null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?u(g,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=p){var a=p.getElementsByTagName("svg");if(0<a.length){var k=a[0],t=parseFloat(k.getAttribute("width")),w=parseFloat(k.getAttribute("height")),v=k.getAttribute("viewBox");if(null==v||0==v.length)k.setAttribute("viewBox",
+"0 0 "+t+" "+w);else if(isNaN(t)||isNaN(w)){var u=v.split(" ");3<u.length&&(t=parseFloat(u[2]),w=parseFloat(u[3]))}l=this.createSvgDataUri(mxUtils.getXml(k));var B=Math.min(1,Math.min(d/Math.max(1,t)),d/Math.max(1,w)),x=e(l,f.type,b+g*m,c+g*m,Math.max(1,Math.round(t*B)),Math.max(1,Math.round(w*B)),f.name,h);if(isNaN(t)||isNaN(w)){var F=new Image;F.onload=mxUtils.bind(this,function(){t=Math.max(1,F.width);w=Math.max(1,F.height);x[0].geometry.width=t;x[0].geometry.height=w;k.setAttribute("viewBox",
+"0 0 "+t+" "+w);l=this.createSvgDataUri(mxUtils.getXml(k));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));n.setCellStyles("image",l,[x[0]])});F.src=this.createSvgDataUri(mxUtils.getXml(k))}return x}}}catch(da){}return null})):u(g,mxUtils.bind(this,function(){return e(B,"text/xml",b+g*m,c+g*m,0,0,f.name)}))}}else{v=!1;if("image/png"==f.type){var x=F?null:this.extractGraphModelFromPng(a.target.result);if(null!=x&&0<x.length){var y=new Image;y.src=a.target.result;u(g,
+mxUtils.bind(this,function(){return e(x,"text/xml",b+g*m,c+g*m,y.width,y.height,f.name)}));v=!0}}v||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,a.target.result,mxUtils.bind(this,function(k,
+n,l){u(g,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var q=h&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/n,d/l)):1;return e(k,f.type,b+g*m,c+g*m,Math.round(n*q),Math.round(l*q),f.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,f.type,b+g*m,c+g*m,240,160,f.name,function(a){u(g,function(){return a})})});/(\.vsdx?)($|\?)/i.test(f.name)||
+/(\.vssx)($|\?)/i.test(f.name)?e(null,f.type,b+g*m,c+g*m,240,160,f.name,function(a){u(g,function(){return a})},f):"image"==f.type.substring(0,5)?l.readAsDataURL(f):l.readAsText(f)})(x)});n?this.confirmImageResize(function(a){h=a;p()},m):p()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?
+e:null),mxSettings.save();c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,
+c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),h=Math.max(1,a.height);if(d&&this.isResampleImage(b,f))try{var k=Math.max(g/e,h/e);if(1<k){var n=Math.round(g/
+k),l=Math.round(h/k),m=document.createElement("canvas");m.width=n;m.height=l;m.getContext("2d").drawImage(a,0,0,n,l);var q=m.toDataURL();if(q.length<b.length){var p=document.createElement("canvas");p.width=n;p.height=l;var u=p.toDataURL();q!==u&&(b=q,g=n,h=l)}}}catch(A){}c(b,g,h)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,e=0;8>e;e++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^
+b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function g(a,b){var c=k;k+=b;return a.substring(c,k)}function f(a){a=g(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(g(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(g(a,
+4),"IHDR"!=g(a,4))null!=e&&e();else{g(a,17);e=a.substring(0,k);do{var n=f(a);if("IDAT"==g(a,4)){e=a.substring(0,k-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);e+=h(c.length)+b+c+h(d^4294967295);e+=a.substring(k-8,a.length);break}e+=a.substring(k-8,k-4+n);g(a,n);g(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
+null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(u){}null!=
+b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;
+c.addListener("pageLinkClicked",function(b,c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?
+"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=c.addClickHandler;c.addClickHandler=function(b,d,g){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};e.call(this,b,d,g)};f.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=
+function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var k=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:k.apply(this,arguments)};var l=c.createLinkForHint;c.createLinkForHint=function(d,e){var g=c.isPageLink(d);if(g){var f=d.indexOf(",");
+0<f&&(f=b.getPageById(d.substring(f+1)),e=null!=f?f.getName():mxResources.get("pageNotFound"))}f=l.call(this,d,e);g&&mxEvent.addListener(f,"click",function(b){a(d);mxEvent.consume(b)});return f};var m=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var g=d.getAttribute("href");if(null==g||!c.isPageLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))m.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(g),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
+function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var z=this.actions.get("print");z.setEnabled(!mxClient.IS_IOS||!navigator.standalone);z.visible=z.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){w.innerHTML="&nbsp;";w.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,
+!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var g=
+c.items;for(index in g){var f=g[index];if("file"===f.kind){if(b.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(N){}}),!1);var w=document.createElement("div");w.style.position="absolute";
+w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML="&nbsp;";var F=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==
+b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||F||(w.style.left=c.container.scrollLeft+10+"px",w.style.top=c.container.scrollTop+10+"px",c.container.appendChild(w),F=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll",!1,null)},0):(w.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){!F||224!=b&&17!=b&&91!=b||(F=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(w),t())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(w,!0),t())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(w.innerHTML=
+"&nbsp;",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==w?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
+Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==
+typeof mxRuler){z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="250px";z.style.width="2000px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);var x=document.createElement("div");x.style.position="absolute";x.style.top="125px";x.style.left="220px";x.style.width="30px";x.style.height="1000px";x.style.background="whiteSmoke";document.body.appendChild(x);var E=document.createElement("div");E.style.position="absolute";E.style.top=
+"95px";E.style.left="220px";E.style.width="30px";E.style.height="30px";E.style.background="whiteSmoke";document.body.appendChild(E);this.vRuler=new mxRuler(this.editor.graph,x,!0);this.hRuler=new mxRuler(this.editor.graph,z,!1)}if("1"==urlParams.test){z=document.getElementById("geFooter");null!=z&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
+"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),z.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);
+this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}z=document.getElementById("geInfo");null!=z&&z.parentNode.removeChild(z);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),
+C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=c.view.translate,e=c.view.scale,g=b.x/e-d.x,f=b.y/e-d.y;mxEvent.isAltDown(a)&&(f=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var n=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(k=b[0].getAttribute("href")));var l=!0,t=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,g,f,!0,n,null,l))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
+a;t()},mxEvent.isControlDown(a)):t()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",g,f,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,
+g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
+mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,
+!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var f=e.lastIndexOf("%3E");0<=f&&f<e.length-3&&(e=e.substring(0,f+3))}catch(z){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(g=!0,e=h)}catch(z){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,
+c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(z){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",
+function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?
+(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};
+EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=
+Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=
+function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var g=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(w){this.handleError(w,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx?)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,
+function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));
+else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,
+b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
+null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,
+a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),g=0;g<e;g++)this.addBasenamesForCell(d.model.getChildAt(a,g),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),
+null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
+this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,
+b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){function k(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&
+(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(G){}return a}if(g.source==(window.opener||window.parent)){var h=g.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(H){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&
+(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&f.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):k(h.xml);
+this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();f.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();
+f.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(H){f.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,n=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?
+f.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,l?mxUtils.bind(this,function(a){this.recentReadyCallback=a;f.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;f.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){f.postMessage(JSON.stringify({event:"template",
+docUrl:a,info:b,name:c}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));
+null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var m=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,
+p=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q);f.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);p(a)});if(this.isExportToCanvas()){if(null!=
+this.pages&&this.currentPage!=this.pages[0]){var v=this.createTemporaryGraph(v.getStylesheet()),y=v.getGlobalVariable,B=this.pages[0];v.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,v)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?p("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);m=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=
+this.getFileData(null,null,!0,null,null,null,l),m.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),m.data=this.getHtml(q,this.editor.graph),m.xml=mxUtils.getXml(q),m.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),
+"xmlsvg"==h.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);f.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));f.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),
+this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}f.postMessage(JSON.stringify(m),"*")}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
+"12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{f.postMessage(JSON.stringify({error:"unknownMessage",
+data:JSON.stringify(h)}),"*");return}}}h=k(h);c=!0;try{a(h,g)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var L=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=L();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=L();if(d!=e&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,
+"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",
+b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||f.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var f=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";f.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?
+"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
+mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight=
+"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
+null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[];if(0<c.length){var e={},g=null,f=null,h="",k="auto",l="auto",m=null,F=null,D=40,x=40,E=0,A=this.editor.graph;A.getGraphBounds();for(var C=function(){null!=b?b(aa):(A.setSelectionCells(aa),A.scrollCellToVisible(A.getSelectionCell()))},J=A.getFreeInsertPoint(),B=J.x,L=J.y,J=L,H=null,
+G="auto",M=[],X=null,Z=null,N=0;N<c.length&&"#"==c[N].charAt(0);){a=c[N];for(N++;N<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[N].substring(1)),N++;if("#"!=a.charAt(1)){var S=a.indexOf(":");if(0<S){var O=mxUtils.trim(a.substring(1,S)),I=mxUtils.trim(a.substring(S+1));"label"==O?H=A.sanitizeHtml(I):"style"==O?g=I:"identity"==O&&0<I.length&&"-"!=I?f=I:"namespace"==O&&0<I.length&&"-"!=I?h=I:"width"==O?k=I:"height"==O?l=I:"left"==O&&0<I.length?
+m=I:"top"==O&&0<I.length?F=I:"ignore"==O?Z=I.split(","):"connect"==O?M.push(JSON.parse(I)):"link"==O?X=I:"padding"==O?E=parseFloat(I):"edgespacing"==O?D=parseFloat(I):"nodespacing"==O?x=parseFloat(I):"layout"==O&&(G=I)}}}var W=this.editor.csvToArray(c[N]),S=null;if(null!=f)for(var R=0;R<W.length;R++)if(f==W[R]){S=R;break}null==H&&(H="%"+W[0]+"%");if(null!=M)for(var T=0;T<M.length;T++)null==e[M[T].to]&&(e[M[T].to]={});A.model.beginUpdate();try{for(R=N+1;R<c.length;R++){var V=this.editor.csvToArray(c[R]);
+if(V.length==W.length){var K=null,Q=null!=S?h+V[S]:null;null!=Q&&(K=A.model.getCell(Q));null==K&&(K=new mxCell(H,new mxGeometry(B,J,0,0),g||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=Q);for(var P=0;P<V.length;P++)A.setAttributeForCell(K,W[P],V[P]);A.setAttributeForCell(K,"placeholders","1");K.style=A.replacePlaceholders(K,K.style);for(T=0;T<M.length;T++)e[M[T].to][K.getAttribute(M[T].to)]=K;null!=X&&"link"!=X&&(A.setLinkForCell(K,K.getAttribute(X)),A.setAttributeForCell(K,X,null));A.fireEvent(new mxEventObject("cellsInserted",
+"cells",[K]));var ba=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=m&&null!=K.getAttribute(m)&&(K.geometry.x=B+parseFloat(K.getAttribute(m))),null!=F&&null!=K.getAttribute(F)&&(K.geometry.y=L+parseFloat(K.getAttribute(F))),"@"==k.charAt(0)&&null!=K.getAttribute(k.substring(1))?K.geometry.width=parseFloat(K.getAttribute(k.substring(1))):K.geometry.width="auto"==k?ba.width+E:parseFloat(k),"@"==l.charAt(0)&&null!=K.getAttribute(l.substring(1))?K.geometry.height=parseFloat(K.getAttribute(l.substring(1))):
+K.geometry.height="auto"==l?ba.height+E:parseFloat(l),J+=K.geometry.height+x);d.push(A.addCell(K))}}for(var U=d.slice(),aa=d.slice(),T=0;T<M.length;T++)for(var Y=M[T],R=0;R<d.length;R++){var K=d[R],ia=K.getAttribute(Y.from);if(null!=ia){A.setAttributeForCell(K,Y.from,null);for(var ja=ia.split(","),P=0;P<ja.length;P++){var ca=e[Y.to][ja[P]];null!=ca&&(H=Y.label,null!=Y.fromlabel&&(H=(K.getAttribute(Y.fromlabel)||"")+(H||"")),null!=Y.tolabel&&(H=(H||"")+(ca.getAttribute(Y.tolabel)||"")),aa.push(A.insertEdge(null,
+null,H||"",Y.invert?ca:K,Y.invert?K:ca,Y.style||A.createCurrentEdgeStyle())),mxUtils.remove(Y.invert?K:ca,U))}}}if(null!=Z)for(R=0;R<d.length;R++)for(K=d[R],P=0;P<Z.length;P++)A.setAttributeForCell(K,mxUtils.trim(Z[P]),null);var fa=new mxParallelEdgeLayout(A);fa.spacing=D;var ka=function(){fa.execute(A.getDefaultParent());for(var a=0;a<d.length;a++){var b=A.getCellGeometry(d[a]);b.x=Math.round(A.snap(b.x));b.y=Math.round(A.snap(b.y));"auto"==k&&(b.width=Math.round(A.snap(b.width)));"auto"==l&&(b.height=
+Math.round(A.snap(b.height)))}};if("circle"==G){var da=new mxCircleLayout(A);da.resetEdges=!1;var la=da.isVertexIgnored;da.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){da.execute(A.getDefaultParent());ka()},!0,C);C=null}else if("horizontaltree"==G||"verticaltree"==G||"auto"==G&&aa.length==2*d.length-1&&1==U.length){A.view.validate();var ga=new mxCompactTreeLayout(A,"horizontaltree"==G);ga.levelDistance=x;ga.edgeRouting=!1;ga.resetEdges=
+!1;this.executeLayout(function(){ga.execute(A.getDefaultParent(),0<U.length?U[0]:null)},!0,C);C=null}else if("horizontalflow"==G||"verticalflow"==G||"auto"==G&&1==U.length){A.view.validate();var ha=new mxHierarchicalLayout(A,"horizontalflow"==G?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ha.intraCellSpacing=x;ha.disableEdgeStyle=!1;this.executeLayout(function(){ha.execute(A.getDefaultParent(),aa);A.moveCells(aa,B,L)},!0,C);C=null}else if("organic"==G||"auto"==G&&aa.length>d.length){A.view.validate();
+var ea=new mxFastOrganicLayout(A);ea.forceConstant=3*x;ea.resetEdges=!1;var na=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return na.apply(this,arguments)||0>mxUtils.indexOf(d,a)};fa=new mxParallelEdgeLayout(A);fa.spacing=D;this.executeLayout(function(){ea.execute(A.getDefaultParent());ka()},!0,C);C=null}this.hideDialog()}finally{A.model.endUpdate()}null!=C&&C()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&
+null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&
+(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=
+this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
+a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,
+8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,g=b.outline;g.pageScale=e.pageScale;g.pageFormat=
e.pageFormat;g.background=e.background;g.pageVisible=e.pageVisible;g.background=e.background;var f=mxUtils.getCurrentStyle(e.container);g.container.style.backgroundColor=f.backgroundColor;null!=e.view.backgroundPageShape&&null!=g.view.backgroundPageShape&&(g.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||
c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();
this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);
@@ -7379,12 +7386,12 @@ this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.is
"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,b=mxUtils.bind(this,function(){var a=d.status,b;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:b="";break;case d.IDLE:b=
"min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=b,e=a)});mxEvent.addListener(d,"checking",b);mxEvent.addListener(d,"noupdate",b);mxEvent.addListener(d,"downloading",b);mxEvent.addListener(d,"progress",b);mxEvent.addListener(d,"cached",b);mxEvent.addListener(d,"updateready",b);mxEvent.addListener(d,"obsolete",b);mxEvent.addListener(d,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),d=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),d=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());
this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);
this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("find").setEnabled(d);this.actions.get("layers").setEnabled(d);this.actions.get("outline").setEnabled(d);
this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var m=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);m.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),h=g.getGraphBounds(),l=Math.floor(h.width*e/g.view.scale),n=Math.floor(h.height*e/g.view.scale);
-k.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+n+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
+arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var k=a.getFileData(!0,null,null,null,null,!0),h=g.getGraphBounds(),l=Math.floor(h.width*e/g.view.scale),m=Math.floor(h.height*e/g.view.scale);
+k.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+f+"&xml="+encodeURIComponent(k))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=
a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
@@ -7399,13 +7406,13 @@ Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as=
mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxAsyncCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};mxAsyncCanvas.prototype.rotate=function(a,b,d,c,e){};
mxAsyncCanvas.prototype.setAlpha=function(a){this.state.alpha=a};mxAsyncCanvas.prototype.setFontColor=function(a){this.state.fontColor=a};mxAsyncCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAsyncCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAsyncCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
mxAsyncCanvas.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAsyncCanvas.prototype.setFontStyle=function(a){this.state.fontStyle=a};mxAsyncCanvas.prototype.rect=function(a,b,d,c){};mxAsyncCanvas.prototype.roundrect=function(a,b,d,c,e,f){};mxAsyncCanvas.prototype.ellipse=function(a,b,d,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxAsyncCanvas.prototype.image=function(a,b,d,c,e,f,k,n){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,k,n,m,g,h,l){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.image=function(a,b,d,c,e,f,k,l){e=this.rewriteImageSource(e);a=this.htmlCanvas.images[e];null==a&&(a=new Image,a.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),a.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[e]=a,a.src=e)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
+mxAsyncCanvas.prototype.text=function(a,b,d,c,e,f,k,l,m,g,h,n){if(null!=e&&0!=e.length&&(a=this.state.scale,"html"==m&&"function"===typeof html2canvas)){this.incWaitCounter();var q=this.canvasIndex++;html2canvas(e,{onrendered:mxUtils.bind(this,function(a){this.htmlCanvas.subCanvas[q]=a;this.decWaitCounter()}),scale:a,logging:!0})}};mxAsyncCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};function mxJsCanvas(a){mxAbstractCanvas2D.call(this);this.ctx=a.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,d,c,e){return d+d+c+c+e+e});return(a=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))?{r:parseInt(a[1],16),g:parseInt(a[2],16),b:parseInt(a[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var a="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a+="italic ");this.ctx.font=a+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a;this.ctx.scale(a,a)};mxJsCanvas.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b;this.ctx.translate(a,b)};
mxJsCanvas.prototype.rotate=function(a,b,d,c,e){c-=this.state.dx;e-=this.state.dy;this.ctx.translate(c,e);(b||d)&&this.ctx.scale(b?-1:1,d?-1:1);this.ctx.rotate(a*this.M_RAD_PER_DEG);this.ctx.translate(-c,-e)};mxJsCanvas.prototype.setAlpha=function(a){this.state.alpha=a;this.ctx.globalAlpha=a};mxJsCanvas.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null;this.ctx.fillStyle=a};
-mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,f,k,n,m){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=n?n:1;c.gradientColor=b;c.gradientAlpha=null!=m?m:1;c.gradientDirection=k;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
+mxJsCanvas.prototype.setGradient=function(a,b,d,c,e,f,k,l,m){d=this.ctx.createLinearGradient(0,c,0,c+f);c=this.state;c.fillColor=a;c.fillAlpha=null!=l?l:1;c.gradientColor=b;c.gradientAlpha=null!=m?m:1;c.gradientDirection=k;a=this.hexToRgb(a);b=this.hexToRgb(b);null!=a&&d.addColorStop(0,"rgba("+a.r+","+a.g+","+a.b+","+c.fillAlpha+")");null!=b&&d.addColorStop(1,"rgba("+b.r+","+b.g+","+b.b+","+c.gradientAlpha+")");this.ctx.fillStyle=d};
mxJsCanvas.prototype.setStrokeColor=function(a){null!=a&&(a==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=a,this.state.strokeColor=a))};mxJsCanvas.prototype.setStrokeWidth=function(a){this.ctx.lineWidth=a};mxJsCanvas.prototype.setDashed=function(a){if(this.state.dashed=a){a=this.state.dashPattern.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.setLineDash(a)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(a){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(a)}catch(b){}};mxJsCanvas.prototype.setDashPattern=function(a){this.state.dashPattern=a;if(this.state.dashed){a=a.split(" ");for(var b=0;b<a.length;b++)a[b]=parseInt(a[b],10);this.ctx.setLineDash(a)}};mxJsCanvas.prototype.setLineCap=function(a){this.ctx.lineCap=a};mxJsCanvas.prototype.setLineJoin=function(a){this.ctx.lineJoin=a};
mxJsCanvas.prototype.setMiterLimit=function(a){this.ctx.lineJoin=a};mxJsCanvas.prototype.setFontColor=function(a){this.ctx.fillStyle=a};mxJsCanvas.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxJsCanvas.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxJsCanvas.prototype.setFontSize=function(a){this.state.fontSize=a};
@@ -7415,13 +7422,13 @@ mxJsCanvas.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.st
mxJsCanvas.prototype.arcTo=function(a,b,d,c,e,f,k){a=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,a,b,d,c,e,f,k);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxJsCanvas.prototype.curveTo=function(a,b,d,c,e,f){this.ctx.bezierCurveTo(a,b,d,c,e,f);this.lastMoveX=e;this.lastMoveY=f};mxJsCanvas.prototype.rect=function(a,b,d,c){this.begin();this.moveTo(a,b);this.lineTo(a+d,b);this.lineTo(a+d,b+c);this.lineTo(a,b+c);this.close()};
mxJsCanvas.prototype.roundrect=function(a,b,d,c,e,f){this.begin();this.moveTo(a+e,b);this.lineTo(a+d-e,b);this.quadTo(a+d,b,a+d,b+f);this.lineTo(a+d,b+c-f);this.quadTo(a+d,b+c,a+d-e,b+c);this.lineTo(a+e,b+c);this.quadTo(a,b+c,a,b+c-f);this.lineTo(a,b+f);this.quadTo(a,b,a+e,b)};mxJsCanvas.prototype.ellipse=function(a,b,d,c){this.ctx.save();this.ctx.translate(a+d/2,b+c/2);this.ctx.scale(d/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(a){if("http://"==a.substring(0,7)||"https://"==a.substring(0,8))a="/proxy?url="+encodeURIComponent(a);return a};
-mxJsCanvas.prototype.image=function(a,b,d,c,e,f,k,n){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(f){f=e.width;var g=e.height,h=Math.min(d/f,c/g);a+=(d-f*h)/2;b+=(c-g*h)/2;d=f*h;c=g*h}k&&(m.translate(2*a+d,0),m.scale(-1,1));n&&(m.translate(0,2*b+c),m.scale(1,-1));m.drawImage(e,a,b,d,c);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(a,b,d,c,e,f,k,l){e=this.rewriteImageSource(e);e=this.images[e];if(null!=e&&0<e.height&&0<e.width){var m=this.ctx;m.save();if(f){f=e.width;var g=e.height,h=Math.min(d/f,c/g);a+=(d-f*h)/2;b+=(c-g*h)/2;d=f*h;c=g*h}k&&(m.translate(2*a+d,0),m.scale(-1,1));l&&(m.translate(0,2*b+c),m.scale(1,-1));m.drawImage(e,a,b,d,c);m.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var a=this.ctx.shadowColor,b=this.ctx.shadowOffsetX,d=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=a;this.ctx.shadowOffsetX=b;this.ctx.shadowOffsetY=d}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(a,b,d,c,e,f,k,n,m,g,h,l){if(null!=e&&0!=e.length){d=this.state.scale;0!=l&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(l*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;l=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:b-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=m/d}switch(f){case mxConstants.ALIGN_CENTER:a-=l/2/d;break;case mxConstants.ALIGN_RIGHT:a-=l/d}this.ctx.save();
+mxJsCanvas.prototype.text=function(a,b,d,c,e,f,k,l,m,g,h,n){if(null!=e&&0!=e.length){d=this.state.scale;0!=n&&(this.ctx.translate(Math.round(a),Math.round(b)),this.ctx.rotate(n*Math.PI/180),this.ctx.translate(Math.round(-a),Math.round(-b)));if("html"==m){e=this.subCanvas[this.canvasIndex++];m=e.height;n=e.width;switch(k){case mxConstants.ALIGN_MIDDLE:b-=m/2/d;break;case mxConstants.ALIGN_BOTTOM:b-=m/d}switch(f){case mxConstants.ALIGN_CENTER:a-=n/2/d;break;case mxConstants.ALIGN_RIGHT:a-=n/d}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(a)-.5,Math.round(b)-.5,Math.round(e.width/d),Math.round(e.height/d)));this.ctx.scale(1/d,1/d);this.ctx.drawImage(e,
-Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();l=document.createElement("div");l.innerHTML=e;l.style.position="absolute";l.style.top="-9999px";l.style.left="-9999px";l.style.fontFamily=this.state.fontFamily;l.style.fontWeight="bold";l.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(l);m=[l.offsetWidth,l.offsetHeight];document.body.removeChild(l);e=e.split("\n");l=m[1];this.ctx.textBaseline="top";m=b;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";b-=(e.length-1)*l/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=l*(e.length-1),m=b-this.state.fontSize}k=[];l=[];for(d=0;d<e.length;d++)l[d]=a,k[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(l[d]-=k[d],f==mxConstants.ALIGN_CENTER&&(l[d]+=k[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=l[0];f=k[0];for(d=1;d<e.length;d++)a=Math.min(a,l[d]),f=Math.max(f,k[d]);this.ctx.save();
-a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],l[d],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(a*d),Math.round(b*d))}else{this.ctx.save();this.updateFont();n=document.createElement("div");n.innerHTML=e;n.style.position="absolute";n.style.top="-9999px";n.style.left="-9999px";n.style.fontFamily=this.state.fontFamily;n.style.fontWeight="bold";n.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(n);m=[n.offsetWidth,n.offsetHeight];document.body.removeChild(n);e=e.split("\n");n=m[1];this.ctx.textBaseline="top";m=b;switch(k){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";b-=(e.length-1)*n/2;m=b-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",b-=n*(e.length-1),m=b-this.state.fontSize}k=[];n=[];for(d=0;d<e.length;d++)n[d]=a,k[d]=this.ctx.measureText(e[d]).width,null!=f&&f!=mxConstants.ALIGN_LEFT&&(n[d]-=k[d],f==mxConstants.ALIGN_CENTER&&(n[d]+=k[d]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){a=n[0];f=k[0];for(d=1;d<e.length;d++)a=Math.min(a,n[d]),f=Math.max(f,k[d]);this.ctx.save();
+a=Math.round(a)-.5;m=Math.round(m)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(a,m,f,this.state.fontSize*mxConstants.LINE_HEIGHT*e.length));this.ctx.restore()}for(d=0;d<e.length;d++)this.ctx.fillText(e[d],n[d],b),b+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(a){0==this.waitCounter?a():this.onComplete=a};DrawioClient=function(a,b){mxEventSource.call(this);this.ui=a;this.cookieName=b;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+a.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(){var a=null;isLocalStorage&&(a=localStorage.getItem("."+this.cookieName));if(null==a&&"undefined"!=typeof Storage){var b=document.cookie,d=this.cookieName+"=",c=b.indexOf(d);0<=c&&(c+=d.length,a=b.indexOf(";",c),0>a?a=b.length:postCookie=b.substring(a),a=b.substring(c,a),a=0<a.length?a:null,null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie=d+"; expires="+b.toUTCString(),localStorage.setItem("."+this.cookieName,a)))}return a};
@@ -7551,35 +7558,35 @@ DriveClient.prototype.setUserId=function(a,b){if(b)if(isLocalStorage)localStorag
DriveClient.prototype.getUserId=function(){var a=null;null!=this.user&&(a=this.user.id);null==a&&isLocalStorage&&(a=localStorage.getItem(".guid"));if(null==a&&"undefined"!=typeof Storage){for(var b=document.cookie.split(";"),d=0;d<b.length;d++){var c=mxUtils.trim(b[d]);if("GUID="==c.substring(0,5)){a=c.substring(5);break}}null!=a&&isLocalStorage&&(b=new Date,b.setYear(b.getFullYear()-1),document.cookie="GUID=; expires="+b.toUTCString(),localStorage.setItem(".guid",a))}return a};
DriveClient.prototype.execute=function(a){var b=mxUtils.bind(this,function(b){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(b,d){this.authorize(!1,mxUtils.bind(this,function(){null!=d&&d();a()}),mxUtils.bind(this,function(a){var b=mxResources.get("cannotLogin");null!=a&&null!=a.error&&403==a.error.code&&null!=a.error.data&&0<a.error.data.length&&"domainPolicy"==a.error.data[0].reason&&(b=a.error.message);this.ui.drive.clearUserId();this.ui.drive.setUser(null);gapi.auth.signOut();this.ui.showError(mxResources.get("error"),
b,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://desk.draw.io/support/solutions/articles/16000074659")}),null,mxResources.get("ok"))}),b)}))});this.authorize(!0,a,b)};
-DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(n){window.clearTimeout(e);c&&(null!=n&&null==n.error?null!=b&&b(n):null!=d&&null!=n&&null!=n.error&&
-403==n.error.code&&("The requested mime type change is forbidden."==n.error.message||null!=n.error.data&&"domainPolicy"==n.error.data[0].reason)?d(n):null==n||null==n.error||401!=n.error.code&&403!=n.error.code?null!=n&&null!=n.error&&404!=n.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(n):403==n.error.code&&null!=this.user?null!=d&&d(n):this.execute(k))}))});null==gapi.auth.getToken()?
+DriveClient.prototype.executeRequest=function(a,b,d){var c=!0,e=null,f=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var k=mxUtils.bind(this,function(){this.requestThread=null;this.currentRequest=a;null!=e&&window.clearTimeout(e);e=window.setTimeout(mxUtils.bind(this,function(){c=!1;null!=d&&d({code:App.ERROR_TIMEOUT,retry:k})}),this.ui.timeout);a.execute(mxUtils.bind(this,function(l){window.clearTimeout(e);c&&(null!=l&&null==l.error?null!=b&&b(l):null!=d&&null!=l&&null!=l.error&&
+403==l.error.code&&("The requested mime type change is forbidden."==l.error.message||null!=l.error.data&&"domainPolicy"==l.error.data[0].reason)?d(l):null==l||null==l.error||401!=l.error.code&&403!=l.error.code?null!=l&&null!=l.error&&404!=l.error.code&&this.currentRequest==a&&f<this.maxRetries?(f++,this.requestThread=window.setTimeout(k,Math.round(Math.pow(2,f)*(1+.1*(Math.random()-.5))*1E3))):null!=d&&d(l):403==l.error.code&&null!=this.user?null!=d&&d(l):this.execute(k))}))});null==gapi.auth.getToken()?
this.execute(k):k()};DriveClient.prototype.authorize=function(a,b,d,c){var e=this.getUserId();null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(e=this.ui.stateArg.userId);if(a&&null==e)null!=d&&d();else{var f={scope:this.scopes,client_id:this.clientId};a&&null!=e?(f.immediate=!0,f.user_id=e):(f.immediate=!1,f.authuser=-1);gapi.auth.authorize(f,mxUtils.bind(this,function(f){null!=f&&null==f.error?null!=this.user&&a&&this.user.id==e?null!=b&&b():this.updateUser(b,d,c):null!=d&&d(f);this.resetTokenRefresh(f)}))}};
DriveClient.prototype.resetTokenRefresh=function(a){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=a&&null==a.error&&0<a.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(a.expires_in),this.lastTokenRefresh=(new Date).getTime(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*a.expires_in))};
DriveClient.prototype.checkToken=function(a){var b=0<this.lastTokenRefresh;(new Date).getTime()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){a();b&&this.fireEvent(new mxEventObject("disconnected"))})):a()};
DriveClient.prototype.updateUser=function(a,b,d){var c=gapi.auth.getToken().access_token;this.ui.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json&access_token="+c,mxUtils.bind(this,function(b){b=JSON.parse(b);this.setUser(new DrawioUser(b.id,b.email,b.name,b.picture,b.locale));this.setUserId(b.id,d);null!=a&&a()}),b)};
DriveClient.prototype.copyFile=function(a,b,d,c){null!=a&&null!=b&&this.executeRequest(gapi.client.drive.files.copy({fileId:a,resource:{title:b},supportsTeamDrives:!0}),d,c)};DriveClient.prototype.renameFile=function(a,b,d,c){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{title:b}),d,c)};DriveClient.prototype.moveFile=function(a,b,d,c){null!=a&&null!=b&&this.executeRequest(this.createDriveRequest(a,{parents:[{kind:"drive#fileLink",id:b}]}),d,c)};
DriveClient.prototype.createDriveRequest=function(a,b){return gapi.client.request({path:"/drive/v2/files/"+a,method:"PUT",params:{uploadType:"multipart",supportsTeamDrives:!0},headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(b)})};DriveClient.prototype.getLibrary=function(a,b,d){return this.getFile(a,b,d,!0,!0)};
-DriveClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;e=null!=e?e:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev}),mxUtils.bind(this,function(a){this.getXmlFile(a,null,b,d)}),d):this.executeRequest(gapi.client.drive.files.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){if(null!=this.user){var f=/\.png$/i.test(a.title);/\.vsdx$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&f?(f=
+DriveClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;e=null!=e?e:!1;null!=urlParams.rev?this.executeRequest(gapi.client.drive.revisions.get({fileId:a,revisionId:urlParams.rev}),mxUtils.bind(this,function(a){this.getXmlFile(a,null,b,d)}),d):this.executeRequest(gapi.client.drive.files.get({fileId:a,supportsTeamDrives:!0}),mxUtils.bind(this,function(a){if(null!=this.user){var f=/\.png$/i.test(a.title);/\.vsdx?$/i.test(a.title)||/\.gliffy$/i.test(a.title)||!this.ui.useCanvasForExport&&f?(f=
a.downloadUrl+"&access_token="+gapi.auth.getToken().access_token,this.ui.convertFile(f,a.title,a.mimeType,this.extension,b,d)):c||e||a.mimeType==this.libraryMimeType?this.getXmlFile(a,null,b,d,!0,e):this.loadRealtime(a,mxUtils.bind(this,function(c){try{null==c||null==c.getModel()||null==c.getModel().getRoot()||c.getModel().getRoot().isEmpty()||c.getModel().getRoot().has("cells")&&!c.getModel().getRoot().has(DriveRealtime.prototype.diagramsKey)?this.getXmlFile(a,c,b,d):b(new DriveFile(this.ui,null,
a,c))}catch(m){d(m)}}),d)}else d({message:mxResources.get("loggedOut")})}),d)};
DriveClient.prototype.loadRealtime=function(a,b,d){if("1"==urlParams.ignoremime||"420247213240"!=this.appId||"application/vnd.jgraph.mxfile.realtime"!=a.mimeType&&"application/mxr"!=a.mimeType)if("850530949725"!=this.appId&&(a.editable||"application/mxe"!=a.mimeType&&"application/vnd.jgraph.mxfile"!=a.mimeType)){var c=mxUtils.bind(this,function(){var e=!0,f=window.setTimeout(mxUtils.bind(this,function(){e=!1;d({code:App.ERROR_TIMEOUT,retry:c})}),this.ui.timeout);gapi.drive.realtime.load(a.id,mxUtils.bind(this,
function(a){window.clearTimeout(f);e&&b(a)}))});c()}else b();else this.redirectToNewApp(d,a.id)};
-DriveClient.prototype.getXmlFile=function(a,b,d,c,e,f){var k=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+k,mxUtils.bind(this,function(k){if(null==k)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?d(new DriveLibrary(this.ui,k,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var m=k.lastIndexOf(",");0<m&&(m=this.ui.extractGraphModelFromPng(k.substring(m+
-1)),null!=m&&0<m.length&&(k=m))}var g=new DriveFile(this.ui,k,a,b);!e&&"850530949725"!=this.appId&&g.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(g,!0,mxUtils.bind(this,function(a){g.desc=a;d(g)}),c,!0):d(g)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
-DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var k=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var n=mxUtils.bind(this,function(e,h,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,h=this.placeholderMimeType),null!=e&&null!=h&&(g.thumbnail={image:e,mimeType:h}));var m=function(){a.saveDelay=(new Date).getTime()-k;
+DriveClient.prototype.getXmlFile=function(a,b,d,c,e,f){var k=gapi.auth.getToken().access_token;this.ui.loadUrl(a.downloadUrl+"&access_token="+k,mxUtils.bind(this,function(k){if(null==k)c({message:mxResources.get("invalidOrMissingFile")});else if(a.mimeType==this.libraryMimeType||f)a.mimeType!=this.libraryMimeType||f?d(new DriveLibrary(this.ui,k,a)):c({message:mxResources.get("notADiagramFile")});else{if(/\.png$/i.test(a.title)){var l=k.lastIndexOf(",");0<l&&(l=this.ui.extractGraphModelFromPng(k.substring(l+
+1)),null!=l&&0<l.length&&(k=l))}var g=new DriveFile(this.ui,k,a,b);!e&&"850530949725"!=this.appId&&g.isEditable()&&a.mimeType!=this.mimeType?this.saveFile(g,!0,mxUtils.bind(this,function(a){g.desc=a;d(g)}),c,!0):d(g)}}),c,"image/"==a.mimeType.substring(0,6)&&"image/svg"!=a.mimeType.substring(0,9)||/\.png$/i.test(a.title)||/\.jpe?g$/i.test(a.title))};
+DriveClient.prototype.saveFile=function(a,b,d,c,e,f){if(a.isEditable()){var k=(new Date).getTime();e=null!=e?e:!this.ui.isLegacyDriveDomain()||"1"==urlParams.ignoremime;f=null!=f?f:!1;var l=mxUtils.bind(this,function(e,h,l){var g={mimeType:a.constructor==DriveLibrary?this.libraryMimeType:this.mimeType,title:a.getTitle()};l||(null!=e||f||(e=this.placeholderThumbnail,h=this.placeholderMimeType),null!=e&&null!=h&&(g.thumbnail={image:e,mimeType:h}));var m=function(){a.saveDelay=(new Date).getTime()-k;
d.apply(this,arguments)},n=mxUtils.bind(this,function(d,e){this.executeRequest(this.createUploadRequest(a.getId(),g,d,b||a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType,e),m,c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){n(a,!0)}),c,this.ui.getCurrentFile()!=a?a.getData():null):n(a.getData(),!1)}),m=mxUtils.bind(this,function(){!f&&a.constructor!=DriveLibrary&&this.enableThumbnails&&"0"!=urlParams.thumb&&(null==
-a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(l){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");n(b,"image/png")}))||n(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?m():this.verifyMimeType(a.getId(),m,!0)}else this.ui.editor.graph.reset(),null!=c&&c({message:mxResources.get("readOnly")})};
+a.realtime||a.realtime.connected)&&this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(a){var b=null;if(null!=a)try{b=a.toDataURL("image/png")}catch(n){}b=null==b||b.length>this.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");l(b,"image/png")}))||l(null,null,a.constructor!=DriveLibrary&&(null==a.realtime||a.realtime.connected))});e||!b?m():this.verifyMimeType(a.getId(),m,!0)}else this.ui.editor.graph.reset(),null!=c&&c({message:mxResources.get("readOnly")})};
DriveClient.prototype.verifyMimeType=function(a,b,d,c){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var e=(new Date).getTime();if(d||e-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=e,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(d){this.checkingMimeType=!1;null!=d&&"application/vnd.jgraph.mxfile.realtime"==d.mimeType?this.redirectToNewApp(c,a):null!=
b&&b()})))};
DriveClient.prototype.redirectToNewApp=function(a,b){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var d=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash".split(" "))+"#G"+b;null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}),mxUtils.bind(this,function(){this.redirectDialogShowing=!1;null!=a&&a()})):this.ui.alert(mxResources.get("redirectToNewApp"),
mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href=d}))}};
-DriveClient.prototype.insertFile=function(a,b,d,c,e,f,k,n){f=null!=f?f:this.mimeType;n=null!=n?n:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,k),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):n?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision=
+DriveClient.prototype.insertFile=function(a,b,d,c,e,f,k,l){f=null!=f?f:this.mimeType;l=null!=l?l:!0;a={mimeType:f,title:a};null!=d&&(a.parents=[{kind:"drive#fileLink",id:d}]);this.executeRequest(this.createUploadRequest(null,a,b,!1,k),mxUtils.bind(this,function(a){f==this.libraryMimeType?c(new DriveLibrary(this.ui,b,a)):0==a?null!=e&&e({message:mxResources.get("errorSavingFile")}):l?this.loadRealtime(a,mxUtils.bind(this,function(d){null!=this.user?(d=new DriveFile(this.ui,b,a,d),d.lastAutosaveRevision=
(new Date).getTime(),c(d)):null!=e&&e({message:mxResources.get("loggedOut")})}),e):c(a)}),e)};
DriveClient.prototype.createUploadRequest=function(a,b,d,c,e){e=null!=e?e:!1;a={path:"/upload/drive/v2/files"+(null!=a?"/"+a:""),method:null!=a?"PUT":"POST",params:{uploadType:"multipart"},headers:{"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'},body:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(b)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=
d?e?d:Base64.encode(d):"")+"\r\n---------314159265358979323846--"};c||(a.params.newRevision=!1);a.params.supportsTeamDrives=!0;return gapi.client.request(a)};
DriveClient.prototype.pickFile=function(a,b){this.filePickerCallback=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("G"+a)});this.filePicked=mxUtils.bind(this,function(a){a.action==google.picker.Action.PICKED&&this.filePickerCallback(a.docs[0].id)});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,c=b?"genericPicker":"filePicker",e=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==
-mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),n=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),k.setMimeTypes("*/*")):
-(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(n).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
+mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",e),this[c].setVisible(!1))});if(null==this[c]||this[c+"Token"]!=a){this[c+"Token"]=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),f=(new google.picker.DocsView).setIncludeFolders(!0),k=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0),l=(new google.picker.DocsUploadView).setIncludeFolders(!0);b?(a.setMimeTypes("*/*"),f.setMimeTypes("*/*"),k.setMimeTypes("*/*")):
+(a.setMimeTypes(this.mimeTypes),f.setMimeTypes(this.mimeTypes),k.setMimeTypes(this.mimeTypes));this[c]=(new google.picker.PickerBuilder).setOAuthToken(this[c+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(a).addView(f).addView(k).addView(google.picker.ViewId.RECENTLY_PICKED).addView(l).setCallback(mxUtils.bind(this,function(a){a.action!=google.picker.Action.PICKED&&a.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,
"click",e);a.action==google.picker.Action.PICKED&&this.filePicked(a)})).build()}mxEvent.addListener(document,"click",e);this[c].setVisible(!0)}))};
DriveClient.prototype.pickFolder=function(a){this.folderPickerCallback=a;this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&mxUtils.bind(this,function(){this.execute(mxUtils.bind(this,function(){this.ui.spinner.stop();var a=gapi.auth.getToken().access_token,d=mxUtils.bind(this,function(a){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(a).className&&(mxEvent.removeListener(document,"click",d),this.folderPicker.setVisible(!1))});if(null==this.folderPicker||this.folderPickerToken!=
a){this.folderPickerToken=a;var a=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),e=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");this.folderPicker=
@@ -7590,20 +7597,20 @@ DriveClient.prototype.pickLibrary=function(a){this.filePickerCallback=a;this.fil
e=(new google.picker.DocsView).setEnableTeamDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),f=(new google.picker.DocsUploadView).setIncludeFolders(!0);this.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(this.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(d).addView(c).addView(e).addView(google.picker.ViewId.RECENTLY_PICKED).addView(f).setCallback(mxUtils.bind(this,
function(b){b.action!=google.picker.Action.PICKED&&b.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",a);b.action==google.picker.Action.PICKED&&this.filePicked(b)})).build()}mxEvent.addListener(document,"click",a);this.libraryPicker.setVisible(!0)}))};DriveClient.prototype.showPermissions=function(a){this.checkToken(mxUtils.bind(this,function(){var b=new gapi.drive.share.ShareClient(this.appId);b.setOAuthToken(gapi.auth.getToken().access_token);b.setItemIds([a]);b.showSettingsDialog()}))};DropboxFile=function(a,b,d){DrawioFile.call(this,a,b);this.stat=d};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.stat.path_display.substring(1))};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};DropboxFile.prototype.isRenamable=function(){return!0};
DropboxFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};DropboxFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};DropboxFile.prototype.doSave=function(a,b,d){var c=this.stat.name;this.stat.name=a;DrawioFile.prototype.save.apply(this,arguments);this.stat.name=c;this.saveFile(a,!1,b,d)};
-DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,k=this.isModified(),n=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});n();var m=mxUtils.bind(this,function(b){var g=this.stat.path_display.lastIndexOf("/"),g=1<g?this.stat.path_display.substring(1,g+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(k||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){n();b()}}c(a)}}),g)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!=
+DropboxFile.prototype.saveFile=function(a,b,d,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(b=mxUtils.bind(this,function(b){if(b){this.savingFile=!0;var e=this.isModified,k=this.isModified(),l=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return k}});l();var m=mxUtils.bind(this,function(b){var f=this.stat.path_display.lastIndexOf("/"),f=1<f?this.stat.path_display.substring(1,f+1):null;this.ui.dropbox.saveFile(a,b,mxUtils.bind(this,function(a){this.savingFile=
+!1;this.isModified=e;this.stat=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(k||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){l();b()}}c(a)}}),f)});this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){m(this.ui.base64ToBlob(a,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null):m(this.getData())}else null!=
c&&c()}),this.getTitle()==a?b(!0):this.ui.dropbox.checkExists(a,b)):null!=d&&d()};DropboxFile.prototype.rename=function(a,b,d){this.ui.dropbox.renameFile(this,a,mxUtils.bind(this,function(c){this.hasSameExtension(a,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=b&&b()):(this.stat=c,this.descriptorChanged(),this.save(!0,b,d))}),d)};DropboxLibrary=function(a,b,d){DropboxFile.call(this,a,b,d)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};DropboxLibrary.prototype.open=function(){};DropboxClient=function(a){DrawioClient.call(this,a,"dbauth");this.client=new Dropbox({clientId:App.DROPBOX_APPKEY});this.client.setAccessToken(this.token)};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio/";DropboxClient.prototype.extension=".html";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;
DropboxClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};
DropboxClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout),f=this.client.usersGetCurrentAccount();f.then(mxUtils.bind(this,function(b){window.clearTimeout(e);c&&(this.setUser(new DrawioUser(b.account_id,b.email,b.name.display_name)),a())}));f["catch"](mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(null==f||401!==f.status||d?b({message:mxResources.get("accessDenied")}):(this.setUser(null),
this.client.setAccessToken(null),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)))}))};
-DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,n){if(c){window.onDropboxCallback=null;c=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(k),
-this.setUser(null),e&&this.setPersistentToken(k),a())}catch(m){b(m)}finally{null!=n&&n.close()}}else null!=n&&n.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(n);k&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(n);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
+DropboxClient.prototype.authenticate=function(a,b){if(null==window.onDropboxCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open(this.client.getAuthenticationUrl("https://"+window.location.host+"/dropbox.html"),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(k,l){if(c){window.onDropboxCallback=null;c=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.client.setAccessToken(k),
+this.setUser(null),e&&this.setPersistentToken(k),a())}catch(m){b(m)}finally{null!=l&&l.close()}}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onDropboxCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
+DropboxClient.prototype.executePromise=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);a.then(mxUtils.bind(this,function(a){window.clearTimeout(l);k&&null!=b&&b(a)}));a["catch"](mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.setUser(null),this.client.setAccessToken(null),
f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)))}))}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null===this.client.getAccessToken()?this.authenticate(function(){e(!0)},d):e(!1)};DropboxClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
-DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var f=mxUtils.bind(this,function(){var c=a.split("/");this.ui.convertFile(a,0<c.length?c[c.length-1]:a,null,this.extension,b,d)});null!=this.token?f():this.authenticate(f,d)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(d,f){var k=e?d.lastIndexOf(","):
+DropboxClient.prototype.getFile=function(a,b,d,c){c=null!=c?c:!1;var e=/\.png$/i.test(a);if(/^https:\/\//i.test(a)||/\.vsdx?$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&e){var f=mxUtils.bind(this,function(){var c=a.split("/");this.ui.convertFile(a,0<c.length?c[c.length-1]:a,null,this.extension,b,d)});null!=this.token?f():this.authenticate(f,d)}else f={path:"/"+a},null!=urlParams.rev&&(f.rev=urlParams.rev),this.readFile(f,mxUtils.bind(this,function(d,f){var k=e?d.lastIndexOf(","):
-1,g=null;0<k&&(k=this.ui.extractGraphModelFromPng(d.substring(k+1)),null!=k&&0<k.length?d=k:g=new LocalFile(this,d,a,!0));b(null!=g?g:c?new DropboxLibrary(this.ui,d,f):new DropboxFile(this.ui,d,f))}),d,e)};
-DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(k){var n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(m);n&&null!=a&&409==a.status&&(n=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this,
-function(a){window.clearTimeout(m);if(n){n=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(q){d(q)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);n&&(n=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
+DropboxClient.prototype.readFile=function(a,b,d,c){var e=mxUtils.bind(this,function(k){var l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),g=this.client.filesGetMetadata({path:"/"+a.path.substring(1),include_deleted:!1});g.then(mxUtils.bind(this,function(a){}));g["catch"](function(a){window.clearTimeout(m);l&&null!=a&&409==a.status&&(l=!1,d({message:mxResources.get("fileNotFound")}))});g=this.client.filesDownload(a);g.then(mxUtils.bind(this,
+function(a){window.clearTimeout(m);if(l){l=!1;try{var e=new FileReader;e.onload=mxUtils.bind(this,function(c){b(e.result,a)});c?e.readAsDataURL(a.fileBlob):e.readAsText(a.fileBlob)}catch(q){d(q)}}}));g["catch"](mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(l=!1,null==a||500!=a.status&&400!=a.status&&401!=a.status?d({message:mxResources.get("error")+" "+a.status}):(this.client.setAccessToken(null),this.setUser(null),k?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){f(!0)},
d)})}):this.authenticate(function(){e(!0)},d)))}))}),f=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){f(!0)},d,a):e(a)});null===this.client.getAccessToken()?this.authenticate(function(){f(!0)},d):f(!1)};
DropboxClient.prototype.checkExists=function(a,b,d){var c=this.client.filesGetMetadata({path:"/"+a.toLowerCase(),include_deleted:!1});this.executePromise(c,mxUtils.bind(this,function(c){d?b(!1,!0,c):this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b(!0,!0,c)},function(){b(!1,!0,c)})}),function(a){b(!0,!1)})};
DropboxClient.prototype.renameFile=function(a,b,d,c){if(/[\\\/:\?\*"\|]/.test(b))c({message:mxResources.get("dropboxCharsNotAllowed")});else{if(null!=a&&null!=b){var e=a.stat.path_display.substring(1),f=e.lastIndexOf("/");0<f&&(b=e.substring(0,f+1)+b)}null!=a&&null!=b&&a.stat.path_lower.substring(1)!==b.toLowerCase()?this.checkExists(b,mxUtils.bind(this,function(e,f,m){e?(e=mxUtils.bind(this,function(e){e=this.client.filesMove({from_path:a.stat.path_display,to_path:"/"+b,autorename:!1});this.executePromise(e,
@@ -7611,11 +7618,11 @@ d,c)}),f&&m.path_lower.substring(1)!==b.toLowerCase()?(f=this.client.filesDelete
DropboxClient.prototype.insertFile=function(a,b,d,c,e){e=null!=e?e:!1;this.checkExists(a,mxUtils.bind(this,function(f){f?this.saveFile(a,b,mxUtils.bind(this,function(a){e?d(new DropboxLibrary(this.ui,b,a)):d(new DropboxFile(this.ui,b,a))}),c):c()}))};
DropboxClient.prototype.saveFile=function(a,b,d,c,e){/[\\\/:\?\*"\|]/.test(a)?c({message:mxResources.get("dropboxCharsNotAllowed")}):15E7<=b.length?c({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 150 MB)"}):(a=this.client.filesUpload({path:"/"+(null!=e?e:"")+a,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([b],{type:"text/plain"})}),this.executePromise(a,d,c))};
DropboxClient.prototype.pickLibrary=function(a){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(b){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),c=b[0].link.indexOf(this.appPath);if(0<c){var e=decodeURIComponent(b[0].link.substring(c+this.appPath.length-1));this.readFile({path:e},mxUtils.bind(this,function(c,k){if(null!=k&&k.id==b[0].id)try{this.ui.spinner.stop(),
-a(e.substring(1),new DropboxLibrary(this.ui,c,k))}catch(n){this.ui.handleError(n)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})};
+a(e.substring(1),new DropboxLibrary(this.ui,c,k))}catch(l){this.ui.handleError(l)}else this.createLibrary(b[0],a,d)}),d)}else this.createLibrary(b[0],a,d)}})})};
DropboxClient.prototype.createLibrary=function(a,b,d){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){this.ui.loadUrl(a.link,mxUtils.bind(this,function(c){this.insertFile(a.name,c,mxUtils.bind(this,function(a){try{this.ui.spinner.stop(),b(a.getHash().substring(1),a)}catch(f){d(f)}}),d,!0)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};
DropboxClient.prototype.pickFile=function(a,b){null!=Dropbox.choose?(a=null!=a?a:mxUtils.bind(this,function(a,b){this.ui.loadFile(null!=a?"D"+encodeURIComponent(a):b.getHash(),null,b)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(d){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(b)this.ui.spinner.stop(),a(d[0].link);else{var c=mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError(a)}),e=mxUtils.bind(this,
-function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var k=d[0].link.indexOf(this.appPath);if(0<k){var n=decodeURIComponent(d[0].link.substring(k+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var k=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var l=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+
-1)),null!=k&&0<k.length?b=k:l=new LocalFile(this,b,n,!0));a(n.substring(1),null!=l?l:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
+function(b,c){this.ui.spinner.stop();a(b,c)}),f=/\.png$/i.test(d[0].name);if(/\.vsdx$/i.test(d[0].name)||/\.gliffy$/i.test(d[0].name)||!this.ui.useCanvasForExport&&f)e(d[0].link);else{var k=d[0].link.indexOf(this.appPath);if(0<k){var l=decodeURIComponent(d[0].link.substring(k+this.appPath.length-1));this.readFile({path:l},mxUtils.bind(this,function(b,g){if(null!=g&&g.id==d[0].id){var k=f?b.lastIndexOf(","):-1;this.ui.spinner.stop();var m=null;0<k&&(k=this.ui.extractGraphModelFromPng(b.substring(k+
+1)),null!=k&&0<k.length?b=k:m=new LocalFile(this,b,l,!0));a(l.substring(1),null!=m?m:new DropboxFile(this.ui,b,g))}else this.createFile(d[0],e,c)}),c,f)}else this.createFile(d[0],e,c)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};
DropboxClient.prototype.createFile=function(a,b,d){var c=/(\.png)$/i.test(a.name);this.ui.loadUrl(a.link,mxUtils.bind(this,function(e){null!=e&&0<e.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[a.name]),mxUtils.bind(this,function(){var f=c?e.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(e.substring(f+1)),null!=f&&0<f.length&&(e=f));this.insertFile(a.name,e,mxUtils.bind(this,function(c){b(a.name,c)}),d)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):
(this.ui.spinner.stop(),d({message:mxResources.get("errorLoadingFile")}))}),d,c)};OneDriveFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.getHash=function(){return"W"+encodeURIComponent(this.meta.id)};OneDriveFile.prototype.getMode=function(){return App.MODE_ONEDRIVE};OneDriveFile.prototype.isAutosaveOptional=function(){return!0};OneDriveFile.prototype.getTitle=function(){return this.meta.name};OneDriveFile.prototype.isRenamable=function(){return!0};
OneDriveFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};OneDriveFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};OneDriveFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
@@ -7628,18 +7635,18 @@ a()))}),b)};
OneDriveClient.prototype.authenticate=function(a,b){if(null==window.onOneDriveCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){var k="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=token&redirect_uri="+encodeURIComponent(this.redirectUri)+"&scope="+encodeURIComponent(this.scopes)+"&response_mode=fragment",k=window.open(k,"odauth",["width=525,height=525","top="+(window.screenY+
Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=k&&(window.onOneDriveCallback=mxUtils.bind(this,function(k,m){if(c){window.onOneDriveCallback=null;c=!1;try{null==k?b({message:mxResources.get("accessDenied"),retry:d}):(null!=f&&f(),this.setUser(null),this.token=k,e&&this.setPersistentToken(k),a())}catch(g){b(g)}finally{null!=m&&m.close()}}else null!=m&&m.close()}),k.focus())}),
mxUtils.bind(this,function(){c&&(window.onOneDriveCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(n);k&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+OneDriveClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);this.get(a,mxUtils.bind(this,function(a){window.clearTimeout(l);k&&(200<=a.getStatus()&&299>=a.getStatus()||404==a.getStatus()?b(a):401===a.getStatus()||400===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d)):d(this.parseRequestText(a)))}),d)}),e=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};OneDriveClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)};
-OneDriveClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;this.executeRequest(this.baseUrl+"/me/drive/items/"+a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var c=JSON.parse(a.getText()),f=/\.png$/i.test(c.name);if(/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(c["@microsoft.graph.downloadUrl"],c.name,null!=c.file?c.file.mimeType:null,this.extension,b,d);else{var m=!0,g=window.setTimeout(mxUtils.bind(this,
+OneDriveClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;this.executeRequest(this.baseUrl+"/me/drive/items/"+a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){var c=JSON.parse(a.getText()),f=/\.png$/i.test(c.name);if(/\.vsdx?$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&f)this.ui.convertFile(c["@microsoft.graph.downloadUrl"],c.name,null!=c.file?c.file.mimeType:null,this.extension,b,d);else{var m=!0,g=window.setTimeout(mxUtils.bind(this,
function(){m=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.loadUrl(c["@microsoft.graph.downloadUrl"],mxUtils.bind(this,function(a){window.clearTimeout(g);if(m){var d=f?a.lastIndexOf(","):-1,k=null;0<d&&(d=this.ui.extractGraphModelFromPng(a.substring(d+1)),null!=d&&0<d.length?a=d:k=new LocalFile(this.ui,a,c.name,!0));null!=k?b(k):e?b(new OneDriveLibrary(this.ui,a,c)):b(new OneDriveFile(this.ui,a,c))}}),mxUtils.bind(this,function(a){window.clearTimeout(g);m&&d(this.parseRequestText(a))}),
f||null!=c.file&&null!=c.file.mimeType&&"image/"==c.file.mimeType.substring(0,6))}}else d(this.parseRequestText(a))}),d)};OneDriveClient.prototype.renameFile=function(a,b,d,c){null!=a&&null!=b&&this.checkExists(a.meta.parentReference.id,b,!1,mxUtils.bind(this,function(e){e?this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id,JSON.stringify({name:b}),"PATCH","application/json",d,c):c()}))};
OneDriveClient.prototype.moveFile=function(a,b,d,c){this.writeFile(this.baseUrl+"/me/drive/items/"+a,JSON.stringify({parentReference:{id:b}}),"PATCH","application/json",d,c)};OneDriveClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
OneDriveClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;this.checkExists(f,a,!0,mxUtils.bind(this,function(k){k?this.writeFile(this.baseUrl+(null!=f?"/me/drive/items/"+f:"/me/drive/root")+"/children/"+a+"/content",b,"PUT",null,mxUtils.bind(this,function(a){e?d(new OneDriveLibrary(this.ui,b,a)):d(new OneDriveFile(this.ui,b,a))}),c):c()}))};
OneDriveClient.prototype.checkExists=function(a,b,d,c){this.executeRequest(this.baseUrl+(null!=a?"/me/drive/items/"+a:"/me/drive/root")+"/children/"+b,mxUtils.bind(this,function(a){404==a.getStatus()?c(!0):d?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[b]),function(){c(!0)},function(){c(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)}))}),function(a){c(!1)},!0)};
OneDriveClient.prototype.saveFile=function(a,b,d){var c=mxUtils.bind(this,function(c){this.writeFile(this.baseUrl+"/me/drive/items/"+a.meta.id+"/content/",c,"PUT",null,b,d)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){c(this.ui.base64ToBlob(a,"image/png"))}),d,this.ui.getCurrentFile()!=a?a.getData():null):c(a.getData())};
-OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var k=mxUtils.bind(this,function(m){var g=!0,h=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),l=new mxXmlRequest(a,b,d);l.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});l.send(mxUtils.bind(this,function(a){window.clearTimeout(h);g&&(200<=a.getStatus()&&299>=a.getStatus()?
-e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},f)})}):this.authenticate(function(){k(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(h);g&&f(this.parseRequestText(a))}))}),n=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){n(!0)},f,a):k(a)});null==this.token?
-this.authenticate(function(){n(!0)},f):n(!1)}else f({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(b){a(b)})};
+OneDriveClient.prototype.writeFile=function(a,b,d,c,e,f){if(null!=a&&null!=b){var k=mxUtils.bind(this,function(m){var g=!0,h=window.setTimeout(mxUtils.bind(this,function(){g=!1;f({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout),n=new mxXmlRequest(a,b,d);n.setRequestHeaders=mxUtils.bind(this,function(a,b){a.setRequestHeader("Content-Type",c||" ");a.setRequestHeader("Authorization","Bearer "+this.token)});n.send(mxUtils.bind(this,function(a){window.clearTimeout(h);g&&(200<=a.getStatus()&&299>=a.getStatus()?
+e(JSON.parse(a.getText())):401===a.getStatus()?(this.clearPersistentToken(),this.setUser(null),this.token=null,m?f({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){l(!0)},f)})}):this.authenticate(function(){k(!0)},f)):f(this.parseRequestText(a)))}),mxUtils.bind(this,function(a){window.clearTimeout(h);g&&f(this.parseRequestText(a))}))}),l=mxUtils.bind(this,function(a){null==this.user?this.updateUser(function(){l(!0)},f,a):k(a)});null==this.token?
+this.authenticate(function(){l(!0)},f):l(!1)}else f({message:mxResources.get("unknownError")})};OneDriveClient.prototype.parseRequestText=function(a){var b={message:mxResources.get("unknownError")};try{b=JSON.parse(a.getText())}catch(d){}return b};OneDriveClient.prototype.pickLibrary=function(a){this.pickFile(function(b){a(b)})};
OneDriveClient.prototype.pickFolder=function(a){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){this.token=b.accessToken;a(b)}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("W"+encodeURIComponent(a))});OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{redirectUri:this.redirectUri},success:mxUtils.bind(this,function(b){null!=b&&null!=b.value&&0<b.value.length&&(this.token=b.accessToken,a(b.value[0].id,b))}),cancel:function(){},error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
OneDriveClient.prototype.logout=function(){if(isLocalStorage){var a=localStorage.getItem("odpickerv7cache");null!=a&&'{"odsdkLoginHint":{'==a.substring(0,19)&&localStorage.removeItem("odpickerv7cache")}this.clearPersistentToken();this.setUser(null);this.token=null};GitHubFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):""))};
@@ -7650,58 +7657,58 @@ this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFi
!1;null!=c&&c()}),!1,b)}));else null!=d&&d()};GitHubLibrary=function(a,b,d){GitHubFile.call(this,a,b,d)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){DrawioClient.call(this,a,"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.maxFileSize=1E6;
GitHubClient.prototype.updateUser=function(a,b,d){var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(401===f.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>f.getStatus()||300<=f.getStatus()?b({message:mxResources.get("accessDenied")}):
(f=JSON.parse(f.getText()),this.setUser(new DrawioUser(f.id,f.email,f.name)),a()))}))};
-GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,n){if(c)if(window.onGitHubCallback=null,c=!1,null==k)b({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var c=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=g.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(t){b(t)}finally{null!=n&&
-n.close()}}))});m()}else null!=n&&n.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
-GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(n);if(k)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
-function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var h=JSON.parse(a.getText());null!=h&&null!=h.errors&&0<h.errors.length&&(g="too_large"==h.errors[0].code)}catch(l){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this,
+GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(e,f){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,l){if(c)if(window.onGitHubCallback=null,c=!1,null==k)b({message:mxResources.get("accessDenied"),retry:d});else{var m=mxUtils.bind(this,function(){var c=
+!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:m})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(g){window.clearTimeout(d);if(c)try{if(200>g.getStatus()||300<=g.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=f&&f();var k=g.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);e&&this.setPersistentToken(this.token);a()}}catch(u){b(u)}finally{null!=l&&
+l.close()}}))});m()}else null!=l&&l.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
+GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(f){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout),m=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+m)};a.send(mxUtils.bind(this,function(){window.clearTimeout(l);if(k)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())f?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
+function(){this.authenticate(function(){e(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var g=!1;try{var h=JSON.parse(a.getText());null!=h&&null!=h.errors&&0<h.errors.length&&(g="too_large"==h.errors[0].code)}catch(n){}d({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),e=mxUtils.bind(this,
function(a){null==this.user?this.updateUser(function(){e(!0)},d,a):c(a)});null==this.token?this.authenticate(function(){e(!0)},d):e(!1)};GitHubClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!0)};
-GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),k=f[0],n=f[1],m=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+k+"/"+n+"/contents/"+a+"?ref="+m+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
-"/repos/"+k+"/"+n+"/contents/"+a+"?ref="+m,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(k,n,m,JSON.parse(a.getText()),c))}catch(h){d(h)}}),d))};
+GitHubClient.prototype.getFile=function(a,b,d,c,e){c=null!=c?c:!1;var f=a.split("/"),k=f[0],l=f[1],m=f[2];a=f.slice(3,f.length).join("/");f=/\.png$/i.test(a);!e&&(/\.vsdx?$/i.test(a)||/\.gliffy$/i.test(a)||!this.ui.useCanvasForExport&&f)?null!=this.token?(e=this.baseUrl+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+m+"&token="+this.token,f=a.split("/"),this.ui.convertFile(e,0<f.length?f[f.length-1]:a,null,this.extension,b,d)):d({message:mxResources.get("accessDenied")}):(a=new mxXmlRequest(this.baseUrl+
+"/repos/"+k+"/"+l+"/contents/"+a+"?ref="+m,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(k,l,m,JSON.parse(a.getText()),c))}catch(h){d(h)}}),d))};
GitHubClient.prototype.createGitHubFile=function(a,b,d,c,e){a={org:a,repo:b,ref:d,name:c.name,path:c.path,sha:c.sha,html_url:c.html_url,download_url:c.download_url};b=c.content;"base64"===c.encoding&&(/\.jpe?g$/i.test(c.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(c.name)?(c=this.ui.extractGraphModelFromPng(b),b=null!=c&&0<c.length?c:"data:image/png;base64,"+b):b=Base64.decode(b));return e?new GitHubLibrary(this.ui,b,a):new GitHubFile(this.ui,
b,a)};GitHubClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e,!1)};
-GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,k){e=null!=e?e:!1;f=f.split("/");var n=f[0],m=f[1],g=f[2],h=f.slice(3,f.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(n+"/"+m+"/"+g+"/"+h,!0,mxUtils.bind(this,function(f,q){f?e?(k||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(n,m,g,h,a,b,q,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(n,m,g,b.content,e))}catch(z){c(z)}}),c)}),c)):d(new GitHubFile(this.ui,
-b,{org:n,repo:m,ref:g,name:a,path:h,sha:q,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
-GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,k,n,m){f.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){n(a)}),m))};
+GitHubClient.prototype.insertFile=function(a,b,d,c,e,f,k){e=null!=e?e:!1;f=f.split("/");var l=f[0],m=f[1],g=f[2],h=f.slice(3,f.length).join("/");0<h.length&&(h+="/");h+=a;this.checkExists(l+"/"+m+"/"+g+"/"+h,!0,mxUtils.bind(this,function(f,q){f?e?(k||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(l,m,g,h,a,b,q,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(l,m,g,b.content,e))}catch(y){c(y)}}),c)}),c)):d(new GitHubFile(this.ui,
+b,{org:l,repo:m,ref:g,name:a,path:h,sha:q,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var e=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){e();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
+GitHubClient.prototype.writeFile=function(a,b,d,c,e,f,k,l,m){f.length>=this.maxFileSize?m({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:e,content:f},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){l(a)}),m))};
GitHubClient.prototype.checkExists=function(a,b,d){this.getFile(a,mxUtils.bind(this,function(c){if(b&&null!=c.meta){var e=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){e();d(!0,c.meta.sha)},function(){e();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
-GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,k=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(n){var m=mxUtils.bind(this,function(g,h){this.writeFile(c,e,f,k,n,h,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
+GitHubClient.prototype.saveFile=function(a,b,d){var c=a.meta.org,e=a.meta.repo,f=a.meta.ref,k=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(l){var m=mxUtils.bind(this,function(g,h){this.writeFile(c,e,f,k,l,h,g,mxUtils.bind(this,function(c){delete a.meta.isNew;b(JSON.parse(c.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),
mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(c+"/"+e+"/"+f+"/"+k,mxUtils.bind(this,function(a){m(a.meta.sha,h)}),mxUtils.bind(this,function(){m(null,h)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):d(a)}))});this.ui.useCanvasForExport&&/(\.png)$/i.test(k)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){m(a.meta.sha,b)}),d,this.ui.getCurrentFile()!=a?a.getData():null):m(a.meta.sha,
Base64.encode(a.getData()))}),mxUtils.bind(this,function(){d()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
-GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var n=document.createElement("h3");mxUtils.write(n,mxResources.get(a?"selectFile":"selectFolder"));n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(n);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
-k.appendChild(m);var g=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var h=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),l=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(h(d+
-"/"+c,mxUtils.bind(this,function(){f=null;v()})));a||(mxUtils.write(b," / "),b.appendChild(h(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;z()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(h(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");t()})))})(a)}m.appendChild(b)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(f=e=c=d=null,v()):this.ui.hideDialog()}))}),t=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(g){l();this.ui.spinner.stop();var k=JSON.parse(g.getText());m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,v();else{var a=f.split("/");
-f=a.slice(0,a.length-1).join("/");t()}})));mxUtils.br(m);null==k||0==k.length?mxUtils.write(m,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var l=0;l<k.length;l++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(m.appendChild(h(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,t()):a&&"file"==k.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+k.path))}))),mxUtils.br(m))})(k[l])}),g(!0),a&&g(!1))}),q)}),p=null,x=null,z=mxUtils.bind(this,
+GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,e=null,f=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var l=document.createElement("h3");mxUtils.write(l,mxResources.get(a?"selectFile":"selectFolder"));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
+k.appendChild(m);var g=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+f)}));this.ui.showDialog(g.container,340,270,!0,!0);a&&g.okButton.parentNode.removeChild(g.okButton);var h=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(h(d+
+"/"+c,mxUtils.bind(this,function(){f=null;z()})));a||(mxUtils.write(b," / "),b.appendChild(h(decodeURIComponent(e),mxUtils.bind(this,function(){f=null;y()}))));if(null!=f&&0<f.length){var g=f.split("/");for(a=0;a<g.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(h(g[a],mxUtils.bind(this,function(){f=g.slice(0,a+1).join("/");u()})))})(a)}m.appendChild(b)}),q=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(f=e=c=d=null,z()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+f+"?ref="+encodeURIComponent(e),null,"GET");g.okButton.removeAttribute("disabled");m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(g){n();this.ui.spinner.stop();var k=JSON.parse(g.getText());m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){if(""==f)f=null,z();else{var a=f.split("/");
+f=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(m);null==k||0==k.length?mxUtils.write(m,mxResources.get("noFiles")):(g=mxUtils.bind(this,function(g){for(var l=0;l<k.length;l++)mxUtils.bind(this,function(k){g==("dir"==k.type)&&(m.appendChild(h(k.name+("dir"==k.type?"/":""),mxUtils.bind(this,function(){"dir"==k.type?(f=k.path,u()):a&&"file"==k.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(e)+"/"+k.path))}))),mxUtils.br(m))})(k[l])}),g(!0),a&&g(!1))}),q)}),p=null,v=null,y=mxUtils.bind(this,
function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,
-"scroll",x);z(a+1)});mxEvent.addListener(p,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(l(!0),m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){f=null;v()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;f="";t()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(p),
-x=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",x))}}),q)}),v=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");
-mxUtils.write(p,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",x);v(a+1)});mxEvent.addListener(p,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(h(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
-function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,z()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";t()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
-this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){m.appendChild(h(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";t()})));mxUtils.br(m)})(b[g])}100==b.length&&(m.appendChild(p),x=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",
-x))}),q)});v()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};
+"scroll",v);y(a+1)});mxEvent.addListener(p,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),m.appendChild(h("../ [Up]",mxUtils.bind(this,function(){f=null;z()}))),mxUtils.br(m));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){m.appendChild(h(a.name,mxUtils.bind(this,function(){e=a.name;f="";u()})));mxUtils.br(m)})(b[c]);100==b.length&&(m.appendChild(p),
+v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",v))}}),q)}),z=mxUtils.bind(this,function(a){null==a&&(m.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");g.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(m,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.setAttribute("href","javascript:void(0);");
+mxUtils.write(p,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",v);z(a+1)});mxEvent.addListener(p,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(m,mxResources.get("noFiles"));else{1==a&&(m.appendChild(h(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
+function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var g=b[1];3>b.length?(d=a,c=g,f=e=null,y()):this.ui.spinner.spin(m,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+g+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;e=decodeURIComponent(a.meta.ref);f="";u()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
+this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m),mxUtils.br(m));for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){m.appendChild(h(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;e=a.default_branch;f="";u()})));mxUtils.br(m)})(b[g])}100==b.length&&(m.appendChild(p),v=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",
+v))}),q)});z()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};
TrelloFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};TrelloFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};TrelloFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY}));else if(this.savingFile=!0,this.getTitle()==a){var e=this.isModified,f=this.isModified(),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=e;this.meta=f;this.contentChanged();null!=d&&d();0<this.saveNeededCounter&&
(this.saveNeededCounter--,this.saveFile(a,b,d,c))}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=e;this.setModified(f||this.isModified());if(null!=c){if(null!=a&&null!=a.retry){var b=a.retry;a.retry=function(){k();b()}}c(a)}}))}else this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(e){this.ui.trello.insertFile(a,this.getData(),mxUtils.bind(this,function(e){this.savingFile=!1;null!=d&&d();this.ui.fileLoaded(e);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(a,
b,d,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,e)}));else null!=d&&d()};TrelloLibrary=function(a,b,d){TrelloFile.call(this,a,b,d)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(a,b,d){this.saveFile(a,!1,b,d)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(a){DrawioClient.call(this,a,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e73615c79cf7e381aef91c85936e9553";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(a,b,d){d&&this.logout();d=mxUtils.bind(this,function(c,d){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){null!=d&&d();a()},error:function(){null!=d&&d();null!=b&&b(mxResources.get("loggedOut"))}})});this.isAuthorized()?d(!0):this.ui.showAuthDialog(this,!0,d)};TrelloClient.prototype.getLibrary=function(a,b,d){this.getFile(a,b,d,!1,!0)};
-TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var f=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(m);if(n){var g=/\.png$/i.test(c.name);/\.vsdx$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),
-c.name,c.mimeType,this.extension,b,d):(n=!0,m=window.setTimeout(mxUtils.bind(this,function(){n=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(m);if(n){c.compoundId=a;var f=g?d.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(d.substring(f+1)),null!=f&&0<f.length&&(d=f));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(m);
-n&&(401==b.status?this.authenticate(f,d,!0):d())}),g||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);n&&(401==a.status?this.authenticate(f,d,!0):d())}))});this.authenticate(f,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
+TrelloClient.prototype.getFile=function(a,b,d,c,e){e=null!=e?e:!1;var f=mxUtils.bind(this,function(){var c=a.split(this.SEPARATOR),l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);Trello.cards.get(c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(c){window.clearTimeout(m);if(l){var g=/\.png$/i.test(c.name);/\.vsdx?$/i.test(c.name)||/\.gliffy$/i.test(c.name)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(c.url),
+c.name,c.mimeType,this.extension,b,d):(l=!0,m=window.setTimeout(mxUtils.bind(this,function(){l=!1;d({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.loadUrl(PROXY_URL+"?url="+encodeURIComponent(c.url),mxUtils.bind(this,function(d){window.clearTimeout(m);if(l){c.compoundId=a;var f=g?d.lastIndexOf(","):-1;0<f&&(f=this.ui.extractGraphModelFromPng(d.substring(f+1)),null!=f&&0<f.length&&(d=f));e?b(new TrelloLibrary(this.ui,d,c)):b(new TrelloFile(this.ui,d,c))}}),mxUtils.bind(this,function(a,b){window.clearTimeout(m);
+l&&(401==b.status?this.authenticate(f,d,!0):d())}),g||null!=c.mimeType&&"image/"==c.mimeType.substring(0,6)))}}),mxUtils.bind(this,function(a){window.clearTimeout(m);l&&(401==a.status?this.authenticate(f,d,!0):d())}))});this.authenticate(f,d)};TrelloClient.prototype.insertLibrary=function(a,b,d,c,e){this.insertFile(a,b,d,c,!0,e)};
TrelloClient.prototype.insertFile=function(a,b,d,c,e,f){e=null!=e?e:!1;var k=mxUtils.bind(this,function(){var k=mxUtils.bind(this,function(k){this.writeFile(a,k,f,mxUtils.bind(this,function(a){e?d(new TrelloLibrary(this.ui,b,a)):d(new TrelloFile(this.ui,b,a))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(a)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(this.ui.base64ToBlob(a,"image/png"))}),c,b):k(b)});this.authenticate(k,c)};
TrelloClient.prototype.saveFile=function(a,b,d){var c=a.meta.compoundId.split(this.SEPARATOR),e=mxUtils.bind(this,function(e){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){this.writeFile(a.meta.name,e,c[0],b,d)}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(f,d,!0):d()}))}),f=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(a.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){e(this.ui.base64ToBlob(a,"image/png"))}),
d,this.ui.getCurrentFile()!=a?a.getData():null):e(a.getData())});this.authenticate(f,d)};
-TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var k=!0,n=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name",
-a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(n),k))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(m)});this.authenticate(f,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+TrelloClient.prototype.writeFile=function(a,b,d,c,e){if(null!=a&&null!=b)if(b.length>=this.maxFileSize)e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(b.length)+" / 10 MB)"});else{var f=mxUtils.bind(this,function(){var k=!0,l=window.setTimeout(mxUtils.bind(this,function(){k=!1;e({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),m=new FormData;m.append("key",Trello.key());m.append("token",Trello.token());m.append("file","string"===typeof b?new Blob([b]):b,a);m.append("name",
+a);var g=new XMLHttpRequest;g.responseType="json";g.onreadystatechange=mxUtils.bind(this,function(){if(4===g.readyState&&(window.clearTimeout(l),k))if(200==g.status){var a=g.response;a.compoundId=d+this.SEPARATOR+a.id;c(a)}else 401==g.status?this.authenticate(f,e,!0):e()});g.open("POST",this.baseUrl+"cards/"+d+"/attachments");g.send(m)});this.authenticate(f,e)}else e({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};
TrelloClient.prototype.pickFolder=function(a){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)}))};TrelloClient.prototype.pickFile=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a,mxResources.get("ok"))}))};
-TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(k);var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="auto";n.style.height=
-"194px";f.appendChild(n);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var g=document.createElement("a");g.setAttribute("href","javascript:void(0);");if(null!=c){var f=document.createElement("img");f.src=c.url;f.width=c.width;f.height=
-c.height;f.style="border: 1px solid black;margin:5px;vertical-align:middle";g.appendChild(f)}mxUtils.write(g,a);mxEvent.addListener(g,"click",b);d.appendChild(g);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),h=mxUtils.bind(this,function(){e=0;n.innerHTML="";this.ui.spinner.spin(n,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
-mxUtils.bind(this,function(a){this.ui.spinner.stop();n.appendChild(m("../ [Up]",mxUtils.bind(this,function(){t()})));mxUtils.br(n);null==a||0==a.length?mxUtils.write(n,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){n.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0):
-null!=g&&g(b)}))});a()}),l=null,q=null,t=mxUtils.bind(this,function(f){null==f&&(e=0,n.innerHTML="",f=1);this.ui.spinner.spin(n,mxResources.get("loading"));null!=l&&null!=l.parentNode&&l.parentNode.removeChild(l);l=document.createElement("a");l.style.display="block";l.setAttribute("href","javascript:void(0);");mxUtils.write(l,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(n,"scroll",q);t(f+1)});mxEvent.addListener(l,"click",k);var p=mxUtils.bind(this,function(){Trello.get("search",
-{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(n,mxResources.get("noFiles"));else{1==f&&(n.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,t())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(n));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){n.appendChild(m(c.name,mxUtils.bind(this,function(){a?(d=c.id,h()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(n.appendChild(l),q=function(){n.scrollTop>=n.scrollHeight-n.offsetHeight&&k()},mxEvent.addListener(n,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(p,g,!0):null!=g&&g({message:a.responseText})}))});p()});t()};
-TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,f,k,n){this.editorUi=a;this.doc=n.doc;this.rtModel=n.rt;this.chatHistory=n.chatHistory;this.chatMap=n.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";n=document.createElement("div");n.style.padding="3px";d.appendChild(n);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
-this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";n.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
+TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c="@me",e=0,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(k);var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.height=
+"194px";f.appendChild(l);f=new CustomDialog(this.ui,f);this.ui.showDialog(f.container,340,270,!0,!0);f.okButton.parentNode.removeChild(f.okButton);var m=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("div");d.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;background:"+(0==e%2?"#eee":"#fff");var f=document.createElement("a");f.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=
+c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";f.appendChild(g)}mxUtils.write(f,a);mxEvent.addListener(f,"click",b);d.appendChild(f);return d}),g=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),h=mxUtils.bind(this,function(){e=0;l.innerHTML="";this.ui.spinner.spin(l,mxResources.get("loading"));var a=mxUtils.bind(this,function(){Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},
+mxUtils.bind(this,function(a){this.ui.spinner.stop();l.appendChild(m("../ [Up]",mxUtils.bind(this,function(){u()})));mxUtils.br(l);null==a||0==a.length?mxUtils.write(l,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){l.appendChild(m(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),mxUtils.bind(this,function(b){401==b.status?this.authenticate(a,g,!0):
+null!=g&&g(b)}))});a()}),n=null,q=null,u=mxUtils.bind(this,function(f){null==f&&(e=0,l.innerHTML="",f=1);this.ui.spinner.spin(l,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(l,"scroll",q);u(f+1)});mxEvent.addListener(n,"click",k);var p=mxUtils.bind(this,function(){Trello.get("search",
+{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:f-1},mxUtils.bind(this,function(e){this.ui.spinner.stop();e=null!=e?e.cards:null;if(null==e||0==e.length)mxUtils.write(l,mxResources.get("noFiles"));else{1==f&&(l.appendChild(m(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,u())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(l));for(var g=0;g<e.length;g++)mxUtils.bind(this,function(c){l.appendChild(m(c.name,mxUtils.bind(this,function(){a?(d=c.id,h()):(this.ui.hideDialog(),b(c.id))})))})(e[g]);100==e.length&&(l.appendChild(n),q=function(){l.scrollTop>=l.scrollHeight-l.offsetHeight&&k()},mxEvent.addListener(l,"scroll",q))}}),mxUtils.bind(this,function(a){401==a.status?this.authenticate(p,g,!0):null!=g&&g({message:a.responseText})}))});p()});u()};
+TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};function ChatWindow(a,b,d,c,e,f,k,l){this.editorUi=a;this.doc=l.doc;this.rtModel=l.rt;this.chatHistory=l.chatHistory;this.chatMap=l.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";l=document.createElement("div");l.style.padding="3px";d.appendChild(l);var m=document.createElement("div");m.style.paddingLeft="3px";m.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(m);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
+this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";l.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
"right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));m.appendChild(this.chatLineArea);m.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,e,f,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.handleResize();this.window.addListener(mxEvent.RESIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.MAXIMIZE,mxUtils.bind(this,this.handleResize));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,this.handleResize));if(null!=this.chatHistory){for(a=Math.max(0,this.chatHistory.length-this.chatHistoryShow);a<this.chatHistory.length;a++)this.updateChatArea(this.chatHistory.get(a));this.chatHistory.addEventListener(gapi.drive.realtime.EventType.VALUES_ADDED,mxUtils.bind(this,
function(a){this.updateChatArea(a.target.get(a.index))}))}this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_JOINED,mxUtils.bind(this,this.collaboratorListener));this.doc.addEventListener(gapi.drive.realtime.EventType.COLLABORATOR_LEFT,mxUtils.bind(this,this.collaboratorListener));null!=this.chatMap&&this.chatMap.addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,mxUtils.bind(this,function(a){this.updateChatArea(a.target.get(a.property))}))}
@@ -7711,7 +7718,7 @@ ChatWindow.prototype.updateChatArea=function(a){a='<span style="color : '+a.coll
ChatWindow.prototype.handleResize=function(){var a=this.window.getElement(),b=this.editorUi.editor.graph.isEnabled()?70:40;this.chatArea.style.height=Math.max(0,a.offsetHeight-b)+"px";this.chatLineArea.style.width=a.offsetWidth-this.sendBtn.offsetWidth-40+"px"};
ChatWindow.prototype.collaboratorListener=function(a){if(!a.collaborator.isMe){if(a.type==gapi.drive.realtime.EventType.COLLABORATOR_JOINED)a='<span style="color : '+a.collaborator.color+';">&#x25B2</span><i>'+mxResources.get("chatJoined",[a.collaborator.displayName])+"</i>";else if(a.type==gapi.drive.realtime.EventType.COLLABORATOR_LEFT)a='<span style="color : '+a.collaborator.color+';">&#x25BC</span><i>'+mxResources.get("chatLeft",[a.collaborator.displayName])+"</i>";else return;this.chatArea.innerHTML=
this.chatArea.innerHTML+a+"<br>";this.chatArea.scrollTop=this.chatArea.scrollHeight}};ChatWindow.prototype.configCollabInfo=function(){for(var a=this.doc.getCollaborators(),b=0;b<a.length;b++){var d=a[b];d.isMe&&(this.collabColor=d.color,this.displayName=d.displayName)}};ChatWindow.prototype.destroy=function(){this.window.destroy()};ChatWindow.prototype.htmlEscape=function(a){return a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")};App=function(a,b,d){EditorUi.call(this,a,b,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,d){var c=null;try{c=window.open(a)}catch(n){}null==c||void 0===c?this.showDialog((new PopupDialog(this,a,b,d)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,b,d){var c=null;try{c=window.open(a)}catch(l){}null==c||void 0===c?this.showDialog((new PopupDialog(this,a,b,d)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
@@ -7722,8 +7729,8 @@ 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&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
App.main=function(a,b){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,c,e,f){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var g=new Image,k=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";g.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+k+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(x){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
-"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var k=e.split(";"),e=0;e<k.length;e++){var n=App.pluginRegistry[k[e]];null!=n?mxscript(f+n):null!=window.console&&console.log("Unknown plugin:",k[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(v){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
+"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),e=urlParams.p;App.initPluginCallback();if(null!=e){var f="";"1"==urlParams.drawdev&&(f=document.location.protocol+"//drawhost.jgraph.com/");for(var k=e.split(";"),e=0;e<k.length;e++){var l=App.pluginRegistry[k[e]];null!=l?mxscript(f+l):null!=window.console&&console.log("Unknown plugin:",k[e])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){f=window.location.protocol+"//"+window.location.host;k=!0;for(e=0;e<c.length&&k;e++)"/"!=c[e].charAt(0)&&c[e].substring(0,f.length)!=f&&(k=!1);if(k||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[c.join("\n")]).replace(/\\n/g,
"\n")))for(e=0;e<c.length;e++)try{mxscript(c[e])}catch(m){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();
mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=b?b():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
@@ -7750,7 +7757,7 @@ null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.but
IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
App.prototype.checkLicense=function(){var a=this.drive.getUser(),b=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=b){var d=b.lastIndexOf("@"),c=b;0<=d&&(c=b.substring(d+1),b=this.crc32(b.substring(0,d))+"@"+c);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(b)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
-a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var d=JSON.parse(b);null!=d&&this.handleLicense(d,c)}}}catch(n){}}))}};
+a.getStatus()&&299>=a.getStatus()){var b=a.getText();if(0<b.length){var d=JSON.parse(b);null!=d&&this.handleLicense(d,c)}}}catch(l){}}))}};
App.prototype.handleLicense=function(a,b){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=a)if(c=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var e=new Date(Date.parse(c)),f=Math.round((e-Date.now())/864E5);if(90>f){var k="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(b);d.style.height="100%";d.style.margin="0px";d.style.display=
"";0>f?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+k+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[b,e.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
k+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[b,e.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
@@ -7761,9 +7768,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,b=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=b&&(a=(null!=b.getTitle()?b.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],b,d=0;256>d;d++){b=d;for(var c=0;8>c;c++)b=b&1?3988292384^b>>>1:b>>>1;a[d]=b}return a};
App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};
App.prototype.getThumbnail=function(a,b){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,f=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(f.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),n=c.getGraphBounds(),m=a/n.width,m=Math.min(1,Math.min(3*a/(4*n.height),m)),g=Math.floor(n.x),h=Math.floor(n.y);k.setAttribute("width",Math.ceil(m*(n.width+4)));k.setAttribute("height",Math.ceil(m*(n.height+4)));var l=k.getContext("2d");
-l.scale(m,m);l.translate(-g,-h);var q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";l.save();l.fillStyle=q;l.fillRect(g,h,Math.ceil(n.width+4),Math.ceil(n.height+4));l.restore();var t=new mxJsCanvas(k),p=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var x=new mxImageExport;x.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};x.drawText=function(a,
-b){};x.drawState(c.getView().getState(c.model.root),p);p.finish(mxUtils.bind(this,function(){x.drawState(c.getView().getState(c.model.root),t);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(k)}));d=!0}}catch(z){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
+function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),l=c.getGraphBounds(),m=a/l.width,m=Math.min(1,Math.min(3*a/(4*l.height),m)),g=Math.floor(l.x),h=Math.floor(l.y);k.setAttribute("width",Math.ceil(m*(l.width+4)));k.setAttribute("height",Math.ceil(m*(l.height+4)));var n=k.getContext("2d");
+n.scale(m,m);n.translate(-g,-h);var q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";n.save();n.fillStyle=q;n.fillRect(g,h,Math.ceil(l.width+4),Math.ceil(l.height+4));n.restore();var u=new mxJsCanvas(k),p=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var v=new mxImageExport;v.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};v.drawText=function(a,
+b){};v.drawState(c.getView().getState(c.model.root),p);p.finish(mxUtils.bind(this,function(){v.drawState(c.getView().getState(c.model.root),u);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(k)}));d=!0}}catch(y){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(b,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",b);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+b+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),b=null!=c?c.getMode():null,b==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):b==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):b==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
@@ -7776,7 +7783,7 @@ App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(docu
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var b=document.createElement("div");b.className="geAlert";b.style.zIndex=2E9;b.style.left="50%";b.style.top="-100%";mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(b.style,"transition","all 1s ease");b.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
mxResources.get("close"));a.innerHTML=mxResources.get("close");b.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=b.parentNode&&(b.parentNode.removeChild(b),mxEvent.consume(a))});document.body.appendChild(b);window.setTimeout(function(){b.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(b.style,"transition","all 2s ease");b.style.opacity="0";window.setTimeout(function(){null!=b.parentNode&&b.parentNode.removeChild(b)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==b||this.loadFile(b,!0)}catch(l){null!=document.body&&this.handleError(l,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var c=urlParams.create;null!=c?a(b[decodeURIComponent(c)]):(c=urlParams.data,null!=c?a(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(g){}if(c)this.spinner.spin(document.body,mxResources.get("loading"));else if(c=this.getDiagramId(),"0"!=urlParams.splash||null!=c&&0!=c.length)this.loadFile(this.getDiagramId());else{var d=this.getDraft(),m=null!=d?d.data:this.getFileData(),c=Editor.useLocalStorage;this.createFile(this.defaultFilename,
@@ -7797,41 +7804,43 @@ App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)n
Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,c){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,c):new LocalFile(this,b,c))}));var c=this.dialog,e=c.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;e.apply(c,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var f=
document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&this.openFiles(f.files)}));f.click()}}};
App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var b=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=b&&b.pickLibrary(mxUtils.bind(this,function(a,c){if(null!=c)try{this.loadLibrary(c)}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
+mxResources.get("loading"))&&b.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,c){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,c):new LocalLibrary(this,b,c))}catch(k){this.handleError(k,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var c=document.createElement("input");
c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files)for(var a=0;a<c.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(c.files[a])}));c.click()}};
-App.prototype.saveLibrary=function(a,b,d,c,e,f,k){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var n=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,n,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-n,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,n,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var g=mxUtils.bind(this,
+App.prototype.saveLibrary=function(a,b,d,c,e,f,k){c=null!=c?c:this.mode;e=null!=e?e:!1;f=null!=f?f:!1;var l=this.createLibraryDataFromImages(b),m=mxUtils.bind(this,function(a){this.spinner.stop();null!=k&&k();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,l,a));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(d){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
+l,d,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,l,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,l,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,b)}),m,d):c==App.MODE_BROWSER?(d=mxUtils.bind(this,function(){var c=new StorageLibrary(this,l,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(c,b)}),m)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(e||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(l);var g=mxUtils.bind(this,
function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);f||this.libraryLoaded(d,b);null!=k&&k()}),m)});if(a!=d.getTitle()){var h=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&h!=d.getHash()&&(mxSettings.removeCustomLibrary(h),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(h);g()}),m)}else g()}};
App.prototype.saveFile=function(a){var b=this.getCurrentFile();if(null!=b){var d=mxUtils.bind(this,function(){this.removeDraft();b.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==b.getTitle()||null==this.mode){var c=null!=b.getTitle()?b.getTitle():this.defaultFilename,e=!mxClient.IS_IOS||!navigator.standalone,f=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var k=4>=a?2:6<a?4:3,c=new CreateDialog(this,
c,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==f&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):f!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,e,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,k);this.showDialog(c.container,460,a>k?390:270,!0,!0);c.init()}else this.save(b.getTitle(),d)}};
-EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(a){b(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&b(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(c=this.extractGraphModelFromPng(c)),b(c))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,b,d,c,e,f,k,n){c=n?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(k=null!=this.stateArg?this.stateArg.folderId:k,this.drive.insertFile(a,b,k,mxUtils.bind(this,
+EditorUi.prototype.loadTemplate=function(a,b,d){var c=a;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(a){b(a)},d,a):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
+200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&b(a.responseText)}),a):'{"state":"{\\"Properties\\":'==c.substring(0,26)?this.importLucidChart(c,0,0,!1,mxUtils.bind(this,function(){b(this.getFileData(!0))})):(/(\.png)($|\?)/i.test(a)&&(c=this.extractGraphModelFromPng(c)),b(c))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};
+App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(a,b,d,c,e,f,k,l){c=l?null:null!=c?c:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){b=null!=b?b:this.emptyDiagramXml;var m=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(a){m();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(k=null!=this.stateArg?this.stateArg.folderId:k,this.drive.insertFile(a,b,k,mxUtils.bind(this,
function(a){m();this.fileCreated(a,d,f,e)}),g)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,k):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g):
c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,b,mxUtils.bind(this,function(a){m();this.fileCreated(a,d,f,e)}),g,!1,k):c==App.MODE_BROWSER?(m(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,b,a);c.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,f,e)}),g)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(m(),this.fileCreated(new LocalFile(this,
b,a,null==c),d,f,e))}};
-App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,k=window.location.protocol+"//"+window.location.hostname+e,n=f,m=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),
-n=this.decodeNodeIntoGraph(n,m));a.setData(this.createFileData(f,m,a,k));null!=m&&m.container.parentNode.removeChild(m.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),h=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}),
+App.prototype.fileCreated=function(a,b,d,c){var e=window.location.pathname;null!=b&&0<b.length&&(e+="?libs="+b);e=this.getUrl(e);a.getMode()!=App.MODE_DEVICE&&(e+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var f=a.getData(),f=0<f.length?this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0):null,k=window.location.protocol+"//"+window.location.hostname+e,l=f,m=null;null!=f&&/\.svg$/i.test(a.getTitle())&&(m=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(m.container),
+l=this.decodeNodeIntoGraph(l,m));a.setData(this.createFileData(f,m,a,k));null!=m&&m.container.parentNode.removeChild(m.container);var g=mxUtils.bind(this,function(){this.spinner.stop()}),h=mxUtils.bind(this,function(){g();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=b&&this.sidebar.showEntries(b)}),
h=mxUtils.bind(this,function(){d||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?h():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=c&&c(),window.openWindow(e,null,h))});a.constructor==LocalFile||a.constructor==DriveFile?h():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
function(){h()}),mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
App.prototype.loadFile=function(a,b,d,c){this.hideDialog();var e=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var e=localStorage.getItem(a);if(null!=e)this.fileLoaded(new StorageFile(this,e,a)),null!=c&&c();else throw{message:mxResources.get("fileNotFound")};}catch(g){this.handleError(g,
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d),null!=c&&c();else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),
-"<"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)),e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),e.getHash=function(){return a},this.fileLoaded(e),null!=c&&c();else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1));this.loadTemplate(f,mxUtils.bind(this,function(d){this.spinner.stop();if(null!=d&&0<d.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var g=f,k=f.lastIndexOf("."),m=g.lastIndexOf("/");
-k>m&&0<m&&(g=g.substring(m+1,k),k=f.substring(k),this.useCanvasForExport||".png"!=k||(k=".xml"),".svg"===k||".xml"===k||".html"===k||".png"===k)&&(e=g+k)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return a};this.fileLoaded(d)||"https://drive.google.com/uc?id="!=f.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),d=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+
-f.substring(31,f.lastIndexOf("&")),b,c),!0):!1}),!d()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",d))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else e=null,"G"==a.charAt(0)?e=this.drive:"D"==a.charAt(0)?e=this.dropbox:"W"==a.charAt(0)?e=this.oneDrive:"H"==a.charAt(0)?e=this.gitHub:"T"==a.charAt(0)&&(e=this.trello),null==e?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=c&&c()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==
-a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),f=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=f&&(window.location.hash=f.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()});null==a||0==a.length?k():null!=f&&f.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d),null!=c&&c();else if("S"==a.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(this.editor.graph.decompress(a.substring(1))),
+c,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(g){this.handleError(g,mxResources.get("errorLoadingFile"))}}else if("R"==a.charAt(0))this.spinner.stop(),e=decodeURIComponent(a.substring(1)),"<"!=e.charAt(0)&&(e=this.editor.graph.decompress(e)),e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),e.getHash=function(){return a},this.fileLoaded(e),null!=c&&c();else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1));
+this.loadTemplate(f,mxUtils.bind(this,function(d){this.spinner.stop();if(null!=d&&0<d.length){var e=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var g=f,k=f.lastIndexOf("."),l=g.lastIndexOf("/");k>l&&0<l&&(g=g.substring(l+1,k),k=f.substring(k),this.useCanvasForExport||".png"!=k||(k=".xml"),".svg"===k||".xml"===k||".html"===k||".png"===k)&&(e=g+k)}d=new LocalFile(this,d,null!=urlParams.title?decodeURIComponent(urlParams.title):e,!0);d.getHash=function(){return a};this.fileLoaded(d)||
+"https://drive.google.com/uc?id="!=f.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),d=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+f.substring(31,f.lastIndexOf("&")),b,c),!0):!1}),!d()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",d))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else e=
+null,"G"==a.charAt(0)?e=this.drive:"D"==a.charAt(0)?e=this.dropbox:"W"==a.charAt(0)?e=this.oneDrive:"H"==a.charAt(0)?e=this.gitHub:"T"==a.charAt(0)&&(e=this.trello),null==e?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),e.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);
+null!=c&&c()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),f=this.getCurrentFile(),k=mxUtils.bind(this,function(){null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=f&&(window.location.hash=
+f.getHash())}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()});null==a||0==a.length?k():null!=f&&f.isModified()&&!b?window.openWindow(this.getUrl()+"#"+a,null,k):k()};
App.prototype.getLibraryStorageHint=function(a){var b=a.getTitle();a.constructor!=LocalLibrary&&(b+="\n"+a.getHash());a.constructor==DriveLibrary?b+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?b+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?b+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?b+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?b+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?b+=" ("+
mxResources.get("browser")+")":a.constructor==LocalLibrary&&(b+=" ("+mxResources.get("device")+")");return b};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,c){var d=0,f=[],k=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=f[a]&&this.loadLibrary(f[a]);null!=c&&c()}});if(null!=b)for(var n=0;n<b.length;n++){var m=encodeURIComponent(decodeURIComponent(b[n]));mxUtils.bind(this,
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),b=mxUtils.bind(this,function(b,c){var d=0,f=[],k=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var a=b.length-1;0<=a;a--)null!=f[a]&&this.loadLibrary(f[a]);null!=c&&c()}});if(null!=b)for(var l=0;l<b.length;l++){var m=encodeURIComponent(decodeURIComponent(b[l]));mxUtils.bind(this,
function(b,c){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){d++;var e=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];f[c]=a;d--;k()}),g=mxUtils.bind(this,function(){a(b);d--;k()});this.pendingLibraries[b]=!0;var h=b.substring(0,1);if("L"==h)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
-b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):g()}))}catch(v){g()}}),0);else if("U"==h){var m=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=m;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),m))}catch(v){g()}else g()}),function(){g()})}catch(z){g()}}}else{var n=null;"G"==h?null!=
-this.drive&&null!=this.drive.user&&(n=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(v){g()}}),function(a){g()}):(delete this.pendingLibraries[b],
-g())}}})(m,n)}k()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
+b&&(b=this.emptyLibraryXml);null!=b?e(new StorageLibrary(this,b,a)):g()}))}catch(z){g()}}),0);else if("U"==h){var l=decodeURIComponent(b.substring(1));if(!this.isOffline()){h=l;this.isCorsEnabledForUrl(h)||(h="t="+(new Date).getTime(),h=PROXY_URL+"?url="+encodeURIComponent(l)+"&"+h);try{mxUtils.get(h,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{e(new UrlLibrary(this,a.getText(),l))}catch(z){g()}else g()}),function(){g()})}catch(y){g()}}}else{var m=null;"G"==h?null!=
+this.drive&&null!=this.drive.user&&(m=this.drive):"H"==h?null!=this.gitHub&&null!=this.gitHub.getUser()&&(m=this.gitHub):"T"==h?null!=this.trello&&this.trello.isAuthorized()&&(m=this.trello):"D"==h?null!=this.dropbox&&null!=this.dropbox.getUser()&&(m=this.dropbox):"W"==h&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(m=this.oneDrive);null!=m?m.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{e(a)}catch(z){g()}}),function(a){g()}):(delete this.pendingLibraries[b],
+g())}}})(m,l)}k()});b(mxSettings.getCustomLibraries(),function(){b((urlParams.clibs||"").split(";"))})}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
@@ -7846,9 +7855,9 @@ d():this.confirm(mxResources.get("replaceIt",[b]),d))};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var b=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,b);this.fname.setAttribute("title",b+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var b=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),b,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
App.prototype.showAuthDialog=function(a,b,d,c){var e=this.spinner.pause();this.showDialog((new AuthDialog(this,a,b,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();e()}))}catch(k){this.editor.setStatus(mxUtils.htmlEntities(k.message))}}))).container,300,b?180:140,!0,!0,mxUtils.bind(this,function(a){null!=c&&c();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,b,d,c,e,f){var k=b;/\.svg$/i.test(k)||(k=k.substring(0,b.lastIndexOf("."))+c);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if((/\.vsdx$/i.test(b)||/\.vsd$/i.test(b))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);n||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;n?(a=JSON.parse(m.responseText),
-a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,k,!0))}),f,b)});m.send()}else{var g=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,k,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,k,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,k,!0))}catch(l){null!=f&&f(l)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
+App.prototype.convertFile=function(a,b,d,c,e,f){var k=b;/\.svg$/i.test(k)||(k=k.substring(0,b.lastIndexOf("."))+c);var l=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(l=!0);if(/\.vsdx?$/i.test(b)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var m=new XMLHttpRequest;m.open("GET",a,!0);l||(m.responseType="blob");m.onload=mxUtils.bind(this,function(){var a=null;l?(a=JSON.parse(m.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([m.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){e(new LocalFile(this,a,k,!0))}),f,b)});m.send()}else{var g=mxUtils.bind(this,function(c){try{/\.png$/i.test(b)?(temp=this.extractGraphModelFromPng(c),null!=temp?e(new LocalFile(this,temp,k,!0)):e(new LocalFile(this,c,b,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,a)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?e(new LocalFile(this,a.responseText,k,!0)):null!=f&&f({message:mxResources.get("errorLoadingFile")}))}),b):e(new LocalFile(this,c,k,!0))}catch(n){null!=f&&f(n)}});d=/\.png$/i.test(b)||/\.jpe?g$/i.test(b)||null!=d&&"image/"==d.substring(0,6);l?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=e){a=JSON.parse(a.getText());var c=a.content;"base64"===a.encoding&&(c=/\.png$/i.test(b)?
"data:image/png;base64,"+c:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(c):atob(c));g(c)}}else null!=f&&f({code:App.ERROR_UNKNOWN})}),function(){null!=f&&f({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=f&&f({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,g,f,d)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
@@ -7874,8 +7883,8 @@ Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.
(null!=b.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+b.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=b.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(b.displayName)+"</b><br><small>"+mxUtils.htmlEntities(b.email)+"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",b=document.createElement("div"),
b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",b.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display=
"none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(b)));
-b=mxUtils.bind(this,function(a,b,d,n){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=n?
-"<br><br><small>"+mxUtils.htmlEntities(n)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=
+b=mxUtils.bind(this,function(a,b,d,l){null!=a&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=b?'<img style="margin-right:10px;" src="'+b+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=l?
+"<br><br><small>"+mxUtils.htmlEntities(l)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=d&&a.appendChild(mxUtils.button(mxResources.get("signOut"),d)),this.userPanel.appendChild(a))});null!=this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=
a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,
function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});
a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&b(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),
@@ -7883,64 +7892,64 @@ null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else thi
this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):
this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var b=Menus.prototype.init;Menus.prototype.init=function(){b.apply(this,
-arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+arguments);var a=this.editorUi,d=a.editor.graph,f=mxUtils.bind(d,d.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),l=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),m=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
-"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&
-a.exportSvg(b/100,c,d,e,g,f,k,!h,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var g=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,
-mxResources.get(c?"compressed":"allPages"),!0);f.style.marginBottom="16px";mxEvent.addListener(g,"change",function(){g.checked?f.setAttribute("disabled","disabled"):f.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!f.checked:null,null,!g.checked,c?null:!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,c,d,e,g,f){b=new EmbedDialog(a,a.createLink(b,c,d,e,g,f,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,g,f,k,h,l,m){a.createHtml(b,c,d,e,g,f,k,h,l,m,mxUtils.bind(this,function(b,c){var d=
-a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);g.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(e,"change",function(){e.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
+"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),d=new NewDialog(a,b);a.showDialog(d.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});d.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,d,c,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&
+a.exportSvg(b/100,d,c,e,f,g,k,!h,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,
+mxResources.get(c?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
+!0,null,null,function(b,d,c,e,f,g){b=new EmbedDialog(a,a.createLink(b,d,c,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,d,c,e,f,g,k,h,l,m){a.createHtml(b,d,c,e,f,g,k,h,l,m,mxUtils.bind(this,function(b,d){var c=
+a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(c)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+d+"\n</body>\n</html>";a.saveData(c+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
+360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||
+mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=
DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,
-fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var g=new RevisionDialog(a,d);a.showDialog(g.container,640,480,!0,!0);g.init()}catch(E){a.handleError(E)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();
-for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,g){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){g(a)})},function(a){g(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,
+fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var f=new RevisionDialog(a,d);a.showDialog(f.container,640,480,!0,!0);f.init()}catch(A){a.handleError(A)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();
+for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,
640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});
if("undefined"!==typeof MathJax){var h=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.isMathEnabled()});h.isEnabled=f}isLocalStorage&&(h=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),h.setToggleAction(!0),h.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
-var l=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return l.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
-a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],g=e.indexOf("=");if(0<=g){var f=e.substring(0,g),e=e.substring(g+1);null==a.copiedStyle[f]&&"none"==e&&(a.copiedStyle[f]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
-null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),g=0;g<q.length;g++){var f=q[g],k=a.copiedStyle[f];e.style[f]!=k&&d.setCellStyles(f,k,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
-320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,g,k,!h,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
-function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,k,!h,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));h=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));h.setToggleAction(!0);h.setSelectedCallback(function(){return d.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),
-t=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
+a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<q.length;f++){var g=q[f],k=a.copiedStyle[g];e.style[g]!=k&&d.setCellStyles(g,k,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,k,!h,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,k,!h,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));h=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));h.setToggleAction(!0);h.setSelectedCallback(function(){return d.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),
+u=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});h=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=
new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
this.tagsWindow.window.isVisible()}));h=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));
-h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],g=null;""!=e&&(g=b.addItem(e,
-null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=
+h.setToggleAction(!0);h.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,
+null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=
b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&
-a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","25");g.style.marginLeft="8px";mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(g.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+
-encodeURIComponent(b)),g.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(g.value="")}));e.firstChild.nextSibling.appendChild(g);mxEvent.addGestureListeners(g,function(a){document.activeElement!=g&&g.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){g.focus()},0);this.addMenuItems(b,
+a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(f.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+
+encodeURIComponent(b)),f.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(b,
["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c);this.addMenuItems(b,["-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);
this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",
mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,
null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),
-this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),g=e.createElement("output");e.appendChild(g);e=new mxXmlCanvas2D(g);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var f=0,k=e.save;e.save=function(){f++;k.apply(this,arguments)};var h=e.restore;e.restore=function(){f--;h.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",
-a,f);l.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",f)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&
+this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var h=e.restore;e.restore=function(){g--;h.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",
+a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&
null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&
a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&
null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,
!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+
-"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,g,f,k,h,l,m){a.createHtml(b,c,d,e,g,f,k,h,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");
-d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+
-window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";g.appendChild(e);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&
-a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,g,f,function(b){a.spinner.stop();
-b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,g,f,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);
-b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,g,f,k,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),
-function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+h+';" src="'+a.createLink(b,c,d,e,g,f,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,
-a.createLink(b,c,d,e,g,f,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)h=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),
+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,k,h,l,m){a.createHtml(b,c,d,e,f,g,k,h,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");
+d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+
+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&
+a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();
+b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);
+b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,k,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),
+function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,
+a.createLink(b,c,d,e,f,g,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)h=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),
h.setToggleAction(!0),h.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});h=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});h.setToggleAction(!0);h.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=
function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),
a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,
["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],
c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function e(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,
-null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,f=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;f.apply(g,arguments);b&&null==a.getCurrentFile()&&"1"!=
-urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=l(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,e){var g=d.view,f=d.getGraphBounds(),
-k=d.snap(Math.ceil(Math.max(0,f.x/g.scale-g.translate.x)+4*d.gridSize)),h=d.snap(Math.ceil(Math.max(0,(f.y+f.height)/g.scale-g.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(g){var f=!0,l=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,function(g,l,m){g=f?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,k,h,Math.round(l*g),Math.round(m*g),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
-f)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){f=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,h,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),l=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=
-typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
+null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=
+urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),
+k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),h=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,a.maxImageSize/m)):1;a.importFile(b,c,k,h,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
+g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,h,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=
+typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
"...",null,function(){e(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){e(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();
a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},c)})).isEnabled=f;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=
@@ -7951,30 +7960,30 @@ c.init()}})).isEnabled=function(){return this.enabled&&f.apply(this,arguments)};
mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),
null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));
this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));
-this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var x="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText plantUml formatSql".split(" "),z=function(b,c,d,e){b.addItem(d,
-null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},v=function(a,b,c,e){var g=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted",
-"cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(v("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",
-function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&v("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&v("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&v("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=
-f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<x.length;c++)"-"==x[c]?a.addSeparator(b):z(a,b,mxResources.get(x[c])+"...",x[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+
-" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},
-c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,
-function(){a.pickFile(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?
-b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},
-c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},c):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&
-"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=
-PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(E){a.handleError(E,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",
-new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,
-"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,
-c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],
-c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&
-this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=
-d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);
-b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,
-b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var v="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText plantUml formatSql".split(" "),y=function(b,c,d,e){("plantUml"!=
+e||EditorUi.enablePlantUml)&&b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},z=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();
+try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(z("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+
+"+Shift+X").isEnabled=f;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=f;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&z("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=f;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+z("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<v.length;c++)"-"==v[c]?a.addSeparator(b):y(a,b,mxResources.get(v[c])+"...",v[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?
+e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=
+a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},c);a.isOffline()||
+(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("newLibrary",new Menu(function(b,
+c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,
+function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},c)}));this.put("openLibraryFrom",
+new Menu(function(b,c){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},
+c):l&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},c):m&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},c):g&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,
+mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(A){a.handleError(A,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
+a.showDialog(b.container,300,80,!0,!0);b.init()},c))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,
+["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);
+"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",
+b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],
+c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",
+b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};
+var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,b){if(480>=screen.width&&a==this.get("help")){b.style.paddingRight="0px";b.style.paddingLeft="0px";b.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,d){this.ui=a;this.page=b;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,d){this.ui=a;this.oldIndex=b;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
@@ -8005,9 +8014,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
d)/this.pages.length)+1),e=null,f=0;f<this.pages.length;f++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),e=c):mxEvent.consume(b)}));mxEvent.addListener(d,
"dragend",mxUtils.bind(this,function(a){e=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=e&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=e&&c!=e&&this.movePage(e,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(f,this.createTabForPage(this.pages[f],c,this.pages[f]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var k=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var n=this.createControlTab(4,
-"&nbsp;&#10095;");n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=m+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(n,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(n,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(n,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()};
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var k=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");k.style.position="absolute";k.style.right=this.editor.chromeless?"29px":"55px";k.style.fontSize="13pt";this.tabContainer.appendChild(k);var l=this.createControlTab(4,
+"&nbsp;&#10095;");l.style.position="absolute";l.style.right=this.editor.chromeless?"0px":"29px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var m=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=m+"px";mxEvent.addListener(k,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(k,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,m-20);mxUtils.setOpacity(k,0<b.scrollLeft?100:50);mxUtils.setOpacity(l,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=b;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
@@ -8017,62 +8026,62 @@ null,mxUtils.bind(this,function(){this.renamePage(d,d.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,d){d=this.createTab(d);var c=a.getName();d.setAttribute("title",c);mxUtils.write(d,c);d.style.maxWidth=b+"px";d.style.width=b+"px";this.addTabListeners(a,d);42<b&&(d.style.textOverflow="ellipsis");return d};
EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var d=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,e=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;e=a==this.currentPage;d.isMouseDown||e||this.selectPage(a)}),null,mxUtils.bind(this,function(f){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(f)&&e||mxEvent.isPopupTrigger(f))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var n=mxEvent.getClientX(f),m=mxEvent.getClientY(f);k.popup(n,m,null,f);this.setCurrentMenu(k,b)}mxEvent.consume(f)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(f)||!c){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var l=mxEvent.getClientX(f),m=mxEvent.getClientY(f);k.popup(l,m,null,f);this.setCurrentMenu(k,b)}mxEvent.consume(f)}}))};
EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,c){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,c){c.setAttribute("page",d.page.getId());return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;return d};a.afterDecode=function(a,d,c){c.page=a.ui.getPageById(d.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,c){c.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(c.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,c));return c};a.beforeDecode=function(a,d,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(d.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",d.getAttribute("relatedPage"));
b.setAttribute("name",d.getAttribute("name"));c.relatedPage=new DiagramPage(b);d=d.cloneNode(!0);b=d.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var f=b.getAttribute("id");null==a.lookup(f)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return d};a.afterDecode=function(a,d,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,d,n,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],k=0;k<d.length;k++){var q=this.view.getState(d[k]),t=null!=q?q.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(t,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[k]&&f.push(a);return a==d[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[k],
-a))}for(k=0;k<f.length;k++)this.model.setVisible(f[k],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=x.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType);
-return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function n(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function m(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],p.model.getTerminal(d[0],!0),!0);var g=n(a),f=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;g==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);p.view.currentRoot!=c&&(e[1].geometry.x-=f.x,e[1].geometry.y-=f.y);var k=p.view.getState(a),h=p.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*h:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*h;var m=p.getOutgoingEdges(p.model.getTerminal(d[0],
-!0));if(null!=m){for(var v=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,q=f=d=0;q<m.length;q++){var u=p.model.getTerminal(m[q],!1);if(g==n(u)){var t=p.view.getState(u);u!=a&&null!=t&&(v&&b!=t.getCenterX()<k.getCenterX()||!v&&b!=t.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,t)&&(d=10+Math.max(d,(Math.min(l.x+l.width,t.x+t.width)-Math.max(l.x,t.x))/h),f=10+Math.max(f,(Math.min(l.y+l.height,t.y+t.height)-Math.max(l.y,t.y))/h))}}v?f=0:d=0;for(q=0;q<m.length;q++)if(u=p.model.getTerminal(m[q],
-!1),g==n(u)&&(t=p.view.getState(u),u!=a&&null!=t&&(v&&b!=t.getCenterX()<k.getCenterX()||!v&&b!=t.getCenterY()<k.getCenterY()))){var y=[];p.traverse(t.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});p.moveCells(y,(b?1:-1)*d,(b?1:-1)*f)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function g(a){p.model.beginUpdate();try{var b=n(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);
-var e=p.model.getParent(a),g=e.geometry,f=[];p.view.currentRoot!=e&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);p.traverse(a,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0});var k=a.geometry.width+40,h=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,h=-40):b==mxConstants.DIRECTION_WEST?(k=-40,h=0):b==mxConstants.DIRECTION_EAST&&(h=0);p.moveCells(f,k,h);return p.addCells(d,e)}finally{p.model.endUpdate()}}function h(a){p.model.beginUpdate();try{var b=
-p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,g=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var f=0;f<c.length;f++){var k=p.model.getTerminal(c[f],!1);null!=k&&g.push(k)}var h=p.view.getBounds(g),l=n(a),m=p.view.translate,v=p.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/v-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/v-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==h?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(h.y+h.height)/v-m.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function l(a,
-b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var g=p.view.getState(p.model.getTerminal(a[e],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=l(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}var t=this,p=t.editor.graph,x=p.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var z=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){z.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&&
-(a.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),
-a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",
-function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+T");var v=p.removeCells;p.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],g=0;g<a.length;g++){var f=a[g];x.isEdge(f)&&c(f)&&(e.push(f),f=x.getTerminal(f,!1));b(f)?(p.traverse(f,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),f=p.getIncomingEdges(a[g]),a=a.concat(f)):e.push(a[g])}a=e;return v.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var u=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var g=p.view.getState(d[e]);if(null!=g&&b(g.cell))for(var f=p.getIncomingEdges(g.cell),g=0;g<f.length;g++)mxUtils.remove(f[g],
-a)}this.model.beginUpdate();try{var k=u.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var h=p.getIncomingEdges(k[e]),f=p.getIncomingEdges(a[e]);if(0==h.length&&0<f.length){var l=this.cloneCells([f[0]])[0];this.addEdge(l,p.getDefaultParent(),this.model.getTerminal(f[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var w=p.moveCells;p.moveCells=function(a,c,d,e,g,f,k){var h=null;this.model.beginUpdate();try{var l=g,m=this.view.getState(g),n=null!=m?m.style:this.getCellStyle(g);
-if(null!=a&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var v=0;v<a.length;v++)if(b(a[v])||p.model.isEdge(a[v])&&null==p.model.getTerminal(a[v],!0)){g=p.model.getParent(a[v]);break}if(null!=l&&g!=l&&null!=this.view.getState(a[0])){var q=p.getIncomingEdges(a[0]);if(0<q.length){var u=p.view.getState(p.model.getTerminal(q[0],!0));if(null!=u){var t=p.view.getState(l);null!=t&&(c=(t.getCenterX()-u.getCenterX())/p.view.scale,d=(t.getCenterY()-u.getCenterY())/p.view.scale)}}}}h=w.apply(this,arguments);
+Graph.prototype.foldCells=function(a,c,d,l,m){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=d.slice(),f=[],k=0;k<d.length;k++){var q=this.view.getState(d[k]),u=null!=q?q.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[k]&&f.push(a);return a==d[k]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[k],
+a))}for(k=0;k<f.length;k++)this.model.setVisible(f[k],!a);d=e;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType);
+return b}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function l(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function m(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],p.model.getTerminal(d[0],!0),!0);var f=l(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);p.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=p.view.getState(a),h=p.view.scale;if(null!=k){var m=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*h:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*h;var n=p.getOutgoingEdges(p.model.getTerminal(d[0],
+!0));if(null!=n){for(var v=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<n.length;q++){var t=p.model.getTerminal(n[q],!1);if(f==l(t)){var B=p.view.getState(t);t!=a&&null!=B&&(v&&b!=B.getCenterX()<k.getCenterX()||!v&&b!=B.getCenterY()<k.getCenterY())&&mxUtils.intersects(m,B)&&(d=10+Math.max(d,(Math.min(m.x+m.width,B.x+B.width)-Math.max(m.x,B.x))/h),g=10+Math.max(g,(Math.min(m.y+m.height,B.y+B.height)-Math.max(m.y,B.y))/h))}}v?g=0:d=0;for(q=0;q<n.length;q++)if(t=p.model.getTerminal(n[q],
+!1),f==l(t)&&(B=p.view.getState(t),t!=a&&null!=B&&(v&&b!=B.getCenterX()<k.getCenterX()||!v&&b!=B.getCenterY()<k.getCenterY()))){var u=[];p.traverse(B.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});p.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function g(a){p.model.beginUpdate();try{var b=l(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);
+var e=p.model.getParent(a),f=e.geometry,g=[];p.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);p.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,h=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,h=-40):b==mxConstants.DIRECTION_WEST?(k=-40,h=0):b==mxConstants.DIRECTION_EAST&&(h=0);p.moveCells(g,k,h);return p.addCells(d,e)}finally{p.model.endUpdate()}}function h(a){p.model.beginUpdate();try{var b=
+p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,f=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=p.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var h=p.view.getBounds(f),m=l(a),n=p.view.translate,v=p.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/v-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/v-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==h?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(h.y+h.height)/v-n.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function n(a,
+b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=p.view.getState(p.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=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=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}var u=this,p=u.editor.graph,v=p.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&&
+(a.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};u.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),
+a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectDescendants",
+function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+T");var z=p.removeCells;p.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&c(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(p.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=p.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return z.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=p.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=p.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var k=t.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var h=p.getIncomingEdges(k[e]),g=p.getIncomingEdges(a[e]);if(0==h.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,p.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var w=p.moveCells;p.moveCells=function(a,c,d,e,f,g,k){var h=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var v=0;v<a.length;v++)if(b(a[v])||p.model.isEdge(a[v])&&null==p.model.getTerminal(a[v],!0)){f=p.model.getParent(a[v]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var q=p.getIncomingEdges(a[0]);if(0<q.length){var t=p.view.getState(p.model.getTerminal(q[0],!0));if(null!=t){var u=p.view.getState(l);null!=u&&(c=(u.getCenterX()-t.getCenterX())/p.view.scale,d=(u.getCenterY()-t.getCenterY())/p.view.scale)}}}}h=w.apply(this,arguments);
if(null!=h&&null!=a&&h.length==a.length)for(v=0;v<h.length;v++)if(this.model.isEdge(h[v]))b(l)&&0>mxUtils.indexOf(h,this.model.getTerminal(h[v],!0))&&this.model.setTerminal(h[v],l,!0);else if(b(a[v])&&(q=p.getIncomingEdges(a[v]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==p.getIncomingEdges(h[v]).length){m=l;if(null==m||m==p.model.getParent(a[v]))m=p.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,
-p.getDefaultParent(),m,h[v])}}finally{this.model.endUpdate()}return h};if(null!=t.sidebar){var G=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var g=p.model,f=null;g.beginUpdate();try{if(f=G.apply(this,arguments),b(a))for(var k=0;k<f.length;k++)if(g.isEdge(f[k])&&null==g.getTerminal(f[k],!0)){g.setTerminal(f[k],a,!0);var h=p.getCellGeometry(f[k]);h.points=null;null!=h.getTerminalPoint(!0)&&h.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return f}}var F={88:t.actions.get("selectChildren"),
-84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},A=t.onKeyDown;t.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var c=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(p.getSelectionCell()):h(p.getSelectionCell()):13==a.which&&(c=m(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&p.model.isEdge(c[0])?p.setSelectionCell(p.model.getTerminal(c[0],
-!1)):p.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(p.view.getState(p.getSelectionCell())),p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=F[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(p.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||A.apply(this,arguments)};var D=p.connectVertex;p.connectVertex=function(a,c,d,e,f,k){var l=p.getIncomingEdges(a);return b(a)&&0<l.length?(d=n(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?h(a):e==f?g(a):m(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):D.call(this,a,c,d,e,f,k)};p.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&p.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+p.getDefaultParent(),m,h[v])}}finally{this.model.endUpdate()}return h};if(null!=u.sidebar){var F=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=p.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var h=p.getCellGeometry(g[k]);h.points=null;null!=h.getTerminalPoint(!0)&&h.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:u.actions.get("selectChildren"),
+84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},x=u.onKeyDown;u.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var c=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?g(p.getSelectionCell()):h(p.getSelectionCell()):13==a.which&&(c=m(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&p.model.isEdge(c[0])?p.setSelectionCell(p.model.getTerminal(c[0],
+!1)):p.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(p.view.getState(p.getSelectionCell())),p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=D[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(p.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(G){console.log("error",G)}mxEvent.isConsumed(a)||x.apply(this,arguments)};var E=p.connectVertex;p.connectVertex=function(a,c,d,e,f,k){var n=p.getIncomingEdges(a);return b(a)&&0<n.length?(d=l(a),e=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?h(a):e==f?g(a):m(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):E.call(this,a,c,d,e,f,k)};p.getSubtree=function(a){var c=[a];b(a)&&!d(a)&&p.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var A=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){A.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
-this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var B=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
+this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");q.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);q.insertEdge(t,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");p.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-x.geometry.relative=!0;x.edge=!0;b.insertEdge(x,!0);p.insertEdge(x,!1);a.insert(d);a.insert(f);a.insert(t);a.insert(x);a.insert(b);a.insert(c);a.insert(e);a.insert(q);a.insert(p);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");q.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);q.insertEdge(u,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");p.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);p.insertEdge(v,!1);a.insert(d);a.insert(f);a.insert(u);a.insert(v);a.insert(b);a.insert(c);a.insert(e);a.insert(q);a.insert(p);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");l.geometry.relative=!0;l.edge=!0;c.insertEdge(l,!0);f.insertEdge(l,!1);a.insert(e);a.insert(l);a.insert(c);a.insert(d);a.insert(f);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(e,!0);d.insertEdge(e,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var n=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");n.geometry.relative=!0;n.edge=!0;c.insertEdge(n,!0);f.insertEdge(n,!1);a.insert(e);a.insert(n);a.insert(c);a.insert(d);a.insert(f);return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new e(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new e(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,
-b.container.clientHeight-30),function(b){function c(c,d){var g=a.menus.get(c),f=e.addMenu(d,mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));f.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";f.className="geTitle";b.appendChild(f);return f}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
-d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var g=document.createElement("span");
-g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";g=document.createElement("span");g.style.cssText="position:relative;top:6px;";
-mxUtils.write(g,mxResources.get("openLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
+b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
+d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");
+f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
+mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"!=urlParams.lightbox&&
"0"!=urlParams.chrome){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
-document.getElementsByTagName("head")[0].appendChild(c)}catch(p){}var e=function(a,b,c,d,e,g,f){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";f(a);this.window=new mxWindow(b,a,c,d,e,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+document.getElementsByTagName("head")[0].appendChild(c)}catch(v){}var e=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
@@ -8080,50 +8089,49 @@ Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>')
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(38,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=
5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.HIGHLIGHT_SIZE=5;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
-25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var f=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){f.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);
-var a=this.menus.get("save");null!=a&&a.setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):n.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,
-arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
-a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var g=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){g.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){f.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};var k=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):l.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;
+a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var g=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){g.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var h=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;h.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
-a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var l=
+a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var n=
EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
-(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);l.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
-function(a){q.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c,d){var e=f.menus.get(a),g=K.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing=
-"border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?(g.style.backgroundImage="url("+c+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function e(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";B.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
-"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),
-mxUtils.setOpacity(g,null!=f?10:20),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function g(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));B.appendChild(b);return b}
-t.apply(this,arguments);var f=this,k=this.editor.graph;mxUtils.bind(k,k.isEnabled);var h=document.createElement("div");h.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";h.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(h);f.actions.get("insertText").label=mxResources.get("text");f.actions.get("insertText").label=mxResources.get("text");f.actions.get("editDiagram").label=mxResources.get("formatXml")+
-"...";f.actions.get("insertRectangle").label=mxResources.get("rectangle");f.actions.get("insertEllipse").label=mxResources.get("ellipse");f.actions.get("insertRhombus").label=mxResources.get("rhombus");f.actions.get("insertImage").label=mxResources.get("image")+"...";f.actions.get("insertLink").label=mxResources.get("link")+"...";f.actions.get("createShape").label=mxResources.get("shape")+"...";f.actions.get("outline").label=mxResources.get("outline")+"...";f.actions.get("layers").label=mxResources.get("layers")+
-"...";f.actions.put("importFile",new Action("File...",function(){k.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&f.importFiles(a.files,null,null,f.maxImageSize)});a.click()}));f.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){k.popupMenuHandler.hideMenu();f.showImportCsvDialog()}));f.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
-new ParseDialog(f,"Insert from Text");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(f,"Insert from Text","formatSql");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(f,"Insert from Text","plantUml");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("toggleShapes",new Action(mxResources.get("shapes")+
-"...",function(){b(f)}));f.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(f)}));var l=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(f,c,d);f.showDialog(a.container,620,420,!0,!1);a.init()}),b)};f.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){f.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?f.menus.addMenuItems(a,"new open - save saveAs -".split(" "),
-b):"1"==urlParams.embed?(f.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&f.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(f.menus.addMenuItems(a,["new"],b),f.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),f.menus.addSubmenu("save",a,b));f.menus.addSubmenu("exportAs",a,b);var c=f.getCurrentFile();null!=c&&c.constructor==DriveFile&&(f.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&f.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));f.menus.addMenuItems(a,
-"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||f.menus.addMenuItems(a,["-","print","-"],b);f.menus.addSubmenu("help",a,b);"1"==urlParams.embed?f.menus.addMenuItems(a,["-","exit"],b):f.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var h=f.menus.get("openFrom"),m=h.funct;h.funct=function(a,b){m.apply(this,arguments);a.addSeparator(b);f.menus.addSubmenu("openRecent",a,b)}}f.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=f.getCurrentFile();
-null!=c&&c.constructor==DriveFile?f.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):f.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||f.menus.addMenuItems(a,["-","revisionHistory"],b);f.menus.addMenuItems(a,["-","autosave"],b)})));var n=f.menus.get("exportAs");f.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){n.funct(a,b);a.addSeparator(b);f.menus.addSubmenu("embed",a,b);
-f.menus.addMenuItems(a,["publishLink"],b)})));var q=f.menus.get("language");f.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&f.menus.addSubmenu("theme",a,b);null!=q&&f.menus.addSubmenu("language",a,b);a.addSeparator(b);f.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&f.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);f.isOfflineApp()||"1"==urlParams.embed||f.menus.addMenuItems(a,["-",
-"plugins"],b)})));f.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));f.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),
-b);f.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);f.menus.addSubmenu("insertLayout",a,b);f.menus.addSubmenu("insertAdvanced",a,b)})));var E="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");f.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<E.length;c++)"-"==E[c]?a.addSeparator(b):l(a,b,mxResources.get(E[c])+"...",E[c])})));f.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
-b)})));f.toolbar=f.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var B=document.createElement("div");B.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 K=new Menubar(f,B);(h=900>d)||c("diagram");g([h?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,e(mxResources.get("shapes"),f.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),f.actions.get("image"),h?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),e(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+")",f.actions.get("image"),
-h?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)]);var y=c("insert",!0,h?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);g([y,e(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),h?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)]);if(480<=d){var H=f.actions.get("undo"),h=f.actions.get("redo"),H=e("",H.funct,null,mxResources.get("undo")+" ("+H.shortcut+")",H,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),h=e("",h.funct,
-null,mxResources.get("redo")+" ("+h.shortcut+")",h,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");g([H,h]);if(560<=d){var h=f.actions.get("zoomIn"),H=f.actions.get("zoomOut"),C=f.actions.get("resetView");
-g([e("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&f.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",C,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=d?e("",h.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",h,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=d?e("",H.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",H,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null])}}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var J=f.descriptorChanged;f.descriptorChanged=function(){J.apply(this,arguments);var a=f.getCurrentFile();
-if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);B.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else B.removeAttribute("title")};f.setStatusText(f.editor.getStatus());B.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";B.appendChild(f.buttonContainer);f.menubarContainer=
-f.buttonContainer;null!=q&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(y=K.addMenu("",q.funct),y.setAttribute("title",mxResources.get("language")),y.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-y.style.backgroundPosition="center center",y.style.backgroundRepeat="no-repeat",y.style.backgroundSize="24px 24px",y.style.position="absolute",y.style.height="24px",y.style.width="24px",y.style.zIndex="1",y.style.top="11px",y.style.right="14px",mxUtils.setOpacity(y,30),B.appendChild(y));f.tabContainer=document.createElement("div");f.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
-h=f.diagramContainer.parentNode;H=document.createElement("div");H.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";C=f.menus.get("viewZoom");if(null!=C){this.tabContainer.style.right="70px";y=K.addMenu("100%",C.funct);y.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");y.style.whiteSpace="nowrap";y.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";y.style.backgroundPosition=
-"right 6px center";y.style.backgroundRepeat="no-repeat";y.style.paddingRight="10px";y.style.display="block";y.style.position="absolute";y.style.textDecoration="none";y.style.textDecoration="none";y.style.right="0px";y.style.bottom="0px";y.style.overflow="hidden";y.style.textAlign="center";y.style.color="#000";y.style.fontSize="12px";y.style.color="#707070";y.style.width="59px";y.style.borderTop="1px solid lightgray";y.style.borderLeft="1px solid lightgray";y.style.height=parseInt(f.tabContainer.style.height)-
-1+"px";y.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";H.appendChild(y);C=mxUtils.bind(this,function(){y.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,C);f.editor.addListener("resetGraphView",C);f.editor.addListener("pageSelected",C);var P=f.setGraphEnabled;f.setGraphEnabled=function(){P.apply(this,arguments);null!=this.tabContainer&&(y.style.visibility=this.tabContainer.style.visibility)}}H.appendChild(f.tabContainer);
-H.appendChild(B);H.appendChild(f.diagramContainer);h.appendChild(H);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.actions.outlineWindow.window.fit();null!=f.actions.layersWindow&&f.actions.layersWindow.window.fit();null!=f.menus.tagsWindow&&f.menus.tagsWindow.window.fit();null!=f.menus.findWindow&&f.menus.findWindow.window.fit()})}}};
+(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);n.apply(this,arguments)};var q=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
+function(a){q.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var u=Menus.prototype.init;Menus.prototype.init=function(){u.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("insertText").label=mxResources.get("text");c.actions.get("insertText").label=mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("formatXml")+
+"...";c.actions.get("insertRectangle").label=mxResources.get("rectangle");c.actions.get("insertEllipse").label=mxResources.get("ellipse");c.actions.get("insertRhombus").label=mxResources.get("rhombus");c.actions.get("insertImage").label=mxResources.get("image")+"...";c.actions.get("insertLink").label=mxResources.get("link")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+
+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&c.importFiles(a.files,null,null,c.maxImageSize)});a.click()}));c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
+new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&c.actions.put("plantUml",
+new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){c.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,
+["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime&&c.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,
+["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],
+b):c.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b);c.menus.addMenuItems(a,["publishLink"],b)})));var k=this.get("language");this.put("preferences",new Menu(mxUtils.bind(this,
+function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=k&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);c.isOfflineApp()||"1"==urlParams.embed||c.menus.addMenuItems(a,["-","plugins"],b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var h="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<h.length;c++)"-"==h[c]?a.addSeparator(b):l(a,b,mxResources.get(h[c])+"...",h[c])})));this.put("options",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
+b)})))};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=f.menus.get(a),g=k.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?
+(g.style.backgroundImage="url("+c+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");
+h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";g.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&
+b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";
+b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));g.appendChild(b);return b}p.apply(this,arguments);var e=document.createElement("div");e.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";e.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(e);var f=this;f.toolbar=this.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var k=new Menubar(f,g);(e=900>d)||a("diagram");c([e?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),
+f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+
+")",f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var h=a("insert",!0,e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([h,b(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=d){var l=f.actions.get("undo"),e=f.actions.get("redo"),l=b("",l.funct,null,mxResources.get("undo")+" ("+l.shortcut+")",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),e=b("",e.funct,
+null,mxResources.get("redo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");c([l,e]);if(560<=d){var e=f.actions.get("zoomIn"),l=f.actions.get("zoomOut"),m=f.actions.get("resetView");
+c([b("",function(){graph.popupMenuHandler.hideMenu();var a=graph.view.scale,b=graph.view.translate.x,c=graph.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-graph.view.scale)&&b==graph.view.translate.x&&c==graph.view.translate.y&&f.actions.get(graph.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=d?b("",e.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=d?b("",l.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var n=f.descriptorChanged;f.descriptorChanged=function(){n.apply(this,arguments);var a=f.getCurrentFile();
+if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);g.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else g.removeAttribute("title")};f.setStatusText(f.editor.getStatus());g.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";g.appendChild(f.buttonContainer);f.menubarContainer=
+f.buttonContainer;e=this.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(h=k.addMenu("",e.funct),h.setAttribute("title",mxResources.get("language")),h.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.position="absolute",h.style.height="24px",h.style.width="24px",h.style.zIndex="1",h.style.top="11px",h.style.right="14px",mxUtils.setOpacity(h,30),g.appendChild(h));f.tabContainer=document.createElement("div");f.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+e=f.diagramContainer.parentNode;l=document.createElement("div");l.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";m=f.menus.get("viewZoom");if(null!=m){this.tabContainer.style.right="70px";h=k.addMenu("100%",m.funct);h.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");h.style.whiteSpace="nowrap";h.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";h.style.backgroundPosition=
+"right 6px center";h.style.backgroundRepeat="no-repeat";h.style.paddingRight="10px";h.style.display="block";h.style.position="absolute";h.style.textDecoration="none";h.style.textDecoration="none";h.style.right="0px";h.style.bottom="0px";h.style.overflow="hidden";h.style.textAlign="center";h.style.color="#000";h.style.fontSize="12px";h.style.color="#707070";h.style.width="59px";h.style.borderTop="1px solid lightgray";h.style.borderLeft="1px solid lightgray";h.style.height=parseInt(f.tabContainer.style.height)-
+1+"px";h.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";l.appendChild(h);m=mxUtils.bind(this,function(){h.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,m);f.editor.addListener("resetGraphView",m);f.editor.addListener("pageSelected",m);var q=f.setGraphEnabled;f.setGraphEnabled=function(){q.apply(this,arguments);null!=this.tabContainer&&(h.style.visibility=this.tabContainer.style.visibility)}}l.appendChild(f.tabContainer);
+l.appendChild(g);l.appendChild(f.diagramContainer);e.appendChild(l);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.actions.outlineWindow.window.fit();null!=f.actions.layersWindow&&f.actions.layersWindow.window.fit();null!=f.menus.tagsWindow&&f.menus.tagsWindow.window.fit();null!=f.menus.findWindow&&f.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();
diff --git a/src/main/webapp/js/atlas-viewer.min.js b/src/main/webapp/js/atlas-viewer.min.js
index 26de09e9..f423537b 100644
--- a/src/main/webapp/js/atlas-viewer.min.js
+++ b/src/main/webapp/js/atlas-viewer.min.js
@@ -1982,14 +1982,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,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){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],t=0;t<e.length;t++)(k.isVertex(e[t])||k.isEdge(e[t]))&&null!=a.view.getState(e[t])&&
-q.push(e[t]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+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){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),p=[],v=0;v<e.length;v++)(k.isVertex(e[v])||k.isEdge(e[v]))&&null!=a.view.getState(e[v])&&
+p.push(e[v]);a.setSelectionCells(p)};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,c,k,l,n,q){var t=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(t=80);e+=t;c+=t;var d=e,g=c,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),r=Math.max(1,Math.round((f-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,f-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=f+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var h=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=h.x+"px";this.bg.style.top=h.y+"px";p+=h.x;r+=h.y;k&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");k=this.getPosition(p,r,
-e,c);p=k.x;r=k.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=p+"px";w.style.top=r+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=r+14+"px",l.style.left=p+e+38-t+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",
-mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){f=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=f+"px";p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));r=Math.max(1,Math.round((f-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
-Math.min(g,f-64);var h=this.getPosition(p,r,e,c);p=h.x;r=h.y;w.style.left=p+"px";w.style.top=r+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=r+14+"px",this.dialogImg.style.left=p+e+38-t+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+function Dialog(a,b,e,c,k,l,q,p){var v=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(v=80);e+=v;c+=v;var d=e,f=c,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),r=Math.max(1,Math.round((g-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&
+(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var h=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=h.x+"px";this.bg.style.top=h.y+"px";n+=h.x;r+=h.y;k&&document.body.appendChild(this.bg);var m=a.createDiv("geDialog");k=this.getPosition(n,r,
+e,c);n=k.x;r=k.y;m.style.width=e+"px";m.style.height=c+"px";m.style.left=n+"px";m.style.top=r+"px";m.style.zIndex=this.zIndex;m.appendChild(b);document.body.appendChild(m);!p&&b.clientHeight>m.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=r+14+"px",l.style.left=n+e+38-v+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",
+mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));r=Math.max(1,Math.round((g-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
+Math.min(f,g-64);var h=this.getPosition(n,r,e,c);n=h.x;r=h.y;m.style.left=n+"px";m.style.top=r+"px";m.style.width=e+"px";m.style.height=c+"px";!p&&b.clientHeight>m.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=r+14+"px",this.dialogImg.style.left=n+e+38-v+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=m;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";
@@ -2000,66 +2000,66 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,p=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var r=q.checked?1:parseInt(g.value);isNaN(r)||(m=mxUtils.getScaleForPageCount(r,e,p))}e.getGraphBounds();var k=r=0,p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*b);p.height=Math.ceil(p.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),r-=b.x*p.width,k-=b.y*p.height):
-c=!0;c=PrintDialog.createPrintPreview(e,m,p,0,r,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage"));
-k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(k);n.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t,
-"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);n.appendChild(c);mxEvent.addListener(d,"change",
-function(){d.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!d.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);n.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";k.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst||
-k.appendChild(t);c.appendChild(k);n.appendChild(c);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,e,c,k,l,n){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+PrintDialog.prototype.create=function(a){function b(a){var c=p.checked||d.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(c){var t=p.checked?1:parseInt(f.value);isNaN(t)||(r=mxUtils.getScaleForPageCount(t,e,n))}e.getGraphBounds();var x=t=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);r*=b;!c&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*n.width,x-=b.y*n.height):
+c=!0;c=PrintDialog.createPrintPreview(e,r,n,0,t,x,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var q=document.createElement("tbody");c=document.createElement("tr");var p=document.createElement("input");p.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(p);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage"));
+k.appendChild(v);mxEvent.addListener(v,"click",function(a){p.checked=!p.checked;d.checked=!p.checked;mxEvent.consume(a)});mxEvent.addListener(p,"change",function(){d.checked=!p.checked});c.appendChild(k);q.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v,
+"click",function(a){d.checked=!d.checked;p.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);q.appendChild(c);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");p.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);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");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&k.appendChild(v);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
+k.appendChild(v);c.appendChild(k);q.appendChild(c);l.appendChild(q);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,e,c,k,l,q){b=new mxPrintPreview(a,b,e,c,k,l);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 p=b.writeHead;b.writeHead=function(a){p.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=g,d.style.backgroundImage="")}function e(){null==r?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",r.src),p.style.fontSize="11px",p.innerHTML=r.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,n=document.createElement("table");n.style.width=
-"100%";n.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
-mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var g=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(d)});
-l.appendChild(d);mxUtils.write(l,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();l.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
-":");k.appendChild(l);l=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var r=c.backgroundImage;mxEvent.addListener(p,"click",function(d){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(d)});e();l.appendChild(p);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var d=new ChangePageSetup(a,g,r,t.get());d.ignoreColor=c.background==g;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=r?r.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
-d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";l.appendChild(w);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);n.appendChild(q);this.container=n};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||f!=document.activeElement&&p!=document.activeElement){a=!1;for(d=0;d<h.length;d++)c=h[d],v?"custom"==c.key&&(q.value=c.key,v=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
-e.height==c.format.height?(q.value=c.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(q.value=c.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,a=n.checked=!0));a?(t.style.display="",g.style.display="none"):(f.value=e.width/100,p.value=e.height/100,l.setAttribute("checked","checked"),
-q.value="custom",t.style.display="none",g.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";
-t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);n.style.marginLeft="10px";n.style.marginRight="6px";t.appendChild(n);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));t.appendChild(d);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";g.appendChild(f);mxUtils.write(g," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";g.appendChild(p);mxUtils.write(g," in");t.style.display="none";g.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),w=0;w<h.length;w++){var u=h[w];r[u.key]=u;var m=document.createElement("option");m.setAttribute("value",u.key);mxUtils.write(m,u.title);q.appendChild(m)}var v=!1;k();a.appendChild(q);mxUtils.br(a);
-a.appendChild(t);a.appendChild(g);var D=e,F=function(a,d){var b=r[q.value];null!=b.format?(f.value=b.format.width/100,p.value=b.format.height/100,g.style.display="none",t.style.display=""):(t.style.display="none",g.style.display="");isNaN(parseFloat(f.value))&&(f.value=e.width/100);isNaN(parseFloat(p.value))&&(p.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(p.value)));"custom"!=q.value&&n.checked&&(b=new mxRectangle(0,0,b.height,b.width));
-d&&v||b.width==D.width&&b.height==D.height||(D=b,null!=c&&c(D))};mxEvent.addListener(b,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){n.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",F);mxEvent.addListener(f,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(n,"change",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(q,"change",function(a){v="custom"==q.value;F(a,!0)});F();
-return{set:function(a){e=a;k(null,null,!0)},get:function(){return D},widthInput:f,heightInput:p}};
+var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function e(){null==r?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",r.src),n.style.fontSize="11px",n.innerHTML=r.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,q=document.createElement("table");q.style.width=
+"100%";q.style.height="100%";var p=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
+mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var f=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(d)});
+l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=c.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
+":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var r=c.backgroundImage;mxEvent.addListener(n,"click",function(d){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(d)});e();l.appendChild(n);k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==g.value&&c.setGridSize(parseInt(g.value));var d=new ChangePageSetup(a,f,r,v.get());d.ignoreColor=c.background==f;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=r?r.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
+d.ignoreColor&&d.ignoreImage||c.model.execute(d)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);p.appendChild(k);q.appendChild(p);this.container=q};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||g!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<h.length;d++)c=h[d],t?"custom"==c.key&&(p.value=c.key,t=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
+e.height==c.format.height?(p.value=c.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(p.value=c.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(v.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
+p.value="custom",v.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var p=document.createElement("select");p.style.marginBottom="8px";p.style.width="202px";var v=document.createElement("div");v.style.marginLeft="4px";v.style.width="210px";
+v.style.height="24px";l.style.marginRight="6px";v.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));v.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";v.appendChild(q);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));v.appendChild(d);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
+g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");v.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var u=h[m];r[u.key]=u;var w=document.createElement("option");w.setAttribute("value",u.key);mxUtils.write(w,u.title);p.appendChild(w)}var t=!1;k();a.appendChild(p);mxUtils.br(a);
+a.appendChild(v);a.appendChild(f);var x=e,F=function(a,d){var b=r[p.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",v.style.display=""):(v.style.display="none",f.style.display="");isNaN(parseFloat(g.value))&&(g.value=e.width/100);isNaN(parseFloat(n.value))&&(n.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=p.value&&q.checked&&(b=new mxRectangle(0,0,b.height,b.width));
+d&&t||b.width==x.width&&b.height==x.height||(x=b,null!=c&&c(x))};mxEvent.addListener(b,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){q.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",F);mxEvent.addListener(g,"click",F);mxEvent.addListener(n,"blur",F);mxEvent.addListener(n,"click",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(p,"change",function(a){t="custom"==p.value;F(a,!0)});F();
+return{set:function(a){e=a;k(null,null,!0)},get:function(){return x},widthInput:g,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(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),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),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,d=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",b="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(b=unescape(encodeURIComponent(this.createSvgGrid(d))),b=window.btoa?btoa(b):Base64.encode(b,!0),b="url(data:image/svg+xml;base64,"+b+")",f=a.gridSize*this.scale*this.gridSteps):
-b="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-e,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
-c,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=c,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],f=1;f<this.gridSteps;f++){var e=f*c;b.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",b="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(b=unescape(encodeURIComponent(this.createSvgGrid(d))),b=window.btoa?btoa(b):Base64.encode(b,!0),b="url(data:image/svg+xml;base64,"+b+")",g=a.gridSize*this.scale*this.gridSteps):
+b="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-d,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
+c,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=g,d.style.backgroundColor=c,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],g=1;g<this.gridSteps;g++){var e=g*c;b.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+
d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+c,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+b,g))+"px";d.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,f=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();c=h.width;d=h.height;var w=
-new mxRectangle(b*f.x,b*f.y,e.width*r,e.height*r),u=(a=a&&Math.min(w.width,w.height)>this.minPageBreakDist)?Math.ceil(d/w.height)-1:0,m=a?Math.ceil(c/w.width)-1:0,v=h.x+c,k=h.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<m&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:m,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*w.height)),
-new mxPoint(Math.round(v),Math.round(h.y+(c+1)*w.height))]:[new mxPoint(Math.round(h.x+(c+1)*w.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*w.width),Math.round(k))];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,d){for(var g=0;g<c.length;g++)if(this.graph.getModel().isVertex(c[g])){var f=this.graph.getCellGeometry(c[g]);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,d){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,f=this.graph.pageScale,e=b.width*f,b=b.height*f,f=Math.floor(Math.min(0,c)/e),r=Math.floor(Math.min(0,
-d)/b);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-f)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-r)*b)};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,d,b,f,e){var g=k.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),f=c.getParent(b);
-if(null==d||d!=b&&d!=f)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(f)&&c.isVertex(f)&&!this.graph.isContainer(f);)b=f,f=this.graph.getModel().getParent(b);return b};var n=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=n.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),f=b.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&b.isVertex(f)){d=!0;break}f=b.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+c,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();c=h.width;d=h.height;var m=
+new mxRectangle(b*g.x,b*g.y,e.width*r,e.height*r),u=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(d/m.height)-1:0,w=a?Math.ceil(c/m.width)-1:0,t=h.x+c,x=h.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:w,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*m.height)),
+new mxPoint(Math.round(t),Math.round(h.y+(c+1)*m.height))]:[new mxPoint(Math.round(h.x+(c+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*m.width),Math.round(x))];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,d){for(var f=0;f<c.length;f++)if(this.graph.getModel().isVertex(c[f])){var g=this.graph.getCellGeometry(c[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){return this.isConnecting()?
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,g=this.graph.pageScale,e=b.width*g,b=b.height*g,g=Math.floor(Math.min(0,c)/e),r=Math.floor(Math.min(0,
+d)/b);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-r)*b)};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,d,b,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),g=c.getParent(b);
+if(null==d||d!=b&&d!=g)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(g)&&c.isVertex(g)&&!this.graph.isContainer(g);)b=g,g=this.graph.getModel().getParent(b);return b};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=q.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),g=b.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&b.isVertex(g)){d=!0;break}g=b.getParent(g)}return d};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var d=this.graph.view.getState(c);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),b=d.getParent(c);!this.graph.isCellSelected(b)&&d.isVertex(b);)c=b,b=d.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),d=c.getParent(a);c.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&
(a=d),d=c.getParent(d);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;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();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var 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 l=!1,n=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||n.apply(this,arguments)};this.keydownHandler=
-mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return t.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 d=!1,g=null,f=null,p=null,r=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 h=0;h<p.length;h++)this.toolbar.container.appendChild(p[h]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
-f}d=c.cellEditor.isContentEditing();g=a;f=e;p=b}}),h=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this,arguments);r();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!=h.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+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 l=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||q.apply(this,arguments)};this.keydownHandler=
+mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var p=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
+function(a){return p.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var v=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return v.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 d=!1,f=null,g=null,n=null,r=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==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
+g}d=c.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,m=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){m.apply(this,arguments);r();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!=h.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
b.substring(0,b.length-1));h.toolbar.setFontName(b);h.toolbar.setFontSize(parseInt(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 u=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){u.apply(this,arguments);r()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";
-if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(B){}var m=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();m.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 v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),D="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],g=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),g.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],h=0;h<e.length;h++){var m=e[h],
-p=m.indexOf("=");0<=p&&(f=m.substring(0,p),m=m.substring(p+1),null!=a[f]&&"none"==m&&(b.push(m),g.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=
-["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)v.push(H[a][b]);for(a=0;a<D.length;a++)0>mxUtils.indexOf(v,D[a])&&v.push(D[a]);var y=function(a,d){var b=c.getModel();
-b.beginUpdate();try{if(d)for(var f=b.isEdge(m),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&c.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var m=a[h],p=b.getStyle(m),r=null!=p?p.split(";"):[],O=v.slice(),e=0;e<r.length;e++){var u=r[e],w=u.indexOf("=");if(0<=w){var k=u.substring(0,w),G=mxUtils.indexOf(O,k);0<=G&&O.splice(G,1);for(var q=0;q<H.length;q++){var l=H[q];if(0<=mxUtils.indexOf(l,k))for(var n=0;n<
-l.length;n++){var F=mxUtils.indexOf(O,l[n]);0<=F&&O.splice(F,1)}}}}for(var g=(f=b.isEdge(m))?c.currentEdgeStyle:c.currentVertexStyle,t=b.getStyle(m),e=0;e<O.length;e++){var k=O[e],B=g[k];null==B||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(D,k))||(t=mxUtils.setStyle(t,k,B))}b.setStyle(m,t)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){y(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){y(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));y(b)});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"),h=d.getProperty("values"),e=0;e<b.length;e++){var m=0<=mxUtils.indexOf(F,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
-h[e])if(0<=mxUtils.indexOf(D,b[e]))g||0<=mxUtils.indexOf(G,b[e])?null==h[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(v,b[e])&&(null==h[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(v,b[e])){if(f||m)null==h[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=h[e];if(g||m||0<=mxUtils.indexOf(G,b[e]))null==h[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||
+if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(y){}var w=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.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 t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],g=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),g.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],n=0;n<e.length;n++){var h=e[n],
+m=h.indexOf("=");0<=m&&(f=h.substring(0,m),h=h.substring(m+1),null!=a[f]&&"none"==h&&(b.push(h),g.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=
+["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),G=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<G.length;a++)for(b=0;b<G[a].length;b++)t.push(G[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(t,x[a])&&t.push(x[a]);var B=function(a,d){var b=c.getModel();
+b.beginUpdate();try{if(d)for(var f=b.isEdge(h),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var n=g[f[e]];null!=n&&c.setCellStyles(f[e],n,a)}else for(n=0;n<a.length;n++){for(var h=a[n],m=b.getStyle(h),u=null!=m?m.split(";"):[],r=t.slice(),e=0;e<u.length;e++){var w=u[e],k=w.indexOf("=");if(0<=k){var D=w.substring(0,k),p=mxUtils.indexOf(r,D);0<=p&&r.splice(p,1);for(var F=0;F<G.length;F++){var l=G[F];if(0<=mxUtils.indexOf(l,D))for(var q=0;q<
+l.length;q++){var y=mxUtils.indexOf(r,l[q]);0<=y&&r.splice(y,1)}}}}for(var g=(f=b.isEdge(h))?c.currentEdgeStyle:c.currentVertexStyle,v=b.getStyle(h),e=0;e<r.length;e++){var D=r[e],B=g[D];null==B||"shape"==D&&!f||f&&!(0>mxUtils.indexOf(x,D))||(v=mxUtils.setStyle(v,D,B))}b.setStyle(h,v)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){B(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){B(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));B(b)});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"),n=d.getProperty("values"),e=0;e<b.length;e++){var h=0<=mxUtils.indexOf(F,b[e]);if("strokeColor"!=b[e]||null!=n[e]&&"none"!=
+n[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(D,b[e])?null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null==n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||h)null==n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e];if(g||h||0<=mxUtils.indexOf(D,b[e]))null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[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=
@@ -2081,25 +2081,25 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=
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()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var c=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),h=a.view.translate,m=a.view.scale,p=mxRectangle.fromRectangle(g);
-p.x=p.x/m-h.x;p.y=p.y/m-h.y;p.width/=m;p.height/=m;var h=a.container.scrollTop,r=a.container.scrollLeft,u=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)u+=3;var v=a.container.offsetWidth-u,u=a.container.offsetHeight-u;d=d?Math.max(.3,Math.min(b||1,v/p.width)):m;b=(v-d*p.width)/2/d;var w=0==this.lightboxVerticalDivider?0:(u-d*p.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),w=Math.max(w,0));if(e||g.width<v||g.height<u)a.view.scaleAndTranslate(d,
-Math.floor(b-p.x),Math.floor(w-p.y)),a.container.scrollTop=h*d/m,a.container.scrollLeft=r*d/m;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/m),Math.floor(g.y+f/m))}});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",
+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){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),n=a.view.translate,h=a.view.scale,m=mxRectangle.fromRectangle(g);
+m.x=m.x/h-n.x;m.y=m.y/h-n.y;m.width/=h;m.height/=h;var n=a.container.scrollTop,u=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var t=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,t/m.width)):h;b=(t-d*m.width)/2/d;var w=0==this.lightboxVerticalDivider?0:(r-d*m.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),w=Math.max(w,0));if(e||g.width<t||g.height<r)a.view.scaleAndTranslate(d,
+Math.floor(b-m.x),Math.floor(w-m.y)),a.container.scrollTop=n*d/h,a.container.scrollLeft=u*d/h;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/h),Math.floor(g.y+f/h))}});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){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace=
"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);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",k);k();var l=0,k=mxUtils.bind(this,function(a,d,b){l++;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}),n=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(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&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",n.style.display="",q.style.display="inline-block"):(t.style.display="none",n.style.display=
-"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",d);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(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 f=null,p=null,r=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=
-null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),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 w=k(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=w.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(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){w.style.display=1<u.getChildCount(u.root)?
+return c}),q=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.fontFamily="Helvetica,Arial";p.style.marginTop="8px";p.style.color="#ffffff";this.chromelessToolbar.appendChild(p);var v=k(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&&(p.innerHTML="",mxUtils.write(p,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});q.style.paddingLeft="0px";q.style.paddingRight="4px";v.style.paddingLeft="4px";v.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(v.style.display="",q.style.display="",p.style.display="inline-block"):(v.style.display="none",q.style.display=
+"none",p.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);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(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,n=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n=
+null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=k(mxUtils.bind(this,function(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=m.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){m.style.display=1<u.getChildCount(u.root)?
"":"none"})}this.addChromelessToolbarItems(k);null!=this.editor.editButtonLink&&k(mxUtils.bind(this,function(d){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||h(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var m=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)<m&&Math.abs(this.scrollTop-a.container.scrollTop)<m&&Math.abs(this.startX-b.getGraphX())<m&&Math.abs(this.startY-b.getGraphY())<m&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}v.apply(this,arguments)};var D=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?D.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),
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var w=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)<w&&Math.abs(this.scrollTop-a.container.scrollTop)<w&&Math.abs(this.startX-b.getGraphX())<w&&Math.abs(this.startY-b.getGraphY())<w&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var t=
+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}t.apply(this,arguments)};var x=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?x.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)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var F=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=F&&(c=a.container.offsetWidth/2-F.x+d.x,f=a.container.offsetHeight/2-F.y+d.y);d=this.view.scale;
this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(d))for(var c=
@@ -2128,18 +2128,18 @@ EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this
EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),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 l=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,b){l.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 l=0;l<k.length;l++){var n=k[l];a.getModel().isEdge(n)&&(c=!0);a.getModel().isVertex(n)&&(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 dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var q=k[l];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 dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("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.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 l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&!mxClient.IS_QUIRKS&&(n+=1);var q=0;if(null!=this.sidebarFooterContainer){var t=
-this.footerHeight+k,q=Math.max(0,Math.min(c-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=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 p=0;if(null!=this.sidebarFooterContainer){var v=
+this.footerHeight+k,p=Math.max(0,Math.min(c-q-v,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=v+"px"}v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=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",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=
+b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-p+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-v)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,p=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",p-=this.tabContainer.clientHeight),this.diagramContainer.style.height=p+"px",this.hsplit.style.height=p+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=v+"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+p+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=
@@ -2149,8 +2149,8 @@ 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,c){function k(a){if(null!=n){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?f.x-n.x:n.y-f.y)-e));mxEvent.consume(a);q!=g()&&(t=!0,d=null)}}function l(a){k(a);n=q=null}var n=null,q=null,t=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=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){n=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=g();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!t){var b=null!=d?d-e:0;d=g();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,n){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,n);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=q){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,p+(b?g.x-q.x:q.y-g.y)-e));mxEvent.consume(a);p!=f()&&(v=!0,d=null)}}function l(a){k(a);q=p=null}var q=null,p=null,v=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=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));p=f();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!v){var b=null!=d?d-e:0;d=f();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,q){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,q);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),mxUtils.clearSelection(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(k.container,230,430,!0,!1);k.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})};
@@ -2160,17 +2160,17 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
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&&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(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var n=new Image;n.onload=function(){e(l,n.width,n.height)};n.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};n.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var q=new Image;q.onload=function(){e(l,q.width,q.height)};q.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.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.createKeyHandler=function(a){function b(a,d,b){n.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 f=
-c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-n.length){c.getModel().beginUpdate();try{for(var a=0;a<n.length;a++)n[a]();n=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var n=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,g={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),
-76:this.actions.get("editLink"),80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var f=g[a.keyCode];if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=t[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
-c.connectVertex(c.getSelectionCell(),t[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 d.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 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.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,
+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 f=
+c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=p&&window.clearTimeout(p);p=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()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],p=null,v={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,f={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),
+76:this.actions.get("editLink"),80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var g=f[a.keyCode];if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=v[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
+c.connectVertex(c.getSelectionCell(),v[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 d.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 g=k.escape;k.escape=function(a){g.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(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);k.bindAction(112,!1,"about");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(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,
"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,
"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",
@@ -2181,32 +2181,32 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
Graph=function(a,b,e,c,k){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,n=null,q=null,t=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)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,n=c,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=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!=l&&null!=q&&null!=n){if(c=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(n),h=this.view.getEdgeStyle(c);f=h==mxEdgeStyle.EntityRelation;d||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),t=l=n=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,q=null,p=null,v=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)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),p=f,q=c,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?v=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(v=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!=l&&null!=p&&null!=q){if(c=p,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(q),h=this.view.getEdgeStyle(c);f=h==mxEdgeStyle.EntityRelation;d||v!=mxEvent.LABEL_HANDLE||(e=v);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=v,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),v=l=q=p=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)h=this.view.getEdgeStyle(c),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(h=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){t=l=n=q=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 g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,f=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),m=0;m<h.width;m++)d.push(new mxRectangle(((h.x+m)*f+c.x)*e,(h.y*b+c.y)*e,f*e,b*e));for(m=0;m<h.height;m++)d.push(new mxRectangle((h.x*f+c.x)*e,((h.y+m)*b+c.y)*e,f*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){v=l=q=p=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,g=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)d.push(new mxRectangle(((h.x+n)*g+c.x)*e,(h.y*b+c.y)*e,g*e,b*e));for(n=0;n<h.height;n++)d.push(new mxRectangle((h.x*g+c.x)*e,((h.y+n)*b+c.y)*e,g*e,b*e));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)};this.graphHandler.getCells=function(a){for(var d=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),f=null!=f?f.style:this.graph.getCellStyle(d[c]);
-"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this);
-this.getRubberband=function(){return f};var p=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),r=0):r=(new Date).getTime()-p};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&w.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var m=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return m.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var D=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 D.apply(this,
+"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);
+this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),r=0):r=(new Date).getTime()-n};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&m.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var t=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(t=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=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 x.apply(this,
arguments);d=d?a.sourceState.cell:a.getCell();if(null!=d){var b=this.getLinkForCell(d);null!=b&&(this.isPageLink(b)?this.pageLinkClicked(d,b):this.openLink(b))}};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 F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
-this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.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,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),h=a+b,m=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var p=e.getChildCount(f),O=0;O<p;O++){var r=e.getChildAt(f,O),
-u=this.view.getState(r);if(null!=u&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var v=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(u=mxUtils.getBoundingBox(u,v));(e.isEdge(r)||e.isVertex(r))&&u.x>=a&&u.y+u.height<=m&&u.y>=d&&u.x+u.width<=h&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var G=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:G.apply(this,
-arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();H=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,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)),f.start(b.x,b.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);H=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 y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
+this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.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,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),h=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),u=0;u<m;u++){var r=e.getChildAt(f,u),
+t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var w=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=w&&(t=mxUtils.getBoundingBox(t,w));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=d&&t.x+t.width<=h&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:D.apply(this,
+arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();G=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,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)),g.start(b.x,b.y)):null!=G?this.addSelectionCells(G):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);G=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 B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,n=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,n,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,q=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),p=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),v=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,q,p,v);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(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){var e=window;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 c=a.split("#")[1];window.location.hash=="#"+c&&(window.location.hash="");window.location.hash=c}else e=window.open(a,b);return e};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,b){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",b))};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)};
@@ -2222,29 +2222,29 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,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 c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,n=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 q=e?"getUTC":"get",t=a[q+"Date"](),d=a[q+"Day"](),g=a[q+"Month"](),f=a[q+"FullYear"](),p=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),u={d:t,dd:n(t),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:g+1,mm:n(g+1),mmm:c.i18n.monthNames[g],mmmm:c.i18n.monthNames[g+
-12],yy:String(f).slice(2),yyyy:f,h:p%12||12,hh:n(p%12||12),H:p,HH:n(p),M:r,MM:n(r),s:h,ss:n(h),l:n(q,3),L:n(99<q?Math.round(q/10):q),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<w?"-":"+")+n(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[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,l=/[^-+\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 p=e?"getUTC":"get",v=a[p+"Date"](),d=a[p+"Day"](),f=a[p+"Month"](),g=a[p+"FullYear"](),n=a[p+"Hours"](),r=a[p+"Minutes"](),h=a[p+"Seconds"](),p=a[p+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),u={d:v,dd:q(v),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:f+1,mm:q(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:q(n%12||12),H:n,HH:q(n),M:r,MM:q(r),s:h,ss:q(h),l:q(p,3),L:q(99<p?Math.round(p/10):p),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+q(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%60,4),S:["th","st","nd","rd"][3<v%10?0:(10!=v%100-v%10)*v%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[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),c=0;c<e;c++)(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 q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(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 l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var n=k.substring(1,k.length-1);if(0>n.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(n)?null!=q.getAttribute(n)?q.getAttribute(n):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(c,
+!0);e.appendChild(k);var p=c.value||mxResources.get("background")||"Background";e.setAttribute("title",p);mxUtils.write(e,p);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 l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var p=a;null==l&&null!=p;)null!=p.value&&"object"==typeof p.value&&(l=p.hasAttribute(q)?null!=p.getAttribute(q)?p.getAttribute(q):"":null),p=this.model.getParent(p);null==l&&(l=this.getGlobalVariable(q))}e.push(b.substring(c,
match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var n=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?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,t=this.view.translate,d=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(d=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+n.x*q,t+n.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
-null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var d=a,g=this.getCellGeometry(a);null!=
-g&&g.relative;)d=this.getModel().getParent(d),g=this.getCellGeometry(d);var f=this.view.getState(d),p=null!=f?f.style:this.getCellStyle(d);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(d);this.model.isVertex(r)&&(d=r)}q=this.duplicateCells([d],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=n.x-g.width/2,g.y=n.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=g&&g.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,h,w))}null==l&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,
-q,w));null!=h&&e.push(h);null==l&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(n,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!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 p=this.view.scale,v=this.view.translate,d=v.x*p,v=v.y*p;this.model.isVertex(e.cell)&&(d=e.x,v=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+q.x*p,v+q.y*p);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),p=this.view.getState(l),null!=e&&null!=p&&mxUtils.intersects(e,p)&&(l=
+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==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{p=l;if(null==p&&k){for(var d=a,f=this.getCellGeometry(a);null!=
+f&&f.relative;)d=this.getModel().getParent(d),f=this.getCellGeometry(d);var g=this.view.getState(d),n=null!=g?g.style:this.getCellStyle(d);if(mxUtils.getValue(n,"part",!1)){var r=this.model.getParent(d);this.model.isVertex(r)&&(d=r)}p=this.duplicateCells([d],!1)[0];f=this.getCellGeometry(p);null!=f&&(f.x=q.x-f.width/2,f.y=q.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=f&&f.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,p,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(m=c.parent.getIndex(c),this.model.add(c.parent,h,m))}null==l&&null!=p&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
+p,m));null!=h&&e.push(h);null==l&&null!=p&&e.push(p);null==p&&null!=h&&h.geometry.setTerminalPoint(q,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,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){if(null!=a.value&&"object"==typeof a.value){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 a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var 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){return mxEvent.isShiftDown(a)};
-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 l=0;l<e.length;l++){var n=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=n&&null!=q){var t=Math.round(q.width-n.width/this.view.scale),d=Math.round(q.height-n.height/this.view.scale);if(0!=d||0!=t){var g=this.model.getParent(e[l]),f=this.layoutManager.getLayout(g);
-null==f?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(n,g,t,d):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(g,f,t,d)}}}}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 l=this.view.getState(k[b]),n=this.getCellGeometry(k[b]);null!=l&&null!=n&&(n=n.clone(),n.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],n))}}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 l=this.getCellGeometry(a),n=this.view.getState(a);null!=n&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,n.width/this.view.scale-l.width):l.height+=c+Math.min(0,n.height/this.view.scale-l.height),this.model.setGeometry(a,
+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 l=0;l<e.length;l++){var q=this.view.getState(e[l]),p=this.getCellGeometry(e[l]);if(null!=q&&null!=p){var v=Math.round(p.width-q.width/this.view.scale),d=Math.round(p.height-q.height/this.view.scale);if(0!=d||0!=v){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
+null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(q,f,v,d):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,v,d)}}}}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 l=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=l&&null!=q&&(q=q.clone(),q.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.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 l=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,q.width/this.view.scale-l.width):l.height+=c+Math.min(0,q.height/this.view.scale-l.height),this.model.setGeometry(a,
l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
@@ -2287,23 +2287,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activa
this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){var c=this.getState(a);null!=c&&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&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,d){return e.apply(this,arguments)||null!=a.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.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 d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&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},r=.5*this.scale,b=!1,c=[],h=0;h<d.length-1;h++){for(var w=d[h+1],u=d[h],m=[],v=d[h+2];h<
-d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,v.x,v.y,w.x,w.y)<1*this.scale*this.scale;)w=v,h++,v=d[h+2];for(var b=e(0,u.x,u.y)||b,k=0;k<this.validEdges.length;k++){var q=this.validEdges[k],l=q.absolutePoints;if(null!=l&&mxUtils.intersects(a,q)&&"1"!=q.style.noJump)for(q=0;q<l.length-1;q++){for(var n=l[q+1],t=l[q],v=l[q+2];q<l.length-2&&mxUtils.ptSegDistSq(t.x,t.y,v.x,v.y,n.x,n.y)<1*this.scale*this.scale;)n=v,q++,v=l[q+2];v=mxUtils.intersection(u.x,u.y,w.x,w.y,t.x,t.y,n.x,n.y);if(null!=v&&(Math.abs(v.x-
-t.x)>r||Math.abs(v.y-t.y)>r)&&(Math.abs(v.x-n.x)>r||Math.abs(v.y-n.y)>r)){n=v.x-u.x;t=v.y-u.y;v={distSq:n*n+t*t,x:v.x,y:v.y};for(n=0;n<m.length;n++)if(m[n].distSq>v.distSq){m.splice(n,0,v);v=null;break}null==v||0!=m.length&&m[m.length-1].x===v.x&&m[m.length-1].y===v.y||m.push(v)}}}for(q=0;q<m.length;q++)b=e(1,m[q].x,m[q].y)||b}v=d[d.length-1];b=e(0,v.x,v.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var 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,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,w=!0,u=null,m=null;h=[];var v=null;a.begin();for(var q=0;q<this.state.routedPoints.length;q++){var l=
-this.state.routedPoints[q],n=new mxPoint(l.x/this.scale,l.y/this.scale);0==q?n=d[0]:q==this.state.routedPoints.length-1&&(n=d[d.length-1]);var t=!1;if(null!=u&&1==l.type){var y=this.state.routedPoints[q+1],l=y.x/this.scale-n.x,y=y.y/this.scale-n.y,l=l*l+y*y;null==v&&(v=new mxPoint(n.x-u.x,n.y-u.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*e/m,v.y=v.y*e/m);l>e*e&&0<m&&(l=u.x-n.x,y=u.y-n.y,l=l*l+y*y,l>e*e&&(t=new mxPoint(n.x-v.x,n.y-v.y),l=new mxPoint(n.x+v.x,n.y+v.y),h.push(t),this.addPoints(a,h,b,c,!1,
-null,w),h=0>Math.round(v.x)||0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,w=!1,"sharp"==g?(a.lineTo(t.x-v.y*h,t.y+v.x*h),a.lineTo(l.x-v.y*h,l.y+v.x*h),a.lineTo(l.x,l.y)):"arc"==g?(h*=1.3,a.curveTo(t.x-v.y*h,t.y+v.x*h,l.x-v.y*h,l.y+v.x*h,l.x,l.y)):(a.moveTo(l.x,l.y),w=!0),h=[l],t=!0))}else v=null;t||(h.push(n),u=n)}this.addPoints(a,h,b,c,!1,null,w);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
-a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),w=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=g)var u=Math.cos(-g),m=Math.sin(-g),f=mxUtils.getRotatedPoint(f,u,m,w);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);f=this.getPerimeterPoint(d,f,0==g&&e,u);0!=g&&(u=Math.cos(g),m=Math.sin(g),f=mxUtils.getRotatedPoint(f,u,m,w));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var p=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||p<c)b=g,c=p}}null!=b&&(e=b)}return e};var n=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=n.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
-return new mxShape(new mxStencil(c.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var g=new mxPoint(b,f);g.type=d;c.push(g);g=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==g||g.type!=d||g.x!=b||g.y!=f},r=.5*this.scale,b=!1,c=[],h=0;h<d.length-1;h++){for(var m=d[h+1],u=d[h],w=[],t=d[h+2];h<
+d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,t.x,t.y,m.x,m.y)<1*this.scale*this.scale;)m=t,h++,t=d[h+2];for(var b=e(0,u.x,u.y)||b,x=0;x<this.validEdges.length;x++){var k=this.validEdges[x],p=k.absolutePoints;if(null!=p&&mxUtils.intersects(a,k)&&"1"!=k.style.noJump)for(k=0;k<p.length-1;k++){for(var l=p[k+1],q=p[k],t=p[k+2];k<p.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,l.x,l.y)<1*this.scale*this.scale;)l=t,k++,t=p[k+2];t=mxUtils.intersection(u.x,u.y,m.x,m.y,q.x,q.y,l.x,l.y);if(null!=t&&(Math.abs(t.x-
+q.x)>r||Math.abs(t.y-q.y)>r)&&(Math.abs(t.x-l.x)>r||Math.abs(t.y-l.y)>r)){l=t.x-u.x;q=t.y-u.y;t={distSq:l*l+q*q,x:t.x,y:t.y};for(l=0;l<w.length;l++)if(w[l].distSq>t.distSq){w.splice(l,0,t);t=null;break}null==t||0!=w.length&&w[w.length-1].x===t.x&&w[w.length-1].y===t.y||w.push(t)}}}for(k=0;k<w.length;k++)b=e(1,w[k].x,w[k].y)||b}t=d[d.length-1];b=e(0,t.x,t.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,u=null,w=null;h=[];var t=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var p=
+this.state.routedPoints[x],l=new mxPoint(p.x/this.scale,p.y/this.scale);0==x?l=d[0]:x==this.state.routedPoints.length-1&&(l=d[d.length-1]);var q=!1;if(null!=u&&1==p.type){var v=this.state.routedPoints[x+1],p=v.x/this.scale-l.x,v=v.y/this.scale-l.y,p=p*p+v*v;null==t&&(t=new mxPoint(l.x-u.x,l.y-u.y),w=Math.sqrt(t.x*t.x+t.y*t.y),t.x=t.x*f/w,t.y=t.y*f/w);p>f*f&&0<w&&(p=u.x-l.x,v=u.y-l.y,p=p*p+v*v,p>f*f&&(q=new mxPoint(l.x-t.x,l.y-t.y),p=new mxPoint(l.x+t.x,l.y+t.y),h.push(q),this.addPoints(a,h,b,c,!1,
+null,m),h=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(q.x-t.y*h,q.y+t.x*h),a.lineTo(p.x-t.y*h,p.y+t.x*h),a.lineTo(p.x,p.y)):"arc"==e?(h*=1.3,a.curveTo(q.x-t.y*h,q.y+t.x*h,p.x-t.y*h,p.y+t.x*h,p.x,p.y)):(a.moveTo(p.x,p.y),m=!0),h=[p],q=!0))}else t=null;q||(h.push(l),u=l)}this.addPoints(a,h,b,c,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
+a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),g=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=e)var u=Math.cos(-e),w=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,w,m);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);f=this.getPerimeterPoint(d,f,0==e&&g,u);0!=e&&(u=Math.cos(e),w=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,w,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var m=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||m<c)b=g,c=m}}null!=b&&(e=b)}return e};var q=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var p=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
+return new mxShape(new mxStencil(c.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return p.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 l=
-mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(n){null!=window.console&&console.log("error in getStencil:",k,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.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&&(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,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(n){null!=window.console&&console.log("error in loadStencilSet:",a,n)}null!=k&&null!=
+mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var 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(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var n=c.getAttribute("w"),
-q=c.getAttribute("h"),n=null==n?80:parseInt(n,10),q=null==q?80:parseInt(q,10);b(k,l,a,n,q)}}c=c.nextSibling}}};
+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(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var q=c.getAttribute("w"),
+p=c.getAttribute("h"),q=null==q?80:parseInt(q,10),p=null==p?80:parseInt(p,10);b(k,l,a,q,p)}}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}mxConstants.HANDLE_FILLCOLOR="#99ccff";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=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
b.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));
@@ -2311,14 +2311,14 @@ for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[
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+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+
";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?
-d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var m=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))m=this.importCells([m],0,0,this.model.getRoot(),null,g)[0],p=this.model.getChildren(m),this.moveCells(p,d,b),f=f.concat(p);else var p=e.getChildren(m),f=f.concat(this.importCells(p,d,b,this.getDefaultParent(),
-null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,d-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};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))}}catch(X){}return c}if(null!=
+d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var m=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))m=this.importCells([m],0,0,this.model.getRoot(),null,g)[0],n=this.model.getChildren(m),this.moveCells(n,d,b),f=f.concat(n);else var n=e.getChildren(m),f=f.concat(this.importCells(n,d,b,this.getDefaultParent(),
+null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,d-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};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))}}catch(O){}return c}if(null!=
a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(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.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(d,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var 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){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var h=d.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var m=h.getTerminalPoint(!0),p=h.getTerminalPoint(!1);
-h.setTerminalPoint(m,!1);h.setTerminalPoint(p,!0);d.setGeometry(f,h);var u=this.view.getState(f),r=this.view.getState(e),v=this.view.getState(g);if(null!=u){var O=null!=r?this.getConnectionConstraint(u,r,!0):null,w=null!=v?this.getConnectionConstraint(u,v,!1):null;this.setConnectionConstraint(f,e,!0,w);this.setConnectionConstraint(f,g,!1,O)}b.push(f)}}else if(d.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var k=h.width;h.width=h.height;
-h.height=k;d.setGeometry(f,h);var q=this.view.getState(f);if(null!=q){var x=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
+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){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var h=d.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var m=h.getTerminalPoint(!0),n=h.getTerminalPoint(!1);
+h.setTerminalPoint(m,!1);h.setTerminalPoint(n,!0);d.setGeometry(f,h);var u=this.view.getState(f),r=this.view.getState(e),t=this.view.getState(g);if(null!=u){var w=null!=r?this.getConnectionConstraint(u,r,!0):null,Q=null!=t?this.getConnectionConstraint(u,t,!1):null;this.setConnectionConstraint(f,e,!0,Q);this.setConnectionConstraint(f,g,!1,w)}b.push(f)}}else if(d.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var x=h.width;h.width=h.height;
+h.height=x;d.setGeometry(f,h);var k=this.view.getState(f);if(null!=k){var p=k.style[mxConstants.STYLE_DIRECTION]||"east";"east"==p?p="south":"south"==p?p="west":"west"==p?p="north":"north"==p&&(p="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,p,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
if(0<d.length)for(var b=0;b<d.length;b++)this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!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.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:"*"),h=0;h<g.length;h++)d(g[h]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.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||
@@ -2337,18 +2337,18 @@ g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrent
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(),h=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(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||
mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,h),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(h);mxEvent.addListener(document,"mouseleave",
-function(a){h.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),g=0;g<a.length;g++){var h=b.getParent(a[g]),m=this.moveCells([e[g]],c,c,!1)[0];f.push(m);if(d)b.add(h,e[g]);else{var p=h.getIndex(a[g]);b.add(h,e[g],p+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=
+function(a){h.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 g=this.cloneCells(a,!1),e=0;e<a.length;e++){var h=b.getParent(a[e]),m=this.moveCells([g[e]],c,c,!1)[0];f.push(m);if(d)b.add(h,g[e]);else{var n=h.getIndex(a[e]);b.add(h,g[e],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){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){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=
mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return 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 h=a?g.getCenterX():g.getCenterY(),c=
-null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;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;h=this.view.scale;f=f/h-(a?g.x:g.y);c=c/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var p=this.view.getState(this.model.getParent(b[e].cell)),u=this.getCellGeometry(b[e].cell),c=c+m;null!=u&&null!=p&&(u=u.clone(),a?u.x=Math.round(c-u.width/2)-p.origin.x:u.y=Math.round(c-u.height/2)-p.origin.y,this.getModel().setGeometry(b[e].cell,
+null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;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;h=this.view.scale;f=f/h-(a?g.x:g.y);c=c/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),u=this.getCellGeometry(b[e].cell),c=c+m;null!=u&&null!=n&&(u=u.clone(),a?u.x=Math.round(c-u.width/2)-n.origin.x:u.y=Math.round(c-u.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,
u))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=this.view.getState(a[c]);if(null!=f){var e=this.getCellGeometry(d[c]);null==e||!e.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(e.relative=!1,e.x=f.x/f.view.scale-
f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(e,d[c]);return b.encode(f)};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,h){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;c=e||c?this.getGraphBounds():
-this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,p=mxUtils.createXmlDocument(),u=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+a));null==p.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/",
-"xmlns:xlink",mxConstants.NS_XLINK);a=d/m;u.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");u.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");u.setAttribute("version","1.1");var r=u;f&&(r=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g"),r.setAttribute("transform","translate(0.5,0.5)"),u.appendChild(r));p.appendChild(u);p=this.createSvgCanvas(r);p.foOffset=f?-.5:0;p.textOffset=f?-.5:0;p.imageOffset=f?-.5:0;p.translate(Math.floor((b/
-d-c.x)/m),Math.floor((b/d-c.y)/m));var v=document.createElement("textarea"),w=p.createAlternateContent;p.createAlternateContent=function(a,d,b,c,f,e,g,h,m,p,u,r,k){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&e.length<5*c/q.fontSize)){var x=this.createElement("text");x.setAttribute("x",Math.round(c/2));x.setAttribute("y",Math.round((f+q.fontSize)/2));x.setAttribute("fill",q.fontColor||"black");x.setAttribute("text-anchor","middle");x.setAttribute("font-size",Math.round(q.fontSize)+
-"px");x.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&x.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&x.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&x.setAttribute("text-decoration","underline");try{return v.innerHTML=e,x.textContent=v.value,x}catch(Ba){return w.apply(this,arguments)}}else return w.apply(this,arguments)};b=this.backgroundImage;
-null!=b&&(f=m/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&p.image(d.x,d.y,b.width,b.height,b.src,!0));p.scale(a);p.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var k=h.drawCellState;h.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)&&k.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),
-p);return u};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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.selectNode=
+this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,n=mxUtils.createXmlDocument(),u=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+a));null==n.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:xlink",mxConstants.NS_XLINK);a=d/m;u.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");u.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");u.setAttribute("version","1.1");var r=u;f&&(r=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),r.setAttribute("transform","translate(0.5,0.5)"),u.appendChild(r));n.appendChild(u);n=this.createSvgCanvas(r);n.foOffset=f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/
+d-c.x)/m),Math.floor((b/d-c.y)/m));var t=document.createElement("textarea"),w=n.createAlternateContent;n.createAlternateContent=function(a,d,b,c,f,e,g,h,n,m,u,r,x){var k=this.state;if(null!=this.foAltText&&(0==c||0!=k.fontSize&&e.length<5*c/k.fontSize)){var p=this.createElement("text");p.setAttribute("x",Math.round(c/2));p.setAttribute("y",Math.round((f+k.fontSize)/2));p.setAttribute("fill",k.fontColor||"black");p.setAttribute("text-anchor","middle");p.setAttribute("font-size",Math.round(k.fontSize)+
+"px");p.setAttribute("font-family",k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&p.setAttribute("font-weight","bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&p.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.setAttribute("text-decoration","underline");try{return t.innerHTML=e,p.textContent=t.value,p}catch(Ba){return w.apply(this,arguments)}}else return w.apply(this,arguments)};b=this.backgroundImage;
+null!=b&&(f=m/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&n.image(d.x,d.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var x=h.drawCellState;h.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)&&x.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),
+n);return u};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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.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.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)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){d=null!=d?d:a;var b=document.createElement("a");
@@ -2356,28 +2356,28 @@ b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=th
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.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(R){}};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,d){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 n=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){n.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
+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(H){}};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,d){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 q=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){q.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":
-"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function 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)}q.apply(this,arguments);
+"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var p=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)}p.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(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";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!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!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!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var v=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=
-"",t.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=
+"",v.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 d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
-function(){try{this.graph.container.focus()}catch(O){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],
-!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,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 f=mxGraphHandler.prototype.moveCells;
-mxGraphHandler.prototype.moveCells=function(a,d,b,c,e,g){mxEvent.isAltDown(g)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-
+function(){try{this.graph.container.focus()}catch(Q){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],
+!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,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 g=mxGraphHandler.prototype.moveCells;
+mxGraphHandler.prototype.moveCells=function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-
this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(d.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==
-mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,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 p=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=
-new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&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=p.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+
+mxUtils.getValue(a.style,"childLayout",null)};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 n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=
+new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&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=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+
"&deg;":(d=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/d)+" x "+this.roundLength(this.bounds.height/d)),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+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=
function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-c.x),c=this.roundLength(b.y/f-c.y);this.hint.innerHTML=e+", "+c;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&
null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;
@@ -2392,126 +2392,126 @@ if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigat
a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var r=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){r.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.mouseUp=function(a,d){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),h=
-this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var m=this.graph.view.getState(h[b]),p=this.graph.getCellGeometry(h[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(e,g),this.graph.model.setGeometry(h[b],p))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
+this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
this.width,this.height),this.graph.selectRegion(e,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 h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);h.apply(this,
-arguments)};var w=(new Date).getTime(),u=0,m=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){m.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),u=0):u=(new Date).getTime()-w;this.currentTerminalState=b};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||
-"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,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 D=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 D.apply(this,arguments)};var F=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 F.apply(this,
-arguments)};var G=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))):G.apply(this,arguments)};var H=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)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
-this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(a,d){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+arguments)};var m=(new Date).getTime(),u=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){w.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),u=0):u=(new Date).getTime()-m;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||
+"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&t.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,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 x=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 x.apply(this,arguments)};var F=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 F.apply(this,
+arguments)};var D=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))):D.apply(this,arguments)};var G=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)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
+this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var y=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(a,d){y.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
d()});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){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.fontSize="90%",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",IMAGE_PATH+"/edit.gif");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)}));c=document.createElement("img");c.setAttribute("src",Dialog.prototype.clearImage);
c.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));c.setAttribute("width","13");c.setAttribute("height","10");c.style.marginLeft="4px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"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 f=document.createElement("div");f.style.marginTop=null!=d||0<c?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),
-mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=
+mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var I=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=
this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(d,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);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.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 x=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){x.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this);
+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 z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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+6+this.state.view.graph.tolerance)+"px"}};var z=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){z.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){J.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var V=mxEdgeHandler.prototype.redrawHandles;
-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(V.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function d(){mxActor.call(this)}function g(){mxActor.call(this)}function f(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,d){this.canvas=
+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+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){J.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var R=mxEdgeHandler.prototype.redrawHandles;
+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
+function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}function p(){mxActor.call(this)}function v(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,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,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function m(){mxActor.call(this)}function v(){mxActor.call(this)}function D(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function y(){mxShape.call(this)}function B(){mxShape.call(this)}
-function C(){mxEllipse.call(this)}function K(){mxShape.call(this)}function x(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function z(){mxShape.call(this)}function J(){mxShape.call(this)}function V(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function O(){mxDoubleEllipse.call(this)}function M(){mxArrowConnector.call(this);this.spacing=0}function I(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}
-function P(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function W(){mxActor.call(this)}function N(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function ha(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,h,m,p){g+=m;var la=c.clone();c.x-=f*(2*g+m);c.y-=e*(2*g+m);f*=g+m;e*=g+m;return function(){a.ellipse(la.x-f-g,la.y-e-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
+this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function B(){mxShape.call(this)}function y(){mxShape.call(this)}
+function C(){mxEllipse.call(this)}function I(){mxShape.call(this)}function z(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function J(){mxShape.call(this)}function R(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function aa(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function K(){mxArrowConnector.call(this);this.spacing=0}function H(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}
+function L(){mxActor.call(this)}function O(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function W(){mxActor.call(this)}function P(){mxActor.call(this)}function da(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function na(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function ia(){mxRhombus.call(this)}function qa(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}
+function ra(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function ga(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,h,m,n){g+=m;var la=c.clone();c.x-=f*(2*g+m);c.y-=e*(2*g+m);f*=g+m;e*=g+m;return function(){a.ellipse(la.x-f-g,la.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d,f),a.lineTo(d,d),a.lineTo(0,0),a.moveTo(d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(d,f),a.lineTo(0,f-d),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",
a);var xa=Math.tan(mxUtils.toRadians(30)),pa=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/xa);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+xa));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)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",
c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,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",l);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.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",n);mxUtils.extend(q,mxActor);q.prototype.size=30;q.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",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.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()};t.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",
-t);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.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};d.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",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(g,mxActor);g.prototype.size=.2;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(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",g);mxUtils.extend(f,mxActor);f.prototype.size=.2;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(p,mxActor);p.prototype.size=.5;p.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",p);mxUtils.extend(r,mxActor);r.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",r);h.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};h.prototype.close=function(){null!=this.firstX&&
+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",l);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(p,mxActor);p.prototype.size=30;p.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",p);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.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()};v.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",
+v);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.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};d.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",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.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",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.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",g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.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",n);mxUtils.extend(r,mxActor);r.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",r);h.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};h.prototype.close=function(){null!=this.firstX&&
null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};h.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=
-g};h.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),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var la=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 m=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,
-la*e+this.lastX-m*f,b*e+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
+g};h.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),la=this.defaultVariation;5>g&&(g=5,la/=3);for(var h=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 m=(Math.random()-.5)*la;this.originalLineTo.call(this.canvas,
+h*e+this.lastX-m*f,b*e+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new h(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};
var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)Ga.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 Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var 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};w.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",w);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground=
-function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(m,mxHexagon);m.prototype.size=30;m.prototype.position=.5;m.prototype.position2=.5;m.prototype.base=20;m.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};m.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,
+b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var 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};m.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",m);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground=
+function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);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.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)))),h=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+h),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",
-m);mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.fixedSize=20;v.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",v);mxUtils.extend(D,mxHexagon);D.prototype.size=.25;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(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",D);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.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",F);var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
+w);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;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(x,mxHexagon);x.prototype.size=.25;x.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",x);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.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",F);var Ca=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){Ca.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),Ca.apply(this,[a,d,
-b,c,f]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.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};G.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 h=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],la=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||u,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth,
-f+this.strokewidth),u+=v,r+=v);var v=d,w=b,v=h==mxConstants.ALIGN_CENTER?v+(c-la)/2:h==mxConstants.ALIGN_RIGHT?v+(c-la-u):v+u,w=m==mxConstants.ALIGN_MIDDLE?w+(f-p)/2:m==mxConstants.ALIGN_BOTTOM?w+(f-p-r):w+r;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,v,w,la,p);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(H,mxCylinder);H.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",H);mxUtils.extend(y,mxShape);y.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",y);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.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",B);mxUtils.extend(C,mxEllipse);C.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",C);mxUtils.extend(K,mxShape);K.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",K);mxUtils.extend(x,mxShape);x.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
-a.height/8,a.width,7*a.height/8)};x.prototype.paintBackground=function(a,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()};x.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",x);mxUtils.extend(E,mxRectangleShape);E.prototype.size=40;E.prototype.isHtmlAllowed=function(){return!1};E.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)};E.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!=E&&(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())};E.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",E);mxUtils.extend(z,mxShape);z.prototype.width=60;z.prototype.height=30;z.prototype.corner=
-10;z.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))};z.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)))),h=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
+b,c,f]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.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};D.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 h=this.style["symbol"+e+"Align"],la=this.style["symbol"+e+"VerticalAlign"],m=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||u,t=this.style["symbol"+e+"ArcSpacing"];null!=t&&(t*=this.getArcSize(c+this.strokewidth,
+f+this.strokewidth),u+=t,r+=t);var t=d,w=b,t=h==mxConstants.ALIGN_CENTER?t+(c-m)/2:h==mxConstants.ALIGN_RIGHT?t+(c-m-u):t+u,w=la==mxConstants.ALIGN_MIDDLE?w+(f-n)/2:la==mxConstants.ALIGN_BOTTOM?w+(f-n-r):w+r;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,t,w,m,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(G,mxCylinder);G.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",G);mxUtils.extend(B,mxShape);B.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",B);mxUtils.extend(y,mxShape);y.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};y.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",y);mxUtils.extend(C,mxEllipse);C.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",C);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(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,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()};z.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",z);mxUtils.extend(N,mxRectangleShape);N.prototype.size=40;N.prototype.isHtmlAllowed=function(){return!1};N.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)};N.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!=N&&(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())};N.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",N);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=
+10;E.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))};E.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)))),h=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(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,h-1.5*e));a.lineTo(d+Math.max(0,g-e),b+h);a.lineTo(d,b+h);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+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",z);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=E.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);
+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+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=N.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",m.prototype.size))*
-d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,m=a.width,p=a.height;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=p*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+
-m,h+f),new mxPoint(e+m,h+p),new mxPoint(e,h+p-f),new mxPoint(e,h)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+m,h),new mxPoint(e+m-f,h+p),new mxPoint(e,h+p),new mxPoint(e+f,h)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};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,h=a.y,m=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+m-e,h),new mxPoint(g+m,h+p),new mxPoint(g,h+p),new mxPoint(g+e,h)]):d==mxConstants.DIRECTION_WEST?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m,h),new mxPoint(g+m-e,h+p),new mxPoint(g+e,h+p),new mxPoint(g,
-h)]):d==mxConstants.DIRECTION_NORTH?(e=p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+e),new mxPoint(g+m,h),new mxPoint(g+m,h+p),new mxPoint(g,h+p-e),new mxPoint(g,h+e)]):(e=p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m,h+e),new mxPoint(g+m,h+p-e),new mxPoint(g,h+p),new mxPoint(g,h)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,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?v.prototype.fixedSize:v.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,m=a.width,p=a.height,u=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(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m-
-f,h),new mxPoint(g+m,a),new mxPoint(g+m-f,h+p),new mxPoint(g,h+p),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+m,h),new mxPoint(g+m-f,a),new mxPoint(g+m,h+p),new mxPoint(g+f,h+p),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(u,h),new mxPoint(g+m,h+f),new mxPoint(g+m,
-h+p),new mxPoint(u,h+p-f),new mxPoint(g,h+p),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(u,h+f),new mxPoint(g+m,h),new mxPoint(g+m,h+p-f),new mxPoint(u,h+p),new mxPoint(g,h+p-f),new mxPoint(g,h)]);u=new mxPoint(u,a);c&&(b.x<g||b.x>g+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(h,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=D.prototype.size;null!=
-d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,m=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_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(p,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+m-f),new mxPoint(p,g+m),new mxPoint(e,g+m-f),new mxPoint(e,g+f),new mxPoint(p,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+
-f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+m),new mxPoint(e+f,g+m),new mxPoint(e,a),new mxPoint(e+f,g)]);p=new mxPoint(p,a);c&&(b.x<e||b.x>e+h?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(g,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.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",J);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.inset=2;V.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",V);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.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,h=.3*f-d/2,m=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,m),
-a.lineTo(g,m),a.lineTo(g,m+d),a.lineTo(b,m+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,m+d),a.lineTo(0,m+d),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.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",U);mxUtils.extend(O,U);O.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",O);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=4;M.prototype.isOpenEnded=function(){return!0};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};M.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-M);mxUtils.extend(I,mxArrowConnector);I.prototype.defaultWidth=10;I.prototype.defaultArrowWidth=20;I.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};I.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};I.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-I);mxUtils.extend(R,mxActor);R.prototype.size=30;R.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",R);mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=
-function(){return!1};L.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",L);mxUtils.extend(P,mxActor);P.prototype.dx=20;P.prototype.dy=20;P.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",P);mxUtils.extend(X,mxActor);X.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",X);mxUtils.extend(A,mxActor);A.prototype.dx=20;A.prototype.dy=
-20;A.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",A);mxUtils.extend(W,mxActor);W.prototype.arrowWidth=.3;W.prototype.arrowSize=.2;W.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",W);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",W.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",W.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",N);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.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",Z);mxUtils.extend(aa,mxActor);aa.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",aa);mxUtils.extend(S,mxActor);S.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",S);mxUtils.extend(T,mxActor);T.prototype.size=20;T.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",
-T);mxUtils.extend(da,mxActor);da.prototype.size=.375;da.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",da);mxUtils.extend(na,mxEllipse);na.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",na);mxUtils.extend(ba,mxEllipse);ba.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",
-ba);mxUtils.extend(ea,mxEllipse);ea.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",ea);mxUtils.extend(qa,mxRhombus);qa.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",qa);mxUtils.extend(ga,mxEllipse);ga.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",ga);mxUtils.extend(ra,mxEllipse);ra.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",ra);mxUtils.extend(ha,mxEllipse);ha.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-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ha);mxUtils.extend(ia,
-mxEllipse);ia.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",ia);mxUtils.extend(ca,mxActor);ca.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",ca);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.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",
-ja);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.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",ka);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.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;oa.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),oa.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",oa);"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,h,m,p){var u=f*(g+m+1),r=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,h,m,
-p){var u=f*(g+m+1),r=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.moveTo(c.x-u/2+r/2,c.y-r/2-u/2);a.lineTo(c.x-r/2-3*u/2,c.y-3*r/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,h,m,p){var u=c.clone(),r=Aa.apply(this,arguments),v=f*(g+2*m),w=e*(g+2*m);return function(){r.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*v+f*m,u.y-2*w+e*m);a.moveTo(u.x-
-v-w+e*m,u.y-w+v-f*m);a.lineTo(u.x+w-v-e*m,u.y-w-v+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,h,m,p){d=f*m*1.118;b=e*m*1.118;f*=g+m;e*=g+m;var u=c.clone();u.x-=d;u.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);h?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,h,m,p,u){e*=h+p;g*=h+p;var r=
-f.clone();return function(){d.begin();d.moveTo(r.x,r.y);m?d.lineTo(r.x-e-g/a,r.y-g+e/a):d.lineTo(r.x+g/a-e,r.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,d,b){return sa(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,h){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return Q(a,d,
-function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,m=f.y-h.y,p=Math.sqrt(e*e+m*m),h=c.call(this,p,e/p,m/p,h,f);return new mxPoint(h.x/g-d.x,h.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,h=g.length-1;d=a.view.translate;var m=a.view.scale,p=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-p.x,u=g.y-p.y,r=Math.sqrt(h*h+u*u);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;f.call(this,r,h/r,u/r,p,g,c,e)})},ma=function(a){return function(d){return[Q(d,["arrowWidth",
-"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",W.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",W.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))})]}},ya=function(a,d,b){return function(c){var f=
-[Q(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(fa(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[Q(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(fa(e));return g}},Ea=function(a){return function(d){var b=
-[Q(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(fa(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d}},fa=function(a,d){return Q(a,
+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",w.prototype.size))*
+d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,m=a.width,n=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+
+m,h+e),new mxPoint(g+m,h+n),new mxPoint(g,h+n-e),new mxPoint(g,h)]):(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+m,h),new mxPoint(g+m-e,h+n),new mxPoint(g,h+n),new mxPoint(g+e,h)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);c&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f=
+mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,m=a.width,n=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+m-f,h),new mxPoint(e+m,h+n),new mxPoint(e,h+n),new mxPoint(e+f,h)]):d==mxConstants.DIRECTION_WEST?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+m,h),new mxPoint(e+m-f,h+n),new mxPoint(e+f,h+n),new mxPoint(e,
+h)]):d==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+m,h),new mxPoint(e+m,h+n),new mxPoint(e,h+n-f),new mxPoint(e,h+f)]):(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+m,h+f),new mxPoint(e+m,h+n-f),new mxPoint(e,h+n),new mxPoint(e,h)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);c&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,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,h=a.y,m=a.width,n=a.height,u=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(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m-
+f,h),new mxPoint(g+m,a),new mxPoint(g+m-f,h+n),new mxPoint(g,h+n),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+m,h),new mxPoint(g+m-f,a),new mxPoint(g+m,h+n),new mxPoint(g+f,h+n),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(u,h),new mxPoint(g+m,h+f),new mxPoint(g+m,
+h+n),new mxPoint(u,h+n-f),new mxPoint(g,h+n),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(u,h+f),new mxPoint(g+m,h),new mxPoint(g+m,h+n-f),new mxPoint(u,h+n),new mxPoint(g,h+n-f),new mxPoint(g,h)]);u=new mxPoint(u,a);c&&(b.x<g||b.x>g+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(h,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=x.prototype.size;null!=
+d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,m=a.height,n=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=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+m-f),new mxPoint(n,g+m),new mxPoint(e,g+m-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+
+f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+m),new mxPoint(e+f,g+m),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);c&&(b.x<e||b.x>e+h?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(g,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.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",J);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.inset=2;R.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",R);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.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,h=.3*f-d/2,m=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,m),
+a.lineTo(g,m),a.lineTo(g,m+d),a.lineTo(b,m+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,m+d),a.lineTo(0,m+d),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.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",aa);mxUtils.extend(Q,aa);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(S,mxArrowConnector);S.prototype.defaultWidth=4;S.prototype.isOpenEnded=function(){return!0};S.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};S.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+S);mxUtils.extend(K,mxArrowConnector);K.prototype.defaultWidth=10;K.prototype.defaultArrowWidth=20;K.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};K.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};K.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
+K);mxUtils.extend(H,mxActor);H.prototype.size=30;H.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",H);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=
+function(){return!1};V.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",V);mxUtils.extend(L,mxActor);L.prototype.dx=20;L.prototype.dy=20;L.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",L);mxUtils.extend(O,mxActor);O.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",O);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=
+20;X.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",X);mxUtils.extend(A,mxActor);A.prototype.arrowWidth=.3;A.prototype.arrowSize=.2;A.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",A);mxUtils.extend(W,mxActor);W.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",A.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",A.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",W);mxUtils.extend(P,mxActor);P.prototype.size=.1;P.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",P);mxUtils.extend(da,mxActor);da.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",da);mxUtils.extend(T,mxActor);T.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",T);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.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",
+Z);mxUtils.extend(U,mxActor);U.prototype.size=.375;U.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",U);mxUtils.extend(na,mxEllipse);na.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",na);mxUtils.extend(oa,mxEllipse);oa.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",
+oa);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(ia,mxRhombus);ia.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",ia);mxUtils.extend(qa,mxEllipse);qa.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",qa);mxUtils.extend(ea,mxEllipse);ea.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",ea);mxUtils.extend(ra,mxEllipse);ra.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-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ra);mxUtils.extend(fa,
+mxEllipse);fa.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",fa);mxUtils.extend(ja,mxActor);ja.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",ja);mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.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",
+ba);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.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",ka);mxUtils.extend(ga,mxConnector);ga.prototype.origPaintEdgeShape=ga.prototype.paintEdgeShape;ga.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;ga.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),ga.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",ga);"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,h,m,n){var u=f*(g+m+1),t=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-t/2,c.y-t/2+u/2);a.lineTo(c.x+t/2-3*u/2,c.y-3*t/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,h,m,
+n){var u=f*(g+m+1),t=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-t/2,c.y-t/2+u/2);a.lineTo(c.x+t/2-3*u/2,c.y-3*t/2-u/2);a.moveTo(c.x-u/2+t/2,c.y-t/2-u/2);a.lineTo(c.x-t/2-3*u/2,c.y-3*t/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,h,m,n){var u=c.clone(),t=Aa.apply(this,arguments),r=f*(g+2*m),w=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*r+f*m,u.y-2*w+e*m);a.moveTo(u.x-
+r-w+e*m,u.y-w+r-f*m);a.lineTo(u.x+w-r-e*m,u.y-w-r+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,h,m,n){d=f*m*1.118;b=e*m*1.118;f*=g+m;e*=g+m;var u=c.clone();u.x-=d;u.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);h?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,h,m,n,u){e*=h+n;g*=h+n;var t=
+f.clone();return function(){d.begin();d.moveTo(t.x,t.y);m?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 Da=function(a,d,b){return sa(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,h){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return M(a,d,
+function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,m=f.y-h.y,n=Math.sqrt(e*e+m*m),h=c.call(this,n,e/n,m/n,h,f);return new mxPoint(h.x/g-d.x,h.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,h=g.length-1;d=a.view.translate;var m=a.view.scale,n=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-n.x,u=g.y-n.y,t=Math.sqrt(h*h+u*u);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;f.call(this,t,h/t,u/t,n,g,c,e)})},ma=function(a){return function(d){return[M(d,["arrowWidth",
+"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",A.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",A.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))})]}},ya=function(a,d,b){return function(c){var f=
+[M(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(ha(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[M(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(ha(e));return g}},Ea=function(a){return function(d){var b=
+[M(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.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(ha(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ha(a));return d}},ha=function(a,d){return M(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))))})},Q=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])};
+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))))})},M=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 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[Da(a,!0,10),Da(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(sa(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,h,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.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(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
@@ -2521,65 +2521,65 @@ a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxCon
e,g,h,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.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(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(sa(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,h,m){b=
Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.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(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<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=[Q(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(fa(a,b/2))}return d},
-label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.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[Q(a,["width","height"],function(a){var d=Math.max(z.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
-"width",z.prototype.width))),b=Math.max(1.5*z.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",z.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(z.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*z.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[Q(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",w.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(fa(a));return d},cross:function(a){return[Q(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",ja.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[Q(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=
-[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.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(fa(a));return d},dataStorage:function(a){return[Q(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.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=[Q(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",m.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",m.prototype.position)));mxUtils.getValue(this.state.style,"base",m.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,
-"base",m.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}),Q(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",m.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}),Q(a,["base"],function(a){var d=
-Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",m.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",m.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",m.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",m.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(fa(a));return d},internalStorage:function(a){var d=[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.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(fa(a));return d},corner:function(a){return[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+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[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",A.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",A.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:ma(1),doubleArrow:ma(.5),
-folder:function(a){return[Q(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.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",n.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[Q(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*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[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.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[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.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:ua(v.prototype.size,!0,null,!0,v.prototype.fixedSize),hexagon:ua(D.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=Q;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
+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=[M(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(ha(a,b/2))}return d},
+label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[M(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.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[M(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",E.prototype.width))),b=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+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[M(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",m.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(ha(a));return d},cross:function(a){return[M(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",ba.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[M(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=
+[M(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",H.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(ha(a));return d},dataStorage:function(a){return[M(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.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=[M(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){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-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.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}),M(a,["base"],function(a){var d=
+Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
+d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ha(a));return d},internalStorage:function(a){var d=[M(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.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(ha(a));return d},corner:function(a){return[M(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.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[M(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.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:ma(1),doubleArrow:ma(.5),
+folder:function(a){return[M(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[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*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[M(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.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[M(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.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:ua(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ua(x.prototype.size,!0,.5,!0),curlyBracket:ua(n.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,p.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=M;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ma),Math.sin(ma));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,h=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,
-c));null==h&&null!=d&&(h=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,p=va.y,u=wa.x,r=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,d,b){a-=w.x;var c=d-w.y;d=(r*a-u*c)/(m*r-p*u);a=(p*a-m*c)/(p*u-m*r);v?(b&&(w=new mxPoint(w.x+m*d,w.y+p*d),f.push(w)),w=new mxPoint(w.x+u*a,w.y+r*a)):(b&&(w=new mxPoint(w.x+u*a,w.y+r*a),f.push(w)),w=new mxPoint(w.x+m*d,w.y+p*d));f.push(w)};
-var w=h;null==c&&(c=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];m.prototype.constraints=[];mxRectangleShape.prototype.constraints=
+c));null==h&&null!=d&&(h=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,n=va.y,u=wa.x,t=wa.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,d,b){a-=w.x;var c=d-w.y;d=(t*a-u*c)/(m*t-n*u);a=(n*a-m*c)/(n*u-m*t);r?(b&&(w=new mxPoint(w.x+m*d,w.y+n*d),f.push(w)),w=new mxPoint(w.x+u*a,w.y+t*a)):(b&&(w=new mxPoint(w.x+u*a,w.y+t*a),f.push(w)),w=new mxPoint(w.x+m*d,w.y+n*d));f.push(w)};
+var w=h;null==c&&(c=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=
-mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=
-mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;
-T.prototype.constraints=mxRectangleShape.prototype.constraints;da.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)];y.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,
+mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=
+mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;
+Z.prototype.constraints=mxRectangleShape.prototype.constraints;U.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)];B.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)];Y.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)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
-0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];v.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)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
-.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.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;A.prototype.constraints=null;P.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
-new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];E.prototype.constraints=null;aa.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)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.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;X.prototype.constraints=null;L.prototype.constraints=null;O.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)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
+new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];N.prototype.constraints=null;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];T.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)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[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 d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,
+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(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(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(){mxClipboard.copy(c)},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 d=0;d<b.length&&
-a;d++)a=a&&c.model.isEdge(b[d]);var e=c.view.translate,f=c.view.scale,p=e.x,r=e.y,e=null;if(1==b.length&&a){var h=c.getCellGeometry(b[0]);null!=h&&(e=h.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(b,a);if(null!=e){var w=Math.round(c.snap(c.popupMenuHandler.triggerX/f-p)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/f-r));c.cellsMoved(b,w-e.x,u-e.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+a;d++)a=a&&c.model.isEdge(b[d]);var f=c.view.translate,e=c.view.scale,n=f.x,r=f.y,f=null;if(1==b.length&&a){var h=c.getCellGeometry(b[0]);null!=h&&(f=h.getTerminalPoint(!0))}f=null!=f?f:c.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(c.snap(c.popupMenuHandler.triggerX/e-n)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/e-r));c.cellsMoved(b,m-f.x,u-f.y)}}}finally{c.getModel().endUpdate()}}});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(){c.setSelectionCells(c.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){c.turnShapes(c.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices()},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,"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();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container,
-340,340,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var e=c.value.getAttribute("tooltip");null!=e&&(d=e)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=
+340,340,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var f=c.value.getAttribute("tooltip");null!=f&&(d=f)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.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(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}},null,null,"Alt+Shift+L");this.addAction("insertLink...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),
-function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,g=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var f=a.indexOf(",");0<f&&(g=b.getPageById(a.substring(f+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,g=e[0].name||e[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));f=c.getFreeInsertPoint();d=new mxCell(g,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
+function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,f=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var g=a.indexOf(",");0<g&&(f=b.getPageById(a.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,f=e[0].name||e[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));g=c.getFreeInsertPoint();d=new mxCell(f,new mxGeometry(g.x,g.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);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.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var e=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(e);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 d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d],20);else{var e=c.view.getState(d),f=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=f&&c.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,f)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=
-a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=d;d=mxUtils.extractTextWithWhitespace(g.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
+a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var f=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(f);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 d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d],20);else{var f=c.view.getState(d),e=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=f&&null!=f.text&&null!=e&&c.isWrapping(d)?(e=e.clone(),e.height=f.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,e)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=
+a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=d;d=mxUtils.extractTextWithWhitespace(f.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}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,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
this.addAction("zoomOut",function(a){c.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){c.fit()},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=
@@ -2591,23 +2591,23 @@ l=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandle
new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return c.pageVisible});
l=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});
l=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var n=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){n||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){n=!1}),n=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+"";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)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,f){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
b),(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)})}finally{c.getModel().endUpdate()}}},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
+c.replaceElement(a)})}finally{c.getModel().endUpdate()}}},null,null,f)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){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.view.getState(a[0]),
-d=null!=e?e.style:c.getCellStyle(a[0]),g="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,g);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"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,
+d=null!=e?e.style:c.getCellStyle(a[0]),f="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,f);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"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(d){null!=d&&c.setCellStyle(mxUtils.trim(d),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 d=c.view.translate,g=c.view.scale,f=d.x,d=d.y,a=c.getModel().getParent(a),p=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=p;)f+=p.x,d+=p.y,a=c.getModel().getParent(a),p=
-c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/g-f));g=Math.round(c.snap(c.popupMenuHandler.triggerY/g-d));b.addPointAt(b.state,f,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var e=
-c.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,c.getModel().setGeometry(d,e))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");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()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var g=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(g),c.insertImage(a,d,b);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null;c.getModel().beginUpdate();
-try{if(0==f.length){var p=c.getFreeInsertPoint(),e=f=[c.insertVertex(c.getDefaultParent(),null,"",p.x,p.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",e))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var m=c.view.getState(f[0]),r=null!=m?m.style:c.getCellStyle(f[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[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!=d&&null!=b){var k=f[0],l=c.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=d,l.height=b,c.getModel().setGeometry(k,l))}}finally{c.getModel().endUpdate()}null!=e&&(c.setSelectionCells(e),c.scrollCellToVisible(e[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
+"+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 d=c.view.translate,f=c.view.scale,g=d.x,d=d.y,a=c.getModel().getParent(a),n=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=n;)g+=n.x,d+=n.y,a=c.getModel().getParent(a),n=
+c.getCellGeometry(a);g=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g));f=Math.round(c.snap(c.popupMenuHandler.triggerY/f-d));b.addPointAt(b.state,g,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var f=
+c.getCellGeometry(d);null!=f&&(f=f.clone(),f.points=null,c.getModel().setGeometry(d,f))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");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()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var f=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(f),c.insertImage(a,d,b);else{var e=c.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;c.getModel().beginUpdate();
+try{if(0==e.length){var n=c.getFreeInsertPoint(),g=e=[c.insertVertex(c.getDefaultParent(),null,"",n.x,n.y,d,b,"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,e);var r=c.view.getState(e[0]),t=null!=r?r.style:c.getCellStyle(e[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+e):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==c.getSelectionCount()&&null!=d&&null!=b){var k=e[0],l=c.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=d,l.height=b,c.getModel().setGeometry(k,l))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
@@ -2643,7 +2643,7 @@ null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.len
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?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var 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");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(D){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
+null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
a=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0]),b=this.graph.decompress(b),0<b.length&&(c=mxUtils.parseXml(b),a=c.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
null==a||d||(c=null,"diagram"==a.nodeName?c=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(c=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=c&&(b=this.graph.decompress(mxUtils.getTextContent(c)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,d){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
@@ -2651,15 +2651,15 @@ Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(func
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&&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};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=t.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"),
+var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}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 p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var v=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=v.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 d=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&(f=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}if(this.isMathOptionVisible()&&
c.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});f.style.paddingTop="0px";a.appendChild(f);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
e.style.position="relative";e.style.top="4px";f.appendChild(e)}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",
-gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var g=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments)};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)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=
+gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var g=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 g.apply(this,arguments)};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]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,
"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));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";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%)":d.style.backgroundColor=a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");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=
@@ -2669,7 +2669,7 @@ mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.current
(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 p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}p.apply(this,arguments);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;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}n.apply(this,arguments);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.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,d){d.height=Math.max(d.height,20);if(1<d.height/20){var b=d.height%20;d.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var r=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){r.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
d,b){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,c,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1;
@@ -2684,25 +2684,25 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
-STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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 h=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,p,r,w){if(null!=b&&null==mxMarker.markers[b]){var m=this.getPackageForType(b);
-null!=m&&mxStencilRegistry.getStencil(m)}return h.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){k.value=Math.max(1,Math.min(h,Math.max(parseInt(k.value),parseInt(u.value))));u.value=Math.max(1,Math.min(h,Math.min(parseInt(k.value),parseInt(u.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,h=0,m=aa.get(),p=1/d.pageScale,r=t.checked;if(r)var p=parseInt(N.value),u=parseInt(Z.value),p=Math.min(m.height*u/(e.height/d.view.scale),m.width*p/(e.width/
-d.view.scale));else p=parseInt(q.value)/(100*d.pageScale),isNaN(p)&&(c=1/d.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*c);m.height=Math.ceil(m.height*c);p*=c;!r&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*m.width,h-=e.y*m.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(d,p,m,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var w=b.writeHead;b.writeHead=function(d){w.apply(this,arguments);null!=a.editor.fontCss&&
-(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=r;b.appendGraph(d,p,g,h,f,!0)}return b}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value=
-"100 %");var c=.75*c,e=u.value,g=k.value,h=!r.checked,m=null;h&&(h=e==p&&g==p);if(!h&&null!=a.pages&&a.pages.length){var w=0,h=a.pages.length-1;r.checked||(w=parseInt(e)-1,h=parseInt(g)-1);for(var v=w;v<=h;v++){var x=a.pages[v],e=x==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,w=!1,l=null,n=null;null==x.viewState&&null==x.mapping&&null==x.root&&a.updatePageRoot(x);null!=x.viewState?(g=x.viewState.pageVisible,w=x.viewState.mathEnabled,l=x.viewState.background,
-n=x.viewState.backgroundImage):null!=x.mapping&&null!=x.mapping.diagramMap&&(w="0"!=x.mapping.diagramMap.get("mathEnabled"),l=x.mapping.diagramMap.get("background"),n=x.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null);e.background=l;e.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;e.pageVisible=g;e.mathEnabled=w;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(e.container);
-a.updatePageRoot(x);e.model.setRoot(x.root)}m=b(e,m,v!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=b(f);m.mathEnabled&&(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&d&&PrintDialog.printPreview(m)}
-var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var h=1,p=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");
-r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var w=r.cloneNode(!0);r.setAttribute("checked","checked");w.setAttribute("value","range");m.appendChild(w);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type",
-"number");u.setAttribute("min","1");u.style.width="50px";m.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var k=u.cloneNode(!0);m.appendChild(k);mxEvent.addListener(u,"focus",function(){w.checked=!0});mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(k,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+
-1;u.value=p;k.value=p;break}u.setAttribute("max",h);k.setAttribute("max",h);1<h&&e.appendChild(m);var l=document.createElement("div");l.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");l.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));l.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
-q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});e.appendChild(l);var m=m.cloneNode(!1),t=n.cloneNode(!0);t.setAttribute("value","fit");n.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(t);m.appendChild(g);l=document.createElement("table");l.style.display="inline-block";var O=document.createElement("tbody"),
-M=document.createElement("tr"),I=M.cloneNode(!0),R=document.createElement("td"),L=R.cloneNode(!0),P=R.cloneNode(!0),X=R.cloneNode(!0),A=R.cloneNode(!0),W=R.cloneNode(!0);R.style.textAlign="right";X.style.textAlign="right";mxUtils.write(R,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";L.appendChild(N);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));P.appendChild(g);mxUtils.write(X,mxResources.get("fitToBy"));var Z=N.cloneNode(!0);A.appendChild(Z);mxEvent.addListener(N,"focus",function(){t.checked=!0});mxEvent.addListener(Z,"focus",function(){t.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));W.appendChild(g);M.appendChild(R);M.appendChild(L);M.appendChild(P);I.appendChild(X);I.appendChild(A);I.appendChild(W);O.appendChild(M);O.appendChild(I);l.appendChild(O);
-m.appendChild(l);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var aa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
-var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";m.appendChild(S);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-l.className="geBtn",g.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),l.className="geBtn",g.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";g.appendChild(l);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&
+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 h=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,m,n,r){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);
+null!=u&&mxStencilRegistry.getStencil(u)}return h.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){w.value=Math.max(1,Math.min(h,Math.max(parseInt(w.value),parseInt(k.value))));k.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(k.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,h=0,m=da.get(),n=1/d.pageScale,r=v.checked;if(r)var n=parseInt(W.value),t=parseInt(P.value),n=Math.min(m.height*t/(e.height/d.view.scale),m.width*n/(e.width/
+d.view.scale));else n=parseInt(p.value)/(100*d.pageScale),isNaN(n)&&(c=1/d.pageScale,p.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*c);m.height=Math.ceil(m.height*c);n*=c;!r&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*m.width,h-=e.y*m.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(d,n,m,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var u=b.writeHead;b.writeHead=function(d){u.apply(this,arguments);null!=a.editor.fontCss&&
+(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=r;b.appendGraph(d,n,g,h,f,!0)}return b}var c=parseInt(T.value)/100;isNaN(c)&&(c=1,T.value=
+"100 %");var c=.75*c,e=k.value,g=w.value,h=!r.checked,n=null;h&&(h=e==m&&g==m);if(!h&&null!=a.pages&&a.pages.length){var t=0,h=a.pages.length-1;r.checked||(t=parseInt(e)-1,h=parseInt(g)-1);for(var u=t;u<=h;u++){var l=a.pages[u],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,t=!1,z=null,x=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(g=l.viewState.pageVisible,t=l.viewState.mathEnabled,z=l.viewState.background,
+x=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(t="0"!=l.mapping.diagramMap.get("mathEnabled"),z=l.mapping.diagramMap.get("background"),x=l.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);e.background=z;e.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;e.pageVisible=g;e.mathEnabled=t;var q=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?u+1:q.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(l);e.model.setRoot(l.root)}n=b(e,n,u!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&&(h=n.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&d&&PrintDialog.printPreview(n)}
+var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var h=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");
+r.setAttribute("name","pages-printdialog");n.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var u=r.cloneNode(!0);r.setAttribute("checked","checked");u.setAttribute("value","range");n.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
+"number");k.setAttribute("min","1");k.style.width="50px";n.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var w=k.cloneNode(!0);n.appendChild(w);mxEvent.addListener(k,"focus",function(){u.checked=!0});mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){m=g+
+1;k.value=m;w.value=m;break}k.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(n);var l=document.createElement("div");l.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type","radio");q.setAttribute("name","printZoom");l.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));l.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
+p.setAttribute("value","100 %");p.style.width="50px";l.appendChild(p);mxEvent.addListener(p,"focus",function(){q.checked=!0});e.appendChild(l);var n=n.cloneNode(!1),v=q.cloneNode(!0);v.setAttribute("value","fit");q.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(v);n.appendChild(g);l=document.createElement("table");l.style.display="inline-block";var Q=document.createElement("tbody"),
+S=document.createElement("tr"),K=S.cloneNode(!0),H=document.createElement("td"),V=H.cloneNode(!0),L=H.cloneNode(!0),O=H.cloneNode(!0),X=H.cloneNode(!0),A=H.cloneNode(!0);H.style.textAlign="right";O.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";V.appendChild(W);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));L.appendChild(g);mxUtils.write(O,mxResources.get("fitToBy"));var P=W.cloneNode(!0);X.appendChild(P);mxEvent.addListener(W,"focus",function(){v.checked=!0});mxEvent.addListener(P,"focus",function(){v.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));A.appendChild(g);S.appendChild(H);S.appendChild(V);S.appendChild(L);K.appendChild(O);K.appendChild(X);K.appendChild(A);Q.appendChild(S);Q.appendChild(K);l.appendChild(Q);
+n.appendChild(l);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);
+var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","100 %");T.style.width="60px";n.appendChild(T);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+l.className="geBtn",g.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),l.className="geBtn",g.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";g.appendChild(l);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var m=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)):(m.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,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;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
@@ -2715,15 +2715,15 @@ function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.r
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",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&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
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.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};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 r=mxUtils.parseXml(d),h=this.editor.extractGraphModel(r.documentElement,
-null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(w){}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))}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;
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};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 r=mxUtils.parseXml(d),h=this.editor.extractGraphModel(r.documentElement,
+null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(m){}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))}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 h=this.updatePageRoot(new DiagramPage(c[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),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,r,h,w,u,m,k){b=null!=b?b:this.editor.graph;r=null!=r?r:!1;m=null!=m?m:!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()){var p=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(p);if(b.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}k?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
-g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(w||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(h||!r&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
-App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,m,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var g=
-this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=g&&g.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(g.graphModel),g.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[e].node,c),g.needsUpdate=!1);d.appendChild(this.pages[e].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,r,h,w,u,m){r=null!=r?r:!0;w=null!=w?w:this.getXmlFileData(r,null!=h?h:!1);m=null!=m?m:this.getCurrentFile();
-h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var d=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(w,h,m,window.location.href,a,b,c,e,r,u);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
+function(a,b,c,e,r,h,m,u,k,t){b=null!=b?b:this.editor.graph;r=null!=r?r:!1;k=null!=k?k:!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()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}t?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(m||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(h||!r&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,k,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=
+this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[f].node,c),e.needsUpdate=!1);d.appendChild(this.pages[f].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,r,h,m,u,k){r=null!=r?r:!0;m=null!=m?m:this.getXmlFileData(r,null!=h?h:!1);k=null!=k?k:this.getCurrentFile();
+h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var d=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(m,h,k,window.location.href,a,b,c,e,r,u);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
return a};EditorUi.prototype.getHtml=function(a,b,c,e,r,h){h=null!=h?h:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==r&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=r&&(r=r.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==r?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=r?'<meta http-equiv="refresh" content="0;URL=\''+r+"'\"/>\n":"")+"</head>\n<body"+(null==r&&null!=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==r?'<script type="text/javascript" src="'+f+'">\x3c/script>':
@@ -2732,244 +2732,251 @@ this.currentPage));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compati
mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==r?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+r+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var d=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,r,h,w){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,r));this.saveData(f,a,g,"text/xml")}else if("html"==
-a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,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!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(d,a,e,b,w);this.editor.graph.pageVisible=c;return f}catch(x){this.handleError(x)}}));else{var p=null,
-k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var l=this.editor.graph.background;if(w||l==mxConstants.NONE)l=null;var n=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
-k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,r){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,r,h,m){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,r));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,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!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(d,a,e,b,m);this.editor.graph.pageVisible=c;return f}catch(z){this.handleError(z)}}));else{var n=null,
+k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var l=this.editor.graph.background;if(m||l==mxConstants.NONE)l=null;var q=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
+k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(B){this.handleError(B)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,r){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>
MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&r&&(g=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=
-function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=
-window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();
-this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,
-r);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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(f){}};
-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,r,h,w){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(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){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=
-JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:
-null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g=this.convertDataUri(g),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==e.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=
-this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:
-a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;c=m.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&m.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var v=document.createElement("div");v.style.position="absolute";v.style.right="0px";v.style.top="0px";v.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(v.style.backgroundColor="inherit");m.style.position=
-"relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)v.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),
-null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var q=this.editor.graph,t=null,y=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),B=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=l.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",
-t.style.marginRight="2px",t.style.marginTop="-2px",v.insertBefore(t,v.firstChild),m.style.paddingRight=18*v.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),m.style.paddingRight=18*v.childNodes.length+"px")})):null==n&&(n=l.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),v.insertBefore(n,v.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,
-function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(m.style.paddingRight=18*v.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(d)})),m.style.paddingRight=18*v.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,d,c,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);B(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=
-q.getSelectionCells(),b=q.view.getBounds(d),c=q.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=q.view.translate.x;b.y-=q.view.translate.y;C(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",
-k.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),
-q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,h,m,p,r,w,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,m,p),d)],d[0].vertex=!0,C(d,new mxRectangle(0,0,m,p),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,l=mxUtils.bind(this,function(d,
-c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);B(a);this.spinner.stop();v=!0}catch(S){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),p=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(p);C(p,new mxRectangle(0,
-0,r.width,r.height),a)}v=!0}catch(S){null!=window.console&&console.log("error in drop handler:",S)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r)||/(\.vsd)($|\?)/i.test(r))?this.importVisio(u,function(a){l(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&
-null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
-a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));v.insertBefore(l,v.firstChild);mxEvent.addListener(l,"click",y);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&y(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));v.insertBefore(c,v.firstChild);mxEvent.addListener(c,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||
-(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),v.insertBefore(c,v.firstChild))}m.appendChild(v);m.style.paddingRight=18*v.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&
-(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat=
-"right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=
-3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=
-null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage=
-"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
+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,h=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()),m()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+m=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(h,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();h()}));m();h()}null!=b&&b()});if(null!=a.url){var e=a.url;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f(a.data)};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||
+c.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){editorUi.alert(a.tooltip)});return d}var b=null;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var c=this.editor.graph,e=c.getModel();e.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=e.getCell(a.getAttribute("id"));if(null!=m){try{var k=a.getAttribute("value");if(null!=k){var l=mxUtils.parseXml(k).documentElement;
+if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(m,l);else for(var t=l.attributes,x=0;x<t.length;x++)c.setAttributeForCell(m,t[x].nodeName,0<t[x].nodeValue.length?t[x].nodeValue:null)}}catch(z){null!=window.console&&console.log("Error in value for "+m.id+": "+z)}try{var q=a.getAttribute("style");null!=q&&c.model.setStyle(m,q)}catch(z){null!=window.console&&console.log("Error in style for "+m.id+": "+z)}try{var p=a.getAttribute("icon");if(null!=p){var v=0<p.length?JSON.parse(p):null;null!=
+v&&v.append||c.removeCellOverlays(m);null!=v&&c.addCellOverlay(m,d(v))}}catch(z){null!=window.console&&console.log("Error in icon for "+m.id+": "+z)}try{var B=a.getAttribute("geometry");if(null!=B){var B=JSON.parse(B),y=c.getCellGeometry(m);if(null!=y){y=y.clone();for(key in B){var C=parseFloat(B[key]);"dx"==key?y.x+=C:"dy"==key?y.y+=C:"dw"==key?y.width+=C:"dh"==key?y.height+=C:y[key]=parseFloat(B[key])}c.model.setGeometry(m,y)}}}catch(z){null!=window.console&&console.log("Error in icon for "+m.id+
+": "+z)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(c.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))c.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(h=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
+1);a=a.nextSibling}}finally{e.endUpdate()}null!=h&&this.chromelessResize&&this.chromelessResize(!0,h)}return b};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();
+this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
+this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
+this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=
+window.console&&console.log("error in fileLoaded:",a,r);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,r,h,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var 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){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
+(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=
+0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g=this.convertDataUri(g),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
+b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));
+return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var l=k.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top=
+"0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");l.style.position="relative";var x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.setAttribute("valign","absmiddle");x.setAttribute("border","0");x.style.margin="0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var p=this.editor.graph,v=null,B=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),y=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v),v=x.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",t.insertBefore(v,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=v&&null!=v.parentNode&&(v.parentNode.removeChild(v),l.style.paddingRight=18*t.childNodes.length+"px")})):null==q&&(q=x.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",
+mxResources.get("save")),t.insertBefore(q,t.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*t.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,d,c,e){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var g=
+0;g<a.length;g++){var h=p.getCellGeometry(a[g]);null!=h&&h.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);y(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),
+p.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=p.getSelectionCells(),b=p.view.getBounds(d),c=p.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=p.view.translate.x;b.y-=p.view.translate.y;C(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility=
+"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",p.panningManager.stop(),p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
+k.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility=
+"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,h,m,n,r,t,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,m,n),d)],d[0].vertex=!0,C(d,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
+0<b.length&&(f.parentNode.removeChild(f),f=null);else{var l=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);y(a);this.spinner.stop();l=!0}catch(T){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),
+r=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,r.width,r.height),a)}l=!0}catch(T){null!=window.console&&console.log("error in drop handler:",T)}}l||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=r&&(/(\.vsdx?)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r))?this.importVisio(u,function(a){q(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,r)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",
+k.style.cursor="");a.stopPropagation();a.preventDefault()}));x=x.cloneNode(!1);x.setAttribute("src",IMAGE_PATH+"/edit.gif");x.setAttribute("title",mxResources.get("edit"));t.insertBefore(x,t.firstChild);mxEvent.addListener(x,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});c=x.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=
+a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}l.appendChild(t);l.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=
+4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position=
+"relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),
+Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",
+Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor=
+"#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,r){a=new ImageDialog(this,a,b,c,e,r);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,
!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var 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,r){a=new LibraryDialog(this,a,b,c,e,r);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,
function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){d();f.retry()}),"undefined"!=
typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),
a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,g)}else null!=c&&c()};EditorUi.prototype.showError=
-function(a,b,c,e,r,h,k,u,m,v,l,n){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,r,h,k,n,u,m);this.showDialog(a.container,v||340,l||150,!0,!1);a.init()};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,r){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=
+function(a,b,c,e,r,h,m,k,l,t,q,p){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,r,h,m,p,k,l);this.showDialog(a.container,t||340,q||150,!0,!1);a.init()};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,r){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=
b&&b()},function(){d();null!=c&&c()},e,r)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,r){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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],
-10):!1)?!1:f;if(f||this.isOffline()){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(m){}}else this.createEchoRequest(a,b,c,e,r).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,r,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
-c?"&mime="+c:"")+(null!=r?"&format="+r:"")+(null!=h?"&base64="+h:"")+(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),g=Array(e),k=0;k<e;++k){for(var u=1024*k,m=Math.min(u+1024,c),v=Array(m-u),l=0;u<m;++l,++u)v[l]=d[u].charCodeAt(0);g[k]=new Uint8Array(v)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,r,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=r&&
-(!mxClient.IS_IOS||!navigator.standalone);r=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);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(F){this.handleError(F)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,1<r,4<r&&(!h||6>r)?3:4,a,c,e);this.showDialog(b.container,420,r==(mxClient.IS_IOS?0:1)?160:4<r?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
+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(w){}}else this.createEchoRequest(a,b,c,e,r).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,r,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+c?"&mime="+c:"")+(null!=r?"&format="+r:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),m=0;m<f;++m){for(var k=1024*m,l=Math.min(k+1024,c),t=Array(l-k),q=0;k<l;++q,++k)t[q]=d[k].charCodeAt(0);e[m]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&
+(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);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(F){this.handleError(F)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,m,null,1<k,4<k&&(!h||6>k)?3:4,a,c,e);this.showDialog(b.container,420,k==(mxClient.IS_IOS?0:1)?160:4<k?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=
null;var 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";
+this.exportDialog.style.zIndex=c.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",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"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,r){this.isLocalFileSave()?this.saveLocalFile(c,a,e,r,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,r,b,d)}),c,r,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,r,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);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){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,d,c)}catch(G){this.handleError(G)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&
-299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(G){this.handleError(G)}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,4<d?3:4,e,h,r);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,c,e,r,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,r,h,k,l,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,k,l,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",
-p=mxUtils.bind(this,function(a){this.spinner.stop();r&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,r,h){h=null!=h?h:!0;var d=
-document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),r||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(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 g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));g.appendChild(c);c=document.createElement("option");
-c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||
-b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,k){this.isLocalFileSave()?this.saveLocalFile(c,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,k,b,d)}),c,k,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,k,h,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);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){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,d,c)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&
+299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<d,4<d?3:4,e,h,k);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
+EditorUi.prototype.exportFile=function(a,b,c,e,k,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,k,h,m,l,q){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,m,l,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",
+n=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,q));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,k,h){h=null!=h?h:!0;var d=
+document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),k||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(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(){m.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 g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=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 g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,k,h,l,u){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!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?c="#U"+encodeURIComponent(l):(d=this.getCurrentFile(),u||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?
+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",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(a)}));d();m.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,k,h,m,l){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!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=m?c="#U"+encodeURIComponent(m):(d=this.getCurrentFile(),l||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?
this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+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)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,
-b,c,e,k,h,l,u,m,v,n){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==e&&(d.target=e);m||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];l&&(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);u&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),d.toolbar=c.join(" "));null!=v&&0<v.length&&(d.edit=v);null!=
-a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";n(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,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 p=document.createElement("input");p.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","type-embedhtmldialog");f=p.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(m);mxUtils.br(g);g.appendChild(p);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));g.appendChild(m);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(m=
-document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),g.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));f.setAttribute("checked","checked");null==c&&p.setAttribute("disabled","disabled");d.appendChild(g);var l=this.addLinkSection(d),n=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";d.appendChild(q);var t=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(d,mxResources.get("allPages"),g,!g),B=this.addCheckbox(d,mxResources.get("layers"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),K=this.addEditButton(d,C),x=K.getEditInput();
-x.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled");x.checked&&C.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(p.checked?c:null,n.checked,q.value,l.getTarget(),l.getColor(),t.checked,y.checked,B.checked,C.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};
+b,c,e,k,h,m,l,q,t,x){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==e&&(d.target=e);q||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];m&&(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);l&&c.push("layers");0<c.length&&(q&&c.push("lightbox"),d.toolbar=c.join(" "));null!=t&&0<t.length&&(d.edit=t);null!=
+a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,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 n=document.createElement("input");n.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","type-embedhtmldialog");f=n.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(k=
+document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));f.setAttribute("checked","checked");null==c&&n.setAttribute("disabled","disabled");d.appendChild(g);var l=this.addLinkSection(d),q=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,
+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value="100%";d.appendChild(p);var v=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(d,mxResources.get("allPages"),g,!g),y=this.addCheckbox(d,mxResources.get("layers"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),I=this.addEditButton(d,C),z=I.getEditInput();
+z.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&C.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(n.checked?c:null,q.checked,p.value,l.getTarget(),l.getColor(),v.checked,B.checked,y.checked,C.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};
EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,k,h){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",
-p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));p.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";p.appendChild(r);d.appendChild(p);r=document.createElement("a");
-r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));p.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
-this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,n=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",
-n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=e+"px",d.appendChild(n),mxUtils.br(d);var q=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,B),K=C.getEditInput(),x=this.addCheckbox(d,mxResources.get("layers"),!0);x.style.marginLeft=K.style.marginLeft;x.style.marginBottom="16px";
-x.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(x.removeAttribute("disabled"),K.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&B.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==t?!0:t.checked,B.checked,C.getLink(),x.checked,null!=l?l.value:null,null!=
-n?n.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){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:4px";
-d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,m=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=m&&(m.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=p?p.checked:!1,null!=m?m.checked:!1)}),null,a,b);this.showDialog(a.container,
-300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,h,l,u){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==u?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 r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width=
-"60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value=this.lastExportZoom||"100%";d.appendChild(r);mxUtils.write(d,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";d.appendChild(n);mxUtils.br(d);var w=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=
-u),q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");h&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(q,"change",function(){q.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked",
-"checked"),t.defaultChecked=!0);var K=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||x.setAttribute("disabled","disabled");b&&(d.appendChild(x),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=26);var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=u),z=null!=this.pages&&1<this.pages.length,
-J=this.addCheckbox(d,z?mxResources.get("allPages"):"",z,!z,null,"jpeg"!=u);J.style.marginLeft="24px";J.style.marginBottom="16px";z||(J.style.visibility="hidden");mxEvent.addListener(E,"change",function(){E.checked&&z?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});l&&z||J.setAttribute("disabled","disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=n.value;this.lastExportZoom=r.value;k(r.value,w.checked,!q.checked,K.checked,E.checked,x.checked,
-n.value,t.checked,!J.checked)}),null,c,e);this.showDialog(a.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){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 m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),r=this.addCheckbox(d,c),l=this.addCheckbox(d,mxResources.get("lightbox"),!0),n=this.addEditButton(d,l),q=n.getEditInput(),t=1<f.model.getChildCount(f.model.getRoot()),B=this.addCheckbox(d,mxResources.get("layers"),t,!t);B.style.marginLeft=q.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?
-(t&&B.removeAttribute("disabled"),q.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&l.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(m.checked,p.checked,r.checked,l.checked,n.getLink(),B.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,c,e,k,h,l,n){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('https://www.draw.io/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
-a&&(g+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+d+'"'+m+(""!=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){n({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()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,c,e,k,h,l){var d=this.editor.graph.getSvg(),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 r=" ",n="";e&&(r="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+r+"/>")}))}else n="",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('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=n&&d.setAttribute("style",n),l(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+
+n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));n.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";n.appendChild(r);d.appendChild(n);r=document.createElement("a");
+r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));n.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
+this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,q=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,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",d.appendChild(q),mxUtils.br(d);var p=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var v=null;if(null==g||g.constructor!=window.DriveFile||b)v=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var y=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,y),I=C.getEditInput(),z=this.addCheckbox(d,mxResources.get("layers"),!0);z.style.marginLeft=I.style.marginLeft;z.style.marginBottom="16px";
+z.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(z.removeAttribute("disabled"),I.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&y.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){k(p.getTarget(),p.getColor(),null==v?!0:v.checked,y.checked,C.getLink(),z.checked,null!=l?l.value:null,null!=
+q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){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:4px";
+d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,k=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=n?n.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,
+300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,h,m,l){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width=
+"60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value=this.lastExportZoom||"100%";d.appendChild(r);mxUtils.write(d,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";d.appendChild(u);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=
+l),p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft="24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");h&&(d.appendChild(v),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(p,"change",function(){p.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(v.setAttribute("checked",
+"checked"),v.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(d.appendChild(z),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=26);var N=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=l),E=null!=this.pages&&1<this.pages.length,
+J=this.addCheckbox(d,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=l);J.style.marginLeft="24px";J.style.marginBottom="16px";E||(J.style.visibility="hidden");mxEvent.addListener(N,"change",function(){N.checked&&E?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});m&&E||J.setAttribute("disabled","disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=r.value;k(r.value,q.checked,!p.checked,I.checked,N.checked,z.checked,
+u.value,v.checked,!J.checked)}),null,c,e);this.showDialog(a.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){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 n=this.addCheckbox(d,mxResources.get("fit"),!0),r=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(d,c),q=this.addCheckbox(d,mxResources.get("lightbox"),!0),p=this.addEditButton(d,q),v=p.getEditInput(),B=1<f.model.getChildCount(f.model.getRoot()),y=this.addCheckbox(d,mxResources.get("layers"),B,!B);y.style.marginLeft=v.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?
+(B&&y.removeAttribute("disabled"),v.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&q.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,q.checked,p.getLink(),y.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,b,c,e,k,h,m,l){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('https://www.draw.io/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
+a&&(g+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+d+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),
+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 n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+b,c,e,k,h,m){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var r=" ",l="";e&&(r="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=l?' style="'+l+'"':"")+r+"/>")}))}else l="",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('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),l+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=l&&d.setAttribute("style",l),m(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.convertMath=function(a,b,c,e){e()};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&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),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));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,c,e,k,h,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,h,l,n,m){m=null!=m?m:"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,k?this.getFileData(!0,null,null,null,c,n):null,m)}catch(F){"Invalid image"==F.message?this.downloadFile(m):this.handleError(F)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,l)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},h=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var h=
-b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),m=null,n=b[k].indexOf("format(",l);0<n&&(m=d(b[k].substring(n+7,b[k].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))d=
-"application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.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){e[a]=d;c--;h()}),mxUtils.bind(this,
-function(a){c--;h()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[k].substring(0,l)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,h,l,n,m,v,q,t,G,H){h=null!=h?h:!0;t=null!=t?t:this.editor.graph;G=null!=G?G:0;var d=m?null:t.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==m&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(d,null,null,H,null,null!=l?l:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
-function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(n*g)+2*G;m=Math.ceil(n*m)+2*G;f.setAttribute("width",g);f.setAttribute("height",m);var p=f.getContext("2d");null!=d&&(p.beginPath(),p.rect(0,0,g,m),p.fillStyle=d,p.fill());p.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(e,G/n,G/n);a(f)},0):(p.drawImage(e,G/n,G/n),a(f))}catch(V){null!=
-k&&k(V)}});e.onerror=function(a){null!=k&&k(a)};try{v&&this.editor.graph.addSvgShadow(c);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(x){null!=k&&k(x)}}),c,q)};EditorUi.prototype.createImageUrlConverter=
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,c,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,h,m,l,q){q=null!=q?q:"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,k?this.getFileData(!0,null,null,null,c,l):null,q)}catch(F){"Invalid image"==F.message?this.downloadFile(q):this.handleError(F)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,m)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},h=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var h=
+b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var m=1;m<b.length;m++){var k=b[m].indexOf(")"),l=null,t=b[m].indexOf("format(",k);0<t&&(l=d(b[m].substring(t+7,b[m].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))d=
+"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.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){e[a]=d;c--;h()}),mxUtils.bind(this,
+function(a){c--;h()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[m].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,h,m,l,q,t,p,v,D,G){h=null!=h?h:!0;v=null!=v?v:this.editor.graph;D=null!=D?D:0;var d=q?null:v.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==q&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(d,null,null,G,null,null!=m?m:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
+function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*D;m=Math.ceil(l*m)+2*D;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");null!=d&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=d,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,D/l,D/l);a(f)},0):(n.drawImage(e,D/l,D/l),a(f))}catch(R){null!=
+k&&k(R)}});e.onerror=function(a){null!=k&&k(a)};try{t&&this.editor.graph.addSvgShadow(c);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(z){null!=k&&k(z)}}),c,p)};EditorUi.prototype.createImageUrlConverter=
function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==
-e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),k=0;k<h.length;k++)mxUtils.bind(this,function(c){var h=e.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=f[h];null==m?(d++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=h&&c.setAttribute(g,h)})(h[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=
+e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),m=0;m<h.length;m++)mxUtils.bind(this,function(c){var h=e.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=f[h];null==m?(d++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=h&&c.setAttribute(g,h)})(h[m])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=
function(a,b,c,e,k,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(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("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(m){null!=c&&c(m)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
+String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(w){null!=c&&c(w)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,
-c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),m=this.editor.extractGraphModel(g.documentElement,
-null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){f.model.beginUpdate();try{for(a=0;a<p.length;a++){var l=this.updatePageRoot(new DiagramPage(p[a])),r=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[r+1]));f.model.execute(new ChangePage(this,l,l,r))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===
-m.nodeName&&(d=f.importGraphModel(m,b,c,e))}}catch(G){throw k||this.handleError(G,mxResources.get("invalidOrMissingFile")),G;}return d};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)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType=
-"blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,b,c)}catch(u){c(u)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(u){c(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(w){this.handleError(w)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
+c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(m){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,
+null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var l=n.getElementsByTagName("diagram");if(1==l.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){var r=this.updatePageRoot(new DiagramPage(l[a])),q=this.pages.length;null==r.getName()&&r.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,r,r,q))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===
+n.nodeName&&(d=f.importGraphModel(n,b,c,e))}}catch(D){throw k||this.handleError(D,mxResources.get("invalidOrMissingFile")),D;}return d};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)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a,e);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType=
+"blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,b,c)}catch(u){c(u)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(u){c(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(m){this.handleError(m)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var d in k.Pages)a.push(k.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;
-for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,h,l){h=null!=h?h:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
+for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,c,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),g=this.importXml(f,b,c,h,!0),0<g.length)return g}catch(D){}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)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/
+1)),g=this.importXml(f,b,c,h,!0),0<g.length)return g}catch(x){}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)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/
e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);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=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,h);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,h);else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value=
a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}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.importFile=function(a,b,c,e,k,h,l,n,m,v,q){v=null!=v?v:!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,l)):d=this.importXml(a,c,e,v);null!=n&&n(d)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=q?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,v),m=!0)),m||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,v);null!=n&&n(a)})):null!=m&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?(d=!0,this.importVisio(m,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-(200<=a.status&&299>=a.status?g(a.responseText):null!=n&&n(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,v));d||null==n||n(f);return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,h,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}h=a.charCodeAt(b++);
-if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&
-15)<<2|(k&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};EditorUi.prototype.importFiles=function(a,b,c,e,k,h,l,n,m,v,q,t){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=q||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>p){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph,
-m=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,h,m,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,e,f,g,h,m,k,d,t)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,r=p,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--r){this.spinner.stop();if(null!=n)n(u);else{var d=[];g.getModel().beginUpdate();
-try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}h(d)}}),D=0;D<p;D++)mxUtils.bind(this,function(d){var h=a[d],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var p=a.target.result,n=p.indexOf(","),r=decodeURIComponent(escape(atob(p.substring(n+1)))),x=mxUtils.parseXml(r),r=x.getElementsByTagName("svg");if(0<r.length){var r=r[0],u=t?null:r.getAttribute("content");
-null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(p.substring(0,n+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var l=a[0],r=parseFloat(l.getAttribute("width")),q=parseFloat(l.getAttribute("height")),v=l.getAttribute("viewBox");if(null==v||0==v.length)l.setAttribute("viewBox",
-"0 0 "+r+" "+q);else if(isNaN(r)||isNaN(q)){var u=v.split(" ");3<u.length&&(r=parseFloat(u[2]),q=parseFloat(u[3]))}p=this.createSvgDataUri(mxUtils.getXml(l));var w=Math.min(1,Math.min(e/Math.max(1,r)),e/Math.max(1,q)),t=k(p,h.type,b+d*m,c+d*m,Math.max(1,Math.round(r*w)),Math.max(1,Math.round(q*w)),h.name,f);if(isNaN(r)||isNaN(q)){var z=new Image;z.onload=mxUtils.bind(this,function(){r=Math.max(1,z.width);q=Math.max(1,z.height);t[0].geometry.width=r;t[0].geometry.height=q;l.setAttribute("viewBox",
-"0 0 "+r+" "+q);p=this.createSvgDataUri(mxUtils.getXml(l));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[t[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(l))}return t}}}catch(ra){}return null})):w(d,mxUtils.bind(this,function(){return k(u,"text/xml",b+d*m,c+d*m,0,0,h.name)}))}}else{r=!1;if("image/png"==h.type){var z=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var D=new Image;D.src=a.target.result;w(d,
-mxUtils.bind(this,function(){return k(z,"text/xml",b+d*m,c+d*m,D.width,D.height,h.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,
-l,p){w(d,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var n=f&&this.isResampleImage(a.target.result,q)?Math.min(1,Math.min(e/l,e/p)):1;return k(g,h.type,b+d*m,c+d*m,Math.round(l*n),Math.round(p*n),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,q)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(h.name)||
-/(\.vssx)($|\?)/i.test(h.name)||/(\.vsd)($|\?)/i.test(h.name)?k(null,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?p.readAsDataURL(h):p.readAsText(h)})(D)});g?this.confirmImageResize(function(a){f=a;u()},m):u()};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)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,h){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,
-h))try{var g=Math.max(d/k,f/k);if(1<g){var l=Math.round(d/g),p=Math.round(f/g),n=document.createElement("canvas");n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var r=n.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=l;q.height=p;var t=q.toDataURL();r!==t&&(b=r,d=l,f=p)}}}catch(B){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=
-function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=m;m+=b;return a.substring(d,m)}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 m=0;if(d(a,8)!=String.fromCharCode(137)+
-"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,m);do{var l=f(a);if("IDAT"==d(a,4)){k=a.substring(0,m-8);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);k+=g(c.length)+b+c+g(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+l);d(a,l);d(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,
-!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&
-"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(r){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&
-(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,d){a(d.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<
-d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&
-this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var n=
-c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=n.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||
-null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var m=this.actions.get("print");m.setEnabled(!mxClient.IS_IOS||!navigator.standalone);m.visible=m.isEnabled();if(!this.editor.chromeless||this.editor.editable){var v=function(){window.setTimeout(function(){t.innerHTML="&nbsp;";t.focus();document.execCommand("selectAll",!1,
-null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=
-a.clipboardData||a.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 g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],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]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],
-h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(O){}}),!1);var t=document.createElement("div");t.style.position="absolute";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.display="block";t.contentEditable=!0;mxUtils.setOpacity(t,0);t.style.width="1px";t.style.height="1px";t.innerHTML="&nbsp;";var F=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,
-function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||F||(t.style.left=c.container.scrollLeft+10+"px",t.style.top=c.container.scrollTop+10+"px",c.container.appendChild(t),F=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){t.focus();document.execCommand("selectAll",!1,null)},0):(t.focus(),document.execCommand("selectAll",
-!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!F||224!=b&&17!=b&&91!=b||(F=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),t.parentNode.removeChild(t))}),0)}));mxEvent.addListener(t,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(t),v())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(t,!0),
-v())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,t);t.innerHTML="&nbsp;"}),0))}),!0);var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==t?!0:G.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||
-0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,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()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){m=document.createElement("div");m.style.position="absolute";m.style.top="95px";m.style.left="250px";m.style.width="2000px";m.style.height="30px";m.style.background="whiteSmoke";document.body.appendChild(m);var H=document.createElement("div");H.style.position="absolute";H.style.top="125px";H.style.left="220px";H.style.width=
-"30px";H.style.height="1000px";H.style.background="whiteSmoke";document.body.appendChild(H);var y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="220px";y.style.width="30px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);this.vRuler=new mxRuler(this.editor.graph,H,!0);this.hRuler=new mxRuler(this.editor.graph,m,!1)}if("1"==urlParams.test){m=document.getElementById("geFooter");null!=m&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),m.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var 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 B=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:B.apply(this,arguments)}}m=document.getElementById("geInfo");null!=m&&m.parentNode.removeChild(m);if(Graph.fileSupport&&
-(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,
-"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var m=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(k=b[0].getAttribute("href")));var l=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,l))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;p()},mxEvent.isControlDown(a)):p()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,
-null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
-EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
-mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
-mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;
-if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.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){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===
-d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(m){}try{var d=b.getElementsByTagName("span"),l=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);
-this.isCompatibleString(l)&&(g=!0,e=l)}catch(m){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,d,d)):(g=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,g.x+d,g.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&
-this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(m){}}}}};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?"https://www.draw.io/":"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 h=document.documentElement;c=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,
-e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=d+"px";h.style.width=Math.max(0,c-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
-var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var 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){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)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
-e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(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('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));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(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(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))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),
-this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function 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),g=0;g<e;g++)this.addBasenamesForCell(c.model.getChildAt(a,g),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&
-(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
-this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
-function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=
-JSON.parse(h)}catch(z){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",
-value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,
-function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(z){k.postMessage(JSON.stringify({event:"draft",
-error:z.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,n=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=h.callback?k.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,l?mxUtils.bind(this,function(a){this.recentReadyCallback=
-a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==
-h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==
-h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==
-a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),w=r.getGlobalVariable,x=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(r.container);
-r.model.setRoot(x.root)}this.exportToCanvas(mxUtils.bind(this,function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(null)}),null,null,null,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=
-h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),p.xml=mxUtils.getXml(l),p.data=this.getFileData(null,null,!0,null,null,null,l),p.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);p.xml=this.getFileData(!0);p.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(l),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));p.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==h.action)c=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
-h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}h=g(h);d=!0;try{a(h,f)}catch(z){this.handleError(z)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var E=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=E();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=E();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||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
-"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,h=null,k="",l="auto",m="auto",n=null,q=null,t=40,G=40,H=0,y=this.editor.graph;
-y.getGraphBounds();for(var B=function(){y.setSelectionCells(S);y.scrollCellToVisible(y.getSelectionCell())},C=y.getFreeInsertPoint(),K=C.x,x=C.y,C=x,E=null,z="auto",J=[],V=null,Y=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var O=a.indexOf(":");if(0<O){var M=mxUtils.trim(a.substring(1,O)),I=mxUtils.trim(a.substring(O+1));"label"==M?E=y.sanitizeHtml(I):
-"style"==M?e=I:"identity"==M&&0<I.length&&"-"!=I?h=I:"namespace"==M&&0<I.length&&"-"!=I?k=I:"width"==M?l=I:"height"==M?m=I:"left"==M&&0<I.length?n=I:"top"==M&&0<I.length?q=I:"ignore"==M?Y=I.split(","):"connect"==M?J.push(JSON.parse(I)):"link"==M?V=I:"padding"==M?H=parseFloat(I):"edgespacing"==M?t=parseFloat(I):"nodespacing"==M?G=parseFloat(I):"layout"==M&&(z=I)}}}var R=this.editor.csvToArray(b[U]);a=null;if(null!=h)for(var L=0;L<R.length;L++)if(h==R[L]){a=L;break}null==E&&(E="%"+R[0]+"%");if(null!=
-J)for(var P=0;P<J.length;P++)null==c[J[P].to]&&(c[J[P].to]={});y.model.beginUpdate();try{for(L=U+1;L<b.length;L++){var X=this.editor.csvToArray(b[L]);if(X.length==R.length){var A=null,W=null!=a?k+X[a]:null;null!=W&&(A=y.model.getCell(W));null==A&&(A=new mxCell(E,new mxGeometry(K,C,0,0),e||"whiteSpace=wrap;html=1;"),A.vertex=!0,A.id=W);for(var N=0;N<X.length;N++)y.setAttributeForCell(A,R[N],X[N]);y.setAttributeForCell(A,"placeholders","1");A.style=y.replacePlaceholders(A,A.style);for(P=0;P<J.length;P++)c[J[P].to][A.getAttribute(J[P].to)]=
-A;null!=V&&"link"!=V&&(y.setLinkForCell(A,A.getAttribute(V)),y.setAttributeForCell(A,V,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[A]));var Z=this.editor.graph.getPreferredSizeForCell(A);A.vertex&&(null!=n&&null!=A.getAttribute(n)&&(A.geometry.x=K+parseFloat(A.getAttribute(n))),null!=q&&null!=A.getAttribute(q)&&(A.geometry.y=x+parseFloat(A.getAttribute(q))),"@"==l.charAt(0)&&null!=A.getAttribute(l.substring(1))?A.geometry.width=parseFloat(A.getAttribute(l.substring(1))):A.geometry.width=
-"auto"==l?Z.width+H:parseFloat(l),"@"==m.charAt(0)&&null!=A.getAttribute(m.substring(1))?A.geometry.height=parseFloat(A.getAttribute(m.substring(1))):A.geometry.height="auto"==m?Z.height+H:parseFloat(m),C+=A.geometry.height+G);d.push(y.addCell(A))}}for(var aa=d.slice(),S=d.slice(),P=0;P<J.length;P++)for(var T=J[P],L=0;L<d.length;L++){var A=d[L],da=A.getAttribute(T.from);if(null!=da){y.setAttributeForCell(A,T.from,null);for(var na=da.split(","),N=0;N<na.length;N++){var ba=c[T.to][na[N]];null!=ba&&
-(E=T.label,null!=T.fromlabel&&(E=(A.getAttribute(T.fromlabel)||"")+(E||"")),null!=T.tolabel&&(E=(E||"")+(ba.getAttribute(T.tolabel)||"")),S.push(y.insertEdge(null,null,E||"",T.invert?ba:A,T.invert?A:ba,T.style||y.createCurrentEdgeStyle())),mxUtils.remove(T.invert?A:ba,aa))}}}if(null!=Y)for(L=0;L<d.length;L++)for(A=d[L],N=0;N<Y.length;N++)y.setAttributeForCell(A,mxUtils.trim(Y[N]),null);var ea=new mxParallelEdgeLayout(y);ea.spacing=t;var qa=function(){ea.execute(y.getDefaultParent());for(var a=0;a<
-d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==l&&(b.width=Math.round(y.snap(b.width)));"auto"==m&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==z){var ga=new mxCircleLayout(y);ga.resetEdges=!1;var ra=ga.isVertexIgnored;ga.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ga.execute(y.getDefaultParent());qa()},!0,B);B=null}else if("horizontaltree"==z||"verticaltree"==
-z||"auto"==z&&S.length==2*d.length-1&&1==aa.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==z);ha.levelDistance=G;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<aa.length?aa[0]:null)},!0,B);B=null}else if("horizontalflow"==z||"verticalflow"==z||"auto"==z&&1==aa.length){y.view.validate();var ia=new mxHierarchicalLayout(y,"horizontalflow"==z?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=G;
-ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(y.getDefaultParent(),S);y.moveCells(S,K,x)},!0,B);B=null}else if("organic"==z||"auto"==z&&S.length>d.length){y.view.validate();var ca=new mxFastOrganicLayout(y);ca.forceConstant=3*G;ca.resetEdges=!1;var ja=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ea=new mxParallelEdgeLayout(y);ea.spacing=t;this.executeLayout(function(){ca.execute(y.getDefaultParent());qa()},!0,B);B=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
-B&&B()}}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,440,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.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 h=b.init;b.init=function(){h.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 h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.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=0;null==this.drive&&"function"!==typeof window.DriveClient||
+" 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.importFile=function(a,b,c,e,k,h,m,l,q,t,p){t=null!=t?t:!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,m)):d=this.importXml(a,c,e,t);null!=l&&l(d)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=p?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,t),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,t);null!=l&&l(a)})):null!=q&&null!=m&&(/(\.vsdx?)($|\?)/i.test(m)||/(\.vssx)($|\?)/i.test(m))?(d=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&
+299>=a.status?g(a.responseText):null!=l&&l(null))}),m)):/(\.vsd)($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,t));d||null==l||l(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,h,m;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}h=a.charCodeAt(d++);if(d==c){b+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}m=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&
+15)<<2|(m&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,h,m,l,q,t,p,v){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=p||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>n){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph,
+n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,h,m,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,e,f,g,h,m,k,d,v)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,r=q,u=[],x=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--r){this.spinner.stop();if(null!=l)l(u);else{var d=[];g.getModel().beginUpdate();
+try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}h(d)}}),w=0;w<q;w++)mxUtils.bind(this,function(d){var h=a[d],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),r=decodeURIComponent(escape(atob(l.substring(q+1)))),u=mxUtils.parseXml(r),r=u.getElementsByTagName("svg");if(0<r.length){var r=r[0],z=v?null:r.getAttribute("content");
+null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?x(d,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var m=a[0],t=parseFloat(m.getAttribute("width")),r=parseFloat(m.getAttribute("height")),p=m.getAttribute("viewBox");if(null==p||0==p.length)m.setAttribute("viewBox",
+"0 0 "+t+" "+r);else if(isNaN(t)||isNaN(r)){var z=p.split(" ");3<z.length&&(t=parseFloat(z[2]),r=parseFloat(z[3]))}l=this.createSvgDataUri(mxUtils.getXml(m));var x=Math.min(1,Math.min(e/Math.max(1,t)),e/Math.max(1,r)),v=k(l,h.type,b+d*n,c+d*n,Math.max(1,Math.round(t*x)),Math.max(1,Math.round(r*x)),h.name,f);if(isNaN(t)||isNaN(r)){var E=new Image;E.onload=mxUtils.bind(this,function(){t=Math.max(1,E.width);r=Math.max(1,E.height);v[0].geometry.width=t;v[0].geometry.height=r;m.setAttribute("viewBox",
+"0 0 "+t+" "+r);l=this.createSvgDataUri(mxUtils.getXml(m));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[v[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(m))}return v}}}catch(ea){}return null})):x(d,mxUtils.bind(this,function(){return k(z,"text/xml",b+d*n,c+d*n,0,0,h.name)}))}}else{r=!1;if("image/png"==h.type){var E=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var w=new Image;w.src=a.target.result;x(d,
+mxUtils.bind(this,function(){return k(E,"text/xml",b+d*n,c+d*n,w.width,w.height,h.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,
+m,l){x(d,mxUtils.bind(this,function(){if(null!=g&&g.length<t){var q=f&&this.isResampleImage(a.target.result,p)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+d*n,c+d*n,Math.round(m*q),Math.round(l*q),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,p)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+d*n,c+d*n,240,160,h.name,function(a){x(d,function(){return a})})});/(\.vsdx?)($|\?)/i.test(h.name)||
+/(\.vssx)($|\?)/i.test(h.name)?k(null,h.type,b+d*n,c+d*n,240,160,h.name,function(a){x(d,function(){return a})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(w)});g?this.confirmImageResize(function(a){f=a;u()},q):u()};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)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,h){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,h))try{var g=Math.max(d/k,f/k);if(1<g){var l=Math.round(d/
+g),n=Math.round(f/g),q=document.createElement("canvas");q.width=l;q.height=n;q.getContext("2d").drawImage(a,0,0,l,n);var r=q.toDataURL();if(r.length<b.length){var p=document.createElement("canvas");p.width=l;p.height=n;var v=p.toDataURL();r!==v&&(b=r,d=l,f=n)}}}catch(y){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^
+b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=l;l+=b;return a.substring(d,l)}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 l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,
+4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,l);do{var n=f(a);if("IDAT"==d(a,4)){k=a.substring(0,l-8);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);k+=g(c.length)+b+c+g(e^4294967295);k+=a.substring(l-8,a.length);break}k+=a.substring(l-8,l-4+n);d(a,n);d(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
+null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(r){}null!=
+b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;
+c.addListener("pageLinkClicked",function(b,d){a(d.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?
+"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=
+function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var m=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");
+0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=m.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
+function(){var a=b.defaultFilename,d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,
+!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.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 g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],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]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var x=document.createElement("div");x.style.position="absolute";
+x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==
+b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||v||(x.style.left=c.container.scrollLeft+10+"px",x.style.top=c.container.scrollTop+10+"px",c.container.appendChild(x),v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){!v||224!=b&&17!=b&&91!=b||(v=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(x),t())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(x,!0),t())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(x.innerHTML=
+"&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,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()})))}));if("1"==urlParams.ruler&&"undefined"!==
+typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background="whiteSmoke";document.body.appendChild(p);var G=document.createElement("div");G.style.position="absolute";G.style.top="125px";G.style.left="220px";G.style.width="30px";G.style.height="1000px";G.style.background="whiteSmoke";document.body.appendChild(G);var B=document.createElement("div");B.style.position="absolute";B.style.top=
+"95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,G,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.test){p=document.getElementById("geFooter");null!=p&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
+"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var 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)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),
+C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var m=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=m;var k=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(m=b[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,g,!0,k,null,l))});k&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
+a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,
+f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
+mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.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){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(w){}try{var d=b.getElementsByTagName("span"),k=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(w){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,
+d,d)):(f=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,f.x+d,f.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(w){}}}}};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?"https://www.draw.io/":"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 h=document.documentElement;c=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=d+"px";h.style.width=
+Math.max(0,c-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var 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){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)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx?)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,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('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));
+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(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(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))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
+null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function 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.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),
+null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
+this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,h=mxUtils.bind(this,function(a,
+b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&
+(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(E){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&
+(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var m=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==h.action){m=null;m="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);
+this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();
+k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var m=1==h.enableRecent,l=1==h.enableSearch,m=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=h.callback?
+k.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,m?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",
+docUrl:a,info:b,name:d}),"*")});this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));
+null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var n=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,
+r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);r(a)});if(this.isExportToCanvas()){if(null!=
+this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),v=p.getGlobalVariable,z=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);n=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=
+this.getFileData(null,null,!0,null,null,null,m),n.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),
+"xmlsvg"==h.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),
+this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}k.postMessage(JSON.stringify(n),"*")}return}if("load"==h.action)c=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
+"12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",
+data:JSON.stringify(h)}),"*");return}}}h=g(h);d=!0;try{a(h,f)}catch(E){this.handleError(E)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var N=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=N();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=N();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||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?
+"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
+mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight=
+"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
+null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[];if(0<d.length){var e={},f=null,k=null,l="",q="auto",p="auto",v=null,F=null,D=40,G=40,B=0,y=this.editor.graph;y.getGraphBounds();for(var C=function(){null!=b?b(Z):(y.setSelectionCells(Z),y.scrollCellToVisible(y.getSelectionCell()))},I=y.getFreeInsertPoint(),z=I.x,N=I.y,I=N,E=null,J=
+"auto",R=[],Y=null,aa=null,Q=0;Q<d.length&&"#"==d[Q].charAt(0);){a=d[Q];for(Q++;Q<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[Q].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[Q].substring(1)),Q++;if("#"!=a.charAt(1)){var S=a.indexOf(":");if(0<S){var K=mxUtils.trim(a.substring(1,S)),H=mxUtils.trim(a.substring(S+1));"label"==K?E=y.sanitizeHtml(H):"style"==K?f=H:"identity"==K&&0<H.length&&"-"!=H?k=H:"namespace"==K&&0<H.length&&"-"!=H?l=H:"width"==K?q=H:"height"==K?p=H:"left"==K&&0<H.length?
+v=H:"top"==K&&0<H.length?F=H:"ignore"==K?aa=H.split(","):"connect"==K?R.push(JSON.parse(H)):"link"==K?Y=H:"padding"==K?B=parseFloat(H):"edgespacing"==K?D=parseFloat(H):"nodespacing"==K?G=parseFloat(H):"layout"==K&&(J=H)}}}var V=this.editor.csvToArray(d[Q]),S=null;if(null!=k)for(var L=0;L<V.length;L++)if(k==V[L]){S=L;break}null==E&&(E="%"+V[0]+"%");if(null!=R)for(var O=0;O<R.length;O++)null==e[R[O].to]&&(e[R[O].to]={});y.model.beginUpdate();try{for(L=Q+1;L<d.length;L++){var X=this.editor.csvToArray(d[L]);
+if(X.length==V.length){var A=null,W=null!=S?l+X[S]:null;null!=W&&(A=y.model.getCell(W));null==A&&(A=new mxCell(E,new mxGeometry(z,I,0,0),f||"whiteSpace=wrap;html=1;"),A.vertex=!0,A.id=W);for(var P=0;P<X.length;P++)y.setAttributeForCell(A,V[P],X[P]);y.setAttributeForCell(A,"placeholders","1");A.style=y.replacePlaceholders(A,A.style);for(O=0;O<R.length;O++)e[R[O].to][A.getAttribute(R[O].to)]=A;null!=Y&&"link"!=Y&&(y.setLinkForCell(A,A.getAttribute(Y)),y.setAttributeForCell(A,Y,null));y.fireEvent(new mxEventObject("cellsInserted",
+"cells",[A]));var da=this.editor.graph.getPreferredSizeForCell(A);A.vertex&&(null!=v&&null!=A.getAttribute(v)&&(A.geometry.x=z+parseFloat(A.getAttribute(v))),null!=F&&null!=A.getAttribute(F)&&(A.geometry.y=N+parseFloat(A.getAttribute(F))),"@"==q.charAt(0)&&null!=A.getAttribute(q.substring(1))?A.geometry.width=parseFloat(A.getAttribute(q.substring(1))):A.geometry.width="auto"==q?da.width+B:parseFloat(q),"@"==p.charAt(0)&&null!=A.getAttribute(p.substring(1))?A.geometry.height=parseFloat(A.getAttribute(p.substring(1))):
+A.geometry.height="auto"==p?da.height+B:parseFloat(p),I+=A.geometry.height+G);c.push(y.addCell(A))}}for(var T=c.slice(),Z=c.slice(),O=0;O<R.length;O++)for(var U=R[O],L=0;L<c.length;L++){var A=c[L],na=A.getAttribute(U.from);if(null!=na){y.setAttributeForCell(A,U.from,null);for(var oa=na.split(","),P=0;P<oa.length;P++){var ca=e[U.to][oa[P]];null!=ca&&(E=U.label,null!=U.fromlabel&&(E=(A.getAttribute(U.fromlabel)||"")+(E||"")),null!=U.tolabel&&(E=(E||"")+(ca.getAttribute(U.tolabel)||"")),Z.push(y.insertEdge(null,
+null,E||"",U.invert?ca:A,U.invert?A:ca,U.style||y.createCurrentEdgeStyle())),mxUtils.remove(U.invert?A:ca,T))}}}if(null!=aa)for(L=0;L<c.length;L++)for(A=c[L],P=0;P<aa.length;P++)y.setAttributeForCell(A,mxUtils.trim(aa[P]),null);var ia=new mxParallelEdgeLayout(y);ia.spacing=D;var qa=function(){ia.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==q&&(b.width=Math.round(y.snap(b.width)));"auto"==p&&
+(b.height=Math.round(y.snap(b.height)))}};if("circle"==J){var ea=new mxCircleLayout(y);ea.resetEdges=!1;var ra=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(y.getDefaultParent());qa()},!0,C);C=null}else if("horizontaltree"==J||"verticaltree"==J||"auto"==J&&Z.length==2*c.length-1&&1==T.length){y.view.validate();var fa=new mxCompactTreeLayout(y,"horizontaltree"==J);fa.levelDistance=G;fa.edgeRouting=
+!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(y.getDefaultParent(),0<T.length?T[0]:null)},!0,C);C=null}else if("horizontalflow"==J||"verticalflow"==J||"auto"==J&&1==T.length){y.view.validate();var ja=new mxHierarchicalLayout(y,"horizontalflow"==J?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=G;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(y.getDefaultParent(),Z);y.moveCells(Z,z,N)},!0,C);C=null}else if("organic"==J||"auto"==J&&Z.length>
+c.length){y.view.validate();var ba=new mxFastOrganicLayout(y);ba.forceConstant=3*G;ba.resetEdges=!1;var ka=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ia=new mxParallelEdgeLayout(y);ia.spacing=D;this.executeLayout(function(){ba.execute(y.getDefaultParent());qa()},!0,C);C=null}this.hideDialog()}finally{y.model.endUpdate()}null!=C&&C()}}catch(ga){this.handleError(ga)}};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,440,130,!0,!0);a.init()};var q=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=q.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 h=b.init;b.init=function(){h.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=0;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.trello&&"function"!==typeof window.TrelloClient||d++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&d++;mxClient.IS_IOS||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("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").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.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!=
@@ -2977,12 +2984,12 @@ this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.is
"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
"min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());
this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);
this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("find").setEnabled(e);this.actions.get("layers").setEnabled(e);this.actions.get("outline").setEnabled(e);
-this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,h){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,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale),n=Math.floor(g.height*k/d.view.scale);
-f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+n+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,
+arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,h){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,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale),q=Math.floor(g.height*k/d.view.scale);
+f.length<=MAX_REQUEST_SIZE&&l*q<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+q+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,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.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
@@ -2994,8 +3001,8 @@ EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mx
null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):
(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=
!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
@@ -3011,11 +3018,11 @@ EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,c=null;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.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):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/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c,
-"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,e){this.pages[c]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(e,
+"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(e)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-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 p=this.createControlTab(4,
+"&nbsp;&#10095;");p.style.position="absolute";p.style.right=this.editor.chromeless?"0px":"29px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var v=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=v+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,v-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(p,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(p,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,v-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(p,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
@@ -3025,62 +3032,62 @@ null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var c=a.getName();e.setAttribute("title",c);mxUtils.write(e,c);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(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!c){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);n.popup(q,t,null,l);this.setCurrentMenu(n,b)}mxEvent.consume(l)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!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 p=mxEvent.getClientX(l),v=mxEvent.getClientY(l);q.popup(p,v,null,l);this.setCurrentMenu(q,b)}mxEvent.consume(l)}}))};
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);e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,c){c.setAttribute("page",e.page.getId());return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.page=a.ui.getPageById(e.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,c));return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage"));
b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,e,q,t){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),g=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),l=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[f]&&g.push(a);return a==e[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[f],
-a))}for(f=0;f<g.length;f++)this.model.setVisible(g[f],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=b?b.style:h.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),m=h.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var n=h.getOutgoingEdges(h.model.getTerminal(d[0],
-!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<n.length;r++){var t=h.model.getTerminal(n[r],!1);if(f==q(t)){var u=h.view.getState(t);t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/m),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/m))}}p?g=0:d=0;for(r=0;r<n.length;r++)if(t=h.model.getTerminal(n[r],
-!1),f==q(t)&&(u=h.view.getState(t),t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var x=[];h.traverse(u.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});h.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function d(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);
-var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function g(a){h.model.beginUpdate();try{var b=
-h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=q(a),n=h.view.translate,p=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/p-n.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function f(a,
-b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(h.model.getTerminal(c[0],!0),d,a),c=h.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&h.setSelectionCell(d[c].cell)))))}var r=this,h=r.editor.graph,w=h.getModel();mxResources.parse("selectChildren=Select Children");
+Graph.prototype.foldCells=function(a,c,e,p,v){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g],
+a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return m.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=b?b.style:h.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function p(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function v(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=p(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),m=h.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var q=h.getOutgoingEdges(h.model.getTerminal(d[0],
+!0));if(null!=q){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<q.length;r++){var t=h.model.getTerminal(q[r],!1);if(f==p(t)){var u=h.view.getState(t);t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/m),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/m))}}n?g=0:d=0;for(r=0;r<q.length;r++)if(t=h.model.getTerminal(q[r],
+!1),f==p(t)&&(u=h.view.getState(t),t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY()))){var v=[];h.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});h.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function d(a){h.model.beginUpdate();try{var b=p(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);
+var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b=
+h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=p(a),q=h.view.translate,n=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-q.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-q.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/n-q.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function g(a,
+b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=p(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(h.model.getTerminal(c[0],!0),d,a),c=h.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&h.setSelectionCell(d[c].cell)))))}var r=this,h=r.editor.graph,m=h.getModel();mxResources.parse("selectChildren=Select Children");
mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==h.getSelectionCount()){c=h.getSelectionCell();var e=h.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(h.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(h.getSelectionCell())&&
(a.addSeparator(),0<h.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),
a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",
-function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+T");var m=h.removeCells;h.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(h.traverse(g,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return m.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var v=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
-a)}this.model.beginUpdate();try{var k=v.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var D=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var r=h.getIncomingEdges(a[0]);if(0<r.length){var t=h.view.getState(h.model.getTerminal(r[0],!0));if(null!=t){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-t.getCenterX())/h.view.scale,d=(u.getCenterY()-t.getCenterY())/h.view.scale)}}}}m=D.apply(this,arguments);
-if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],l,!0);else if(b(a[q])&&(r=h.getIncomingEdges(a[q]),0<r.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],l,!0);else if(0==h.getIncomingEdges(m[q]).length){n=l;if(null==n||n==h.model.getParent(a[q]))n=h.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,
-h.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var F=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var G={88:r.actions.get("selectChildren"),
-84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},H=r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var c=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(h.getSelectionCell()):g(h.getSelectionCell()):13==a.which&&(c=t(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&h.model.isEdge(c[0])?h.setSelectionCell(h.model.getTerminal(c[0],
-!1)):h.setSelectionCell(c[c.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=G[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(h.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||H.apply(this,arguments)};var y=h.connectVertex;h.connectVertex=function(a,c,e,f,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?g(a):f==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):y.call(this,a,c,e,f,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+T");var w=h.removeCells;h.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];m.isEdge(g)&&c(g)&&(e.push(g),g=m.getTerminal(g,!1));b(g)?(h.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return w.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var k=t.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,q=this.view.getState(f),n=null!=q?q.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||h.model.isEdge(a[p])&&null==h.model.getTerminal(a[p],!0)){f=h.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var r=h.getIncomingEdges(a[0]);if(0<r.length){var t=h.view.getState(h.model.getTerminal(r[0],!0));if(null!=t){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-t.getCenterX())/h.view.scale,d=(u.getCenterY()-t.getCenterY())/h.view.scale)}}}}m=x.apply(this,arguments);
+if(null!=m&&null!=a&&m.length==a.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p],l,!0);else if(b(a[p])&&(r=h.getIncomingEdges(a[p]),0<r.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],l,!0);else if(0==h.getIncomingEdges(m[p]).length){q=l;if(null==q||q==h.model.getParent(a[p]))q=h.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,
+h.getDefaultParent(),q,m[p])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var F=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:r.actions.get("selectChildren"),
+84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},G=r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var c=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(c=v(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&h.model.isEdge(c[0])?h.setSelectionCell(h.model.getTerminal(c[0],
+!1)):h.setSelectionCell(c[c.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=D[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||G.apply(this,arguments)};var B=h.connectVertex;h.connectVertex=function(a,c,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=p(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):v(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):B.call(this,a,c,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");h.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);h.insertEdge(w,!1);a.insert(d);a.insert(f);a.insert(l);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(h);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");h.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);h.insertEdge(m,!1);a.insert(d);a.insert(g);a.insert(l);a.insert(m);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(h);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var 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);e.insertEdge(d,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);g.insertEdge(f,!1);a.insert(d);a.insert(f);a.insert(c);a.insert(e);a.insert(g);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(d,!0);e.insertEdge(d,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(d);a.insert(g);a.insert(c);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,
-b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),h=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));h.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";h.className="geTitle";b.appendChild(h);return h}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
+b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"!=urlParams.lightbox&&
"0"!=urlParams.chrome){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
-document.getElementsByTagName("head")[0].appendChild(c)}catch(h){}var k=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+document.getElementsByTagName("head")[0].appendChild(c)}catch(m){}var k=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
@@ -3088,52 +3095,51 @@ Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>')
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(38,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=
5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.HIGHLIGHT_SIZE=5;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
-25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){l.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);
-var a=this.menus.get("save");null!=a&&a.setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var t=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){t.apply(this,
-arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
-a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){l.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};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 p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):p.apply(this,arguments)};var v=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){v.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;
+a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
-b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;g.apply(this,arguments);
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;f.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
-a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var f=
+a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var g=
EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
-(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);f.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
-function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var r=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c,d){var e=g.menus.get(a),f=K.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing=
-"border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function d(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";C.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
-"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),
-mxUtils.setOpacity(g,null!=f?10:20),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));C.appendChild(b);return b}
-r.apply(this,arguments);var g=this,k=this.editor.graph;mxUtils.bind(k,k.isEnabled);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+
-"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+
-"...";g.actions.put("importFile",new Action("File...",function(){k.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){k.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
-new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(g,"Insert from Text","formatSql");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(g,"Insert from Text","plantUml");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+
-"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(g)}));var n=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),
-b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile&&(g.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&g.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));g.menus.addMenuItems(a,
-"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var l=g.menus.get("openFrom"),p=l.funct;l.funct=function(a,b){p.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();
-null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-","revisionHistory"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var q=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){q.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);
-g.menus.addMenuItems(a,["publishLink"],b)})));var t=g.menus.get("language");g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);null!=t&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-",
-"plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),
-b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var B="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<B.length;c++)"-"==B[c]?a.addSeparator(b):n(a,b,mxResources.get(B[c])+"...",B[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
-b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.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 K=new Menubar(g,C);(l=900>e)||c("diagram");f([l?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),g.actions.get("image"),l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",g.actions.get("image"),
-l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)]);var x=c("insert",!0,l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([x,d(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)]);if(480<=e){var E=g.actions.get("undo"),l=g.actions.get("redo"),E=d("",E.funct,null,mxResources.get("undo")+" ("+E.shortcut+")",E,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),l=d("",l.funct,
-null,mxResources.get("redo")+" ("+l.shortcut+")",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([E,l]);if(560<=e){var l=g.actions.get("zoomIn"),E=g.actions.get("zoomOut"),z=g.actions.get("resetView");
-f([d("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&g.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",z,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=e?d("",l.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=e?d("",E.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",E,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null])}}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var J=g.descriptorChanged;g.descriptorChanged=function(){J.apply(this,arguments);var a=g.getCurrentFile();
-if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);C.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else C.removeAttribute("title")};g.setStatusText(g.editor.getStatus());C.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";C.appendChild(g.buttonContainer);g.menubarContainer=
-g.buttonContainer;null!=t&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=e&&(x=K.addMenu("",t.funct),x.setAttribute("title",mxResources.get("language")),x.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="24px 24px",x.style.position="absolute",x.style.height="24px",x.style.width="24px",x.style.zIndex="1",x.style.top="11px",x.style.right="14px",mxUtils.setOpacity(x,30),C.appendChild(x));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
-l=g.diagramContainer.parentNode;E=document.createElement("div");E.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";z=g.menus.get("viewZoom");if(null!=z){this.tabContainer.style.right="70px";x=K.addMenu("100%",z.funct);x.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");x.style.whiteSpace="nowrap";x.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";x.style.backgroundPosition=
-"right 6px center";x.style.backgroundRepeat="no-repeat";x.style.paddingRight="10px";x.style.display="block";x.style.position="absolute";x.style.textDecoration="none";x.style.textDecoration="none";x.style.right="0px";x.style.bottom="0px";x.style.overflow="hidden";x.style.textAlign="center";x.style.color="#000";x.style.fontSize="12px";x.style.color="#707070";x.style.width="59px";x.style.borderTop="1px solid lightgray";x.style.borderLeft="1px solid lightgray";x.style.height=parseInt(g.tabContainer.style.height)-
-1+"px";x.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";E.appendChild(x);z=mxUtils.bind(this,function(){x.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,z);g.editor.addListener("resetGraphView",z);g.editor.addListener("pageSelected",z);var V=g.setGraphEnabled;g.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(x.style.visibility=this.tabContainer.style.visibility)}}E.appendChild(g.tabContainer);
-E.appendChild(C);E.appendChild(g.diagramContainer);l.appendChild(E);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};
+(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);g.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
+function(a){n.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var r=Menus.prototype.init;Menus.prototype.init=function(){r.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("insertText").label=mxResources.get("text");c.actions.get("insertText").label=mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("formatXml")+
+"...";c.actions.get("insertRectangle").label=mxResources.get("rectangle");c.actions.get("insertEllipse").label=mxResources.get("ellipse");c.actions.get("insertRhombus").label=mxResources.get("rhombus");c.actions.get("insertImage").label=mxResources.get("image")+"...";c.actions.get("insertLink").label=mxResources.get("link")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+
+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&c.importFiles(a.files,null,null,c.maxImageSize)});a.click()}));c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
+new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&c.actions.put("plantUml",
+new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){c.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,
+["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime&&c.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,
+["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],
+b):c.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b);c.menus.addMenuItems(a,["publishLink"],b)})));var h=this.get("language");this.put("preferences",new Menu(mxUtils.bind(this,
+function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);c.isOfflineApp()||"1"==urlParams.embed||c.menus.addMenuItems(a,["-","plugins"],b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("options",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
+b)})))};var h=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=f.menus.get(a),g=k.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?
+(g.style.backgroundImage="url("+c+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");
+h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";g.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&
+b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";
+b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));g.appendChild(b);return b}h.apply(this,arguments);var d=document.createElement("div");d.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";d.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(d);var f=this;f.toolbar=this.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var k=new Menubar(f,g);(d=900>e)||a("diagram");c([d?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),
+f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+
+")",f.actions.get("image"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var l=a("insert",!0,d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([l,b(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=e){var n=f.actions.get("undo"),d=f.actions.get("redo"),n=b("",n.funct,null,mxResources.get("undo")+" ("+n.shortcut+")",n,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),d=b("",d.funct,
+null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");c([n,d]);if(560<=e){var d=f.actions.get("zoomIn"),n=f.actions.get("zoomOut"),p=f.actions.get("resetView");
+c([b("",function(){graph.popupMenuHandler.hideMenu();var a=graph.view.scale,b=graph.view.translate.x,c=graph.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-graph.view.scale)&&b==graph.view.translate.x&&c==graph.view.translate.y&&f.actions.get(graph.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",p,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=e?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=e?b("",n.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",n,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var q=f.descriptorChanged;f.descriptorChanged=function(){q.apply(this,arguments);var a=f.getCurrentFile();
+if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);g.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else g.removeAttribute("title")};f.setStatusText(f.editor.getStatus());g.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";g.appendChild(f.buttonContainer);f.menubarContainer=
+f.buttonContainer;d=this.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=e&&(l=k.addMenu("",d.funct),l.setAttribute("title",mxResources.get("language")),l.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+l.style.backgroundPosition="center center",l.style.backgroundRepeat="no-repeat",l.style.backgroundSize="24px 24px",l.style.position="absolute",l.style.height="24px",l.style.width="24px",l.style.zIndex="1",l.style.top="11px",l.style.right="14px",mxUtils.setOpacity(l,30),g.appendChild(l));f.tabContainer=document.createElement("div");f.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+d=f.diagramContainer.parentNode;n=document.createElement("div");n.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";p=f.menus.get("viewZoom");if(null!=p){this.tabContainer.style.right="70px";l=k.addMenu("100%",p.funct);l.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");l.style.whiteSpace="nowrap";l.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";l.style.backgroundPosition=
+"right 6px center";l.style.backgroundRepeat="no-repeat";l.style.paddingRight="10px";l.style.display="block";l.style.position="absolute";l.style.textDecoration="none";l.style.textDecoration="none";l.style.right="0px";l.style.bottom="0px";l.style.overflow="hidden";l.style.textAlign="center";l.style.color="#000";l.style.fontSize="12px";l.style.color="#707070";l.style.width="59px";l.style.borderTop="1px solid lightgray";l.style.borderLeft="1px solid lightgray";l.style.height=parseInt(f.tabContainer.style.height)-
+1+"px";l.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";n.appendChild(l);p=mxUtils.bind(this,function(){l.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,p);f.editor.addListener("resetGraphView",p);f.editor.addListener("pageSelected",p);var r=f.setGraphEnabled;f.setGraphEnabled=function(){r.apply(this,arguments);null!=this.tabContainer&&(l.style.visibility=this.tabContainer.style.visibility)}}n.appendChild(f.tabContainer);
+n.appendChild(g);n.appendChild(f.diagramContainer);d.appendChild(n);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.actions.outlineWindow.window.fit();null!=f.actions.layersWindow&&f.actions.layersWindow.window.fit();null!=f.menus.tagsWindow&&f.menus.tagsWindow.window.fit();null!=f.menus.findWindow&&f.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\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\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 by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 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\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
@@ -3141,8 +3147,8 @@ GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.au
0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};
mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,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:k.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
-this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var g=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",
-g);g();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.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var f=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",
+f);f();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);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};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",
this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),c())}));l.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};
@@ -3151,26 +3157,26 @@ GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,
top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!0,this.graph.maxFitScale=
null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",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,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var n=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(n);l||(n=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%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
-null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};
+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,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var q=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(q);l||(q=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 p=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
+null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;p()}};
GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),n=0;n<l;n++)k.setVisible(k.getChildAt(k.root,n),null!=b?c.isVisible(c.getChildAt(c.root,n)):!1);if(null==c)for(n=0;n<e.length;n++)k.setVisible(k.getChildAt(k.root,parseInt(e[n])),!0)}finally{k.endUpdate()}}};
-GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;return f}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";
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),q=0;q<l;q++)k.setVisible(k.getChildAt(k.root,q),null!=b?c.isVisible(c.getChildAt(c.root,q)):!1);if(null==c)for(q=0;q<e.length;q++)k.setVisible(k.getChildAt(k.root,parseInt(e[q])),!0)}finally{k.endUpdate()}}};
+GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,l=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)}),n=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)||(n(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){n(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){n(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||n(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():n(30))}})}for(var d=this.toolbarItems,g=0,f=null,p=null,r=0;r<d.length;r++){var h=d[r];if("pages"==h){p=b.ownerDocument.createElement("div");
-p.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(p,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(p);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";h=mxUtils.bind(this,function(){p.innerHTML="";mxUtils.write(p,this.currentPage+1+" / "+this.diagrams.length);p.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=p.style.display;u.style.display=p.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==h){if(this.layersEnabled){var m=this.graph.getModel(),v=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=v.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");m.addListener(mxEvent.CHANGE,function(){v.style.display=1<m.getChildCount(m.root)?"inline-block":"none"});v.style.display=1<m.getChildCount(m.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
-null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
-70),e.appendChild(d));this.minToolbarWidth=34*g;var D=b.style.border,d=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==D&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=f&&(f.parentNode.removeChild(f),
-f=null),b.style.border=D)});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()})});mxEvent.addListener(b,"mouseenter",d)};
+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),l())}));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 p=this.graph,v=p.getTolerance();p.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+p.container.scrollLeft;this.scrollTop=p.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-p.container.scrollLeft)<v&&Math.abs(this.scrollTop-p.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.style.opacity||0)?l():q(30))}})}for(var d=this.toolbarItems,f=0,g=null,n=null,r=0;r<d.length;r++){var h=d[r];if("pages"==h){n=b.ownerDocument.createElement("div");
+n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var m=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");m.style.borderRightStyle="none";m.style.paddingLeft="0px";m.style.paddingRight="0px";e.appendChild(n);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";m.style.display=n.style.display;u.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==h){if(this.layersEnabled){var w=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=t.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
+"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");w.addListener(mxEvent.CHANGE,function(){t.style.display=1<w.getChildCount(w.root)?"inline-block":"none"});t.style.display=1<w.getChildCount(w.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
+null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
+70),e.appendChild(d));this.minToolbarWidth=34*f;var x=b.style.border,d=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==x&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
+g=null),b.style.border=x)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==g)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)};
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.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=c.indexOf(","),0<k&&(k=c.substring(k+
1),this.selectPageById(k),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&&
@@ -3179,17 +3185,17 @@ GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.l
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){c.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||
10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&
-c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var n=c.editor.graph,q=n.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");
-var t=this;n.getImageFromBundles=function(a){return t.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(n.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
-(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(n,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
-this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute",c.chromelessToolbar.style.bottom="",
-c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(n,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};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;}})};
+c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var q=c.editor.graph,p=q.container;p.style.overflow="hidden";this.lightboxChrome?(p.style.border="1px solid #c0c0c0",p.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");
+var v=this;q.getImageFromBundles=function(a){return v.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return v.getImageUrl(a)};return a};this.graphConfig.move&&(q.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(p.style,"border-radius","4px"),p.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
+(mxUtils.setPrefixedStyle(p.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(p.style,"transition","all .25s ease-in-out"));this.addClickHandler(q,c);window.setTimeout(mxUtils.bind(this,function(){p.style.outline="none";p.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(p);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(p.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
+this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(p.style.position="absolute",p.style.display="block",p.style.left=a.x+"px",p.style.top=a.y+"px",p.style.width=document.body.clientWidth-80+"px",p.style.height=document.body.clientHeight-80+"px",p.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute",c.chromelessToolbar.style.bottom="",
+c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(q,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};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 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 c=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 l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function n(b,c){if(!b.resizedAttached)b.resizedAttached=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(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 l(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"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,t,H,y=function(){if((t=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=t,q=H;g()},B=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};B(d,"scroll",y);B(f,"scroll",y)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},t=Object.prototype.toString.call(e),d="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var t=0,g=e.length;t<g;t++)n(e[t],q);else n(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,v,D,G,B=function(){if((D=b.offsetWidth)!=q||(G=b.offsetHeight)!=v)n=!0,q=D,v=G;g()},y=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};y(d,"scroll",B);y(f,"scroll",B)}var p=function(){GraphViewer.resizeSensorEnabled&&c()},v=Object.prototype.toString.call(e),d="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var v=0,f=e.length;v<f;v++)q(e[v],p);else q(e,p);this.detach=function(){if(d)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})();
diff --git a/src/main/webapp/js/atlas.min.js b/src/main/webapp/js/atlas.min.js
index 8e0095bb..ae7bb8fb 100644
--- a/src/main/webapp/js/atlas.min.js
+++ b/src/main/webapp/js/atlas.min.js
@@ -6762,275 +6762,275 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
"yahoo","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yammer;fillColor=#0093BE;strokeColor=none",.2*348,59.6,"","Yammer",null,null,this.getTagsForStencil("mxgraph.weblogos","yammer","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yandex",31.8,66.4,"","Yandex",null,null,this.getTagsForStencil("mxgraph.weblogos","yandex","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yelp;fillColor=#C41200;strokeColor=none",.2*317,83,"","Yelp",null,null,this.getTagsForStencil("mxgraph.weblogos",
"yelp","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"yoolink",79.2,79.2,"","Yoolink",null,null,this.getTagsForStencil("mxgraph.weblogos","yoolink","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youmob",76,76.2,"","Youmob",null,null,this.getTagsForStencil("mxgraph.weblogos","youmob","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube;fillColor=#FF2626;gradientColor=#B5171F",.2*786,65.8,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos",
"youtube","web logos logo").join(" ")),this.createVertexTemplateEntry(a+"youtube_2;fillColor=#FF2626;gradientColor=#B5171F",.2*232,32.6,"","Youtube",null,null,this.getTagsForStencil("mxgraph.weblogos","youtube","web logos logo").join(" "))])}})();
-DrawioFile=function(a,e){mxEventSource.call(this);this.ui=a;this.data=e||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
-DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,e,d,b){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(a,e,d){};DrawioFile.prototype.saveFile=function(a,e,d,b){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
-DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,e,d){};DrawioFile.prototype.isMovable=function(){return!1};
-DrawioFile.prototype.move=function(a,e,d){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
-this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
+DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.data=e||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
+DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(b,e,d,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this))};DrawioFile.prototype.saveAs=function(b,e,d){};DrawioFile.prototype.saveFile=function(b,e,d,c){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};
+DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(b){this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,d){};DrawioFile.prototype.isMovable=function(){return!1};
+DrawioFile.prototype.move=function(b,e,d){};DrawioFile.prototype.getHash=function(){return""};DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(b,e){var d=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(b){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
+this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(b){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(b)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
-DrawioFile.prototype.addUnsavedStatus=function(a){a instanceof Error&&null!=a.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(a.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(a=this.ui.statusContainer.getElementsByTagName("div"),
-0<a.length&&mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
-DrawioFile.prototype.autosave=function(a,e,d,b){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());a=(new Date).getTime()-this.lastAutosave<e?a:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=d&&d(a)}),
-mxUtils.bind(this,function(a){null!=b&&b(a)}))}else null!=d&&d(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
-DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,e){if(null!=a&&null!=e){var d=a.lastIndexOf("."),b=0<d?a.substring(d):"",d=e.lastIndexOf(".");return b===(0<d?e.substring(d):"")}return a==e};
-DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,e,d,b){DrawioFile.call(this,a,e);this.title=d;this.mode=b?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};
-LocalFile.prototype.saveFile=function(a,e,d,b){this.title=a;this.updateFileData();e=this.getData();var f=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,f?"image/png":"text/xml",f);else if(b.length<MAX_REQUEST_SIZE){var e=a.lastIndexOf("."),e=0<e?a.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(f?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=d&&d()});f?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){k(a)}),b,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(a,e,d){this.title=a;this.descriptorChanged();null!=e&&e()};
-LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(a,e,d){LocalFile.call(this,a,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(a,e,d){DrawioFile.call(this,a,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
-StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(a,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(a,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(a,!1,e,d)};
-StorageFile.prototype.saveFile=function(a,e,d,b){if(this.isEditable()){var f=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(k){null!=b&&b(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=b?b({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=a&&null!=d?this.ui.confirm(mxResources.get("replaceIt",
-[a]),f,b):f()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,e,d){var b=this.getTitle();b!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(f){var k=mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(b,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(b,e)}),d)});null!=f?this.ui.confirm(mxResources.get("replaceIt",[a]),k,d):k()})):e()};
-StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,e,d){StorageFile.call(this,a,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,e,d){this.saveFile(a,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,e,d){StorageFile.call(this,a,e,d);a=d;e=a.lastIndexOf("/");0<=e&&(a=a.substring(e+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,e,d){return!1};UrlLibrary.prototype.saveAs=function(a,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,e,d){function b(b,p,u,m,w,v){function t(){mxEvent.addListener(x,"click",null!=v?v:function(){u!=App.MODE_GOOGLE||a.isDriveDomain()?u==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(u,c.checked);e()})):(a.setMode(u,c.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",p);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var f=document.createElement("div");f.style.textOverflow="ellipsis";f.style.overflow="hidden";if(null!=b){var y=document.createElement("img");
-y.setAttribute("src",b);y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="60px";y.style.height="60px";y.style.paddingBottom="6px";x.appendChild(y)}else f.style.paddingTop="5px",f.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(f.style.paddingTop="0px",f.style.marginTop="-2px");x.appendChild(f);mxUtils.write(f,p);if(null!=w)for(b=0;b<w.length;b++)mxUtils.br(f),mxUtils.write(f,w[b]);if(null!=m&&null==a[m]){y.style.visibility=
-"hidden";mxUtils.setOpacity(f,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var l=window.setTimeout(function(){null==a[m]&&(k.stop(),x.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[m]&&(window.clearTimeout(l),mxUtils.setOpacity(f,100),y.style.visibility="",k.stop(),t(),"drive"==m&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else t();
-q.appendChild(x);++g>=d&&(mxUtils.br(q),g=0)}d=null!=d?d:2;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var k=a.addLanguageMenu(f,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
-"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("valign","bottom");l.setAttribute("src",Editor.helpImage);l.style.marginRight="2px";k.appendChild(l);mxUtils.write(k,mxResources.get("help"));f.appendChild(k)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";
-n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};f.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var c=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
-!0);Editor.useLocalStorage=c});var q=document.createElement("div");mxClient.IS_QUIRKS&&(q.style.whiteSpace="nowrap",q.style.cssFloat="left");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";q.style.padding="12px 0px 12px 0px";var c=document.createElement("input");c.setAttribute("type","checkbox");c.setAttribute("checked","checked");c.defaultChecked=!0;var g=0,h=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop=
-"4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");f.appendChild(k);"function"===typeof window.DriveClient&&b(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&b(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||b(IMAGE_PATH+"/osa_drive-harddisk.png",
-mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||b(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);f.appendChild(q);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(c);l=document.createElement("span");l.style.color="gray";l.style.fontSize="12px";mxUtils.write(l," "+mxResources.get("rememberThisSetting"));k.appendChild(l);mxUtils.br(k);var t=a.getRecent();if(null!=t&&
-0<t.length){var v=document.createElement("select");v.style.marginTop="8px";v.style.width="140px";var p=document.createElement("option");p.setAttribute("value","");p.setAttribute("selected","selected");p.style.textAlign="center";mxUtils.write(p,mxResources.get("openRecent")+"...");v.appendChild(p);for(p=0;p<t.length;p++)(function(a){var c=a.mode;c==App.MODE_GOOGLE?c="googleDrive":c==App.MODE_ONEDRIVE&&(c="oneDrive");var g=document.createElement("option");g.setAttribute("value",a.id);mxUtils.write(g,
-a.title+" ("+mxResources.get(c)+")");v.appendChild(g)})(t[p]);k.appendChild(v);mxEvent.addListener(v,"change",function(c){""!=v.value&&a.loadFile(v.value)})}else k.style.marginTop="20px",q.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(t=document.createElement("div"),t.style.cursor="pointer",t.style.padding="18px 0px 6px 0px",t.style.fontSize="12px",t.style.color="gray",mxUtils.write(t,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
-", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(t,"click",function(){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&(a.hideDialog(),a.openFiles(c.files,!0))});c.click()}),k.appendChild(t),q.style.paddingBottom="4px");q.appendChild(k);mxEvent.addListener(l,"click",function(a){c.checked=!c.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
-document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(h.style.padding="8px",h.style.fontSize="9pt",h.style.marginTop="-14px",h.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",f.appendChild(h))},5E3);this.container=
-f},SplashDialog=function(a){var e=document.createElement("div");e.style.textAlign="center";a.addLanguageMenu(e,!0);var d=null,d=a.getServiceCount();if(!a.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
-"gray";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);b.style.marginRight="2px";d.appendChild(b);mxUtils.write(d,mxResources.get("help"));e.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("align","absmiddle");b.style.width="40px";
-b.style.height="40px";b.style.marginRight="12px";b.style.paddingBottom="4px";var f="";a.mode==App.MODE_GOOGLE?(b.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):a.mode==App.MODE_DROPBOX?(b.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):a.mode==App.MODE_ONEDRIVE?(b.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):a.mode==App.MODE_GITHUB?(b.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):a.mode==App.MODE_TRELLO?(b.src=IMAGE_PATH+
-"/trello-logo.svg",f=mxResources.get("trello")):a.mode==App.MODE_BROWSER?(b.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):(b.src=IMAGE_PATH+"/osa_drive-harddisk.png",f=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var l=document.createElement("button");l.className="geBigButton";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",l.style.marginBottom="12px"):
-(d.appendChild(b),mxUtils.write(d,f),e.appendChild(d),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",l.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("createNewDiagram"));mxEvent.addListener(l,"click",function(){a.hideDialog();a.actions.get("new").funct()});k.appendChild(l);mxUtils.br(k);l=document.createElement("button");
-l.className="geBigButton";l.style.marginBottom="22px";l.style.overflow="hidden";l.style.width="340px";mxClient.IS_QUIRKS&&(l.style.width="340px");mxUtils.write(l,mxResources.get("openExistingDiagram"));mxEvent.addListener(l,"click",function(){a.actions.get("open").funct()});k.appendChild(l);d="undefined";a.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):a.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):a.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):a.mode==App.MODE_GITHUB?d=mxResources.get("github"):
-a.mode==App.MODE_TRELLO?d=mxResources.get("trello"):a.mode==App.MODE_DEVICE?d=mxResources.get("device"):a.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(f=function(b){l.style.marginBottom="24px";var d=document.createElement("a");d.setAttribute("href","javascript:void(0)");d.style.display="block";d.style.marginTop="6px";mxUtils.write(d,mxResources.get("signOut"));l.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(d,"click",
-function(){a.confirm(mxResources.get("areYouSure"),function(){b()})});k.appendChild(d)},b=null!=a.drive?a.drive.getUser():null,a.mode==App.MODE_GOOGLE&&null!=b?(l.style.marginBottom="24px",f=document.createElement("a"),f.setAttribute("href","javascript:void(0)"),f.style.display="block",f.style.marginTop="6px",mxUtils.write(f,mxResources.get("changeUser")+" ("+b.displayName+")"),l.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(f,"click",function(){a.hideDialog();a.drive.clearUserId();
-a.drive.setUser(null);gapi.auth.signOut();a.setMode(App.MODE_GOOGLE);a.hideDialog();a.showSplash();a.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){a.hideDialog();a.showSplash()})),mxUtils.bind(this,function(b){a.handleError(b,null,function(){a.hideDialog();a.showSplash()})}))}),k.appendChild(f)):a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?f(function(){a.oneDrive.logout()}):a.mode==App.MODE_GITHUB&&null!=a.gitHub?f(function(){a.gitHub.logout();a.openLink("https://www.github.com/logout")}):
-a.mode==App.MODE_TRELLO&&null!=a.trello?a.trello.isAuthorized()&&f(function(){a.trello.logout()}):a.mode==App.MODE_DROPBOX&&null!=a.dropbox&&f(function(){a.dropbox.logout();a.openLink("https://www.dropbox.com/logout")}),f=document.createElement("a"),f.setAttribute("href","javascript:void(0)"),f.style.display="block",f.style.marginTop="8px",mxUtils.write(f,mxResources.get("notUsingService",[d])),mxEvent.addListener(f,"click",function(){a.hideDialog(!1);a.setMode(null);a.clearMode();a.showSplash(!0)}),
-k.appendChild(f));e.appendChild(k);this.container=e},ConfirmDialog=function(a,e,d,b,f,k,l,n,q){var c=document.createElement("div");c.style.textAlign="center";var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight="44px";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,e);c.appendChild(g);g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");
-k=mxUtils.button(k||mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b(h.checked)});k.className="geBtn";null!=n&&(k.innerHTML=n+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");a.editor.cancelFirst&&g.appendChild(k);f=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d(h.checked)});g.appendChild(f);null!=l?(f.innerHTML=l+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",
-f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(k);c.appendChild(g);q?(g.style.marginTop="10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(h),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),g.appendChild(l),c.appendChild(g),mxEvent.addListener(l,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):g.style.marginTop="16px";this.container=
-c},ErrorDialog=function(a,e,d,b,f,k,l,n,q,c,g){q=null!=q?q:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=e){var t=document.createElement("div");t.style.padding="0px";t.style.margin="0px";t.style.fontSize="18px";t.style.paddingBottom="16px";t.style.marginBottom="16px";t.style.borderBottom="1px solid #c0c0c0";t.style.color="gray";mxUtils.write(t,e);h.appendChild(t)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;h.appendChild(e);d=document.createElement("div");
-d.style.marginTop="16px";d.style.textAlign="center";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");null!=c&&(c=mxUtils.button(c,function(){null!=g&&g()}),c.className="geBtn",d.appendChild(c));var v=mxUtils.button(b,function(){q&&a.hideDialog();null!=f&&f()});v.className="geBtn";d.appendChild(v);null!=l&&(b=mxUtils.button(l,function(){q&&a.hideDialog();null!=n&&n()}),b.className="geBtn gePrimaryBtn",
-d.appendChild(b));this.init=function(){v.focus()};h.appendChild(d);this.container=h},EmbedDialog=function(a,e,d,b,f){b=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);mxUtils.write(b,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(b);var l=document.createElement("div");l.style.position="absolute";l.style.top="30px";l.style.right="30px";l.style.color="gray";mxUtils.write(l,a.formatFileSize(e.length));b.appendChild(l);var n=document.createElement("textarea");
-n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");b.appendChild(n);mxUtils.br(b);this.init=function(){window.setTimeout(function(){5E5>e.length?(n.value=e,n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};l=document.createElement("div");l.style.position="absolute";l.style.bottom="36px";l.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
-function(){var c=5E5>e.length?n.value:e;if(null!=f)f(c);else if(k)try{var g=a.openLink(c);null!=g&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=g&&null!=g.location.href&&g.location.href.substring(0,8)!=c.substring(0,8)&&(g.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}else{var b=window.open().document;b.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
-'</title><meta charset="utf-8"></head><body>'+e+"</body></html>");b.close()}}),q.className="geBtn",l.appendChild(q));if(!k||7500<e.length){var c=mxUtils.button(mxResources.get("download"),function(){a.hideDialog();a.saveData("embed.txt","txt",e,"text/plain")});c.className="geBtn";l.appendChild(c)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var g=mxUtils.button("",function(){try{var c="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);a.openLink(c)}catch(t){a.handleError({message:t.message||
-mxResources.get("drawingTooLarge")})}}),c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height","18");c.setAttribute("border","0");g.appendChild(c);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth="46px";g.className="geBtn";l.appendChild(g)}7168>e.length&&(g=mxUtils.button("",function(){try{var c="https://twitter.com/intent/tweet?text="+
-encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);a.openLink(c)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",g.appendChild(c),g.setAttribute("title",mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign=
-"bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",l.appendChild(g))}c=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.appendChild(c);g=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?
-c.className="geBtn gePrimaryBtn":(l.appendChild(g),g.className="geBtn gePrimaryBtn",c.className="geBtn"):(l.appendChild(q),c.className="geBtn",q.className="geBtn gePrimaryBtn");b.appendChild(l);this.container=b};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(a,e){function d(){var a=null!=C.getTitle()?C.getTitle():this.defaultFilename;if(H.checked&&""!=t.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(t.value));null!=a&&(b+="&title="+encodeURIComponent(a));0<F.length&&(b+="&s="+F);""!=v.value&&"0"!=v.value&&(b+="&border="+v.value);""!=h.value&&(b+="&height="+h.value);b+="&pan="+(p.checked?"1":"0");b+="&zoom="+(y.checked?"1":"0");b+="&fit="+(w.checked?"1":"0");b+="&resize="+
-(m.checked?"1":"0");b+="&x0="+Number(g.value);b+="&y0="+q;f.mathEnabled&&(b+="&math=1");u.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));c.value=b}else C.constructor==DriveFile||C.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=t.value?b+=encodeURIComponent(mxUtils.htmlEntities(t.value))+"&type=3":(b+=C.getHash().substring(1),b=C.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+
-encodeURIComponent(a)),""!=h.value&&(a=parseInt(h.value)+parseInt(g.value),b+="&height="+a),c.value=b):c.value=""}var b=document.createElement("div"),f=a.editor.graph,k=f.getGraphBounds(),l=f.view.scale,n=Math.floor(k.x/l-f.view.translate.x),q=Math.floor(k.y/l-f.view.translate.y);mxUtils.write(b,mxResources.get("googleGadget")+":");mxUtils.br(b);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";b.appendChild(c);
-mxUtils.br(b);this.init=function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)};mxUtils.write(b,mxResources.get("top")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=n;b.appendChild(g);mxUtils.write(b,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
-"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/l);b.appendChild(h);mxUtils.br(b);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";b.appendChild(k);mxUtils.write(b,mxResources.get("publicDiagramUrl")+":");mxUtils.br(b);var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","28");t.style.marginBottom="8px";t.style.marginTop="2px";t.style.width="410px";t.value=e||"";
-b.appendChild(t);mxUtils.br(b);mxUtils.write(b,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";b.appendChild(v);mxUtils.br(b);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";b.appendChild(p);mxUtils.write(b,mxResources.get("pan")+" ");var y=document.createElement("input");
-y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="8px";b.appendChild(y);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 u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft="8px";b.appendChild(u);mxUtils.write(b,
-mxResources.get("asNew")+" ");mxUtils.br(b);var m=document.createElement("input");m.setAttribute("type","checkbox");m.setAttribute("checked","checked");m.defaultChecked=!0;m.style.marginLeft="16px";b.appendChild(m);mxUtils.write(b,mxResources.get("resize")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";b.appendChild(w);mxUtils.write(b,mxResources.get("fit")+" ");var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginLeft=
-"8px";b.appendChild(H);mxUtils.write(b,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),C=a.getCurrentFile();mxEvent.addListener(p,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(m,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(H,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(g,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(t,"change",d);d();
-mxEvent.addListener(c,"click",function(){c.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?c.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";l=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});l.className="geBtn gePrimaryBtn";k.appendChild(l);b.appendChild(k);this.container=b},CreateGraphDialog=function(a,e,d){var b=document.createElement("div");b.style.textAlign=
-"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);b.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var l="curved=1;";k.cellRenderer.installCellOverlayListeners=
-function(a,c,b){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(b.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(b){c.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(b.node,"touchstart",function(b){c.fireEvent(new mxEventObject("pointerdown","event",b,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
-!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,l);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var n=k.getDefaultParent(),q=mxUtils.bind(this,function(a){var c=new mxCellOverlay(this.connectImage,"Add outgoing");c.cursor="hand";c.addListener(mxEvent.CLICK,function(c,b){k.connectionHandler.reset();k.clearSelection();var g=k.getCellGeometry(a),m;h(function(){m=k.insertVertex(n,null,"Entry",g.x,g.y,80,30,"rounded=1;");q(m);k.view.refresh(m);
-k.insertEdge(n,null,"",a,m,l)},function(){k.scrollCellToVisible(m)})});c.addListener("pointerdown",function(a,c){var b=c.getProperty("event"),g=c.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var m=mxUtils.convertPoint(k.container,mxEvent.getClientX(b),mxEvent.getClientY(b));k.connectionHandler.start(g,m.x,m.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(b);mxEvent.consume(b)});k.addCellOverlay(a,c)});k.getModel().beginUpdate();var c;try{c=k.insertVertex(n,null,"Start",
-0,0,80,30,"ellipse"),q(c)}finally{k.getModel().endUpdate()}var g;"horizontalTree"==d?(g=new mxCompactTreeLayout(k),g.edgeRouting=!1,g.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(g=new mxCompactTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=30,l="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(g=new mxRadialTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=80):"verticalFlow"==d?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-d?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(g=new mxFastOrganicLayout(k,!1),g.forceConstant=80):"circle"==d&&(g=new mxCircleLayout(k));if(null!=g){var h=function(a,b){k.getModel().beginUpdate();try{null!=a&&a(),g.execute(k.getDefaultParent(),c)}catch(m){throw m;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=b&&b()}));h.startAnimation()}},t=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(a,c,b,g,p){t.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var v=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()})});v.className="geBtn";a.editor.cancelFirst&&b.appendChild(v);var p=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
-var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),c.x,c.y),b=a.editor.graph.view,g=b.getBounds(c);g.x-=b.translate.x;g.y-=b.translate.y;a.editor.graph.scrollRectToVisible(g);a.editor.graph.setSelectionCells(c);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));a.hideDialog()});b.appendChild(p);p.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(v)};this.container=b};
+DrawioFile.prototype.addUnsavedStatus=function(b){b instanceof Error&&null!=b.message?this.ui.editor.setStatus('<div class="geStatusAlert" style="overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+" ("+mxUtils.htmlEntities(b.message)+")</div>"):(this.ui.editor.setStatus('<div class="geStatusAlert" style="cursor:pointer;overflow:hidden;">'+mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+"</div>"),null!=this.ui.statusContainer&&(b=this.ui.statusContainer.getElementsByTagName("div"),
+0<b.length&&mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null==this.ui.mode?"saveAs":"save").funct()}))))};
+DrawioFile.prototype.autosave=function(b,e,d,c){null==this.lastAutosave&&(this.lastAutosave=(new Date).getTime());b=(new Date).getTime()-this.lastAutosave<e?b:0;this.clearAutosave();this.autosaveThread=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=this.autosaveThread=null;if(this.isModified()&&this.isAutosaveNow()){var b=this.isAutosaveRevision();b&&(this.lastAutosaveRevision=(new Date).getTime());this.save(b,mxUtils.bind(this,function(b){this.autosaveCompleted();null!=d&&d(b)}),
+mxUtils.bind(this,function(b){null!=c&&c(b)}))}else null!=d&&d(null)}),b)};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 b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
+DrawioFile.prototype.close=function(b){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var d=b.lastIndexOf("."),c=0<d?b.substring(d):"",d=e.lastIndexOf(".");return c===(0<d?e.substring(d):"")}return b==e};
+DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(b,e,d,c){DrawioFile.call(this,b,e);this.title=d;this.mode=c?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,d){this.saveAs(this.title,e,d)};LocalFile.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};
+LocalFile.prototype.saveFile=function(b,e,d,c){this.title=b;this.updateFileData();e=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),k=mxUtils.bind(this,function(c){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(c,b,g?"image/png":"text/xml",g);else if(c.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf("."),e=0<e?b.substring(e+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(b)+
+(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}));this.setModified(!1);this.contentChanged();null!=d&&d()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(b){k(b)}),c,this.ui.getCurrentFile()!=this?this.getData():null):k(e)};LocalFile.prototype.rename=function(b,e,d){this.title=b;this.descriptorChanged();null!=e&&e()};
+LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(b,e){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};LocalLibrary=function(b,e,d){LocalFile.call(this,b,e,d)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,d){DrawioFile.call(this,b,e);this.title=d};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
+StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,e,d){this.saveAs(this.getTitle(),e,d)};StorageFile.prototype.saveAs=function(b,e,d){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,e,d)};
+StorageFile.prototype.saveFile=function(b,e,d,c){if(this.isEditable()){var g=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(k){null!=c&&c(k)}});this.isRenamable()&&"."==b.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(b,mxUtils.bind(this,function(d){this.isRenamable()&&this.getTitle()!=b&&null!=d?this.ui.confirm(mxResources.get("replaceIt",
+[b]),g,c):g()}))}else null!=d&&d()};StorageFile.prototype.rename=function(b,e,d){var c=this.getTitle();c!=b?this.ui.getLocalData(b,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(c,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,e)}),d)});null!=g?this.ui.confirm(mxResources.get("replaceIt",[b]),k,d):k()})):e()};
+StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(b,e,d){StorageFile.call(this,b,e,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,e,d){this.saveFile(b,!1,e,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageLibrary.prototype.isRenamable=function(b,e,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(b,e,d){StorageFile.call(this,b,e,d);b=d;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,d){return!1};UrlLibrary.prototype.saveAs=function(b,e,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(b,e,d){function c(c,t,m,l,v,u){function w(){mxEvent.addListener(x,"click",null!=u?u:function(){m!=App.MODE_GOOGLE||b.isDriveDomain()?m==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(m,a.checked);e()})):(b.setMode(m,a.checked),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}var x=document.createElement("a");x.style.overflow="hidden";x.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";x.className="geBaseButton";x.style.boxSizing="border-box";x.style.fontSize="11px";x.style.position="relative";x.style.margin="4px";x.style.padding="8px 10px 12px 10px";x.style.width="88px";x.style.height="100px";x.style.whiteSpace="nowrap";x.setAttribute("title",t);mxClient.IS_QUIRKS&&(x.style.cssFloat="left",x.style.zoom="1");var D=document.createElement("div");D.style.textOverflow="ellipsis";D.style.overflow="hidden";if(null!=c){var g=document.createElement("img");
+g.setAttribute("src",c);g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";x.appendChild(g)}else D.style.paddingTop="5px",D.style.whiteSpace="normal",mxClient.IS_IOS?(x.style.padding="0px 10px 20px 10px",x.style.top="6px"):mxClient.IS_FF&&(D.style.paddingTop="0px",D.style.marginTop="-2px");x.appendChild(D);mxUtils.write(D,t);if(null!=v)for(c=0;c<v.length;c++)mxUtils.br(D),mxUtils.write(D,v[c]);if(null!=l&&null==b[l]){g.style.visibility=
+"hidden";mxUtils.setOpacity(D,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(x);var G=window.setTimeout(function(){null==b[l]&&(k.stop(),x.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[l]&&(window.clearTimeout(G),mxUtils.setOpacity(D,100),g.style.visibility="",k.stop(),w(),"drive"==l&&null!=h.parentNode&&h.parentNode.removeChild(h))}))}else w();
+q.appendChild(x);++f>=d&&(mxUtils.br(q),f=0)}d=null!=d?d:2;var g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";g.style.paddingTop="0px";g.style.paddingBottom="20px";var k=b.addLanguageMenu(g,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!b.isOffline()&&1<b.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://about.draw.io/support/");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
+"absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("valign","bottom");n.setAttribute("src",Editor.helpImage);n.style.marginRight="2px";k.appendChild(n);mxUtils.write(k,mxResources.get("help"));g.appendChild(k)}var p=document.createElement("div");p.style.position="absolute";p.style.cursor="pointer";p.style.fontSize="12px";
+p.style.bottom="28px";p.style.color="gray";mxUtils.write(p,mxResources.get("decideLater"));b.isOfflineApp()?p.style.right="20px":(mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0)"),p.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)p.style.marginLeft=-Math.round(p.clientWidth/2)+"px"};g.appendChild(p);mxEvent.addListener(p,"click",function(){b.hideDialog();var a=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,
+!0);Editor.useLocalStorage=a});var q=document.createElement("div");mxClient.IS_QUIRKS&&(q.style.whiteSpace="nowrap",q.style.cssFloat="left");q.style.border="1px solid #d3d3d3";q.style.borderWidth="1px 0px 1px 0px";q.style.padding="12px 0px 12px 0px";var a=document.createElement("input");a.setAttribute("type","checkbox");a.setAttribute("checked","checked");a.defaultChecked=!0;var f=0,h=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop=
+"4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");g.appendChild(k);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",
+mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);g.appendChild(q);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(a);n=document.createElement("span");n.style.color="gray";n.style.fontSize="12px";mxUtils.write(n," "+mxResources.get("rememberThisSetting"));k.appendChild(n);mxUtils.br(k);var m=b.getRecent();if(null!=m&&
+0<m.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var u=document.createElement("option");u.setAttribute("value","");u.setAttribute("selected","selected");u.style.textAlign="center";mxUtils.write(u,mxResources.get("openRecent")+"...");t.appendChild(u);for(u=0;u<m.length;u++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var f=document.createElement("option");f.setAttribute("value",a.id);mxUtils.write(f,
+a.title+" ("+mxResources.get(b)+")");t.appendChild(f)})(m[u]);k.appendChild(t);mxEvent.addListener(t,"change",function(a){""!=t.value&&b.loadFile(t.value)})}else k.style.marginTop="20px",q.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(m=document.createElement("div"),m.style.cursor="pointer",m.style.padding="18px 0px 6px 0px",m.style.fontSize="12px",m.style.color="gray",mxUtils.write(m,mxResources.get("import")+": "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+
+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(m,"click",function(){var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&(b.hideDialog(),b.openFiles(a.files,!0))});a.click()}),k.appendChild(m),q.style.paddingBottom="4px");q.appendChild(k);mxEvent.addListener(n,"click",function(b){a.checked=!a.checked;mxEvent.consume(b)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==
+document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(h.style.padding="8px",h.style.fontSize="9pt",h.style.marginTop="-14px",h.innerHTML='<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",g.appendChild(h))},5E3);this.container=
+g},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";b.addLanguageMenu(e,!0);var d=null,d=b.getServiceCount();if(!b.isOffline()&&1<d){d=document.createElement("a");d.setAttribute("href","https://about.draw.io/support/");d.setAttribute("title",mxResources.get("help"));d.setAttribute("target","_blank");d.style.position="absolute";d.style.fontSize="12px";d.style.textDecoration="none";d.style.cursor="pointer";d.style.bottom="22px";d.style.left="26px";d.style.color=
+"gray";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);c.style.marginRight="2px";d.appendChild(c);mxUtils.write(d,mxResources.get("help"));e.appendChild(d)}d=document.createElement("p");d.style.fontSize="16pt";d.style.padding="0px";d.style.paddingTop="2px";d.style.margin="0px";d.style.color="gray";c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width="40px";
+c.style.height="40px";c.style.marginRight="12px";c.style.paddingBottom="4px";var g="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",g=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",g=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",g=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(c.src=IMAGE_PATH+"/github-logo.svg",g=mxResources.get("github")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+
+"/trello-logo.svg",g=mxResources.get("trello")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",g=mxResources.get("browser")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",g=mxResources.get("device"));var k=document.createElement("div");k.style.margin="4px 0px 0px 0px";var n=document.createElement("button");n.className="geBigButton";n.style.overflow="hidden";n.style.width="340px";mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?(k.style.padding="42px 0px 56px 0px",n.style.marginBottom="12px"):
+(d.appendChild(c),mxUtils.write(d,g),e.appendChild(d),k.style.border="1px solid #d3d3d3",k.style.borderWidth="1px 0px 1px 0px",k.style.padding="18px 0px 24px 0px",n.style.marginBottom="8px");mxClient.IS_QUIRKS&&(k.style.whiteSpace="nowrap",k.style.cssFloat="left");mxClient.IS_QUIRKS&&(n.style.width="340px");mxUtils.write(n,mxResources.get("createNewDiagram"));mxEvent.addListener(n,"click",function(){b.hideDialog();b.actions.get("new").funct()});k.appendChild(n);mxUtils.br(k);n=document.createElement("button");
+n.className="geBigButton";n.style.marginBottom="22px";n.style.overflow="hidden";n.style.width="340px";mxClient.IS_QUIRKS&&(n.style.width="340px");mxUtils.write(n,mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){b.actions.get("open").funct()});k.appendChild(n);d="undefined";b.mode==App.MODE_GOOGLE?d=mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?d=mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?d=mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?d=mxResources.get("github"):
+b.mode==App.MODE_TRELLO?d=mxResources.get("trello"):b.mode==App.MODE_DEVICE?d=mxResources.get("device"):b.mode==App.MODE_BROWSER&&(d=mxResources.get("browser"));mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(g=function(c){n.style.marginBottom="24px";var d=document.createElement("a");d.setAttribute("href","javascript:void(0)");d.style.display="block";d.style.marginTop="6px";mxUtils.write(d,mxResources.get("signOut"));n.style.marginBottom="16px";k.style.paddingBottom="18px";mxEvent.addListener(d,"click",
+function(){b.confirm(mxResources.get("areYouSure"),function(){c()})});k.appendChild(d)},c=null!=b.drive?b.drive.getUser():null,b.mode==App.MODE_GOOGLE&&null!=c?(n.style.marginBottom="24px",g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="6px",mxUtils.write(g,mxResources.get("changeUser")+" ("+c.displayName+")"),n.style.marginBottom="16px",k.style.paddingBottom="18px",mxEvent.addListener(g,"click",function(){b.hideDialog();b.drive.clearUserId();
+b.drive.setUser(null);gapi.auth.signOut();b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash();b.drive.authorize(!1,mxUtils.bind(this,mxUtils.bind(this,function(){b.hideDialog();b.showSplash()})),mxUtils.bind(this,function(c){b.handleError(c,null,function(){b.hideDialog();b.showSplash()})}))}),k.appendChild(g)):b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?g(function(){b.oneDrive.logout()}):b.mode==App.MODE_GITHUB&&null!=b.gitHub?g(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):
+b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&g(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&g(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}),g=document.createElement("a"),g.setAttribute("href","javascript:void(0)"),g.style.display="block",g.style.marginTop="8px",mxUtils.write(g,mxResources.get("notUsingService",[d])),mxEvent.addListener(g,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)}),
+k.appendChild(g));e.appendChild(k);this.container=e},ConfirmDialog=function(b,e,d,c,g,k,n,p,q){var a=document.createElement("div");a.style.textAlign="center";var f=document.createElement("div");f.style.padding="6px";f.style.overflow="auto";f.style.maxHeight="44px";mxClient.IS_QUIRKS&&(f.style.height="60px");mxUtils.write(f,e);a.appendChild(f);f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";var h=document.createElement("input");h.setAttribute("type","checkbox");
+k=mxUtils.button(k||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(h.checked)});k.className="geBtn";null!=p&&(k.innerHTML=p+"<br>"+k.innerHTML,k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.style.width="40%");b.editor.cancelFirst&&f.appendChild(k);g=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d(h.checked)});f.appendChild(g);null!=n?(g.innerHTML=n+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",
+g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||f.appendChild(k);a.appendChild(f);q?(f.style.marginTop="10px",f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(h),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),a.appendChild(f),mxEvent.addListener(n,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)})):f.style.marginTop="16px";this.container=
+a},ErrorDialog=function(b,e,d,c,g,k,n,p,q,a,f){q=null!=q?q:!0;var h=document.createElement("div");h.style.textAlign="center";if(null!=e){var m=document.createElement("div");m.style.padding="0px";m.style.margin="0px";m.style.fontSize="18px";m.style.paddingBottom="16px";m.style.marginBottom="16px";m.style.borderBottom="1px solid #c0c0c0";m.style.color="gray";mxUtils.write(m,e);h.appendChild(m)}e=document.createElement("div");e.style.padding="6px";e.innerHTML=d;h.appendChild(e);d=document.createElement("div");
+d.style.marginTop="16px";d.style.textAlign="center";null!=k&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();k()}),e.className="geBtn",d.appendChild(e),d.style.textAlign="center");null!=a&&(a=mxUtils.button(a,function(){null!=f&&f()}),a.className="geBtn",d.appendChild(a));var t=mxUtils.button(c,function(){q&&b.hideDialog();null!=g&&g()});t.className="geBtn";d.appendChild(t);null!=n&&(c=mxUtils.button(n,function(){q&&b.hideDialog();null!=p&&p()}),c.className="geBtn gePrimaryBtn",
+d.appendChild(c));this.init=function(){t.focus()};h.appendChild(d);this.container=h},EmbedDialog=function(b,e,d,c,g){c=document.createElement("div");var k=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);mxUtils.write(c,mxResources.get(5E5>e.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var p=document.createElement("textarea");
+p.setAttribute("autocomplete","off");p.setAttribute("autocorrect","off");p.setAttribute("autocapitalize","off");p.setAttribute("spellcheck","false");p.style.marginTop="10px";p.style.resize="none";p.style.height="150px";p.style.width="440px";p.style.border="1px solid gray";p.value=mxResources.get("updatingDocument");c.appendChild(p);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(p.value=e,p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+p.select():document.execCommand("selectAll",!1,null)):(p.setAttribute("readonly","true"),p.value=e.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};n=document.createElement("div");n.style.position="absolute";n.style.bottom="36px";n.style.right="32px";var q=null;!EmbedDialog.showPreviewOption||mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(q=mxUtils.button(mxResources.get(5E5>e.length?"preview":"openInNewWindow"),
+function(){var a=5E5>e.length?p.value:e;if(null!=g)g(a);else if(k)try{var f=b.openLink(a);null!=f&&(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=f&&null!=f.location.href&&f.location.href.substring(0,8)!=a.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(u){b.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var c=window.open().document;c.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+
+'</title><meta charset="utf-8"></head><body>'+e+"</body></html>");c.close()}}),q.className="geBtn",n.appendChild(q));if(!k||7500<e.length){var a=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();b.saveData("embed.txt","txt",e,"text/plain")});a.className="geBtn";n.appendChild(a)}if(k&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var f=mxUtils.button("",function(){try{var a="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(p.value);b.openLink(a)}catch(m){b.handleError({message:m.message||
+mxResources.get("drawingTooLarge")})}}),a=document.createElement("img");a.setAttribute("src",Editor.facebookImage);a.setAttribute("width","18");a.setAttribute("height","18");a.setAttribute("border","0");f.appendChild(a);f.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");f.style.verticalAlign="bottom";f.style.paddingTop="4px";f.style.minWidth="46px";f.className="geBtn";n.appendChild(f)}7168>e.length&&(f=mxUtils.button("",function(){try{var a="https://twitter.com/intent/tweet?text="+
+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(p.value);b.openLink(a)}catch(m){b.handleError({message:m.message||mxResources.get("drawingTooLarge")})}}),a=document.createElement("img"),a.setAttribute("src",Editor.tweetImage),a.setAttribute("width","18"),a.setAttribute("height","18"),a.setAttribute("border","0"),a.style.marginBottom="5px",f.appendChild(a),f.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),f.style.verticalAlign=
+"bottom",f.style.paddingTop="4px",f.style.minWidth="46px",f.className="geBtn",n.appendChild(f))}a=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(a);f=mxUtils.button(mxResources.get("copy"),function(){p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?
+a.className="geBtn gePrimaryBtn":(n.appendChild(f),f.className="geBtn gePrimaryBtn",a.className="geBtn"):(n.appendChild(q),a.className="geBtn",q.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,e){function d(){var b=null!=y.getTitle()?y.getTitle():this.defaultFilename;if(G.checked&&""!=m.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(m.value));null!=b&&(c+="&title="+encodeURIComponent(b));0<z.length&&(c+="&s="+z);""!=t.value&&"0"!=t.value&&(c+="&border="+t.value);""!=h.value&&(c+="&height="+h.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(w.checked?"1":"0");c+="&fit="+(v.checked?"1":"0");c+="&resize="+
+(l.checked?"1":"0");c+="&x0="+Number(f.value);c+="&y0="+q;g.mathEnabled&&(c+="&math=1");D.checked?c+="&edit=_blank":x.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));a.value=c}else y.constructor==DriveFile||y.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=m.value?c+=encodeURIComponent(mxUtils.htmlEntities(m.value))+"&type=3":(c+=y.getHash().substring(1),c=y.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=b&&(c+="&title="+
+encodeURIComponent(b)),""!=h.value&&(b=parseInt(h.value)+parseInt(f.value),c+="&height="+b),a.value=c):a.value=""}var c=document.createElement("div"),g=b.editor.graph,k=g.getGraphBounds(),n=g.view.scale,p=Math.floor(k.x/n-g.view.translate.x),q=Math.floor(k.y/n-g.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var a=document.createElement("input");a.setAttribute("type","text");a.style.marginBottom="8px";a.style.marginTop="2px";a.style.width="410px";c.appendChild(a);
+mxUtils.br(c);this.init=function(){a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","4");f.style.marginRight="16px";f.style.marginLeft="4px";f.value=p;c.appendChild(f);mxUtils.write(c,mxResources.get("height")+":");var h=document.createElement("input");h.setAttribute("type",
+"text");h.setAttribute("size","4");h.style.marginLeft="4px";h.value=Math.ceil(k.height/n);c.appendChild(h);mxUtils.br(c);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var m=document.createElement("input");m.setAttribute("type","text");m.setAttribute("size","28");m.style.marginBottom="8px";m.style.marginTop="2px";m.style.width="410px";m.value=e||"";
+c.appendChild(m);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";c.appendChild(t);mxUtils.br(c);var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";c.appendChild(u);mxUtils.write(c,mxResources.get("pan")+" ");var w=document.createElement("input");
+w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";x.setAttribute("title",window.location.href);c.appendChild(x);mxUtils.write(c,mxResources.get("edit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";c.appendChild(D);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;l.style.marginLeft="16px";c.appendChild(l);mxUtils.write(c,mxResources.get("resize")+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("fit")+" ");var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginLeft=
+"8px";c.appendChild(G);mxUtils.write(c,mxResources.get("embed")+" ");var z=b.getBasenames().join(";"),y=b.getCurrentFile();mxEvent.addListener(u,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(v,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(h,"change",d);mxEvent.addListener(f,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(m,"change",d);d();
+mxEvent.addListener(a,"click",function(){a.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?a.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";k.appendChild(n);c.appendChild(k);this.container=c},CreateGraphDialog=function(b,e,d){var c=document.createElement("div");c.style.textAlign=
+"right";this.init=function(){var e=document.createElement("div");e.style.position="relative";e.style.border="1px solid gray";e.style.width="100%";e.style.height="360px";e.style.overflow="hidden";e.style.marginBottom="16px";mxEvent.disableContextMenu(e);c.appendChild(e);var k=new Graph(e);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var n="curved=1;";k.cellRenderer.installCellOverlayListeners=
+function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=
+!1;k.connectionHandler.createEdgeState=function(a){a=k.createEdge(null,null,null,null,null,n);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var p=k.getDefaultParent(),q=mxUtils.bind(this,function(a){var b=new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){k.connectionHandler.reset();k.clearSelection();var f=k.getCellGeometry(a),l;h(function(){l=k.insertVertex(p,null,"Entry",f.x,f.y,80,30,"rounded=1;");q(l);k.view.refresh(l);
+k.insertEdge(p,null,"",a,l,n)},function(){k.scrollCellToVisible(l)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),f=b.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var l=mxUtils.convertPoint(k.container,mxEvent.getClientX(c),mxEvent.getClientY(c));k.connectionHandler.start(f,l.x,l.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});k.addCellOverlay(a,b)});k.getModel().beginUpdate();var a;try{a=k.insertVertex(p,null,"Start",
+0,0,80,30,"ellipse"),q(a)}finally{k.getModel().endUpdate()}var f;"horizontalTree"==d?(f=new mxCompactTreeLayout(k),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==d?(f=new mxCompactTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=30,n="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==d?(f=new mxRadialTreeLayout(k,!1),f.edgeRouting=!1,f.levelDistance=80):"verticalFlow"==d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+d?f=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==d?(f=new mxFastOrganicLayout(k,!1),f.forceConstant=80):"circle"==d&&(f=new mxCircleLayout(k));if(null!=f){var h=function(b,c){k.getModel().beginUpdate();try{null!=b&&b(),f.execute(k.getDefaultParent(),a)}catch(l){throw l;}finally{var h=new mxMorphing(k);h.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=c&&c()}));h.startAnimation()}},m=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(a,b,c,f,v){m.apply(this,arguments);h()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);h()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){h()})}var t=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));b.hideDialog()})});t.className="geBtn";b.editor.cancelFirst&&c.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();
+var a=b.editor.graph.getFreeInsertPoint(),a=b.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),a.x,a.y),c=b.editor.graph.view,f=c.getBounds(a);f.x-=c.translate.x;f.y-=c.translate.y;b.editor.graph.scrollRectToVisible(f);b.editor.graph.setSelectionCells(a);null!=e.parentNode&&(k.destroy(),e.parentNode.removeChild(e));b.hideDialog()});c.appendChild(u);u.className="geBtn gePrimaryBtn";b.editor.cancelFirst||c.appendChild(t)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":
IMAGE_PATH+"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(a,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var b=document.createElement("h2");mxUtils.write(b,mxResources.get("backgroundImage"));b.style.marginTop="0px";d.appendChild(b);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var b=a.editor.graph.backgroundImage,f=document.createElement("input");f.setAttribute("type","text");f.style.marginTop="4px";f.style.marginBottom="4px";f.style.width="350px";f.value=
-null!=b?b.src:"";var k=!1,l=function(){k||""==f.value||a.isOffline()?(n.value="",q.value=""):a.loadImage(mxUtils.trim(f.value),function(a){n.value=a.width;q.value=a.height},function(){a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));f.value="";n.value="";q.value=""})};this.init=function(){f.focus();if(Graph.fileSupport){f.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=d.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=
-b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(g){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxBackgroundSize,function(a,c,b,g,h,p){f.value=a;l()},function(){},
-function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0,a.maxBackgroundBytes,a.maxBackgroundBytes);else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var g=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)&&(f.value=decodeURIComponent(g),l())}c.stopPropagation();c.preventDefault()}),!1)}};d.appendChild(f);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var n=document.createElement("input");
-n.setAttribute("type","text");n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="16px";n.value=null!=b?b.width:"";d.appendChild(n);mxUtils.write(d,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="16px";q.value=null!=b?b.height:"";d.appendChild(q);b=mxUtils.button(mxResources.get("reset"),function(){f.value="";n.value="";q.value="";k=!1});mxEvent.addListener(b,"mousedown",
-function(){k=!0});mxEvent.addListener(b,"touchstart",function(){k=!0});b.className="geBtn";b.width="100";d.appendChild(b);mxUtils.br(d);mxEvent.addListener(f,"change",l);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(f.value=a.url,l()));f.focus()};b=document.createElement("div");b.style.marginTop="40px";b.style.textAlign="right";var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-c.className="geBtn";a.editor.cancelFirst&&b.appendChild(c);if(!a.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var g=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)});
-g.className="geBtn";b.appendChild(g);null!=a.drive&&"1"==urlParams.photos&&(g=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),g.className="geBtn",b.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();e(""!=f.value?new mxImage(mxUtils.trim(f.value),n.value,q.value):null)});g.className="geBtn gePrimaryBtn";b.appendChild(g);a.editor.cancelFirst||b.appendChild(c);d.appendChild(b);this.container=d},ParseDialog=function(a,e,d){function b(c,b){var g=c.split("\n");if("plantUmlPng"==b||"plantUmlSvg"==
-b||"plantUmlTxt"==b){var g="plantUmlTxt"==b?PLANT_URL+"/txt/":"plantUmlPng"==b?PLANT_URL+"/png/":PLANT_URL+"/svg/",h=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var d=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,c,b){c1=a>>2;c2=(a&3)<<4|c>>4;c3=(c&15)<<2|b>>6;c4=b&63;r="";r+=d(c1&63);r+=d(c2&63);r+=d(c3&63);return r+=
-d(c4&63)},u=new XMLHttpRequest;u.open("GET",g+function(a){r="";for(f=0;f<a.length;f+=3)r=f+2==a.length?r+e(a.charCodeAt(f),a.charCodeAt(f+1),0):f+1==a.length?r+e(a.charCodeAt(f),0,0):r+e(a.charCodeAt(f),a.charCodeAt(f+1),a.charCodeAt(f+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(c))))),!0);"plantUmlTxt"!=b&&(u.responseType="blob");u.onload=function(g){if(200<=this.status&&300>this.status)if("plantUmlTxt"==b){a.spinner.stop();h.getModel().beginUpdate();try{cell=h.insertVertex(null,
-null,"<pre>"+this.response+"</pre>",k.x,k.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else g=new FileReader,g.readAsDataURL(this.response),g.onload=function(b){var g=new Image;g.onload=function(){a.spinner.stop();var m=g.width,u=g.height;if(0==m&&0==u){var p=b.target.result,w=p.indexOf(","),p=decodeURIComponent(escape(atob(p.substring(w+1)))),p=mxUtils.parseXml(p).getElementsByTagName("svg");
-0<p.length&&(m=parseFloat(p[0].getAttribute("width")),u=parseFloat(p[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,c,k.x,k.y,m,u,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(b.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};g.src=b.target.result},g.onerror=function(c){a.handleError(c)};else a.spinner.stop(),a.handleError(g)};u.onerror=
-function(c){a.handleError(c)};u.send()}}else if("table"==b){for(var m=null,w=[],t=0,f=0;f<g.length;f++)if(u=mxUtils.trim(g[f]),"create table"==u.substring(0,12).toLowerCase())u=mxUtils.trim(u.substring(12)),"("==u.charAt(u.length-1)&&(u=u.substring(0,u.lastIndexOf(" "))),m=new mxCell(u,new mxGeometry(t,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
-m.vertex=!0,w.push(m),u=a.editor.graph.getPreferredSizeForCell(n),null!=u&&(m.geometry.width=u.width+10);else if(null!=m&&")"==u.charAt(0))t+=m.geometry.width+40,m=null;else if("("!=u&&null!=m&&(u=u.substring(0,","==u.charAt(u.length-1)?u.length-1:u.length),"primary key"!=u.substring(0,11).toLowerCase())){var l=u.toLowerCase().indexOf("primary key"),u=u.replace(/primary key/i,""),n=new mxCell(u,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
-n.vertex=!0;u=sb.cloneCell(n,0<l?"PK":"");u.connectable=!1;u.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";u.geometry.width=30;u.geometry.height=26;n.insert(u);u=a.editor.graph.getPreferredSizeForCell(n);null!=u&&m.geometry.width<u.width+10&&(m.geometry.width=Math.min(220,u.width+10));m.insert(n);m.geometry.height+=26}0<w.length&&(h=a.editor.graph,
-g=h.view,u=h.getGraphBounds(),h.setSelectionCells(h.importCells(w,Math.ceil(Math.max(0,u.x/g.scale-g.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(u.y+u.height)/g.scale-g.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==b){if(0<g.length){h=a.editor.graph;m=new mxCell(g[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
-m.vertex=!0;u=h.getPreferredSizeForCell(m);null!=u&&m.geometry.width<u.width+10&&(m.geometry.width=u.width+10);n=[m];if(1<g.length)for(f=1;f<g.length;f++)"--"==g[f]?(u=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;"),u.vertex=!0,m.geometry.height+=u.geometry.height,m.insert(u),n.push(u)):0<g[f].length&&";"!=g[f].charAt(0)&&(t=new mxCell(g[f],
-new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),t.vertex=!0,u=h.getPreferredSizeForCell(t),null!=u&&t.geometry.width<u.width&&(t.geometry.width=u.width),m.geometry.width=Math.max(m.geometry.width,t.geometry.width),m.geometry.height+=t.geometry.height,m.insert(t),n.push(t));h.getModel().beginUpdate();try{m=h.importCells([m],k.x,k.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
-"cells",[m].concat(m.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(m);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var n=function(a){var c=q[a];null==c&&(c=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),c.vertex=!0,q[a]=c,w.push(c));return c},q={},w=[],f=0;f<g.length;f++)if(";"!=g[f].charAt(0)){var A=g[f].split("->");2<=A.length&&(t=n(A[0]),l=n(A[A.length-1]),A=new mxCell(2<A.length?A[1]:"",new mxGeometry),A.edge=!0,t.insertEdge(A,!0),l.insertEdge(A,!1),
-w.push(A))}if(0<w.length){g=document.createElement("div");g.style.visibility="hidden";document.body.appendChild(g);h=new Graph(g);h.getModel().beginUpdate();try{w=h.importCells(w);for(f=0;f<w.length;f++)h.getModel().isVertex(w[f])&&(u=h.getPreferredSizeForCell(w[f]),w[f].geometry.width=Math.max(w[f].geometry.width,u.width),w[f].geometry.height=Math.max(w[f].geometry.height,u.height));m=new mxFastOrganicLayout(h);m.disableEdgeStyle=!1;m.forceConstant=120;m.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
-n=[];a.editor.graph.getModel().beginUpdate();try{n=a.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),k.x,k.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",n))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(n[0]);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());h.destroy();g.parentNode.removeChild(g)}}}function f(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
-"table"==n.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
-"plantUmlSvg"==n.value||"plantUmlTxt"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var k=a.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height=
-"354px";l.style.marginBottom="16px";var n=document.createElement("select"),q=document.createElement("option");q.setAttribute("value","list");mxUtils.write(q,mxResources.get("list"));n.appendChild(q);null!=d&&"fromText"!=d||q.setAttribute("selected","selected");q=document.createElement("option");q.setAttribute("value","table");mxUtils.write(q,mxResources.get("table"));n.appendChild(q);"formatSql"==d&&q.setAttribute("selected","selected");q=document.createElement("option");q.setAttribute("value","diagram");
-mxUtils.write(q,mxResources.get("diagram"));n.appendChild(q);q=document.createElement("option");q.setAttribute("value","plantUmlSvg");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&q.setAttribute("selected","selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var c=document.createElement("option");c.setAttribute("value","plantUmlTxt");
-mxUtils.write(c,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(n.appendChild(q),n.appendChild(d),n.appendChild(c));var g=f();l.value=g;e.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];
-var c=new FileReader;c.onload=function(a){l.value=a.target.result};c.readAsText(a)}},!1));e.appendChild(n);mxEvent.addListener(n,"change",function(){var a=f();if(0==l.value.length||l.value==g)g=a,l.value=g});d=mxUtils.button(mxResources.get("close"),function(){l.value==g?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});d.className="geBtn";a.editor.cancelFirst&&e.appendChild(d);q=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();b(l.value,n.value)});
-e.appendChild(q);q.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(d);this.container=e},NewDialog=function(a,e,d,b,f,k,l,n,q,c,g,h,t,v,p){function y(){for(var a=!0;D<M.length&&(a||0!=mxUtils.mod(D,30));)a=M[D++],m(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function x(){if(O)d||a.hideDialog(),v(O,N,E.value);else if(b)d||a.hideDialog(),b(T,E.value);else{var c=E.value;null!=c&&0<c.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==
-App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(b){a.createFile(c,T,null!=V&&0<V.length?V:null,null,function(){a.hideDialog()},null,b)})}}function u(a,c,b,g,m){null!=R&&(R.style.backgroundColor="transparent",R.style.border="1px solid transparent");A.removeAttribute("disabled");T=c;V=b;R=a;O=g;N=m;R.style.backgroundColor=n;R.style.border=q}function m(a,c,b,g,m,h,p,w){var d=document.createElement("div");d.className="geTemplate";d.style.height=
-S+"px";d.style.width=Y+"px";null!=g&&0<g.length&&d.setAttribute("title",g);if(null!=h)d.style.backgroundImage="url("+h+")",d.style.backgroundSize="contain",d.style.backgroundPosition="center center",d.style.backgroundRepeat="no-repeat",mxEvent.addListener(d,"click",function(c){u(d,null,null,a,p)}),mxEvent.addListener(d,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);d.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";d.style.backgroundPosition=
-"center center";d.style.backgroundRepeat="no-repeat";var e=!1;mxEvent.addListener(d,"click",function(b){A.setAttribute("disabled","disabled");d.style.backgroundColor="transparent";d.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(u(d,a.getText(),c),e&&x())}))});mxEvent.addListener(d,"dblclick",function(a){e=!0})}else d.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(b)+
-"</td></tr></table>",m&&u(d),null!=w?mxEvent.addListener(d,"click",w):(mxEvent.addListener(d,"click",function(a){u(d)}),mxEvent.addListener(d,"dblclick",function(a){x()}));L.appendChild(d)}function w(){mxEvent.addListener(L,"scroll",function(a){L.scrollTop+L.clientHeight>=L.scrollHeight&&(y(),mxEvent.consume(a))});var a=null,b;for(b in G){var g=document.createElement("div"),m=mxResources.get(b),h=G[b];null==m&&(m=b.substring(0,1).toUpperCase()+b.substring(1));18<m.length&&(m=m.substring(0,18)+"&hellip;");
-g.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";g.setAttribute("title",m+" ("+h.length+")");mxUtils.write(g,g.getAttribute("title"));null!=c&&(g.style.padding=c);Q.appendChild(g);null==a&&(a=g,a.style.backgroundColor=l);(function(c,b){mxEvent.addListener(g,"click",function(){a!=b&&(a.style.backgroundColor="",a=b,a.style.backgroundColor=l,L.scrollTop=0,L.innerHTML="",D=0,M=G[c],z=null,y())})})(b,g)}y()}d=null!=
-d?d:!0;f=null!=f?f:!1;l=null!=l?l:"#ebf2f9";n=null!=n?n:"#e6eff8";q=null!=q?q:"1px solid #ccd9ea";g=null!=g?g:TEMPLATE_PATH+"/index.xml";var H=document.createElement("div");H.style.height="100%";var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.height="46px";d&&H.appendChild(F);var C=document.createElement("img");C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="40px";C.style.height="40px";C.style.marginRight="10px";C.style.paddingBottom="4px";C.src=
-a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&d&&F.appendChild(C);d&&mxUtils.write(F,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
-mxResources.get("filename"))+":");C=".xml";a.mode==App.MODE_GOOGLE&&null!=a.drive?C=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?C=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?C=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?C=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(C=a.trello.extension);var E=document.createElement("input");E.setAttribute("value",a.defaultFilename+C);E.style.marginRight="20px";E.style.marginLeft="10px";E.style.width=
-e?"220px":"430px";this.init=function(){d&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?E.select():document.execCommand("selectAll",!1,null))};d&&F.appendChild(E);var F=!1,D=0,A=mxUtils.button(mxResources.get("create"),function(){A.setAttribute("disabled","disabled");x();A.removeAttribute("disabled")});A.className="geBtn gePrimaryBtn";if(h||t){var K=[],z=null,I=function(a){A.setAttribute("disabled","disabled");for(var c=0;c<K.length;c++)K[c].className=c==
-a?"geBtn gePrimaryBtn":"geBtn"},F=!0,C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="30px";H.appendChild(C);var B=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Q.style.display="";L.style.left="160px";I(0);L.scrollTop=0;L.innerHTML="";D=0;z!=M&&(M=z,y(),z=null)});K.push(B);C.appendChild(B);var J=function(a){Q.style.display="none";L.style.left="30px";I(a?-1:1);null==z&&(z=M);L.scrollTop=0;L.innerHTML="";var c=new Spinner({lines:12,length:10,width:5,
-radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});c.spin(L);D=0;var b=function(a,b){c.stop();M=a;b?L.innerHTML=b:0==a.length?L.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(L.innerHTML="",y())};a?t(P.value,b):h(b)};h&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){J()}),C.appendChild(B),K.push(B));if(t){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxResources.get("search")+":";C.appendChild(B);
-var P=document.createElement("input");P.style.marginRight="10px";P.style.marginLeft="10px";P.style.width="220px";mxEvent.addListener(P,"keypress",function(a){13==a.keyCode&&J(!0)});C.appendChild(P);B=mxUtils.button(mxResources.get("search"),function(){J(!0)});B.className="geBtn";C.appendChild(B)}I(0)}var V=null,T=null,R=null,O=null,N=null,L=document.createElement("div");L.style.border="1px solid #d3d3d3";L.style.position="absolute";L.style.left="160px";L.style.right="34px";F=(d?72:40)+(F?30:0);L.style.top=
-F+"px";L.style.bottom="68px";L.style.margin="6px 0 0 -1px";L.style.padding="6px";L.style.overflow="auto";var Q=document.createElement("div");Q.style.cssText="position:absolute;left:30px;width:128px;top:"+F+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var S=140,Y=140,G={},aa=1;G.basic=[{title:"blankDiagram",select:!0}];var M=G.basic;if(!e){H.appendChild(Q);H.appendChild(L);var X=!1;mxUtils.get(g,function(a){if(!X){X=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==
-typeof a.getAttribute){var c=a.getAttribute("url");if(null!=c){var b=c.indexOf("/"),c=c.substring(0,b),b=G[c];null==b&&(aa++,b=[],G[c]=b);b.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}w()}})}mxEvent.addListener(E,"keypress",function(a){13==a.keyCode&&x()});g=document.createElement("div");g.style.marginTop=e?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom=
-"24px";g.style.right="40px";F=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});F.className="geBtn";!a.editor.cancelFirst||f&&null==k||g.appendChild(F);e||a.isOffline()||!d||null!=b||f||(C=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),C.className="geBtn",g.appendChild(C));e||"1"==urlParams.embed||f||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var c=new FilenameDialog(a,
-"",mxResources.get("create"),function(c){null!=c&&0<c.length&&(c=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(c)),null==a.getCurrentFile()?window.location.href=c:window.openWindow(c))},mxResources.get("url"));a.showDialog(c.container,300,80,!0,!0);c.init()}),e.className="geBtn",g.appendChild(e));Graph.fileSupport&&p&&(p=mxUtils.button(mxResources.get("import"),function(){var c=document.createElement("input");c.setAttribute("multiple",
-"multiple");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(b){a.openFiles(c.files,!0)});c.click()}),p.className="geBtn",g.appendChild(p));g.appendChild(A);a.editor.cancelFirst||null!=b||f&&null==k||g.appendChild(F);H.appendChild(g);this.container=H},CreateDialog=function(a,e,d,b,f,k,l,n,q,c,g,h,t,v,p){function y(c,b,g,m){function u(){mxEvent.addListener(p,"click",function(){var c=g;if(l){var b=w.value,m=b.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>m){var c=null!=c?c:C.value,
-h="";c==App.MODE_GOOGLE?h=a.drive.extension:c==App.MODE_GITHUB?h=a.gitHub.extension:c==App.MODE_TRELLO?h=a.trello.extension:c==App.MODE_DROPBOX?h=a.dropbox.extension:c==App.MODE_ONEDRIVE?h=a.oneDrive.extension:c==App.MODE_DEVICE&&(h=".xml");0<=m&&(b=b.substring(0,m));w.value=b+h}}x(g)})}var p=document.createElement("a");p.style.overflow="hidden";var d=document.createElement("img");d.src=c;d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="60px";d.style.height="60px";d.style.paddingBottom=
-"6px";p.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";p.className="geBaseButton";p.style.position="relative";p.style.margin="4px";p.style.padding="8px 8px 10px 8px";p.style.whiteSpace="nowrap";p.appendChild(d);mxClient.IS_QUIRKS&&(p.style.cssFloat="left",p.style.zoom="1");p.style.color="gray";p.style.fontSize="11px";var v=document.createElement("div");p.appendChild(v);mxUtils.write(v,b);if(null!=m&&null==a[m]){d.style.visibility="hidden";mxUtils.setOpacity(v,10);var f=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});f.spin(p);var t=window.setTimeout(function(){null==a[m]&&(f.stop(),p.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[m]&&(window.clearTimeout(t),mxUtils.setOpacity(v,100),d.style.visibility="",f.stop(),u())}))}else u();H.appendChild(p);++F==h&&(mxUtils.br(H),F=0)}function x(c){var b=w.value;if(null==c||null!=b&&0<b.length)a.hideDialog(),d(b,
-c)}l=null!=l?l:!0;n=null!=n?n:!0;h=null!=h?h:4;var u=document.createElement("div");null==b&&a.addLanguageMenu(u);var m=document.createElement("h2");mxUtils.write(m,f||mxResources.get("create"));m.style.marginTop="0px";m.style.marginBottom="24px";u.appendChild(m);mxUtils.write(u,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",e);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||
-5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};u.appendChild(w);null!=t&&null!=v&&"image/"==v.substring(0,6)&&(w.style.width="160px",f=null,"image/svg+xml"==v&&mxClient.IS_SVG?(f=document.createElement("div"),f.innerHTML=mxUtils.trim(t),t=f.getElementsByTagName("svg")[0],v=parseInt(t.getAttribute("width")),p=parseInt(t.getAttribute("height")),t.setAttribute("viewBox","0 0 "+v+" "+p),t.setAttribute("width","120px"),t.setAttribute("height","80px")):
-(f=document.createElement("img"),f.setAttribute("src","data:"+v+(p?";base64,":";utf8,")+t)),f.style.position="absolute",f.style.top="70px",f.style.right="100px",f.style.maxWidth="120px",f.style.maxHeight="80px",mxUtils.setPrefixedStyle(f.style,"transform","translate(50%,-50%)"),u.appendChild(f),q&&Editor.popupsAllowed&&(f.style.cursor="pointer",mxEvent.addListener(f,"click",function(){x("_blank")})));mxUtils.br(u);var H=document.createElement("div");H.style.textAlign="center";var F=0;H.style.marginTop=
-"6px";u.appendChild(H);var C=document.createElement("select");C.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(f,mxResources.get("googleDrive")),C.appendChild(f),y(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_ONEDRIVE),
-mxUtils.write(f,mxResources.get("oneDrive")),C.appendChild(f),a.mode==App.MODE_ONEDRIVE&&f.setAttribute("selected","selected"),y(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(f,mxResources.get("dropbox")),C.appendChild(f),a.mode==App.MODE_DROPBOX&&f.setAttribute("selected","selected"),y(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
-App.MODE_DROPBOX,"dropbox")),null!=a.gitHub&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_GITHUB),mxUtils.write(f,mxResources.get("github")),C.appendChild(f),y(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=a.trello&&(f=document.createElement("option"),f.setAttribute("value",App.MODE_TRELLO),mxUtils.write(f,mxResources.get("trello")),C.appendChild(f),y(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));
-if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)f=document.createElement("option"),f.setAttribute("value",App.MODE_DEVICE),mxUtils.write(f,mxResources.get("device")),C.appendChild(f),a.mode!=App.MODE_DEVICE&&n||f.setAttribute("selected","selected"),g&&y(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),
-mxUtils.write(n,mxResources.get("browser")),C.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),y(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");n.style.marginTop="26px";n.style.textAlign="center";null!=c&&(f=mxUtils.button(mxResources.get("help"),function(){a.openLink(c)}),f.className="geBtn",n.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){null!=b?b():(a.fileLoaded(null),a.hideDialog(),
-window.close(),window.location.href=a.getUrl())});f.className="geBtn";a.editor.cancelFirst&&n.appendChild(f);null==b&&(t=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),t.className="geBtn",n.appendChild(t));q&&Editor.popupsAllowed&&(q=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),q.className="geBtn",n.appendChild(q));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){x(g?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",
-n.appendChild(k));a.editor.cancelFirst||n.appendChild(f);mxEvent.addListener(w,"keypress",function(c){13==c.keyCode?x(App.MODE_DEVICE):27==c.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});u.appendChild(n);this.container=u},PopupDialog=function(a,e,d,b,f){f=null!=f?f:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var l=mxUtils.button(mxResources.get("openInThisWindow"),function(){f&&a.hideDialog();
-null!=b&&b()});l.className="geBtn";l.style.marginBottom="8px";l.style.width="280px";k.appendChild(l);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){f&&a.hideDialog();null!=d&&d();a.openLink(e)});n.className="geBtn gePrimaryBtn";n.style.width=l.style.width;k.appendChild(n);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,e,d,b,f,k){k=null!=k?k:!0;var l=a.editor.graph,n=document.createElement("div");
-mxUtils.write(n,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var q=document.createElement("input");q.setAttribute("value",d);q.setAttribute("type","text");q.setAttribute("spellcheck","false");q.setAttribute("autocorrect","off");q.setAttribute("autocomplete","off");q.setAttribute("autocapitalize",
+var BackgroundImageDialog=function(b,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=b.editor.graph.backgroundImage,g=document.createElement("input");g.setAttribute("type","text");g.style.marginTop="4px";g.style.marginBottom="4px";g.style.width="350px";g.value=
+null!=c?c.src:"";var k=!1,n=function(){k||""==g.value||b.isOffline()?(p.value="",q.value=""):b.loadImage(mxUtils.trim(g.value),function(a){p.value=a.width;q.value=a.height},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));g.value="";p.value="";q.value=""})};this.init=function(){g.focus();if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var a=d.parentNode,c=null;mxEvent.addListener(a,"dragleave",function(a){null!=
+c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=b.highlightElement(a));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)b.importFiles(a.dataTransfer.files,0,0,b.maxBackgroundSize,function(a,b,c,f,h,t){g.value=a;n()},function(){},
+function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes);else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var f=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(f)&&(g.value=decodeURIComponent(f),n())}a.stopPropagation();a.preventDefault()}),!1)}};d.appendChild(g);mxUtils.br(d);mxUtils.br(d);mxUtils.write(d,mxResources.get("width")+":");var p=document.createElement("input");
+p.setAttribute("type","text");p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="16px";p.value=null!=c?c.width:"";d.appendChild(p);mxUtils.write(d,mxResources.get("height")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="16px";q.value=null!=c?c.height:"";d.appendChild(q);c=mxUtils.button(mxResources.get("reset"),function(){g.value="";p.value="";q.value="";k=!1});mxEvent.addListener(c,"mousedown",
+function(){k=!0});mxEvent.addListener(c,"touchstart",function(){k=!0});c.className="geBtn";c.width="100";d.appendChild(c);mxUtils.br(d);mxEvent.addListener(g,"change",n);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(g.value=a.url,n()));g.focus()};c=document.createElement("div");c.style.marginTop="40px";c.style.textAlign="right";var a=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+a.className="geBtn";b.editor.cancelFirst&&c.appendChild(a);if(!b.isOffline()&&"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top){var f=mxUtils.button(mxResources.get("search"),function(){if(null==b.imageSearchPicker){var a=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);b.imageSearchPicker=a.setCallback(function(a){ImageDialog.filePicked(a)}).build()}b.imageSearchPicker.setVisible(!0)});
+f.className="geBtn";c.appendChild(f);null!=b.drive&&"1"==urlParams.photos&&(f=mxUtils.button(mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.photoPicker){var a=gapi.auth.getToken().access_token,a=(new google.picker.PickerBuilder).setAppId(b.drive.appId).setLocale(mxLanguage).setOAuthToken(a).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+b.photoPicker=a.setCallback(function(a){ImageDialog.filePicked(a)}).build()}b.photoPicker.setVisible(!0)}))}),f.className="geBtn",c.appendChild(f))}f=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();e(""!=g.value?new mxImage(mxUtils.trim(g.value),p.value,q.value):null)});f.className="geBtn gePrimaryBtn";c.appendChild(f);b.editor.cancelFirst||c.appendChild(a);d.appendChild(c);this.container=d},ParseDialog=function(b,e,d){function c(a,c){var f=a.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==
+c||"plantUmlTxt"==c){var f="plantUmlTxt"==c?PLANT_URL+"/txt/":"plantUmlPng"==c?PLANT_URL+"/png/":PLANT_URL+"/svg/",h=b.editor.graph;if(b.spinner.spin(document.body,mxResources.get("inserting"))){var d=function(a){if(10>a)return String.fromCharCode(48+a);a-=10;if(26>a)return String.fromCharCode(65+a);a-=26;if(26>a)return String.fromCharCode(97+a);a-=26;return 0==a?"-":1==a?"_":"?"},e=function(a,b,c){c1=a>>2;c2=(a&3)<<4|b>>4;c3=(b&15)<<2|c>>6;c4=c&63;r="";r+=d(c1&63);r+=d(c2&63);r+=d(c3&63);return r+=
+d(c4&63)},m=new XMLHttpRequest;m.open("GET",f+function(a){r="";for(z=0;z<a.length;z+=3)r=z+2==a.length?r+e(a.charCodeAt(z),a.charCodeAt(z+1),0):z+1==a.length?r+e(a.charCodeAt(z),0,0):r+e(a.charCodeAt(z),a.charCodeAt(z+1),a.charCodeAt(z+2));return r}(h.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(a))))),!0);"plantUmlTxt"!=c&&(m.responseType="blob");m.onload=function(f){if(200<=this.status&&300>this.status)if("plantUmlTxt"==c){b.spinner.stop();h.getModel().beginUpdate();try{cell=h.insertVertex(null,
+null,"<pre>"+this.response+"</pre>",k.x,k.y,1,1,"text;html=1;overflow=fill;"),h.updateCellSize(cell,!0)}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())}else f=new FileReader,f.readAsDataURL(this.response),f.onload=function(c){var f=new Image;f.onload=function(){b.spinner.stop();var l=f.width,v=f.height;if(0==l&&0==v){var d=c.target.result,m=d.indexOf(","),d=decodeURIComponent(escape(atob(d.substring(m+1)))),d=mxUtils.parseXml(d).getElementsByTagName("svg");
+0<d.length&&(l=parseFloat(d[0].getAttribute("width")),v=parseFloat(d[0].getAttribute("height")))}h.getModel().beginUpdate();try{cell=h.insertVertex(null,null,a,k.x,k.y,l,v,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(c.target.result)+";")}finally{h.getModel().endUpdate()}h.setSelectionCell(cell);h.scrollCellToVisible(h.getSelectionCell())};f.src=c.target.result},f.onerror=function(a){b.handleError(a)};else b.spinner.stop(),b.handleError(f)};m.onerror=
+function(a){b.handleError(a)};m.send()}}else if("table"==c){for(var l=null,v=[],g=0,z=0;z<f.length;z++)if(m=mxUtils.trim(f[z]),"create table"==m.substring(0,12).toLowerCase())m=mxUtils.trim(m.substring(12)),"("==m.charAt(m.length-1)&&(m=m.substring(0,m.lastIndexOf(" "))),l=new mxCell(m,new mxGeometry(g,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
+l.vertex=!0,v.push(l),m=b.editor.graph.getPreferredSizeForCell(p),null!=m&&(l.geometry.width=m.width+10);else if(null!=l&&")"==m.charAt(0))g+=l.geometry.width+40,l=null;else if("("!=m&&null!=l&&(m=m.substring(0,","==m.charAt(m.length-1)?m.length-1:m.length),"primary key"!=m.substring(0,11).toLowerCase())){var n=m.toLowerCase().indexOf("primary key"),m=m.replace(/primary key/i,""),p=new mxCell(m,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
+p.vertex=!0;m=sb.cloneCell(p,0<n?"PK":"");m.connectable=!1;m.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";m.geometry.width=30;m.geometry.height=26;p.insert(m);m=b.editor.graph.getPreferredSizeForCell(p);null!=m&&l.geometry.width<m.width+10&&(l.geometry.width=Math.min(220,m.width+10));l.insert(p);l.geometry.height+=26}0<v.length&&(h=b.editor.graph,
+f=h.view,m=h.getGraphBounds(),h.setSelectionCells(h.importCells(v,Math.ceil(Math.max(0,m.x/f.scale-f.translate.x)+4*h.gridSize),Math.ceil(Math.max(0,(m.y+m.height)/f.scale-f.translate.y)+4*h.gridSize))),h.scrollCellToVisible(h.getSelectionCell()))}else if("list"==c){if(0<f.length){h=b.editor.graph;l=new mxCell(f[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");
+l.vertex=!0;m=h.getPreferredSizeForCell(l);null!=m&&l.geometry.width<m.width+10&&(l.geometry.width=m.width+10);p=[l];if(1<f.length)for(z=1;z<f.length;z++)"--"==f[z]?(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;"),m.vertex=!0,l.geometry.height+=m.geometry.height,l.insert(m),p.push(m)):0<f[z].length&&";"!=f[z].charAt(0)&&(g=new mxCell(f[z],
+new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),g.vertex=!0,m=h.getPreferredSizeForCell(g),null!=m&&g.geometry.width<m.width&&(g.geometry.width=m.width),l.geometry.width=Math.max(l.geometry.width,g.geometry.width),l.geometry.height+=g.geometry.height,l.insert(g),p.push(g));h.getModel().beginUpdate();try{l=h.importCells([l],k.x,k.y)[0],h.fireEvent(new mxEventObject("cellsInserted",
+"cells",[l].concat(l.children)))}finally{h.getModel().endUpdate()}h.setSelectionCell(l);h.scrollCellToVisible(h.getSelectionCell())}}else{for(var p=function(a){var b=q[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,q[a]=b,v.push(b));return b},q={},v=[],z=0;z<f.length;z++)if(";"!=f[z].charAt(0)){var A=f[z].split("->");2<=A.length&&(g=p(A[0]),n=p(A[A.length-1]),A=new mxCell(2<A.length?A[1]:"",new mxGeometry),A.edge=!0,g.insertEdge(A,!0),n.insertEdge(A,!1),
+v.push(A))}if(0<v.length){f=document.createElement("div");f.style.visibility="hidden";document.body.appendChild(f);h=new Graph(f);h.getModel().beginUpdate();try{v=h.importCells(v);for(z=0;z<v.length;z++)h.getModel().isVertex(v[z])&&(m=h.getPreferredSizeForCell(v[z]),v[z].geometry.width=Math.max(v[z].geometry.width,m.width),v[z].geometry.height=Math.max(v[z].geometry.height,m.height));l=new mxFastOrganicLayout(h);l.disableEdgeStyle=!1;l.forceConstant=120;l.execute(h.getDefaultParent())}finally{h.getModel().endUpdate()}h.clearCellOverlays();
+p=[];b.editor.graph.getModel().beginUpdate();try{p=b.editor.graph.importCells(h.getModel().getChildren(h.getDefaultParent()),k.x,k.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",p))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(p[0]);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());h.destroy();f.parentNode.removeChild(f)}}}function g(){return"list"==p.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":
+"table"==p.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==p.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
+"plantUmlSvg"==p.value||"plantUmlTxt"==p.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var k=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var n=document.createElement("textarea");n.style.resize="none";n.style.width="100%";n.style.height=
+"354px";n.style.marginBottom="16px";var p=document.createElement("select"),q=document.createElement("option");q.setAttribute("value","list");mxUtils.write(q,mxResources.get("list"));p.appendChild(q);null!=d&&"fromText"!=d||q.setAttribute("selected","selected");q=document.createElement("option");q.setAttribute("value","table");mxUtils.write(q,mxResources.get("formatSql"));p.appendChild(q);"formatSql"==d&&q.setAttribute("selected","selected");q=document.createElement("option");q.setAttribute("value",
+"diagram");mxUtils.write(q,mxResources.get("diagram"));p.appendChild(q);q=document.createElement("option");q.setAttribute("value","plantUmlSvg");mxUtils.write(q,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==d&&q.setAttribute("selected","selected");d=document.createElement("option");d.setAttribute("value","plantUmlPng");mxUtils.write(d,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");var a=document.createElement("option");a.setAttribute("value","plantUmlTxt");
+mxUtils.write(a,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&(p.appendChild(q),p.appendChild(d),p.appendChild(a));var f=g();n.value=f;e.appendChild(n);this.init=function(){n.focus()};Graph.fileSupport&&(n.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),n.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=a.dataTransfer.files[0];
+var b=new FileReader;b.onload=function(a){n.value=a.target.result};b.readAsText(a)}},!1));e.appendChild(p);mxEvent.addListener(p,"change",function(){var a=g();if(0==n.value.length||n.value==f)f=a,n.value=f});d=mxUtils.button(mxResources.get("close"),function(){n.value==f?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});d.className="geBtn";b.editor.cancelFirst&&e.appendChild(d);q=mxUtils.button(mxResources.get("insert"),function(){b.hideDialog();c(n.value,p.value)});
+e.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(d);this.container=e},NewDialog=function(b,e,d,c,g,k,n,p,q,a,f,h,m,t,u){function w(){for(var a=!0;C<Q.length&&(a||0!=mxUtils.mod(C,30));)a=Q[C++],l(a.url,a.libs,a.title,a.tooltip?a.tooltip:a.title,a.select,a.imgUrl,a.info,a.onClick),a=!1}function x(){if(S)d||b.hideDialog(),t(S,O,E.value);else if(c)d||b.hideDialog(),c(Z,E.value);else{var a=E.value;null!=a&&0<a.length&&b.pickFolder(b.mode==App.MODE_ONEDRIVE||b.mode==
+App.MODE_TRELLO||b.mode==App.MODE_GOOGLE&&(null==b.stateArg||null==b.stateArg.folderId)?b.mode:null,function(c){b.createFile(a,Z,null!=X&&0<X.length?X:null,null,function(){b.hideDialog()},null,c)})}}function D(a,b,c,f,l){null!=N&&(N.style.backgroundColor="transparent",N.style.border="1px solid transparent");A.removeAttribute("disabled");Z=b;X=c;N=a;S=f;O=l;N.style.backgroundColor=p;N.style.border=q}function l(a,b,c,f,l,h,v,d){var m=document.createElement("div");m.className="geTemplate";m.style.height=
+R+"px";m.style.width=T+"px";null!=f&&0<f.length&&m.setAttribute("title",f);if(null!=h)m.style.backgroundImage="url("+h+")",m.style.backgroundSize="contain",m.style.backgroundPosition="center center",m.style.backgroundRepeat="no-repeat",mxEvent.addListener(m,"click",function(b){D(m,null,null,a,v)}),mxEvent.addListener(m,"dblclick",function(a){x()});else if(null!=a&&0<a.length){a.substring(0,a.length-4);m.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";m.style.backgroundPosition=
+"center center";m.style.backgroundRepeat="no-repeat";var t=!1;mxEvent.addListener(m,"click",function(c){A.setAttribute("disabled","disabled");m.style.backgroundColor="transparent";m.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(D(m,a.getText(),b),t&&x())}))});mxEvent.addListener(m,"dblclick",function(a){t=!0})}else m.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+mxResources.get(c)+
+"</td></tr></table>",l&&D(m),null!=d?mxEvent.addListener(m,"click",d):(mxEvent.addListener(m,"click",function(a){D(m)}),mxEvent.addListener(m,"dblclick",function(a){x()}));I.appendChild(m)}function v(){mxEvent.addListener(I,"scroll",function(a){I.scrollTop+I.clientHeight>=I.scrollHeight&&(w(),mxEvent.consume(a))});var b=null,c;for(c in V){var f=document.createElement("div"),l=mxResources.get(c),h=V[c];null==l&&(l=c.substring(0,1).toUpperCase()+c.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");
+f.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";f.setAttribute("title",l+" ("+h.length+")");mxUtils.write(f,f.getAttribute("title"));null!=a&&(f.style.padding=a);W.appendChild(f);null==b&&(b=f,b.style.backgroundColor=n);(function(a,c){mxEvent.addListener(f,"click",function(){b!=c&&(b.style.backgroundColor="",b=c,b.style.backgroundColor=n,I.scrollTop=0,I.innerHTML="",C=0,Q=V[a],B=null,w())})})(c,f)}w()}d=null!=
+d?d:!0;g=null!=g?g:!1;n=null!=n?n:"#ebf2f9";p=null!=p?p:"#e6eff8";q=null!=q?q:"1px solid #ccd9ea";f=null!=f?f:TEMPLATE_PATH+"/index.xml";var G=document.createElement("div");G.style.height="100%";var z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="46px";d&&G.appendChild(z);var y=document.createElement("img");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="40px";y.style.height="40px";y.style.marginRight="10px";y.style.paddingBottom="4px";y.src=
+b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!e&&d&&z.appendChild(y);d&&mxUtils.write(z,(null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):
+mxResources.get("filename"))+":");y=".xml";b.mode==App.MODE_GOOGLE&&null!=b.drive?y=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?y=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?y=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?y=b.gitHub.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(y=b.trello.extension);var E=document.createElement("input");E.setAttribute("value",b.defaultFilename+y);E.style.marginRight="20px";E.style.marginLeft="10px";E.style.width=
+e?"220px":"430px";this.init=function(){d&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?E.select():document.execCommand("selectAll",!1,null))};d&&z.appendChild(E);var z=!1,C=0,A=mxUtils.button(mxResources.get("create"),function(){A.setAttribute("disabled","disabled");x();A.removeAttribute("disabled")});A.className="geBtn gePrimaryBtn";if(h||m){var J=[],B=null,L=function(a){A.setAttribute("disabled","disabled");for(var b=0;b<J.length;b++)J[b].className=b==
+a?"geBtn gePrimaryBtn":"geBtn"},z=!0,y=document.createElement("div");y.style.whiteSpace="nowrap";y.style.height="30px";G.appendChild(y);var H=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){W.style.display="";I.style.left="160px";L(0);I.scrollTop=0;I.innerHTML="";C=0;B!=Q&&(Q=B,w(),B=null)});J.push(H);y.appendChild(H);var F=function(a){W.style.display="none";I.style.left="30px";L(a?-1:1);null==B&&(B=Q);I.scrollTop=0;I.innerHTML="";var b=new Spinner({lines:12,length:10,width:5,
+radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});b.spin(I);C=0;var c=function(a,c){b.stop();Q=a;c?I.innerHTML=c:0==a.length?I.innerHTML=mxResources.get("noDiagrams",null,"No Diagrams Found"):(I.innerHTML="",w())};a?m(M.value,c):h(c)};h&&(H=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){F()}),y.appendChild(H),J.push(H));if(m){H=document.createElement("span");H.style.marginLeft="10px";H.innerHTML=mxResources.get("search")+":";y.appendChild(H);
+var M=document.createElement("input");M.style.marginRight="10px";M.style.marginLeft="10px";M.style.width="220px";mxEvent.addListener(M,"keypress",function(a){13==a.keyCode&&F(!0)});y.appendChild(M);H=mxUtils.button(mxResources.get("search"),function(){F(!0)});H.className="geBtn";y.appendChild(H)}L(0)}var X=null,Z=null,N=null,S=null,O=null,I=document.createElement("div");I.style.border="1px solid #d3d3d3";I.style.position="absolute";I.style.left="160px";I.style.right="34px";z=(d?72:40)+(z?30:0);I.style.top=
+z+"px";I.style.bottom="68px";I.style.margin="6px 0 0 -1px";I.style.padding="6px";I.style.overflow="auto";var W=document.createElement("div");W.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";var R=140,T=140,V={},K=1;V.basic=[{title:"blankDiagram",select:!0}];var Q=V.basic;if(!e){G.appendChild(W);G.appendChild(I);var P=!1;mxUtils.get(f,function(a){if(!P){P=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==
+typeof a.getAttribute){var b=a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=V[b];null==c&&(K++,c=[],V[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}v()}})}mxEvent.addListener(E,"keypress",function(a){13==a.keyCode&&x()});f=document.createElement("div");f.style.marginTop=e?"4px":"16px";f.style.textAlign="right";f.style.position="absolute";f.style.left="40px";f.style.bottom=
+"24px";f.style.right="40px";z=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||g&&null==k||f.appendChild(z);e||b.isOffline()||!d||null!=c||g||(y=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),y.className="geBtn",f.appendChild(y));e||"1"==urlParams.embed||g||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var a=new FilenameDialog(b,
+"",mxResources.get("create"),function(a){null!=a&&0<a.length&&(a=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+encodeURIComponent(E.value)+"&create="+encodeURIComponent(a)),null==b.getCurrentFile()?window.location.href=a:window.openWindow(a))},mxResources.get("url"));b.showDialog(a.container,300,80,!0,!0);a.init()}),e.className="geBtn",f.appendChild(e));Graph.fileSupport&&u&&(u=mxUtils.button(mxResources.get("import"),function(){var a=document.createElement("input");a.setAttribute("multiple",
+"multiple");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(c){b.openFiles(a.files,!0)});a.click()}),u.className="geBtn",f.appendChild(u));f.appendChild(A);b.editor.cancelFirst||null!=c||g&&null==k||f.appendChild(z);G.appendChild(f);this.container=G},CreateDialog=function(b,e,d,c,g,k,n,p,q,a,f,h,m,t,u){function w(a,c,f,l){function m(){mxEvent.addListener(d,"click",function(){var a=f;if(n){var c=v.value,l=c.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>l){var a=null!=a?a:y.value,
+h="";a==App.MODE_GOOGLE?h=b.drive.extension:a==App.MODE_GITHUB?h=b.gitHub.extension:a==App.MODE_TRELLO?h=b.trello.extension:a==App.MODE_DROPBOX?h=b.dropbox.extension:a==App.MODE_ONEDRIVE?h=b.oneDrive.extension:a==App.MODE_DEVICE&&(h=".xml");0<=l&&(c=c.substring(0,l));v.value=c+h}}x(f)})}var d=document.createElement("a");d.style.overflow="hidden";var t=document.createElement("img");t.src=a;t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.style.width="60px";t.style.height="60px";t.style.paddingBottom=
+"6px";d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";d.className="geBaseButton";d.style.position="relative";d.style.margin="4px";d.style.padding="8px 8px 10px 8px";d.style.whiteSpace="nowrap";d.appendChild(t);mxClient.IS_QUIRKS&&(d.style.cssFloat="left",d.style.zoom="1");d.style.color="gray";d.style.fontSize="11px";var w=document.createElement("div");d.appendChild(w);mxUtils.write(w,c);if(null!=l&&null==b[l]){t.style.visibility="hidden";mxUtils.setOpacity(w,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(d);var g=window.setTimeout(function(){null==b[l]&&(u.stop(),d.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[l]&&(window.clearTimeout(g),mxUtils.setOpacity(w,100),t.style.visibility="",u.stop(),m())}))}else m();G.appendChild(d);++z==h&&(mxUtils.br(G),z=0)}function x(a){var c=v.value;if(null==a||null!=c&&0<c.length)b.hideDialog(),d(c,
+a)}n=null!=n?n:!0;p=null!=p?p:!0;h=null!=h?h:4;var D=document.createElement("div");null==c&&b.addLanguageMenu(D);var l=document.createElement("h2");mxUtils.write(l,g||mxResources.get("create"));l.style.marginTop="0px";l.style.marginBottom="24px";D.appendChild(l);mxUtils.write(D,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",e);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};D.appendChild(v);null!=m&&null!=t&&"image/"==t.substring(0,6)&&(v.style.width="160px",g=null,"image/svg+xml"==t&&mxClient.IS_SVG?(g=document.createElement("div"),g.innerHTML=mxUtils.trim(m),m=g.getElementsByTagName("svg")[0],t=parseInt(m.getAttribute("width")),u=parseInt(m.getAttribute("height")),m.setAttribute("viewBox","0 0 "+t+" "+u),m.setAttribute("width","120px"),m.setAttribute("height","80px")):
+(g=document.createElement("img"),g.setAttribute("src","data:"+t+(u?";base64,":";utf8,")+m)),g.style.position="absolute",g.style.top="70px",g.style.right="100px",g.style.maxWidth="120px",g.style.maxHeight="80px",mxUtils.setPrefixedStyle(g.style,"transform","translate(50%,-50%)"),D.appendChild(g),q&&Editor.popupsAllowed&&(g.style.cursor="pointer",mxEvent.addListener(g,"click",function(){x("_blank")})));mxUtils.br(D);var G=document.createElement("div");G.style.textAlign="center";var z=0;G.style.marginTop=
+"6px";D.appendChild(G);var y=document.createElement("select");y.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(g,mxResources.get("googleDrive")),y.appendChild(g),w(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_ONEDRIVE),
+mxUtils.write(g,mxResources.get("oneDrive")),y.appendChild(g),b.mode==App.MODE_ONEDRIVE&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(g,mxResources.get("dropbox")),y.appendChild(g),b.mode==App.MODE_DROPBOX&&g.setAttribute("selected","selected"),w(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),
+App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_GITHUB),mxUtils.write(g,mxResources.get("github")),y.appendChild(g),w(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.trello&&(g=document.createElement("option"),g.setAttribute("value",App.MODE_TRELLO),mxUtils.write(g,mxResources.get("trello")),y.appendChild(g),w(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));
+if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&!mxClient.IS_IOS)g=document.createElement("option"),g.setAttribute("value",App.MODE_DEVICE),mxUtils.write(g,mxResources.get("device")),y.appendChild(g),b.mode!=App.MODE_DEVICE&&p||g.setAttribute("selected","selected"),f&&w(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);p&&isLocalStorage&&"0"!=urlParams.browser&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_BROWSER),
+mxUtils.write(p,mxResources.get("browser")),y.appendChild(p),b.mode==App.MODE_BROWSER&&p.setAttribute("selected","selected"),w(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));p=document.createElement("div");p.style.marginTop="26px";p.style.textAlign="center";null!=a&&(g=mxUtils.button(mxResources.get("help"),function(){b.openLink(a)}),g.className="geBtn",p.appendChild(g));g=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),
+window.close(),window.location.href=b.getUrl())});g.className="geBtn";b.editor.cancelFirst&&p.appendChild(g);null==c&&(m=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),m.className="geBtn",p.appendChild(m));q&&Editor.popupsAllowed&&(q=mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),q.className="geBtn",p.appendChild(q));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){x(f?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",
+p.appendChild(k));b.editor.cancelFirst||p.appendChild(g);mxEvent.addListener(v,"keypress",function(a){13==a.keyCode?x(App.MODE_DEVICE):27==a.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});D.appendChild(p);this.container=D},PopupDialog=function(b,e,d,c,g){g=null!=g?g:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInThisWindow"),function(){g&&b.hideDialog();
+null!=c&&c()});n.className="geBtn";n.style.marginBottom="8px";n.style.width="280px";k.appendChild(n);mxUtils.br(k);var p=mxUtils.button(mxResources.get("openInNewWindow"),function(){g&&b.hideDialog();null!=d&&d();b.openLink(e)});p.className="geBtn gePrimaryBtn";p.style.width=n.style.width;k.appendChild(p);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(b,e,d,c,g,k){k=null!=k?k:!0;var n=b.editor.graph,p=document.createElement("div");
+mxUtils.write(p,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";mxClient.IS_VML||(e.style.paddingRight="20px");var q=document.createElement("input");q.setAttribute("value",d);q.setAttribute("type","text");q.setAttribute("spellcheck","false");q.setAttribute("autocorrect","off");q.setAttribute("autocomplete","off");q.setAttribute("autocapitalize",
"off");q.style.marginTop="6px";q.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";q.style.backgroundRepeat="no-repeat";q.style.backgroundPosition="100% 50%";q.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?
-"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){q.value="";q.focus()});e.appendChild(q);e.appendChild(d);n.appendChild(e);var c=function(c,g,h,d){var u="data:"==c.substring(0,5);!a.isOffline()||u&&"undefined"===typeof chrome?0<c.length&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(c,function(m){a.spinner.stop();a.hideDialog();var u=!1===d?1:null!=g&&null!=h?Math.max(g/
-m.width,h/m.height):Math.min(1,Math.min(520/m.width,520/m.height));k&&(c=a.convertDataUri(c));b(c,Math.round(Number(m.width)*u),Math.round(Number(m.height)*u))},function(){a.spinner.stop();b(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(a.hideDialog(),b(c)):(c=a.convertDataUri(c),g=null==g?120:g,h=null==h?100:h,a.hideDialog(),b(c,g,h))},g=function(g,h){if(null!=g){var p=f?null:l.getModel().getGeometry(l.getSelectionCell());null!=p?c(g,p.width,
-p.height,h):c(g,null,null,h)}else a.hideDialog(),b(null)};this.init=function(){q.focus();if(Graph.fileSupport){q.setAttribute("placeholder",mxResources.get("dragImagesHere"));var c=n.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(g){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));g.stopPropagation();g.preventDefault()}));
-mxEvent.addListener(c,"drop",mxUtils.bind(this,function(c){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,function(a,c,b,h,d,p,e,v){g(a,v)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!mxEvent.isControlDown(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var h=c.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&
-g(decodeURIComponent(h))}c.stopPropagation();c.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&d.appendChild(e);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(q.value=
-a.url));q.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(c){a.importFiles(h.files,0,0,a.maxImageSize,function(a,c,b,h,m,d){g(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},!0)});var t=mxUtils.button(mxResources.get("open"),function(){h.click()});t.className="geBtn";d.appendChild(t)}}document.createElement("canvas").getContext&&
-"data:image/"==q.value.substring(0,11)&&"data:image/svg"!=q.value.substring(0,14)&&(t=mxUtils.button(mxResources.get("crop"),function(){var c=new CropImageDialog(a,q.value,function(a){q.value=a});a.showDialog(c.container,200,180,!0,!0);c.init()}),t.className="geBtn",d.appendChild(t));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(t=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var c=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
-a.imageSearchPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0)}),t.className="geBtn",d.appendChild(t),null!=a.drive&&"1"==urlParams.photos&&(t=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var c=gapi.auth.getToken().access_token,c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.photoPicker=c.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),t.className="geBtn",d.appendChild(t)));mxEvent.addListener(q,"keypress",function(a){13==a.keyCode&&g(q.value)});t=mxUtils.button(mxResources.get("apply"),function(){g(q.value)});t.className="geBtn gePrimaryBtn";d.appendChild(t);a.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition=
-"center 65%",n.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),n.appendChild(e));n.appendChild(d);this.container=n},LinkDialog=function(a,e,d,b,f){function k(a,c,b){b=mxUtils.button("",b);b.className="geBtn";b.setAttribute("title",c);c=document.createElement("img");c.style.height="26px";
-c.style.width="26px";c.setAttribute("src",a);b.style.minWidth="42px";b.style.verticalAlign="middle";b.appendChild(c);x.appendChild(b)}var l=document.createElement("div");mxUtils.write(l,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var q=document.createElement("input");
-q.setAttribute("placeholder",mxResources.get("dragUrlsHere"));q.setAttribute("type","text");q.style.marginTop="6px";q.style.width="400px";q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";q.style.backgroundRepeat="no-repeat";q.style.backgroundPosition="100% 50%";q.style.paddingRight="14px";var c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";
-c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?0:3)+"px";c.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(c,"click",function(){q.value="";q.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
-h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var t=document.createElement("select");t.style.width="380px";if(f&&null!=a.pages){null!=e&&a.editor.graph.isPageLink(e)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(q.setAttribute("value",e),g.setAttribute("checked","checked"),g.defaultChecked=!0);q.style.width="380px";n.appendChild(g);n.appendChild(q);n.appendChild(c);mxUtils.br(n);n.appendChild(h);f=!1;for(c=0;c<a.pages.length;c++){var v=
-document.createElement("option");mxUtils.write(v,a.pages[c].getName()||mxResources.get("pageWithNumber",[c+1]));v.setAttribute("value","data:page/id,"+a.pages[c].getId());e==v.getAttribute("value")&&(v.setAttribute("selected","selected"),f=!0);t.appendChild(v)}if(!f&&h.checked){var p=document.createElement("option");mxUtils.write(p,mxResources.get("pageNotFound"));p.setAttribute("disabled","disabled");p.setAttribute("selected","selected");p.setAttribute("value","pageNotFound");t.appendChild(p);mxEvent.addListener(t,
-"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)})}n.appendChild(t)}else q.setAttribute("value",e),n.appendChild(q),n.appendChild(c);l.appendChild(n);var y=mxUtils.button(d,function(){a.hideDialog();b(h.checked?"pageNotFound"!==t.value?t.value:e:q.value,LinkDialog.selectedDocs)});y.style.verticalAlign="middle";y.className="geBtn gePrimaryBtn";this.init=function(){h.checked?t.focus():(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-q.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(t,"focus",function(){g.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var c=l.parentNode,b=null;mxEvent.addListener(c,"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(c,"dragover",
-mxUtils.bind(this,function(g){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=a.highlightElement(c));g.stopPropagation();g.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,y.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
-x.style.marginTop="20px";x.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var c=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(c=DriveClient.prototype.oldAppHostname,c=
-"https://"+c+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(c=DriveClient.prototype.newAppHostname,c="https://"+c+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(c="https://drive.google.com/#folders/"+a.docs[0].id);q.value=c;q.focus()}else LinkDialog.selectedDocs=null;q.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",
-mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var c=gapi.auth.getToken().access_token,b=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),g=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
-c=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(c).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(b).addView(g).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&c.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
-a.linkPicker=c.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){q.value=a[0].link;q.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,c){q.value=c.value[0].webUrl;
-q.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var c=a[0],b=a[1],g=a[2];a=a.slice(3,a.length).join("/");q.value="https://github.com/"+c+"/"+b+"/blob/"+g+"/"+a;q.focus()}})});mxEvent.addListener(q,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),b(h.checked?t.value:q.value,LinkDialog.selectedDocs))});x.appendChild(y);a.editor.cancelFirst||x.appendChild(d);l.appendChild(x);this.container=
-l},AboutDialog=function(a){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
-"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';e.appendChild(d);mxEvent.addListener(e,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=
-e},FeedbackDialog=function(a){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var b=document.createElement("input");b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),
-function(){var c=(l.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;c.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(b.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+q.value+c),
-function(c){a.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?a.alert(mxResources.get("feedbackSent")):a.alert(mxResources.get("errorSendingFeedback"))},function(){a.spinner.stop();a.alert(mxResources.get("errorSendingFeedback"))}))});f.className="geBtn gePrimaryBtn";f.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(b,"change",
-function(){0<b.value.length&&0<k.test(b.value)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});mxEvent.addListener(b,"keyup",function(){0<b.value.length&&k.test(b.value)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});e.appendChild(b);this.init=function(){b.focus()};var l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("checked","checked");l.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(l);
-var n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(n);mxEvent.addListener(n,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));e.appendChild(d);var q=document.createElement("textarea");q.style.resize="none";q.style.width="600px";q.style.height="140px";q.style.marginTop="6px";q.setAttribute("placeholder",mxResources.get("commentsNotes"));
-e.appendChild(q);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(d.appendChild(n),d.appendChild(f)):(d.appendChild(f),d.appendChild(n));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6;
-var RevisionDialog=function(a,e,d){var b=document.createElement("div"),f=document.createElement("h3");f.style.marginTop="0px";mxUtils.write(f,mxResources.get("revisionHistory"));b.appendChild(f);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";b.appendChild(k);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.left="199px";l.style.width="470px";l.style.height=
-"376px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);b.appendChild(l);var n=new Graph(l);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;var q=0,c=null,g=0,h=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=c&&null!=c[g]?c[g].getAttribute("name"):"pagenumber"==a?g+1:h.apply(this,arguments)};n.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-n.addListener(mxEvent.SIZE,mxUtils.bind(this,function(c,b){a.editor.graph.mathEnabled&&Editor.MathJaxRender(n.container)}));var t=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),v=a.getCurrentFile(),p=null,y=null,x=null,u=null,m=mxUtils.button("",function(){null!=x&&n.zoomIn()});m.className="geSprite geSprite-zoomin";m.setAttribute("title",mxResources.get("zoomIn"));
-m.style.outline="none";m.style.border="none";m.style.margin="2px";m.setAttribute("disabled","disabled");mxUtils.setOpacity(m,20);var w=mxUtils.button("",function(){null!=x&&n.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var H=mxUtils.button("",function(){null!=x&&(n.maxFitScale=8,n.fit(8),n.center())});H.className=
-"geSprite geSprite-fit";H.setAttribute("title",mxResources.get("fit"));H.style.outline="none";H.style.border="none";H.style.margin="2px";H.setAttribute("disabled","disabled");mxUtils.setOpacity(H,20);var F=mxUtils.button("",function(){null!=x&&(n.zoomActual(),n.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 C=
-document.createElement("div");C.style.position="absolute";C.style.textAlign="right";C.style.color="gray";C.style.marginTop="10px";C.style.backgroundColor="transparent";C.style.top="440px";C.style.right="32px";C.style.maxWidth="380px";C.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var c=a.getCurrentFile(),c=null!=c&&null!=c.getTitle()?c.getTitle():a.defaultFilename,b=mxUtils.getXml(x.documentElement);a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml"):
-(b="undefined"===typeof pako?"&xml="+encodeURIComponent(b):"&data="+encodeURIComponent(a.editor.graph.compress(b)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml"+b)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var D=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=u&&a.confirm(mxResources.get("areYouSure"),function(){null!=d?d(u):a.spinner.spin(document.body,mxResources.get("restoring"))&&v.save(!0,function(c){a.spinner.stop();
-a.replaceFileData(u);a.hideDialog()},function(c){a.spinner.stop();a.editor.setStatus("");a.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)})})});D.className="geBtn";D.setAttribute("disabled","disabled");var A=document.createElement("select");A.setAttribute("disabled","disabled");A.style.maxWidth="80px";A.style.position="relative";A.style.top="-2px";A.style.verticalAlign="bottom";A.style.marginRight="6px";A.style.display="none";var K=null;mxEvent.addListener(A,"change",function(a){null!=
-K&&(K(a),mxEvent.consume(a))});var z=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),window.openWindow(a.getUrl()))});z.className="geBtn";z.setAttribute("disabled","disabled");null!=d&&(z.style.display="none");var I=mxUtils.button(mxResources.get("show"),function(){null!=y&&a.openLink(y.getUrl())});I.className="geBtn gePrimaryBtn";I.setAttribute("disabled",
-"disabled");null!=d&&(I.style.display="none",D.className="geBtn gePrimaryBtn");f=document.createElement("div");f.style.position="absolute";f.style.top="482px";f.style.width="640px";f.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var J=null;if(null!=e&&0<e.length){l.style.cursor="move";var P=document.createElement("table");P.style.border=
-"1px solid lightGray";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var V=document.createElement("tbody"),T=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(q=mxUtils.indexOf(a.pages,a.currentPage));for(var R=e.length-1;0<=R;R--){var O=function(b){var h=new Date(b.modifiedDate),d=null;if(0<=h.getTime()){var f=function(b){t.stop();var p=mxUtils.parseXml(b),e=a.editor.extractGraphModel(p.documentElement,!0);if(null!=e){var f=function(c){null!=c&&(c=
-k(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c},k=function(a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";l.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center();return a};A.style.display="none";A.innerHTML="";x=p;u=b;c=parseSelectFunction=null;g=0;if("mxfile"==e.nodeName){p=e.getElementsByTagName("diagram");c=[];for(b=0;b<p.length;b++)c.push(p[b]);
-g=Math.min(q,c.length-1);0<c.length&&f(c[g]);if(1<c.length)for(A.removeAttribute("disabled"),A.style.display="",b=0;b<c.length;b++)p=document.createElement("option"),mxUtils.write(p,c[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),p.setAttribute("value",b),b==g&&p.setAttribute("selected","selected"),A.appendChild(p);K=function(){g=q=parseInt(A.value);f(c[q])}}else k(e);C.innerHTML="";mxUtils.write(C,h.toLocaleDateString()+" "+h.toLocaleTimeString());C.setAttribute("title",d.getAttribute("title"));
-m.removeAttribute("disabled");w.removeAttribute("disabled");H.removeAttribute("disabled");F.removeAttribute("disabled");null!=v&&v.isRestricted()||(a.editor.graph.isEnabled()&&D.removeAttribute("disabled"),E.removeAttribute("disabled"),I.removeAttribute("disabled"),z.removeAttribute("disabled"));mxUtils.setOpacity(m,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(H,60);mxUtils.setOpacity(F,60)}else A.style.display="none",A.innerHTML="",C.innerHTML="",mxUtils.write(C,mxResources.get("errorLoadingFile"))},
-d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";b==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===T?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+a.formatFileSize(parseInt(b.fileSize))+
-(null!=b.lastModifyingUserName?" "+b.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){y!=b&&(t.stop(),null!=p&&(p.style.backgroundColor=""),y=b,p=d,p.style.backgroundColor="#ebf2f9",u=x=null,C.removeAttribute("title"),C.innerHTML=mxResources.get("loading")+"...",l.style.backgroundColor="#ffffff",n.getModel().clear(),D.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),F.setAttribute("disabled",
-"disabled"),H.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),mxUtils.setOpacity(m,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(H,20),mxUtils.setOpacity(F,20),t.spin(l),b.getXml(function(a){y==b&&f(a)},function(a){t.stop();A.style.display="none";A.innerHTML="";C.innerHTML="";mxUtils.write(C,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){I.click();
-window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);V.appendChild(d)}return d}(e[R]);null!=O&&R==e.length-1&&(J=O)}P.appendChild(V);k.appendChild(P)}else null==v||null==a.drive&&v.constructor==window.DriveFile||null==a.dropbox&&v.constructor==window.DropboxFile?(l.style.display="none",B.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(l.style.display="none",B.style.display="none",mxUtils.write(k,
-mxResources.get("noRevisions")));this.init=function(){null!=J&&J.click()};k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn";B.appendChild(A);B.appendChild(m);B.appendChild(w);B.appendChild(F);B.appendChild(H);a.editor.cancelFirst?(f.appendChild(k),f.appendChild(E),f.appendChild(z),f.appendChild(D),f.appendChild(I)):(f.appendChild(E),f.appendChild(z),f.appendChild(D),f.appendChild(I),f.appendChild(k));b.appendChild(f);b.appendChild(B);b.appendChild(C);this.container=
-b},DraftDialog=function(a,e,d,b,f,k,l,n){var q=document.createElement("div"),c=document.createElement("div");c.style.marginTop="0px";c.style.whiteSpace="nowrap";c.style.overflow="auto";mxUtils.write(c,e);q.appendChild(c);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);q.appendChild(g);var h=new Graph(g);
-h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;e=mxUtils.parseXml(d);var t=a.editor.extractGraphModel(e.documentElement,!0),v=0,p=null,y=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=p&&null!=p[v]?p[v].getAttribute("name"):"pagenumber"==a?v+1:y.apply(this,arguments)};h.getLinkForCell=function(){return null};e=mxUtils.button("",function(){h.zoomIn()});e.className=
-"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){h.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);c=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});c.className="geSprite geSprite-fit";c.setAttribute("title",
-mxResources.get("fit"));c.style.outline="none";c.style.border="none";c.style.margin="2px";mxUtils.setOpacity(c,60);var x=mxUtils.button("",function(){h.zoomActual();h.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);f=mxUtils.button(l||mxResources.get("discard"),f);f.className="geBtn";var u=document.createElement("select");u.style.maxWidth="80px";u.style.position=
-"relative";u.style.top="-2px";u.style.verticalAlign="bottom";u.style.marginRight="6px";u.style.display="none";b=mxUtils.button(k||mxResources.get("edit"),b);b.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";l=document.createElement("div");l.className="geToolbarContainer";l.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function c(a){if(null!=a){var c=a.getAttribute("background");if(null==c||""==c||c==mxConstants.NONE)c="#ffffff";g.style.backgroundColor=c;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function b(b){null!=b&&(b=c(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b}mxEvent.addListener(u,"change",function(a){v=parseInt(u.value);b(p[v]);mxEvent.consume(a)});if("mxfile"==t.nodeName){var d=t.getElementsByTagName("diagram");
-p=[];for(var e=0;e<d.length;e++)p.push(d[e]);0<p.length&&b(p[v]);if(1<p.length)for(u.style.display="",e=0;e<p.length;e++)d=document.createElement("option"),mxUtils.write(d,p[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==v&&d.setAttribute("selected","selected"),u.appendChild(d)}else c(t)};l.appendChild(u);l.appendChild(e);l.appendChild(d);l.appendChild(x);l.appendChild(c);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.className=
-"geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(k.appendChild(e),null!=n&&k.appendChild(n),k.appendChild(f),k.appendChild(b)):(k.appendChild(b),k.appendChild(f),null!=n&&k.appendChild(n),k.appendChild(e));q.appendChild(k);q.appendChild(l);this.container=q},FindWindow=function(a,e,d,b,f){function k(a,c,b){if("object"===typeof c.value&&null!=c.value.attributes){c=c.value.attributes;for(var g=0;g<c.length;g++)if("label"!=c[g].nodeName){var h=
-mxUtils.trim(c[g].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&h.substring(0,b.length)===b||null!=a&&a.test(h))return!0}}return!1}function l(){var a=q.model.getDescendants(q.model.getRoot()),b=t.value.toLowerCase(),h=v.checked?new RegExp(b):null,d=null;c!=b&&(c=b,g=null);var e=null==g;if(0<b.length)for(var f=0;f<a.length;f++){var l=q.view.getState(a[f]);if(null!=l&&null!=l.cell.value&&(e||null==d)&&(q.model.isVertex(l.cell)||q.model.isEdge(l.cell))&&(q.isHtmlLabel(l.cell)?
-(p.innerHTML=q.getLabel(l.cell),label=mxUtils.extractTextWithWhitespace([p])):label=q.getLabel(l.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==h&&(label.substring(0,b.length)===b||k(h,l.cell,b))||null!=h&&(h.test(label)||k(h,l.cell,b))))if(e){d=l;break}else null==d&&(d=l);e=e||l==g}null!=d?(g=d,q.scrollCellToVisible(g.cell),q.isEnabled()?q.setSelectionCell(g.cell):q.highlightCell(g.cell)):q.isEnabled()&&q.clearSelection();return 0==b.length||null!=d}
-var n=a.actions.get("find"),q=a.editor.graph,c=null,g=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("find"));t.setAttribute("type","text");t.style.marginTop="4px";t.style.marginBottom="6px";t.style.width="200px";t.style.fontSize="12px";t.style.borderRadius="4px";t.style.padding="6px";h.appendChild(t);mxUtils.br(h);var v=document.createElement("input");
-v.setAttribute("type","checkbox");v.style.marginRight="4px";h.appendChild(v);mxUtils.write(h,mxResources.get("regularExpression"));var p=document.createElement("div");mxUtils.br(h);var y=mxUtils.button(mxResources.get("reset"),function(){t.value="";t.style.backgroundColor="";c=g=null;t.focus()});y.setAttribute("title",mxResources.get("reset"));y.style.marginTop="6px";y.style.marginRight="4px";y.className="geBtn";h.appendChild(y);y=mxUtils.button(mxResources.get("find"),function(){try{t.style.backgroundColor=
-l()?"":"#ffcfcf"}catch(x){a.handleError(x)}});y.setAttribute("title",mxResources.get("find")+" (Enter)");y.style.marginTop="6px";y.className="geBtn gePrimaryBtn";h.appendChild(y);mxEvent.addListener(t,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)n.funct();else if(c!=t.value.toLowerCase()||13==a.keyCode)try{t.style.backgroundColor=l()?"":"#ffcfcf"}catch(u){t.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(c){70==c.keyCode&&
-a.keyHandler.isControlDown(c)&&!mxEvent.isShiftDown(c)&&(n.funct(),mxEvent.consume(c))});this.window=new mxWindow(mxResources.get("find"),h,e,d,b,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)):q.container.focus()}))},
-TagsWindow=function(a,e,d,b,f){function k(a){a=null!=a?a:n.model.getDescendants(n.model.getRoot());for(var c=g.value.split(" "),b=[],h=0;h<a.length;h++)if(n.model.isVertex(a[h])||n.model.isEdge(a[h])){var d=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(q)||""):"",m=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),e=0;e<c.length&&m;e++)var f=mxUtils.trim(c[e]).toLowerCase(),m=m&&(0==f.length||0<=mxUtils.indexOf(d,f));else m=0==mxUtils.trim(g.value).length;
-m&&b.push(a[h])}return b}function l(a,c){n.model.beginUpdate();try{for(var b=0;b<a.length;b++)n.model.setVisible(a[b],c)}finally{n.model.endUpdate()}}var n=a.editor.graph,q="tags",c=document.createElement("div");c.style.userSelect="none";c.style.overflow="hidden";c.style.padding="10px";c.style.height="100%";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("allTags"));g.setAttribute("type","text");g.style.marginTop="4px";g.style.width="260px";g.style.fontSize="12px";
-g.style.borderRadius="4px";g.style.padding="6px";c.appendChild(g);if(!a.isOffline()||mxClient.IS_CHROMEAPP){g.style.width="240px";var h=a.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");h.firstChild.style.marginBottom="6px";h.style.marginLeft="6px";c.appendChild(h)}mxEvent.addListener(g,"dblclick",function(){var c=new FilenameDialog(a,q,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(q=a)}),mxResources.get("enterPropertyName"));a.showDialog(c.container,
-300,80,!0,!0);c.init()});g.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(c);h=mxUtils.button(mxResources.get("hide"),function(){l(k(),!1)});h.setAttribute("title",mxResources.get("hide"));h.style.marginTop="8px";h.style.marginRight="4px";h.className="geBtn";c.appendChild(h);h=mxUtils.button(mxResources.get("show"),function(){var a=k();l(a,!0);n.isEnabled()&&n.setSelectionCells(a)});h.setAttribute("title",mxResources.get("show"));h.style.marginTop="8px";h.style.marginRight=
-"4px";h.className="geBtn";c.appendChild(h);var t=a.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){t.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";c.appendChild(h);mxEvent.addListener(g,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||t.funct()});this.window=new mxWindow(mxResources.get("tags"),c,e,d,b,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
-this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},AuthDialog=function(a,e,d,b){var f=document.createElement("div");f.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
-mxResources.get("authorizationRequired"));var l="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";e==a.drive?(l=mxResources.get("googleDrive"),n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==a.dropbox?(l=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==a.oneDrive?(l=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==a.gitHub?(l=mxResources.get("github"),n.src=IMAGE_PATH+
-"/github-logo-white.svg"):e==a.trello&&(l=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[l]));var q=document.createElement("input");q.setAttribute("type","checkbox");l=mxUtils.button(mxResources.get("authorize"),function(){b(q.checked)});l.insertBefore(n,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";f.appendChild(k);f.appendChild(a);f.appendChild(l);d&&(d=document.createElement("p"),
-d.style.marginTop="20px",d.appendChild(q),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),f.appendChild(d),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));this.container=f},MoreShapesDialog=function(a,e,d){d=null!=d?d:a.sidebar.entries;var b=document.createElement("div");if(e){e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));
-e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var f=document.createElement("div"),k=document.createElement("div");f.style.position="absolute";f.style.top="40px";f.style.left="0px";f.style.width="202px";f.style.bottom="60px";f.style.overflow="auto";mxClient.IS_QUIRKS&&(f.style.height="437px",f.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
-"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(e.style.width)-202+"px",k.style.height=f.style.height,k.style.marginTop=f.style.marginTop);var l=null,n=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";for(var c=0;c<d.length;c++)(function(b){var g=q.cloneNode(!1);g.style.fontWeight="bold";g.style.backgroundColor=
-"dark"==uiTheme?"#505759":"#e5e5e5";g.style.padding="6px 0px 6px 20px";mxUtils.write(g,b.title);f.appendChild(g);for(var h=0;h<b.entries.length;h++)(function(b){var g=q.cloneNode(!1);g.style.cursor="pointer";g.style.padding="4px 0px 4px 20px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.checked=a.sidebar.isEntryVisible(b.id);m.defaultChecked=m.checked;g.appendChild(m);mxUtils.write(g," "+b.title);f.appendChild(g);var d=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
-b.imageCallback?b.imageCallback(k):null!=b.image?k.innerHTML='<img border="0" src="'+b.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=l&&(l.style.backgroundColor=""),l=g,l.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(g,"click",d);mxEvent.addListener(g,"dblclick",function(a){m.checked=!m.checked;mxEvent.consume(a)});n.push(function(){return m.checked?b.id:null});0==c&&0==h&&d()})(b.entries[h])})(d[c]);
-b.style.padding="30px";b.appendChild(e);b.appendChild(f);b.appendChild(k);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop="12px");var g=document.createElement("input");g.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=
-document.createElement("span"),e.style.paddingRight="20px",e.appendChild(g),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=g&&(g.checked=!g.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
-function(){a.hideDialog();for(var c=[],b=0;b<n.length;b++){var h=n[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(c.join(";"),g.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table"),v=document.createElement("tbody");b.style.height="100%";b.style.overflow="auto";var p=document.createElement("tr");t.style.width="100%";e=document.createElement("td");var h=document.createElement("td"),y=document.createElement("td"),x=mxUtils.bind(this,function(c,
-b,g){var h=document.createElement("input");h.type="checkbox";t.appendChild(h);h.checked=a.sidebar.isEntryVisible(g);var m=document.createElement("span");mxUtils.write(m,b);b=document.createElement("div");b.style.display="block";b.appendChild(h);b.appendChild(m);mxEvent.addListener(m,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});c.appendChild(b);return function(){return h.checked?g:null}});p.appendChild(e);p.appendChild(h);p.appendChild(y);v.appendChild(p);t.appendChild(v);for(var n=
-[],u=0,c=0;c<d.length;c++)for(v=0;v<d[c].entries.length;v++)u++;for(var m=[e,h,y],w=0,c=0;c<d.length;c++)(function(a){for(var c=0;c<a.entries.length;c++){var b=a.entries[c];n.push(x(m[Math.floor(w/(u/3))],b.title,b.id));w++}})(d[c]);b.appendChild(t);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";g=document.createElement("input");isLocalStorage&&(g.setAttribute("type","checkbox"),g.checked=!0,g.defaultChecked=!0,d.appendChild(g),e=document.createElement("span"),
-mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){g.checked=!g.checked;mxEvent.consume(a)}));b.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var c=["search"],b=0;b<n.length;b++){var h=n[b].apply(this,arguments);null!=h&&c.push(h)}a.sidebar.showEntries(0<c.length?c.join(";"):"",g.checked);a.hideDialog()});h.className=
-"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(e),d.appendChild(h)):(d.appendChild(h),d.appendChild(e));b.appendChild(d);this.container=b},PluginsDialog=function(a){function e(){if(0==f.length)b.innerHTML=mxResources.get("noPlugins");else{b.innerHTML="";for(var c=0;c<f.length;c++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";
-d.style.position="relative";d.style.cursor="pointer";d.style.top="5px";d.style.marginRight="4px";d.style.display="inline-block";h.appendChild(d);mxUtils.write(h,f[c]);b.appendChild(h);mxUtils.br(b);mxEvent.addListener(d,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+f[c]+'"?',function(){f.splice(c,1);e()})}}(c))}}}var d=document.createElement("div"),b=document.createElement("div");b.style.height="120px";b.style.overflow="auto";var f=mxSettings.getPlugins().slice();
-d.appendChild(b);e();var k=mxUtils.button(mxResources.get("add"),function(){var c="",b=urlParams.p;if(null!=b&&0<b.length){for(var d=b.split(";"),b=0;b<d.length;b++){var v=App.pluginRegistry[d[b]];null!=v&&(c+=v+";")}";"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1))}c=new FilenameDialog(a,c,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var c=d[a],b=App.pluginRegistry[c];null!=b&&(c=b);0<c.length&&0>mxUtils.indexOf(f,c)&&f.push(c)}e()}},mxResources.get("enterValue")+
-" ("+mxResources.get("url")+")");a.showDialog(c.container,300,80,!0,!0);c.init()});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(f);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});n.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
-q.className="geBtn";a.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");var c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign="right";a.editor.cancelFirst?(c.appendChild(l),c.appendChild(q),c.appendChild(k),c.appendChild(n)):(c.appendChild(q),c.appendChild(k),c.appendChild(n),c.appendChild(l));d.appendChild(c);this.container=d},CropImageDialog=function(a,e,d){var b=document.createElement("div"),f=document.createElement("table"),k=document.createElement("tbody"),
-l=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");l.appendChild(n);k.appendChild(l);var l=document.createElement("tr"),q=document.createElement("td"),c=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(q,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";this.init=function(){g.focus();
-g.select()};c.appendChild(g);l.appendChild(q);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";c.appendChild(h);l.appendChild(q);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("right")+
-":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";c.appendChild(t);l.appendChild(q);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("bottom")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value="0";c.appendChild(v);l.appendChild(q);l.appendChild(c);k.appendChild(l);l=document.createElement("tr");
-q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("circle")+":");l.appendChild(q);var p=document.createElement("input");p.setAttribute("type","checkbox");c.appendChild(p);l.appendChild(c);k.appendChild(l);f.appendChild(k);b.appendChild(f);var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),y=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var c=document.createElement("canvas"),b=c.getContext("2d"),e=y.width,
-f=y.height,x=parseInt(g.value),k=parseInt(h.value),e=Math.max(1,e-x-parseInt(t.value)),f=Math.max(1,f-k-parseInt(v.value));c.width=e;c.height=f;p.checked&&(b.fillStyle="#000000",b.arc(e/2,f/2,Math.min(e/2,f/2),0,2*Math.PI),b.fill(),b.globalCompositeOperation="source-in");b.drawImage(y,x,k,e,f,0,0,e,f);d(c.toDataURL())});x.setAttribute("disabled","disabled");y.onload=function(){x.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+y.width+" "+mxResources.get("height")+
-": "+y.height)};y.src=e;mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&x.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(f),e.appendChild(x)):(e.appendChild(x),e.appendChild(f));b.appendChild(e);this.container=b},EditGeometryDialog=function(a,e){var d=a.editor.graph,b=1==e.length?d.getCellGeometry(e[0]):null,f=document.createElement("div"),k=document.createElement("table"),l=document.createElement("tbody"),
-n=document.createElement("tr"),q=document.createElement("td"),c=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(q,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=b?b.x:"";this.init=function(){g.focus();g.select()};c.appendChild(g);n.appendChild(q);n.appendChild(c);l.appendChild(n);n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("top")+
-":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=b?b.y:"";c.appendChild(h);n.appendChild(q);n.appendChild(c);l.appendChild(n);n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("width")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=b?b.width:"";c.appendChild(t);n.appendChild(q);n.appendChild(c);l.appendChild(n);
-n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("height")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=b?b.height:"";c.appendChild(v);n.appendChild(q);n.appendChild(c);l.appendChild(n);n=document.createElement("tr");q=document.createElement("td");c=document.createElement("td");mxUtils.write(q,mxResources.get("rotation")+":");var p=document.createElement("input");
-p.setAttribute("type","text");p.style.width="100px";p.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";c.appendChild(p);n.appendChild(q);n.appendChild(c);l.appendChild(n);k.appendChild(l);f.appendChild(k);var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<e.length;c++){var b=d.getCellGeometry(e[c]);null!=b&&(b=b.clone(),d.isCellMovable(e[c])&&
-(0<mxUtils.trim(g.value).length&&(b.x=Number(g.value)),0<mxUtils.trim(h.value).length&&(b.y=Number(h.value))),d.isCellResizable(e[c])&&(0<mxUtils.trim(t.value).length&&(b.width=Number(t.value)),0<mxUtils.trim(v.value).length&&(b.height=Number(v.value))),d.getModel().setGeometry(e[c],b));0<mxUtils.trim(p.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(p.value),[e[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&y.click()});k=document.createElement("div");
-k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?(k.appendChild(b),k.appendChild(y)):(k.appendChild(y),k.appendChild(b));f.appendChild(k);this.container=f},LibraryDialog=function(a,e,d,b,f,k){function l(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=v;)a=a.parentNode;var c=null;if(null!=a)for(var b=v.firstChild,c=0;null!=b&&b!=a;)b=b.nextSibling,c++;return c}function n(c,b,h,d,e,u,f,t,k){try{if(null==b||"image/"==b.substring(0,6))if(null==c&&
-null!=f||null==y[c]){var z=function(){D.innerHTML="";D.style.cursor="pointer";D.style.whiteSpace="nowrap";D.style.textOverflow="ellipsis";mxUtils.write(D,null!=A.title&&0<A.title.length?A.title:mxResources.get("untitled"));D.style.color=null==A.title||0==A.title.length?"#d0d0d0":""};v.style.backgroundImage="";p.style.display="none";var F=e,q=u;if(e>a.maxImageSize||u>a.maxImageSize){var C=Math.min(1,Math.min(a.maxImageSize/Math.max(1,e)),a.maxImageSize/Math.max(1,u));e*=C;u*=C}F>q?(q=Math.round(100*
-q/F),F=100):(F=Math.round(100*F/q),q=100);var B=document.createElement("div");B.setAttribute("draggable","true");B.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";B.style.position="relative";B.style.cursor="move";mxUtils.setPrefixedStyle(B.style,"transition","transform .1s ease-in-out");if(null!=c){var I=document.createElement("img");I.setAttribute("src",w.convert(c));I.style.width=F+"px";I.style.height=q+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-q)/2)+"px";I.style.paddingLeft=
-Math.floor((100-F)/2)+"px";B.appendChild(I)}else if(null!=f){var E=a.stringToCells(a.editor.graph.decompress(f.xml));0<E.length&&(a.sidebar.createThumb(E,100,100,B,null,!0,!1),B.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",B.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.position=
-"absolute";J.style.marginLeft="-12px";J.style.zIndex="1";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",function(a){mxEvent.consume(a)});(function(a,c,b){mxEvent.addListener(J,"click",function(h){y[c]=null;for(var m=0;m<g.length;m++)if(null!=g[m].data&&g[m].data==c||null!=g[m].xml&&null!=b&&g[m].xml==b.xml){g.splice(m,1);break}B.parentNode.removeChild(a);0==g.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(h)});mxEvent.addListener(J,
-"dblclick",function(a){mxEvent.consume(a)})})(B,c,f);B.appendChild(J);B.style.marginBottom="30px";var D=document.createElement("div");D.style.position="absolute";D.style.boxSizing="border-box";D.style.bottom="-18px";D.style.left="10px";D.style.right="10px";D.style.backgroundColor="#ffffff";D.style.overflow="hidden";D.style.textAlign="center";var A=null;null!=c?(A={data:c,w:e,h:u,title:k},null!=t&&(A.aspect=t),y[c]=I,g.push(A)):null!=f&&(f.aspect="fixed",g.push(f),A=f);mxEvent.addListener(D,"keydown",
-function(a){13==a.keyCode&&null!=m&&(m(),m=null,mxEvent.consume(a))});z();B.appendChild(D);mxEvent.addListener(D,"mousedown",function(a){"true"!=D.getAttribute("contentEditable")&&mxEvent.consume(a)});E=function(c){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var b=new FilenameDialog(a,A.title||"",mxResources.get("ok"),function(a){null!=a&&(A.title=a,z())},mxResources.get("enterValue"));a.showDialog(b.container,300,80,!0,!0);b.init();
-mxEvent.consume(c)}else if("true"!=D.getAttribute("contentEditable")){null!=m&&(m(),m=null);if(null==A.title||0==A.title.length)D.innerHTML="";D.style.textOverflow="";D.style.whiteSpace="";D.style.cursor="text";D.style.color="";D.setAttribute("contentEditable","true");D.focus();document.execCommand("selectAll",!1,null);m=function(){D.removeAttribute("contentEditable");D.style.cursor="pointer";A.title=D.innerHTML;z()};mxEvent.consume(c)}};mxEvent.addListener(D,"click",E);mxEvent.addListener(B,"dblclick",
-E);v.appendChild(B);mxEvent.addListener(B,"dragstart",function(a){null==c&&null!=f&&(J.style.visibility="hidden",D.style.visibility="hidden");mxClient.IS_FF&&null!=f.xml&&a.dataTransfer.setData("Text",f.xml);x=l(a);mxClient.IS_GC&&(B.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(B.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(B,30);J.style.visibility="";D.style.visibility=""},0)});mxEvent.addListener(B,"dragend",function(a){"hidden"==J.style.visibility&&(J.style.visibility=
-"",D.style.visibility="");x=null;mxUtils.setOpacity(B,100);mxUtils.setPrefixedStyle(B.style,"transform",null)})}else H||(H=!0,a.handleError({message:mxResources.get("fileExists")}));else{e=!1;try{if(a.spinner.stop(),F=mxUtils.parseXml(c),"mxlibrary"==F.documentElement.nodeName){q=JSON.parse(mxUtils.getTextContent(F.documentElement));if(null!=q&&0<q.length)for(var K=0;K<q.length;K++)null!=q[K].xml?n(null,null,0,0,0,0,q[K]):n(q[K].data,null,0,0,q[K].w,q[K].h,null,"fixed",q[K].title);e=!0}else if("mxfile"==
-F.documentElement.nodeName){for(var P=F.documentElement.getElementsByTagName("diagram"),K=0;K<P.length;K++){var q=mxUtils.getTextContent(P[K]),E=a.stringToCells(a.editor.graph.decompress(q)),X=a.editor.graph.getBoundingBoxFromGeometry(E);n(null,null,0,0,0,0,{xml:q,w:X.width,h:X.height})}e=!0}}catch(Z){}e||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function q(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
-function c(c){c.stopPropagation();c.preventDefault();H=!1;u=l(c);if(null!=x)null!=u&&u<v.children.length?(g.splice(u>x?u-1:u,0,g.splice(x,1)[0]),v.insertBefore(v.children[x],v.children[u])):(g.push(g.splice(x,1)[0]),v.appendChild(v.children[x]));else if(0<c.dataTransfer.files.length)a.importFiles(c.dataTransfer.files,0,0,a.maxImageSize,F(c));else if(0<=mxUtils.indexOf(c.dataTransfer.types,"text/uri-list")){var b=decodeURIComponent(c.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(b)||
-/(\.png)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b)||/(\.svg)($|\?)/i.test(b))&&a.loadImage(b,function(a){n(b,null,0,0,a.width,a.height);v.scrollTop=v.scrollHeight})}c.stopPropagation();c.preventDefault()}var g=[];d=document.createElement("div");d.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";d.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==e&&(e=a.defaultLibraryName+".xml");var t=document.createElement("input");t.setAttribute("value",
-e);t.style.marginRight="20px";t.style.marginLeft="10px";t.style.width="500px";null==f||f.isRenamable()||t.setAttribute("disabled","true");this.init=function(){if(null==f||f.isRenamable())t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};h.appendChild(t);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";
-v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));d.appendChild(p);var y={},x=null,u=null,m=null;
-e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=m&&(m(),m=null,mxEvent.consume(a))};mxEvent.addListener(v,"mousedown",e);mxEvent.addListener(v,"pointerdown",e);mxEvent.addListener(v,"touchstart",e);var w=new mxUrlConverter,H=!1;if(null!=b)for(e=0;e<b.length;e++)h=b[e],n(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(v,"dragleave",function(a){p.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==v||c==p){a.stopPropagation();a.preventDefault();
-break}c=c.parentNode}});var F=function(c){return function(b,g,h,m,d,p,e,u,f){null!=f&&(/(\.vsdx)($|\?)/i.test(f.name)||/(\.vssx)($|\?)/i.test(f.name))?a.importVisio(f,mxUtils.bind(this,function(b){a.spinner.stop();n(b,g,h,m,d,p,e,"fixed",mxEvent.isAltDown(c)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," "))})):null!=f&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(b,f.name)?a.parseFile(f,mxUtils.bind(this,function(b){4==b.readyState&&(a.spinner.stop(),200<=b.status&&299>=
-b.status&&(n(b.responseText,g,h,m,d,p,e,"fixed",mxEvent.isAltDown(c)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(n(b,g,h,m,d,p,e,"fixed",mxEvent.isAltDown(c)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",q);mxEvent.addListener(v,"drop",c);mxEvent.addListener(p,"dragover",q);mxEvent.addListener(p,"drop",c);d.appendChild(v);b=document.createElement("div");b.style.textAlign="right";
-b.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);h=mxUtils.button(mxResources.get("export"),function(){var c=a.createLibraryDataFromImages(g),b=t.value;/(\.xml)$/i.test(b)||(b+=".xml");a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml&xml="+encodeURIComponent(c))).simulate(document,
-"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";b.appendChild(h);var C=document.createElement("input");C.setAttribute("multiple","multiple");C.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(C,"change",function(c){H=!1;a.importFiles(C.files,0,0,a.maxImageSize,function(a,b,g,h,m,d,e,p,u){F(c)(a,b,g,h,m,d,e,p,u);C.value=""});v.scrollTop=v.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=m&&(m(),m=null);C.click()}),h.setAttribute("id",
-"btnAddImage"),h.className="geBtn",b.appendChild(h));h=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=m&&(m(),m=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){H=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var g=a.indexOf(",");0<g&&(a=a.substring(0,g)+";base64,"+a.substring(g+1))}n(a,null,0,0,c,b);v.scrollTop=v.scrollHeight}})});h.setAttribute("id","btnAddImageUrl");h.className="geBtn";b.appendChild(h);this.saveBtnClickHandler=function(c,b,g,h){a.saveLibrary(c,
-b,g,h)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=m&&(m(),m=null);this.saveBtnClickHandler(t.value,g,f,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";b.appendChild(h);a.editor.cancelFirst||b.appendChild(e);d.appendChild(b);this.container=d},EditShapeDialog=function(a,e,d,b,f){b=null!=b?b:300;f=null!=f?f:120;var k,l,n=document.createElement("table"),q=document.createElement("tbody");n.style.cellPadding="4px";k=document.createElement("tr");l=
-document.createElement("td");l.setAttribute("colspan","2");l.style.fontSize="10pt";mxUtils.write(l,d);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");var c=document.createElement("textarea");c.style.outline="none";c.style.resize="none";c.style.width=b-200+"px";c.style.height=f+"px";this.textarea=c;this.init=function(){c.focus();c.scrollTop=0};l.appendChild(c);k.appendChild(l);l=document.createElement("td");d=document.createElement("div");d.style.position=
-"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=f+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);l.appendChild(d);var g=new Graph(d);g.setEnabled(!1);var h=a.editor.graph.cloneCells([e])[0];g.addCells([h]);d=g.view.getState(h);var t="";null!=d.shape&&null!=d.shape.stencil&&(t=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(c,t||"");d=g.getGraphBounds();f=Math.min(160/d.width,(f-40)/d.height);g.view.scaleAndTranslate(f,
-20/f-d.x,20/f-d.y);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.setAttribute("colspan","2");l.style.paddingTop="2px";l.style.whiteSpace="nowrap";l.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.className="geBtn";a.editor.cancelFirst&&l.appendChild(f);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){a.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
-d.className="geBtn",l.appendChild(d));var v=function(b,g,h){var d=c.value,m=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(m.documentElement),m=m.documentElement.getElementsByTagName("parsererror");if(null!=m&&0<m.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(h&&a.hideDialog(),m=!b.model.contains(g),!h||m||d!=t){d=a.editor.graph.compress(d);b.getModel().beginUpdate();try{if(m){var e=a.editor.graph.getInsertPoint();g.geometry.x=e.x;
-g.geometry.y=e.y;b.addCell(g)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[g])}catch(H){throw H;}finally{b.getModel().endUpdate()}m&&b.setSelectionCell(g)}};d=mxUtils.button(mxResources.get("preview"),function(){v(g,h,!1)});d.className="geBtn";l.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){v(a.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";l.appendChild(d);a.editor.cancelFirst||l.appendChild(f);k.appendChild(l);q.appendChild(k);n.appendChild(q);this.container=
-n},CustomDialog=function(a,e,d,b,f,k,l,n){var q=document.createElement("div");q.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=l&&e.appendChild(l);l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=b&&b()});l.className="geBtn";n&&(l.style.display="none");a.editor.cancelFirst&&e.appendChild(l);a.isOffline()||null==k||(n=mxUtils.button(mxResources.get("help"),function(){a.openLink(k)}),n.className="geBtn",e.appendChild(n));
-f=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});e.appendChild(f);f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||e.appendChild(l);q.appendChild(e);this.cancelBtn=l;this.okButton=f;this.container=q};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
+"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){q.value="";q.focus()});e.appendChild(q);e.appendChild(d);p.appendChild(e);var a=function(a,f,h,d){var m="data:"==a.substring(0,5);!b.isOffline()||m&&"undefined"===typeof chrome?0<a.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(a,function(l){b.spinner.stop();b.hideDialog();var v=!1===d?1:null!=f&&null!=h?Math.max(f/
+l.width,h/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(a=b.convertDataUri(a));c(a,Math.round(Number(l.width)*v),Math.round(Number(l.height)*v))},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(a)):(a=b.convertDataUri(a),f=null==f?120:f,h=null==h?100:h,b.hideDialog(),c(a,f,h))},f=function(f,h){if(null!=f){var d=g?null:n.getModel().getGeometry(n.getSelectionCell());null!=d?a(f,d.width,
+d.height,h):a(f,null,null,h)}else b.hideDialog(),c(null)};this.init=function(){q.focus();if(Graph.fileSupport){q.setAttribute("placeholder",mxResources.get("dragImagesHere"));var a=p.parentNode,c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=b.highlightElement(a));f.stopPropagation();f.preventDefault()}));
+mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)b.importFiles(a.dataTransfer.files,0,0,b.maxImageSize,function(a,b,c,h,d,m,e,t){f(a,t)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var h=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(h)&&
+f(decodeURIComponent(h))}a.stopPropagation();a.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";e=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});e.className="geBtn";b.editor.cancelFirst&&d.appendChild(e);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(q.value=
+a.url));q.focus()};if(Graph.fileSupport){var h=document.createElement("input");h.setAttribute("multiple","multiple");h.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(h,"change",function(a){b.importFiles(h.files,0,0,b.maxImageSize,function(a,b,c,h,l,v){f(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var m=mxUtils.button(mxResources.get("open"),function(){h.click()});m.className="geBtn";d.appendChild(m)}}document.createElement("canvas").getContext&&
+"data:image/"==q.value.substring(0,11)&&"data:image/svg"!=q.value.substring(0,14)&&(m=mxUtils.button(mxResources.get("crop"),function(){var a=new CropImageDialog(b,q.value,function(a){q.value=a});b.showDialog(a.container,200,180,!0,!0);a.init()}),m.className="geBtn",d.appendChild(m));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(m=mxUtils.button(mxResources.get("search"),function(){if(null==b.imageSearchPicker){var a=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);
+b.imageSearchPicker=a.setCallback(function(a){ImageDialog.filePicked(a)}).build()}b.imageSearchPicker.setVisible(!0)}),m.className="geBtn",d.appendChild(m),null!=b.drive&&"1"==urlParams.photos&&(m=mxUtils.button(mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.photoPicker){var a=gapi.auth.getToken().access_token,a=(new google.picker.PickerBuilder).setAppId(b.drive.appId).setLocale(mxLanguage).setOAuthToken(a).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+b.photoPicker=a.setCallback(function(a){ImageDialog.filePicked(a)}).build()}b.photoPicker.setVisible(!0)}))}),m.className="geBtn",d.appendChild(m)));mxEvent.addListener(q,"keypress",function(a){13==a.keyCode&&f(q.value)});m=mxUtils.button(mxResources.get("apply"),function(){f(q.value)});m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(e);Graph.fileSupport&&(d.style.marginTop="120px",p.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.backgroundPosition=
+"center 65%",p.style.backgroundRepeat="no-repeat",e=document.createElement("div"),e.style.position="absolute",e.style.width="420px",e.style.top="58%",e.style.textAlign="center",e.style.fontSize="18px",e.style.color="#a0c3ff",mxUtils.write(e,mxResources.get("dragImagesHere")),p.appendChild(e));p.appendChild(d);this.container=p},LinkDialog=function(b,e,d,c,g){function k(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";
+b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);x.appendChild(c)}var n=document.createElement("div");mxUtils.write(n,mxResources.get("editLink")+":");var p=document.createElement("div");p.className="geTitle";p.style.backgroundColor="transparent";p.style.borderColor="transparent";p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";mxClient.IS_VML||(p.style.paddingRight="20px");var q=document.createElement("input");
+q.setAttribute("placeholder",mxResources.get("dragUrlsHere"));q.setAttribute("type","text");q.style.marginTop="6px";q.style.width="400px";q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";q.style.backgroundRepeat="no-repeat";q.style.backgroundPosition="100% 50%";q.style.paddingRight="14px";var a=document.createElement("div");a.setAttribute("title",mxResources.get("reset"));a.style.position="relative";a.style.left="-16px";a.style.width="12px";a.style.height="14px";a.style.cursor="pointer";
+a.style.display=mxClient.IS_VML?"inline":"inline-block";a.style.top=(mxClient.IS_VML?0:3)+"px";a.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(a,"click",function(){q.value="";q.focus()});var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-bottom:8px;";f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","current-linkdialog");var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";
+h.setAttribute("value","url");h.setAttribute("type","radio");h.setAttribute("name","current-linkdialog");var m=document.createElement("select");m.style.width="380px";if(g&&null!=b.pages){null!=e&&b.editor.graph.isPageLink(e)?(h.setAttribute("checked","checked"),h.defaultChecked=!0):(q.setAttribute("value",e),f.setAttribute("checked","checked"),f.defaultChecked=!0);q.style.width="380px";p.appendChild(f);p.appendChild(q);p.appendChild(a);mxUtils.br(p);p.appendChild(h);g=!1;for(a=0;a<b.pages.length;a++){var t=
+document.createElement("option");mxUtils.write(t,b.pages[a].getName()||mxResources.get("pageWithNumber",[a+1]));t.setAttribute("value","data:page/id,"+b.pages[a].getId());e==t.getAttribute("value")&&(t.setAttribute("selected","selected"),g=!0);m.appendChild(t)}if(!g&&h.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");m.appendChild(u);mxEvent.addListener(m,
+"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}p.appendChild(m)}else q.setAttribute("value",e),p.appendChild(q),p.appendChild(a);n.appendChild(p);var w=mxUtils.button(d,function(){b.hideDialog();c(h.checked?"pageNotFound"!==m.value?m.value:e:q.value,LinkDialog.selectedDocs)});w.style.verticalAlign="middle";w.className="geBtn gePrimaryBtn";this.init=function(){h.checked?m.focus():(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+q.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(m,"focus",function(){f.removeAttribute("checked");h.setAttribute("checked","checked");h.checked=!0});mxEvent.addListener(q,"focus",function(){h.removeAttribute("checked");f.setAttribute("checked","checked");f.checked=!0});if(Graph.fileSupport){var a=n.parentNode,c=null;mxEvent.addListener(a,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",
+mxUtils.bind(this,function(f){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=b.highlightElement(a));f.stopPropagation();f.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(q.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),f.setAttribute("checked","checked"),f.checked=!0,w.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
+x.style.marginTop="20px";x.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";b.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
+"https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);q.value=b;q.focus()}else LinkDialog.selectedDocs=null;q.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var a=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),f=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),h=(new google.picker.DocsView).setIncludeFolders(!0).setEnableTeamDrives(!0).setSelectFolderEnabled(!0),
+a=(new google.picker.PickerBuilder).setAppId(b.drive.appId).setLocale(mxLanguage).setOAuthToken(a).enableFeature(google.picker.Feature.SUPPORT_TEAM_DRIVES).addView(c).addView(f).addView(h).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);"1"==urlParams.photos&&a.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+b.linkPicker=a.setCallback(function(a){LinkDialog.filePicked(a)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){q.value=a[0].link;q.focus()}})});null!=b.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){b.oneDrive.pickFile(function(a,b){q.value=b.value[0].webUrl;
+q.focus()})});null!=b.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],f=a[2];a=a.slice(3,a.length).join("/");q.value="https://github.com/"+b+"/"+c+"/blob/"+f+"/"+a;q.focus()}})});mxEvent.addListener(q,"keypress",function(a){13==a.keyCode&&(b.hideDialog(),c(h.checked?m.value:q.value,LinkDialog.selectedDocs))});x.appendChild(w);b.editor.cancelFirst||x.appendChild(d);n.appendChild(x);this.container=
+n},AboutDialog=function(b){var e=document.createElement("div");e.style.marginTop="6px";e.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";mxClient.IS_SVG?(d.setAttribute("width","164"),d.setAttribute("height","221"),d.style.width="164px",d.style.height="221px",d.setAttribute("src",IMAGE_PATH+"/drawlogo-text-bottom.svg")):(d.setAttribute("width","176"),d.setAttribute("height","219"),d.style.width="170px",d.style.height="219px",d.setAttribute("src",IMAGE_PATH+
+"/logo-flat.png"));e.appendChild(d);mxUtils.br(e);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";e.appendChild(d);mxUtils.br(e);mxUtils.br(e);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2018 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';e.appendChild(d);mxEvent.addListener(e,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&b.hideDialog()});this.container=
+e},FeedbackDialog=function(b){var e=document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");e.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var g=mxUtils.button(mxResources.get("sendMessage"),
+function(){var a=(n.checked?"\nDiagram:\n"+b.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;a.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+q.value+a),
+function(a){b.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});g.className="geBtn gePrimaryBtn";g.setAttribute("disabled","disabled");var k=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(c,"change",
+function(){0<c.value.length&&0<k.test(c.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});mxEvent.addListener(c,"keyup",function(){0<c.value.length&&k.test(c.value)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});e.appendChild(c);this.init=function(){c.focus()};var n=document.createElement("input");n.setAttribute("type","checkbox");n.setAttribute("checked","checked");n.defaultChecked=!0;d=document.createElement("p");d.style.marginTop="14px";d.appendChild(n);
+var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(p);mxEvent.addListener(p,"click",function(a){n.checked=!n.checked;mxEvent.consume(a)});e.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("feedback"));e.appendChild(d);var q=document.createElement("textarea");q.style.resize="none";q.style.width="600px";q.style.height="140px";q.style.marginTop="6px";q.setAttribute("placeholder",mxResources.get("commentsNotes"));
+e.appendChild(q);d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});p.className="geBtn";b.editor.cancelFirst?(d.appendChild(p),d.appendChild(g)):(d.appendChild(g),d.appendChild(p));e.appendChild(d);this.container=e};FeedbackDialog.maxAttachmentSize=1E6;
+var RevisionDialog=function(b,e,d){var c=document.createElement("div"),g=document.createElement("h3");g.style.marginTop="0px";mxUtils.write(g,mxResources.get("revisionHistory"));c.appendChild(g);var k=document.createElement("div");k.style.position="absolute";k.style.overflow="auto";k.style.width="170px";k.style.height="378px";c.appendChild(k);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height=
+"376px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);c.appendChild(n);var p=new Graph(n);p.setEnabled(!1);p.setPanning(!0);p.panningHandler.ignoreCell=!0;p.panningHandler.useLeftButtonForPanning=!0;p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;var q=0,a=null,f=0,h=p.getGlobalVariable;p.getGlobalVariable=function(b){return"page"==b&&null!=a&&null!=a[f]?a[f].getAttribute("name"):"pagenumber"==b?f+1:h.apply(this,arguments)};p.getLinkForCell=function(){return null};Editor.MathJaxRender&&
+p.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){b.editor.graph.mathEnabled&&Editor.MathJaxRender(p.container)}));var m=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),t=b.getCurrentFile(),u=null,w=null,x=null,D=null,l=mxUtils.button("",function(){null!=x&&p.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));
+l.style.outline="none";l.style.border="none";l.style.margin="2px";l.setAttribute("disabled","disabled");mxUtils.setOpacity(l,20);var v=mxUtils.button("",function(){null!=x&&p.zoomOut()});v.className="geSprite geSprite-zoomout";v.setAttribute("title",mxResources.get("zoomOut"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var G=mxUtils.button("",function(){null!=x&&(p.maxFitScale=8,p.fit(8),p.center())});G.className=
+"geSprite geSprite-fit";G.setAttribute("title",mxResources.get("fit"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var z=mxUtils.button("",function(){null!=x&&(p.zoomActual(),p.center())});z.className="geSprite geSprite-actualsize";z.setAttribute("title",mxResources.get("actualSize"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var y=
+document.createElement("div");y.style.position="absolute";y.style.textAlign="right";y.style.color="gray";y.style.marginTop="10px";y.style.backgroundColor="transparent";y.style.top="440px";y.style.right="32px";y.style.maxWidth="380px";y.style.cursor="default";var E=mxUtils.button(mxResources.get("download"),function(){if(null!=x){var a=b.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():b.defaultFilename,c=mxUtils.getXml(x.documentElement);b.isLocalFileSave()?b.saveLocalFile(c,a,"text/xml"):
+(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(b.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&format=xml"+c)).simulate(document,"_blank"))}});E.className="geBtn";E.setAttribute("disabled","disabled");var C=mxUtils.button(mxResources.get("restore"),function(){null!=x&&null!=D&&b.confirm(mxResources.get("areYouSure"),function(){null!=d?d(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&t.save(!0,function(a){b.spinner.stop();
+b.replaceFileData(D);b.hideDialog()},function(a){b.spinner.stop();b.editor.setStatus("");b.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)})})});C.className="geBtn";C.setAttribute("disabled","disabled");var A=document.createElement("select");A.setAttribute("disabled","disabled");A.style.maxWidth="80px";A.style.position="relative";A.style.top="-2px";A.style.verticalAlign="bottom";A.style.marginRight="6px";A.style.display="none";var J=null;mxEvent.addListener(A,"change",function(a){null!=
+J&&(J(a),mxEvent.consume(a))});var B=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=x&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(x.documentElement)),window.openWindow(b.getUrl()))});B.className="geBtn";B.setAttribute("disabled","disabled");null!=d&&(B.style.display="none");var L=mxUtils.button(mxResources.get("show"),function(){null!=w&&b.openLink(w.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled",
+"disabled");null!=d&&(L.style.display="none",C.className="geBtn gePrimaryBtn");g=document.createElement("div");g.style.position="absolute";g.style.top="482px";g.style.width="640px";g.style.textAlign="right";var H=document.createElement("div");H.className="geToolbarContainer";H.style.backgroundColor="transparent";H.style.padding="2px";H.style.border="none";H.style.left="199px";H.style.top="442px";var F=null;if(null!=e&&0<e.length){n.style.cursor="move";var M=document.createElement("table");M.style.border=
+"1px solid lightGray";M.style.borderCollapse="collapse";M.style.borderSpacing="0px";M.style.width="100%";var X=document.createElement("tbody"),Z=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(q=mxUtils.indexOf(b.pages,b.currentPage));for(var N=e.length-1;0<=N;N--){var S=function(c){var h=new Date(c.modifiedDate),d=null;if(0<=h.getTime()){var g=function(c){m.stop();var e=mxUtils.parseXml(c),g=b.editor.extractGraphModel(e.documentElement,!0);if(null!=g){var w=function(a){null!=a&&(a=
+u(mxUtils.parseXml(b.editor.graph.decompress(mxUtils.getTextContent(a))).documentElement));return a},u=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";n.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,p.getModel());p.maxFitScale=1;p.fit(8);p.center();return a};A.style.display="none";A.innerHTML="";x=e;D=c;a=parseSelectFunction=null;f=0;if("mxfile"==g.nodeName){e=g.getElementsByTagName("diagram");a=[];for(c=0;c<e.length;c++)a.push(e[c]);
+f=Math.min(q,a.length-1);0<a.length&&w(a[f]);if(1<a.length)for(A.removeAttribute("disabled"),A.style.display="",c=0;c<a.length;c++)e=document.createElement("option"),mxUtils.write(e,a[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),e.setAttribute("value",c),c==f&&e.setAttribute("selected","selected"),A.appendChild(e);J=function(){f=q=parseInt(A.value);w(a[q])}}else u(g);y.innerHTML="";mxUtils.write(y,h.toLocaleDateString()+" "+h.toLocaleTimeString());y.setAttribute("title",d.getAttribute("title"));
+l.removeAttribute("disabled");v.removeAttribute("disabled");G.removeAttribute("disabled");z.removeAttribute("disabled");null!=t&&t.isRestricted()||(b.editor.graph.isEnabled()&&C.removeAttribute("disabled"),E.removeAttribute("disabled"),L.removeAttribute("disabled"),B.removeAttribute("disabled"));mxUtils.setOpacity(l,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(G,60);mxUtils.setOpacity(z,60)}else A.style.display="none",A.innerHTML="",y.innerHTML="",mxUtils.write(y,mxResources.get("errorLoadingFile"))},
+d=document.createElement("tr");d.style.borderBottom="1px solid lightGray";d.style.fontSize="12px";d.style.cursor="pointer";var k=document.createElement("td");k.style.padding="6px";k.style.whiteSpace="nowrap";c==e[e.length-1]?mxUtils.write(k,mxResources.get("current")):h.toDateString()===Z?mxUtils.write(k,h.toLocaleTimeString()):mxUtils.write(k,h.toLocaleDateString()+" "+h.toLocaleTimeString());d.appendChild(k);d.setAttribute("title",h.toLocaleDateString()+" "+h.toLocaleTimeString()+" "+b.formatFileSize(parseInt(c.fileSize))+
+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(d,"click",function(a){w!=c&&(m.stop(),null!=u&&(u.style.backgroundColor=""),w=c,u=d,u.style.backgroundColor="#ebf2f9",D=x=null,y.removeAttribute("title"),y.innerHTML=mxResources.get("loading")+"...",n.style.backgroundColor="#ffffff",p.getModel().clear(),C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),z.setAttribute("disabled",
+"disabled"),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),mxUtils.setOpacity(l,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(z,20),m.spin(n),c.getXml(function(a){w==c&&g(a)},function(a){m.stop();A.style.display="none";A.innerHTML="";y.innerHTML="";mxUtils.write(y,mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(d,"dblclick",function(a){L.click();
+window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);X.appendChild(d)}return d}(e[N]);null!=S&&N==e.length-1&&(F=S)}M.appendChild(X);k.appendChild(M)}else null==t||null==b.drive&&t.constructor==window.DriveFile||null==b.dropbox&&t.constructor==window.DropboxFile?(n.style.display="none",H.style.display="none",mxUtils.write(k,mxResources.get("notAvailable"))):(n.style.display="none",H.style.display="none",mxUtils.write(k,
+mxResources.get("noRevisions")));this.init=function(){null!=F&&F.click()};k=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});k.className="geBtn";H.appendChild(A);H.appendChild(l);H.appendChild(v);H.appendChild(z);H.appendChild(G);b.editor.cancelFirst?(g.appendChild(k),g.appendChild(E),g.appendChild(B),g.appendChild(C),g.appendChild(L)):(g.appendChild(E),g.appendChild(B),g.appendChild(C),g.appendChild(L),g.appendChild(k));c.appendChild(g);c.appendChild(H);c.appendChild(y);this.container=
+c},DraftDialog=function(b,e,d,c,g,k,n,p){var q=document.createElement("div"),a=document.createElement("div");a.style.marginTop="0px";a.style.whiteSpace="nowrap";a.style.overflow="auto";mxUtils.write(a,e);q.appendChild(a);var f=document.createElement("div");f.style.position="absolute";f.style.border="1px solid lightGray";f.style.marginTop="10px";f.style.width="640px";f.style.top="46px";f.style.bottom="74px";f.style.overflow="hidden";mxEvent.disableContextMenu(f);q.appendChild(f);var h=new Graph(f);
+h.setEnabled(!1);h.setPanning(!0);h.panningHandler.ignoreCell=!0;h.panningHandler.useLeftButtonForPanning=!0;h.minFitScale=null;h.maxFitScale=null;h.centerZoom=!0;e=mxUtils.parseXml(d);var m=b.editor.extractGraphModel(e.documentElement,!0),t=0,u=null,w=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):"pagenumber"==a?t+1:w.apply(this,arguments)};h.getLinkForCell=function(){return null};e=mxUtils.button("",function(){h.zoomIn()});e.className=
+"geSprite geSprite-zoomin";e.setAttribute("title",mxResources.get("zoomIn"));e.style.outline="none";e.style.border="none";e.style.margin="2px";mxUtils.setOpacity(e,60);d=mxUtils.button("",function(){h.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);a=mxUtils.button("",function(){h.maxFitScale=8;h.fit(8);h.center()});a.className="geSprite geSprite-fit";a.setAttribute("title",
+mxResources.get("fit"));a.style.outline="none";a.style.border="none";a.style.margin="2px";mxUtils.setOpacity(a,60);var x=mxUtils.button("",function(){h.zoomActual();h.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);g=mxUtils.button(n||mxResources.get("discard"),g);g.className="geBtn";var D=document.createElement("select");D.style.maxWidth="80px";D.style.position=
+"relative";D.style.top="-2px";D.style.verticalAlign="bottom";D.style.marginRight="6px";D.style.display="none";c=mxUtils.button(k||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";n=document.createElement("div");n.className="geToolbarContainer";n.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function a(a){if(null!=a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";f.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,h.getModel());h.maxFitScale=1;h.fit(8);h.center()}}function c(c){null!=c&&(c=a(mxUtils.parseXml(b.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(D,"change",function(a){t=parseInt(D.value);c(u[t]);mxEvent.consume(a)});if("mxfile"==m.nodeName){var d=m.getElementsByTagName("diagram");
+u=[];for(var e=0;e<d.length;e++)u.push(d[e]);0<u.length&&c(u[t]);if(1<u.length)for(D.style.display="",e=0;e<u.length;e++)d=document.createElement("option"),mxUtils.write(d,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==t&&d.setAttribute("selected","selected"),D.appendChild(d)}else a(m)};n.appendChild(D);n.appendChild(e);n.appendChild(d);n.appendChild(x);n.appendChild(a);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.className=
+"geBtn";p=null!=p?mxUtils.button(mxResources.get("ignore"),p):null;null!=p&&(p.className="geBtn");b.editor.cancelFirst?(k.appendChild(e),null!=p&&k.appendChild(p),k.appendChild(g),k.appendChild(c)):(k.appendChild(c),k.appendChild(g),null!=p&&k.appendChild(p),k.appendChild(e));q.appendChild(k);q.appendChild(n);this.container=q},FindWindow=function(b,e,d,c,g){function k(a,b,c){if("object"===typeof b.value&&null!=b.value.attributes){b=b.value.attributes;for(var f=0;f<b.length;f++)if("label"!=b[f].nodeName){var l=
+mxUtils.trim(b[f].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==a&&l.substring(0,c.length)===c||null!=a&&a.test(l))return!0}}return!1}function n(){var b=q.model.getDescendants(q.model.getRoot()),c=m.value.toLowerCase(),l=t.checked?new RegExp(c):null,h=null;a!=c&&(a=c,f=null);var d=null==f;if(0<c.length)for(var e=0;e<b.length;e++){var g=q.view.getState(b[e]);if(null!=g&&null!=g.cell.value&&(d||null==h)&&(q.model.isVertex(g.cell)||q.model.isEdge(g.cell))&&(q.isHtmlLabel(g.cell)?
+(u.innerHTML=q.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([u])):label=q.getLabel(g.cell),label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase(),null==l&&(label.substring(0,c.length)===c||k(l,g.cell,c))||null!=l&&(l.test(label)||k(l,g.cell,c))))if(d){h=g;break}else null==h&&(h=g);d=d||g==f}null!=h?(f=h,q.scrollCellToVisible(f.cell),q.isEnabled()?q.setSelectionCell(f.cell):q.highlightCell(f.cell)):q.isEnabled()&&q.clearSelection();return 0==c.length||null!=h}
+var p=b.actions.get("find"),q=b.editor.graph,a=null,f=null,h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var m=document.createElement("input");m.setAttribute("placeholder",mxResources.get("find"));m.setAttribute("type","text");m.style.marginTop="4px";m.style.marginBottom="6px";m.style.width="200px";m.style.fontSize="12px";m.style.borderRadius="4px";m.style.padding="6px";h.appendChild(m);mxUtils.br(h);var t=document.createElement("input");
+t.setAttribute("type","checkbox");t.style.marginRight="4px";h.appendChild(t);mxUtils.write(h,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(h);var w=mxUtils.button(mxResources.get("reset"),function(){m.value="";m.style.backgroundColor="";a=f=null;m.focus()});w.setAttribute("title",mxResources.get("reset"));w.style.marginTop="6px";w.style.marginRight="4px";w.className="geBtn";h.appendChild(w);w=mxUtils.button(mxResources.get("find"),function(){try{m.style.backgroundColor=
+n()?"":"#ffcfcf"}catch(x){b.handleError(x)}});w.setAttribute("title",mxResources.get("find")+" (Enter)");w.style.marginTop="6px";w.className="geBtn gePrimaryBtn";h.appendChild(w);mxEvent.addListener(m,"keyup",function(b){if(91==b.keyCode||17==b.keyCode)mxEvent.consume(b);else if(27==b.keyCode)p.funct();else if(a!=m.value.toLowerCase()||13==b.keyCode)try{m.style.backgroundColor=n()?"":"#ffcfcf"}catch(D){m.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(h,"keydown",function(a){70==a.keyCode&&
+b.keyHandler.isControlDown(a)&&!mxEvent.isShiftDown(a)&&(p.funct(),mxEvent.consume(a))});this.window=new mxWindow(mxResources.get("find"),h,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):q.container.focus()}))},
+TagsWindow=function(b,e,d,c,g){function k(a){a=null!=a?a:p.model.getDescendants(p.model.getRoot());for(var b=f.value.split(" "),c=[],h=0;h<a.length;h++)if(p.model.isVertex(a[h])||p.model.isEdge(a[h])){var d=null!=a[h].value&&"object"==typeof a[h].value?mxUtils.trim(a[h].value.getAttribute(q)||""):"",l=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),m=0;m<b.length&&l;m++)var e=mxUtils.trim(b[m]).toLowerCase(),l=l&&(0==e.length||0<=mxUtils.indexOf(d,e));else l=0==mxUtils.trim(f.value).length;
+l&&c.push(a[h])}return c}function n(a,b){p.model.beginUpdate();try{for(var c=0;c<a.length;c++)p.model.setVisible(a[c],b)}finally{p.model.endUpdate()}}var p=b.editor.graph,q="tags",a=document.createElement("div");a.style.userSelect="none";a.style.overflow="hidden";a.style.padding="10px";a.style.height="100%";var f=document.createElement("input");f.setAttribute("placeholder",mxResources.get("allTags"));f.setAttribute("type","text");f.style.marginTop="4px";f.style.width="260px";f.style.fontSize="12px";
+f.style.borderRadius="4px";f.style.padding="6px";a.appendChild(f);if(!b.isOffline()||mxClient.IS_CHROMEAPP){f.style.width="240px";var h=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000046966");h.firstChild.style.marginBottom="6px";h.style.marginLeft="6px";a.appendChild(h)}mxEvent.addListener(f,"dblclick",function(){var a=new FilenameDialog(b,q,mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&(q=a)}),mxResources.get("enterPropertyName"));b.showDialog(a.container,
+300,80,!0,!0);a.init()});f.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(a);h=mxUtils.button(mxResources.get("hide"),function(){n(k(),!1)});h.setAttribute("title",mxResources.get("hide"));h.style.marginTop="8px";h.style.marginRight="4px";h.className="geBtn";a.appendChild(h);h=mxUtils.button(mxResources.get("show"),function(){var a=k();n(a,!0);p.isEnabled()&&p.setSelectionCells(a)});h.setAttribute("title",mxResources.get("show"));h.style.marginTop="8px";h.style.marginRight=
+"4px";h.className="geBtn";a.appendChild(h);var m=b.actions.get("tags"),h=mxUtils.button(mxResources.get("close"),function(){m.funct()});h.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");h.style.marginTop="8px";h.className="geBtn gePrimaryBtn";a.appendChild(h);mxEvent.addListener(f,"keyup",function(a){13!=a.keyCode&&27!=a.keyCode||m.funct()});this.window=new mxWindow(mxResources.get("tags"),a,e,d,c,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);
+this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(f.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?f.select():document.execCommand("selectAll",!1,null)):p.container.focus()}))},AuthDialog=function(b,e,d,c){var g=document.createElement("div");g.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,
+mxResources.get("authorizationRequired"));var n="Unknown",p=document.createElement("img");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.marginRight="10px";e==b.drive?(n=mxResources.get("googleDrive"),p.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(n=mxResources.get("dropbox"),p.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(n=mxResources.get("oneDrive"),p.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(n=mxResources.get("github"),p.src=IMAGE_PATH+
+"/github-logo-white.svg"):e==b.trello&&(n=mxResources.get("trello"),p.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[n]));var q=document.createElement("input");q.setAttribute("type","checkbox");n=mxUtils.button(mxResources.get("authorize"),function(){c(q.checked)});n.insertBefore(p,n.firstChild);n.style.marginTop="6px";n.className="geBigButton";g.appendChild(k);g.appendChild(b);g.appendChild(n);d&&(d=document.createElement("p"),
+d.style.marginTop="20px",d.appendChild(q),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),d.appendChild(k),g.appendChild(d),q.checked=!0,q.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)}));this.container=g},MoreShapesDialog=function(b,e,d){d=null!=d?d:b.sidebar.entries;var c=document.createElement("div");if(e){e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));
+e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";mxClient.IS_QUIRKS&&(e.style.width="718px");var g=document.createElement("div"),k=document.createElement("div");g.style.position="absolute";g.style.top="40px";g.style.left="0px";g.style.width="202px";g.style.bottom="60px";g.style.overflow="auto";mxClient.IS_QUIRKS&&(g.style.height="437px",g.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right=
+"0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(e.style.width)-202+"px",k.style.height=g.style.height,k.style.marginTop=g.style.marginTop);var n=null,p=[],q=document.createElement("div");q.style.position="relative";q.style.left="0px";q.style.right="0px";for(var a=0;a<d.length;a++)(function(c){var f=q.cloneNode(!1);f.style.fontWeight="bold";f.style.backgroundColor=
+"dark"==uiTheme?"#505759":"#e5e5e5";f.style.padding="6px 0px 6px 20px";mxUtils.write(f,c.title);g.appendChild(f);for(var l=0;l<c.entries.length;l++)(function(c){var f=q.cloneNode(!1);f.style.cursor="pointer";f.style.padding="4px 0px 4px 20px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.checked=b.sidebar.isEntryVisible(c.id);h.defaultChecked=h.checked;f.appendChild(h);mxUtils.write(f," "+c.title);g.appendChild(f);var d=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=
+c.imageCallback?c.imageCallback(k):null!=c.image?k.innerHTML='<img border="0" src="'+c.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=n&&(n.style.backgroundColor=""),n=f,n.style.backgroundColor="dark"==uiTheme?"#505759":"#ebf2f9",null!=a&&mxEvent.consume(a)};mxEvent.addListener(f,"click",d);mxEvent.addListener(f,"dblclick",function(a){h.checked=!h.checked;mxEvent.consume(a)});p.push(function(){return h.checked?c.id:null});0==a&&0==l&&d()})(c.entries[l])})(d[a]);
+c.style.padding="30px";c.appendChild(e);c.appendChild(g);c.appendChild(k);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=e.style.width,d.style.paddingTop="12px");var f=document.createElement("input");f.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)e=
+document.createElement("span"),e.style.paddingRight="20px",e.appendChild(f),mxUtils.write(e," "+mxResources.get("rememberThisSetting")),f.checked=!0,f.defaultChecked=!0,mxEvent.addListener(e,"click",function(a){mxEvent.getSource(a)!=f&&(f.checked=!f.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&(e.style.position="relative",e.style.top="-6px"),d.appendChild(e);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";var h=mxUtils.button(mxResources.get("apply"),
+function(){b.hideDialog();for(var a=[],c=0;c<p.length;c++){var l=p[c].apply(this,arguments);null!=l&&a.push(l)}b.sidebar.showEntries(a.join(";"),f.checked,!0)});h.className="geBtn gePrimaryBtn"}else{var m=document.createElement("table"),t=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";var u=document.createElement("tr");m.style.width="100%";e=document.createElement("td");var h=document.createElement("td"),w=document.createElement("td"),x=mxUtils.bind(this,function(a,
+c,f){var l=document.createElement("input");l.type="checkbox";m.appendChild(l);l.checked=b.sidebar.isEntryVisible(f);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(l);c.appendChild(h);mxEvent.addListener(h,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)});a.appendChild(c);return function(){return l.checked?f:null}});u.appendChild(e);u.appendChild(h);u.appendChild(w);t.appendChild(u);m.appendChild(t);for(var p=
+[],D=0,a=0;a<d.length;a++)for(t=0;t<d[a].entries.length;t++)D++;for(var l=[e,h,w],v=0,a=0;a<d.length;a++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];p.push(x(l[Math.floor(v/(D/3))],c.title,c.id));v++}})(d[a]);c.appendChild(m);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="center";f=document.createElement("input");isLocalStorage&&(f.setAttribute("type","checkbox"),f.checked=!0,f.defaultChecked=!0,d.appendChild(f),e=document.createElement("span"),
+mxUtils.write(e," "+mxResources.get("rememberThisSetting")),d.appendChild(e),mxEvent.addListener(e,"click",function(a){f.checked=!f.checked;mxEvent.consume(a)}));c.appendChild(d);e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";h=mxUtils.button(mxResources.get("apply"),function(){for(var a=["search"],c=0;c<p.length;c++){var l=p[c].apply(this,arguments);null!=l&&a.push(l)}b.sidebar.showEntries(0<a.length?a.join(";"):"",f.checked);b.hideDialog()});h.className=
+"geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}b.editor.cancelFirst?(d.appendChild(e),d.appendChild(h)):(d.appendChild(h),d.appendChild(e));c.appendChild(d);this.container=c},PluginsDialog=function(b){function e(){if(0==g.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML="";for(var a=0;a<g.length;a++){var h=document.createElement("span");h.style.whiteSpace="nowrap";var d=document.createElement("span");d.className="geSprite geSprite-delete";
+d.style.position="relative";d.style.cursor="pointer";d.style.top="5px";d.style.marginRight="4px";d.style.display="inline-block";h.appendChild(d);mxUtils.write(h,g[a]);c.appendChild(h);mxUtils.br(c);mxEvent.addListener(d,"click",function(a){return function(){b.confirm(window.parent.mxResources.get("delete")+' "'+g[a]+'"?',function(){g.splice(a,1);e()})}}(a))}}}var d=document.createElement("div"),c=document.createElement("div");c.style.height="120px";c.style.overflow="auto";var g=mxSettings.getPlugins().slice();
+d.appendChild(c);e();var k=mxUtils.button(mxResources.get("add"),function(){var a="",c=urlParams.p;if(null!=c&&0<c.length){for(var d=c.split(";"),c=0;c<d.length;c++){var t=App.pluginRegistry[d[c]];null!=t&&(a+=t+";")}";"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1))}a=new FilenameDialog(b,a,mxResources.get("add"),function(a){if(null!=a&&0<a.length){d=a.split(";");for(a=0;a<d.length;a++){var b=d[a],c=App.pluginRegistry[b];null!=c&&(b=c);0<b.length&&0>mxUtils.indexOf(g,b)&&g.push(b)}e()}},mxResources.get("enterValue")+
+" ("+mxResources.get("url")+")");b.showDialog(a.container,300,80,!0,!0);a.init()});k.className="geBtn";var n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";var p=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(g);mxSettings.save();b.hideDialog();b.alert(mxResources.get("restartForChangeRequired"))});p.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://desk.draw.io/support/solutions/articles/16000056430")});
+q.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(q.style.display="none");var a=document.createElement("div");a.style.marginTop="14px";a.style.textAlign="right";b.editor.cancelFirst?(a.appendChild(n),a.appendChild(q),a.appendChild(k),a.appendChild(p)):(a.appendChild(q),a.appendChild(k),a.appendChild(p),a.appendChild(n));d.appendChild(a);this.container=d},CropImageDialog=function(b,e,d){var c=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),
+n=document.createElement("tr"),p=document.createElement("td");p.style.whiteSpace="nowrap";p.setAttribute("colspan","2");mxUtils.write(p,mxResources.get("loading")+"...");n.appendChild(p);k.appendChild(n);var n=document.createElement("tr"),q=document.createElement("td"),a=document.createElement("td");g.style.paddingLeft="6px";mxUtils.write(q,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value="0";this.init=function(){f.focus();
+f.select()};a.appendChild(f);n.appendChild(q);n.appendChild(a);k.appendChild(n);n=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("top")+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value="0";a.appendChild(h);n.appendChild(q);n.appendChild(a);k.appendChild(n);n=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("right")+
+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value="0";a.appendChild(m);n.appendChild(q);n.appendChild(a);k.appendChild(n);n=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";a.appendChild(t);n.appendChild(q);n.appendChild(a);k.appendChild(n);n=document.createElement("tr");
+q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("circle")+":");n.appendChild(q);var u=document.createElement("input");u.setAttribute("type","checkbox");a.appendChild(u);n.appendChild(a);k.appendChild(n);g.appendChild(k);c.appendChild(g);var g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()}),w=new Image,x=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var a=document.createElement("canvas"),c=a.getContext("2d"),v=w.width,
+e=w.height,g=parseInt(f.value),x=parseInt(h.value),v=Math.max(1,v-g-parseInt(m.value)),e=Math.max(1,e-x-parseInt(t.value));a.width=v;a.height=e;u.checked&&(c.fillStyle="#000000",c.arc(v/2,e/2,Math.min(v/2,e/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(w,g,x,v,e,0,0,v,e);d(a.toDataURL())});x.setAttribute("disabled","disabled");w.onload=function(){x.removeAttribute("disabled");p.innerHTML="";mxUtils.write(p,mxResources.get("width")+": "+w.width+" "+mxResources.get("height")+
+": "+w.height)};w.src=e;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&x.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";b.editor.cancelFirst?(e.appendChild(g),e.appendChild(x)):(e.appendChild(x),e.appendChild(g));c.appendChild(e);this.container=c},EditGeometryDialog=function(b,e){var d=b.editor.graph,c=1==e.length?d.getCellGeometry(e[0]):null,g=document.createElement("div"),k=document.createElement("table"),n=document.createElement("tbody"),
+p=document.createElement("tr"),q=document.createElement("td"),a=document.createElement("td");k.style.paddingLeft="6px";mxUtils.write(q,mxResources.get("left")+":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=c?c.x:"";this.init=function(){f.focus();f.select()};a.appendChild(f);p.appendChild(q);p.appendChild(a);n.appendChild(p);p=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("top")+
+":");var h=document.createElement("input");h.setAttribute("type","text");h.style.width="100px";h.value=null!=c?c.y:"";a.appendChild(h);p.appendChild(q);p.appendChild(a);n.appendChild(p);p=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("width")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.width="100px";m.value=null!=c?c.width:"";a.appendChild(m);p.appendChild(q);p.appendChild(a);n.appendChild(p);
+p=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";a.appendChild(t);p.appendChild(q);p.appendChild(a);n.appendChild(p);p=document.createElement("tr");q=document.createElement("td");a=document.createElement("td");mxUtils.write(q,mxResources.get("rotation")+":");var u=document.createElement("input");
+u.setAttribute("type","text");u.style.width="100px";u.value=1==e.length?mxUtils.getValue(d.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";a.appendChild(u);p.appendChild(q);p.appendChild(a);n.appendChild(p);k.appendChild(n);g.appendChild(k);var c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()}),w=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();d.getModel().beginUpdate();try{for(var a=0;a<e.length;a++){var c=d.getCellGeometry(e[a]);null!=c&&(c=c.clone(),d.isCellMovable(e[a])&&
+(0<mxUtils.trim(f.value).length&&(c.x=Number(f.value)),0<mxUtils.trim(h.value).length&&(c.y=Number(h.value))),d.isCellResizable(e[a])&&(0<mxUtils.trim(m.value).length&&(c.width=Number(m.value)),0<mxUtils.trim(t.value).length&&(c.height=Number(t.value))),d.getModel().setGeometry(e[a],c));0<mxUtils.trim(u.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[e[a]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&w.click()});k=document.createElement("div");
+k.style.marginTop="20px";k.style.textAlign="right";b.editor.cancelFirst?(k.appendChild(c),k.appendChild(w)):(k.appendChild(w),k.appendChild(c));g.appendChild(k);this.container=g},LibraryDialog=function(b,e,d,c,g,k){function n(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function p(a,c,h,d,m,e,g,D,k){try{if(null==c||"image/"==c.substring(0,6))if(null==a&&
+null!=g||null==w[a]){var z=function(){F.innerHTML="";F.style.cursor="pointer";F.style.whiteSpace="nowrap";F.style.textOverflow="ellipsis";mxUtils.write(F,null!=A.title&&0<A.title.length?A.title:mxResources.get("untitled"));F.style.color=null==A.title||0==A.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var B=m,y=e;if(m>b.maxImageSize||e>b.maxImageSize){var q=Math.min(1,Math.min(b.maxImageSize/Math.max(1,m)),b.maxImageSize/Math.max(1,e));m*=q;e*=q}B>y?(y=Math.round(100*
+y/B),B=100):(B=Math.round(100*B/y),y=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!=a){var C=document.createElement("img");C.setAttribute("src",v.convert(a));C.style.width=B+"px";C.style.height=y+"px";C.style.margin="10px";C.style.paddingBottom=Math.floor((100-y)/2)+"px";C.style.paddingLeft=
+Math.floor((100-B)/2)+"px";E.appendChild(C)}else if(null!=g){var H=b.stringToCells(b.editor.graph.decompress(g.xml));0<H.length&&(b.sidebar.createThumb(H,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var L=document.createElement("img");L.setAttribute("src",Editor.closeImage);L.setAttribute("border","0");L.setAttribute("title",mxResources.get("delete"));L.setAttribute("align","top");L.style.paddingTop="4px";L.style.position=
+"absolute";L.style.marginLeft="-12px";L.style.zIndex="1";L.style.cursor="pointer";mxEvent.addListener(L,"dragstart",function(a){mxEvent.consume(a)});(function(a,b,c){mxEvent.addListener(L,"click",function(l){w[b]=null;for(var h=0;h<f.length;h++)if(null!=f[h].data&&f[h].data==b||null!=f[h].xml&&null!=c&&f[h].xml==c.xml){f.splice(h,1);break}E.parentNode.removeChild(a);0==f.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(l)});mxEvent.addListener(L,
+"dblclick",function(a){mxEvent.consume(a)})})(E,a,g);E.appendChild(L);E.style.marginBottom="30px";var F=document.createElement("div");F.style.position="absolute";F.style.boxSizing="border-box";F.style.bottom="-18px";F.style.left="10px";F.style.right="10px";F.style.backgroundColor="#ffffff";F.style.overflow="hidden";F.style.textAlign="center";var A=null;null!=a?(A={data:a,w:m,h:e,title:k},null!=D&&(A.aspect=D),w[a]=C,f.push(A)):null!=g&&(g.aspect="fixed",f.push(g),A=g);mxEvent.addListener(F,"keydown",
+function(a){13==a.keyCode&&null!=l&&(l(),l=null,mxEvent.consume(a))});z();E.appendChild(F);mxEvent.addListener(F,"mousedown",function(a){"true"!=F.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(a){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(b,A.title||"",mxResources.get("ok"),function(a){null!=a&&(A.title=a,z())},mxResources.get("enterValue"));b.showDialog(c.container,300,80,!0,!0);c.init();
+mxEvent.consume(a)}else if("true"!=F.getAttribute("contentEditable")){null!=l&&(l(),l=null);if(null==A.title||0==A.title.length)F.innerHTML="";F.style.textOverflow="";F.style.whiteSpace="";F.style.cursor="text";F.style.color="";F.setAttribute("contentEditable","true");F.focus();document.execCommand("selectAll",!1,null);l=function(){F.removeAttribute("contentEditable");F.style.cursor="pointer";A.title=F.innerHTML;z()};mxEvent.consume(a)}};mxEvent.addListener(F,"click",H);mxEvent.addListener(E,"dblclick",
+H);t.appendChild(E);mxEvent.addListener(E,"dragstart",function(b){null==a&&null!=g&&(L.style.visibility="hidden",F.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&b.dataTransfer.setData("Text",g.xml);x=n(b);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);L.style.visibility="";F.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==L.style.visibility&&(L.style.visibility=
+"",F.style.visibility="");x=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{m=!1;try{if(b.spinner.stop(),B=mxUtils.parseXml(a),"mxlibrary"==B.documentElement.nodeName){y=JSON.parse(mxUtils.getTextContent(B.documentElement));if(null!=y&&0<y.length)for(var J=0;J<y.length;J++)null!=y[J].xml?p(null,null,0,0,0,0,y[J]):p(y[J].data,null,0,0,y[J].w,y[J].h,null,"fixed",y[J].title);m=!0}else if("mxfile"==
+B.documentElement.nodeName){for(var M=B.documentElement.getElementsByTagName("diagram"),J=0;J<M.length;J++){var y=mxUtils.getTextContent(M[J]),H=b.stringToCells(b.editor.graph.decompress(y)),P=b.editor.graph.getBoundingBoxFromGeometry(H);p(null,null,0,0,0,0,{xml:y,w:P.width,h:P.height})}m=!0}}catch(ba){}m||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(ba){}return null}function q(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}
+function a(a){a.stopPropagation();a.preventDefault();G=!1;D=n(a);if(null!=x)null!=D&&D<t.children.length?(f.splice(D>x?D-1:D,0,f.splice(x,1)[0]),t.insertBefore(t.children[x],t.children[D])):(f.push(f.splice(x,1)[0]),t.appendChild(t.children[x]));else if(0<a.dataTransfer.files.length)b.importFiles(a.dataTransfer.files,0,0,b.maxImageSize,z(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(a.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||
+/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&b.loadImage(c,function(a){p(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}a.stopPropagation();a.preventDefault()}var f=[];d=document.createElement("div");d.style.height="100%";var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.height="40px";d.appendChild(h);mxUtils.write(h,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var m=document.createElement("input");m.setAttribute("value",
+e);m.style.marginRight="20px";m.style.marginLeft="10px";m.style.width="500px";null==g||g.isRenamable()||m.setAttribute("disabled","true");this.init=function(){if(null==g||g.isRenamable())m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};h.appendChild(m);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";
+t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";t.style.backgroundRepeat="no-repeat";0==f.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));d.appendChild(u);var w={},x=null,D=null,l=null;
+e=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=l&&(l(),l=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",e);mxEvent.addListener(t,"pointerdown",e);mxEvent.addListener(t,"touchstart",e);var v=new mxUrlConverter,G=!1;if(null!=c)for(e=0;e<c.length;e++)h=c[e],p(h.data,null,0,0,h.w,h.h,h,h.aspect,h.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor="";for(var c=mxEvent.getSource(a);null!=c;){if(c==t||c==u){a.stopPropagation();a.preventDefault();
+break}c=c.parentNode}});var z=function(a){return function(c,f,l,h,d,m,e,v,g){null!=g&&(/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name))?b.importVisio(g,mxUtils.bind(this,function(c){b.spinner.stop();p(c,f,l,h,d,m,e,"fixed",mxEvent.isAltDown(a)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," "))})):null!=g&&!b.isOffline()&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(c,g.name)?b.parseFile(g,mxUtils.bind(this,function(c){4==c.readyState&&(b.spinner.stop(),200<=c.status&&299>=
+c.status&&(p(c.responseText,f,l,h,d,m,e,"fixed",mxEvent.isAltDown(a)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(p(c,f,l,h,d,m,e,"fixed",mxEvent.isAltDown(a)?null:e.substring(0,e.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",q);mxEvent.addListener(t,"drop",a);mxEvent.addListener(u,"dragover",q);mxEvent.addListener(u,"drop",a);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";
+c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&c.appendChild(e);h=mxUtils.button(mxResources.get("export"),function(){var a=b.createLibraryDataFromImages(f),c=m.value;/(\.xml)$/i.test(c)||(c+=".xml");b.isLocalFileSave()?b.saveLocalFile(a,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(a))).simulate(document,
+"_blank")});h.setAttribute("id","btnDownload");h.className="geBtn";c.appendChild(h);var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(y,"change",function(a){G=!1;b.importFiles(y.files,0,0,b.maxImageSize,function(c,b,f,l,h,d,m,e,v){z(a)(c,b,f,l,h,d,m,e,v);y.value=""});t.scrollTop=t.scrollHeight}),h=mxUtils.button(mxResources.get("import"),function(){null!=l&&(l(),l=null);y.click()}),h.setAttribute("id",
+"btnAddImage"),h.className="geBtn",c.appendChild(h));h=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=l&&(l(),l=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(a,c,b){G=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var f=a.indexOf(",");0<f&&(a=a.substring(0,f)+";base64,"+a.substring(f+1))}p(a,null,0,0,c,b);t.scrollTop=t.scrollHeight}})});h.setAttribute("id","btnAddImageUrl");h.className="geBtn";c.appendChild(h);this.saveBtnClickHandler=function(a,c,f,l){b.saveLibrary(a,
+c,f,l)};h=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=l&&(l(),l=null);this.saveBtnClickHandler(m.value,f,g,k)}));h.setAttribute("id","btnSave");h.className="geBtn gePrimaryBtn";c.appendChild(h);b.editor.cancelFirst||c.appendChild(e);d.appendChild(c);this.container=d},EditShapeDialog=function(b,e,d,c,g){c=null!=c?c:300;g=null!=g?g:120;var k,n,p=document.createElement("table"),q=document.createElement("tbody");p.style.cellPadding="4px";k=document.createElement("tr");n=
+document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";mxUtils.write(n,d);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");var a=document.createElement("textarea");a.style.outline="none";a.style.resize="none";a.style.width=c-200+"px";a.style.height=g+"px";this.textarea=a;this.init=function(){a.focus();a.scrollTop=0};n.appendChild(a);k.appendChild(n);n=document.createElement("td");d=document.createElement("div");d.style.position=
+"relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=g+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);n.appendChild(d);var f=new Graph(d);f.setEnabled(!1);var h=b.editor.graph.cloneCells([e])[0];f.addCells([h]);d=f.view.getState(h);var m="";null!=d.shape&&null!=d.shape.stencil&&(m=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(a,m||"");d=f.getGraphBounds();g=Math.min(160/d.width,(g-40)/d.height);f.view.scaleAndTranslate(g,
+20/g-d.x,20/g-d.y);k.appendChild(n);q.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.setAttribute("colspan","2");n.style.paddingTop="2px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";b.editor.cancelFirst&&n.appendChild(g);b.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://desk.draw.io/support/solutions/articles/16000052874")}),
+d.className="geBtn",n.appendChild(d));var t=function(c,f,h){var d=a.value,l=mxUtils.parseXml(d),d=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(h&&b.hideDialog(),l=!c.model.contains(f),!h||l||d!=m){d=b.editor.graph.compress(d);c.getModel().beginUpdate();try{if(l){var e=b.editor.graph.getInsertPoint();f.geometry.x=e.x;
+f.geometry.y=e.y;c.addCell(f)}c.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+d+")",[f])}catch(G){throw G;}finally{c.getModel().endUpdate()}l&&c.setSelectionCell(f)}};d=mxUtils.button(mxResources.get("preview"),function(){t(f,h,!1)});d.className="geBtn";n.appendChild(d);d=mxUtils.button(mxResources.get("apply"),function(){t(b.editor.graph,e,!0)});d.className="geBtn gePrimaryBtn";n.appendChild(d);b.editor.cancelFirst||n.appendChild(g);k.appendChild(n);q.appendChild(k);p.appendChild(q);this.container=
+p},CustomDialog=function(b,e,d,c,g,k,n,p){var q=document.createElement("div");q.appendChild(e);e=document.createElement("div");e.style.marginTop="16px";e.style.textAlign="center";null!=n&&e.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});n.className="geBtn";p&&(n.style.display="none");b.editor.cancelFirst&&e.appendChild(n);b.isOffline()||null==k||(p=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),p.className="geBtn",e.appendChild(p));
+g=mxUtils.button(g||mxResources.get("ok"),function(){b.hideDialog();null!=d&&d()});e.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(n);q.appendChild(e);this.cancelBtn=n;this.okButton=g;this.container=q};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,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":
IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=":
@@ -7040,45 +7040,45 @@ Editor.defaultCustomLibraries=[];Editor.defaultCsvValue='##\n## Example CSV impo
Editor.shadowOptionEnabled=!0;Editor.configure=function(a){if(null!=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;if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type",
-"text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):
-null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],g=b.getElementsByTagName("div");null!=g&&0<g.length&&(b=g[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&&(g=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=g&&(h=new mxCodec(g.ownerDocument),h.decode(g,
-this.graph.getStylesheet())));else if(g=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=g){var h=new mxCodec(g.ownerDocument);h.decode(g,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
+"text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(a){a=null!=a&&"mxlibrary"!=a.nodeName?this.extractGraphModel(a):
+null;if(null!=a){var c=a.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],f=c.getElementsByTagName("div");null!=f&&0<f.length&&(c=f[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==a.nodeName){c=a.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=f&&(h=new mxCodec(f.ownerDocument),h.decode(f,
+this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var h=new mxCodec(f.ownerDocument);h.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==a.getAttribute("math");c=a.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==a.getAttribute("shadow"),!1)}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);
null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),
-null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(w){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),g=[];if(null!=b&&0<b.length)for(var h=0;h<b.length;h++)if("mxgraph"==b[h].getAttribute("class")){g.push(b[h]);break}0<g.length&&(b=g[0].getAttribute("data-mxgraph"),null!=b?(g=JSON.parse(b),null!=g&&null!=g.xml&&(g=mxUtils.parseXml(g.xml),
-a=g.documentElement)):(g=g[0].getElementsByTagName("div"),0<g.length&&(b=mxUtils.getTextContent(g[0]),b=this.graph.decompress(b),0<b.length&&(g=mxUtils.parseXml(b),a=g.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
-null==a||c||(g=null,"diagram"==a.nodeName?g=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(g=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=g&&(b=this.graph.decompress(mxUtils.getTextContent(g)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
-null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var b=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){b.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
+null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(v){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),f=[];if(null!=b&&0<b.length)for(var h=0;h<b.length;h++)if("mxgraph"==b[h].getAttribute("class")){f.push(b[h]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),
+a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
+null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var d=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){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"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},
asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,
-mxUtils.bind(this,function(a,c){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var g=document.getElementsByTagName("script");if(null!=g&&0<g.length){var h=document.createElement("script");h.type="text/javascript";h.src=a;g[0].parentNode.appendChild(h)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
-var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,g,h){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==g?c.push(g.replace(/\\"/g,'"')):void 0!==h&&c.push(h);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var l=Format.prototype.init;Format.prototype.init=function(){l.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-n.apply(this,arguments):this.clear()};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 q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,g=this.createOption(mxResources.get("shadow"),
-function(){return b.shadowVisible},function(a){var g=new ChangePageSetup(c);g.ignoreColor=!0;g.ignoreImage=!0;g.shadowVisible=a;b.model.execute(g)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(g.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(g,60));a.appendChild(g)}return a};var c=DiagramFormatPanel.prototype.addOptions;
-DiagramFormatPanel.prototype.addOptions=function(a){a=c.apply(this,arguments);var b=this.editorUi,g=b.editor.graph;if(g.isEnabled()){var h=b.getCurrentFile();null!=h&&h.isAutosaveOptional()&&(h=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(h))}if(this.isMathOptionVisible()&&
-g.isEnabled()&&"undefined"!==typeof MathJax){h=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return g.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(g.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});h.style.paddingTop="0px";a.appendChild(h);var d=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
-d.style.position="relative";d.style.top="4px";h.appendChild(d)}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",
-gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var g=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+
+mxUtils.bind(this,function(a,c){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var h=document.createElement("script");h.type="text/javascript";h.src=a;f[0].parentNode.appendChild(h)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;
+var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,h){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,'"')):void 0!==h&&c.push(h);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
+var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var c=this.editorUi,b=c.editor.graph,f=this.createOption(mxResources.get("shadow"),
+function(){return b.shadowVisible},function(a){var f=new ChangePageSetup(c);f.ignoreColor=!0;f.ignoreImage=!0;f.shadowVisible=a;b.model.execute(f)},{install:function(a){this.listener=function(){a(b.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}});Editor.shadowOptionEnabled||(f.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(f,60));a.appendChild(f)}return a};var a=DiagramFormatPanel.prototype.addOptions;
+DiagramFormatPanel.prototype.addOptions=function(c){c=a.apply(this,arguments);var b=this.editorUi,f=b.editor.graph;if(f.isEnabled()){var h=b.getCurrentFile();null!=h&&h.isAutosaveOptional()&&(h=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),c.appendChild(h))}if(this.isMathOptionVisible()&&
+f.isEnabled()&&"undefined"!==typeof MathJax){h=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return f.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(f.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});h.style.paddingTop="0px";c.appendChild(h);var d=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
+d.style.position="relative";d.style.top="4px";h.appendChild(d)}return c};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",
+gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var h=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+
")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return h.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=
-mxUtils.button("",function(c){g.getModel().beginUpdate();try{var b=g.getSelectionCells();for(c=0;c<b.length;c++){for(var h=g.getModel().getStyle(b[c]),m=0;m<d.length;m++)h=mxUtils.removeStylename(h,d[m]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,a.fill),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,a.stroke),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,
-"#000000"),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,null));g.getModel().setStyle(b[c],h)}}finally{g.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+
-a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");h.appendChild(c)}h.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var g=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace=
-"nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var d="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var p=document.createElement("div");p.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(p));mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(e);b(p);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 g=this.editorUi.editor.graph,h=g.view.getState(g.getSelectionCell());1==g.getSelectionCount()&&null!=h&&null!=h.shape&&null!=h.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var h=f.getModel().getStyle(b[c]),l=0;l<d.length;l++)h=mxUtils.removeStylename(h,d[l]);null!=a?(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,a.fill),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,a.stroke),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(h=mxUtils.setStyle(h,mxConstants.STYLE_FILLCOLOR,"#ffffff"),h=mxUtils.setStyle(h,mxConstants.STYLE_STROKECOLOR,
+"#000000"),h=mxUtils.setStyle(h,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],h)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+
+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");h.appendChild(c)}h.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(h),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,h=document.createElement("div");h.style.whiteSpace=
+"nowrap";h.style.paddingLeft="24px";h.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(h);var d="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var m=document.createElement("div");m.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(m,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var e=document.createElement("div");e.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(m),a.appendChild(e));mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(m);b(e);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,h=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=h&&null!=h.shape&&null!=h.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize=
-"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var t=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}t.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var g=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
-c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return g.apply(this,arguments)}};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
-c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var g=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,c,g,!1);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;
-var g=a.ownerDocument,h=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"filter"):g.createElement("filter");h.setAttribute("id",this.shadowId);var m=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):g.createElement("feGaussianBlur");m.setAttribute("in","SourceAlpha");m.setAttribute("stdDeviation",this.svgShadowBlur);m.setAttribute("result","blur");h.appendChild(m);m=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feOffset"):g.createElement("feOffset");
-m.setAttribute("in","blur");m.setAttribute("dx",this.svgShadowSize);m.setAttribute("dy",this.svgShadowSize);m.setAttribute("result","offsetBlur");h.appendChild(m);m=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feFlood"):g.createElement("feFlood");m.setAttribute("flood-color",this.svgShadowColor);m.setAttribute("flood-opacity",this.svgShadowOpacity);m.setAttribute("result","offsetColor");h.appendChild(m);m=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feComposite"):
-g.createElement("feComposite");m.setAttribute("in","offsetColor");m.setAttribute("in2","offsetBlur");m.setAttribute("operator","in");m.setAttribute("result","offsetBlur");h.appendChild(m);m=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"feBlend"):g.createElement("feBlend");m.setAttribute("in","SourceGraphic");m.setAttribute("in2","offsetBlur");h.appendChild(m);m=a.getElementsByTagName("defs");0==m.length?(g=null!=g.createElementNS?g.createElementNS(mxConstants.NS_SVG,"defs"):g.createElement("defs"),
-null!=a.firstChild?a.insertBefore(g,a.firstChild):a.appendChild(g)):g=m[0];g.appendChild(h);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return h};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var m=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}m.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
+c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
+c,b){c=null!=c?c:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var f=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),h=new mxCellHighlight(this,c,f,!1);h.highlight(a);window.setTimeout(function(){null!=h.shape&&(mxUtils.setPrefixedStyle(h.shape.node.style,"transition","all 1200ms ease-in-out"),h.shape.node.style.opacity=0);window.setTimeout(function(){h.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;
+var f=a.ownerDocument,h=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");h.setAttribute("id",this.shadowId);var l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation",this.svgShadowBlur);l.setAttribute("result","blur");h.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");
+l.setAttribute("in","blur");l.setAttribute("dx",this.svgShadowSize);l.setAttribute("dy",this.svgShadowSize);l.setAttribute("result","offsetBlur");h.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");l.setAttribute("flood-color",this.svgShadowColor);l.setAttribute("flood-opacity",this.svgShadowOpacity);l.setAttribute("result","offsetColor");h.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):
+f.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");h.appendChild(l);l=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");h.appendChild(l);l=a.getElementsByTagName("defs");0==l.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),
+null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=l[0];f.appendChild(h);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return h};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter",
"url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];
mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=
[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"];mxStencilRegistry.libraries.android=
@@ -7086,334 +7086,341 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
-STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var p=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,g,h,d,e,f,t,v){if(null!=b&&null==mxMarker.markers[b]){var m=this.getPackageForType(b);
-null!=m&&mxStencilRegistry.getStencil(m)}return p.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){l.value=Math.max(1,Math.min(p,Math.max(parseInt(l.value),parseInt(k.value))));k.value=Math.max(1,Math.min(p,Math.min(parseInt(l.value),parseInt(k.value))))}function g(c){function b(c,b,h){var m=c.getGraphBounds(),d=0,e=0,p=Z.get(),f=1/c.pageScale,t=q.checked;if(t)var f=parseInt(M.value),v=parseInt(X.value),f=Math.min(p.height*v/(m.height/c.view.scale),p.width*f/(m.width/
-c.view.scale));else f=parseInt(n.value)/(100*c.pageScale),isNaN(f)&&(g=1/c.pageScale,n.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*g);p.height=Math.ceil(p.height*g);f*=g;!t&&c.pageVisible?(m=c.getPageLayout(),d-=m.x*p.width,e-=m.y*p.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,f,p,0,d,e,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var u=b.writeHead;b.writeHead=function(c){u.apply(this,arguments);null!=a.editor.fontCss&&
-(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,c,b,g,h,m){var d=w.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:d.className="geDisableMathJax";return d}}b.open(null,null,h,!0)}else{p=c.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";b.backgroundColor=p;b.autoOrigin=t;b.appendGraph(c,f,d,e,h,!0)}return b}var g=parseInt(U.value)/100;isNaN(g)&&(g=1,U.value=
-"100 %");var g=.75*g,m=k.value,d=l.value,e=!v.checked,p=null;e&&(e=m==f&&d==f);if(!e&&null!=a.pages&&a.pages.length){var t=0,e=a.pages.length-1;v.checked||(t=parseInt(m)-1,e=parseInt(d)-1);for(var w=t;w<=e;w++){var u=a.pages[w],m=u==a.currentPage?h:null;if(null==m){var m=a.createTemporaryGraph(h.getStylesheet()),d=!0,t=!1,y=null,x=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(d=u.viewState.pageVisible,t=u.viewState.mathEnabled,y=u.viewState.background,
-x=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(t="0"!=u.mapping.diagramMap.get("mathEnabled"),y=u.mapping.diagramMap.get("background"),x=u.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);m.background=y;m.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;m.pageVisible=d;m.mathEnabled=t;var z=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?w+1:z.apply(this,arguments)};document.body.appendChild(m.container);
-a.updatePageRoot(u);m.model.setRoot(u.root)}p=b(m,p,w!=e);m!=h&&m.container.parentNode.removeChild(m.container)}}else p=b(h);p.mathEnabled&&(e=p.wnd.document,e.writeln('<script type="text/x-mathjax-config">'),e.writeln("MathJax.Hub.Config({"),e.writeln('messageStyle: "none",'),e.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),e.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),e.writeln("TeX: {"),e.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-e.writeln("},"),e.writeln("tex2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("},"),e.writeln("asciimath2jax: {"),e.writeln('\tignoreClass: "geDisableMathJax"'),e.writeln("}"),e.writeln("});"),c&&(e.writeln("MathJax.Hub.Queue(function () {"),e.writeln("window.print();"),e.writeln("});")),e.writeln("\x3c/script>"),e.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&c&&PrintDialog.printPreview(p)}
-var h=a.editor.graph,d=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,c||mxResources.get("print"));d.appendChild(e);var p=1,f=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","all");v.setAttribute("type","radio");
-v.setAttribute("name","pages-printdialog");t.appendChild(v);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));t.appendChild(e);mxUtils.br(t);var u=v.cloneNode(!0);v.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+":");t.appendChild(e);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
-"number");k.setAttribute("min","1");k.style.width="50px";t.appendChild(k);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));t.appendChild(e);var l=k.cloneNode(!0);t.appendChild(l);mxEvent.addListener(k,"focus",function(){u.checked=!0});mxEvent.addListener(l,"focus",function(){u.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(l,"change",b);if(null!=a.pages&&(p=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){f=e+
-1;k.value=f;l.value=f;break}k.setAttribute("max",p);l.setAttribute("max",p);1<p&&d.appendChild(t);var y=document.createElement("div");y.style.marginBottom="10px";var x=document.createElement("input");x.style.marginRight="8px";x.setAttribute("value","adjust");x.setAttribute("type","radio");x.setAttribute("name","printZoom");y.appendChild(x);e=document.createElement("span");mxUtils.write(e,mxResources.get("adjustTo"));y.appendChild(e);var n=document.createElement("input");n.style.cssText="margin:0 8px 0 8px;";
-n.setAttribute("value","100 %");n.style.width="50px";y.appendChild(n);mxEvent.addListener(n,"focus",function(){x.checked=!0});d.appendChild(y);var t=t.cloneNode(!1),q=x.cloneNode(!0);q.setAttribute("value","fit");x.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";e.appendChild(q);t.appendChild(e);y=document.createElement("table");y.style.display="inline-block";var R=document.createElement("tbody"),
-O=document.createElement("tr"),N=O.cloneNode(!0),L=document.createElement("td"),Q=L.cloneNode(!0),S=L.cloneNode(!0),Y=L.cloneNode(!0),G=L.cloneNode(!0),aa=L.cloneNode(!0);L.style.textAlign="right";Y.style.textAlign="right";mxUtils.write(L,mxResources.get("fitTo"));var M=document.createElement("input");M.style.cssText="margin:0 8px 0 8px;";M.setAttribute("value","1");M.setAttribute("min","1");M.setAttribute("type","number");M.style.width="40px";Q.appendChild(M);e=document.createElement("span");mxUtils.write(e,
-mxResources.get("fitToSheetsAcross"));S.appendChild(e);mxUtils.write(Y,mxResources.get("fitToBy"));var X=M.cloneNode(!0);G.appendChild(X);mxEvent.addListener(M,"focus",function(){q.checked=!0});mxEvent.addListener(X,"focus",function(){q.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));aa.appendChild(e);O.appendChild(L);O.appendChild(Q);O.appendChild(S);N.appendChild(Y);N.appendChild(G);N.appendChild(aa);R.appendChild(O);R.appendChild(N);y.appendChild(R);
-t.appendChild(y);d.appendChild(t);t=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));t.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var Z=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));t.appendChild(e);
-var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";t.appendChild(U);d.appendChild(t);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&e.appendChild(t);a.isOffline()||(y=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-y.className="geBtn",e.appendChild(y));PrintDialog.previewEnabled&&(y=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();g(!1)}),y.className="geBtn",e.appendChild(y));y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();g(!0)});y.className="geBtn gePrimaryBtn";e.appendChild(y);a.editor.cancelFirst||e.appendChild(t);d.appendChild(e);this.container=d};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&&
+STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,h,d,m,e,g,t){if(null!=b&&null==mxMarker.markers[b]){var l=this.getPackageForType(b);
+null!=l&&mxStencilRegistry.getStencil(l)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){n.value=Math.max(1,Math.min(e,Math.max(parseInt(n.value),parseInt(k.value))));k.value=Math.max(1,Math.min(e,Math.min(parseInt(n.value),parseInt(k.value))))}function f(c){function b(c,b,h){var l=c.getGraphBounds(),m=0,d=0,e=ba.get(),g=1/c.pageScale,t=q.checked;if(t)var g=parseInt(Q.value),v=parseInt(P.value),g=Math.min(e.height*v/(l.height/c.view.scale),e.width*g/(l.width/
+c.view.scale));else g=parseInt(D.value)/(100*c.pageScale),isNaN(g)&&(f=1/c.pageScale,D.value="100 %");e=mxRectangle.fromRectangle(e);e.width=Math.ceil(e.width*f);e.height=Math.ceil(e.height*f);g*=f;!t&&c.pageVisible?(l=c.getPageLayout(),m-=l.x*e.width,d-=l.y*e.height):t=!0;if(null==b){b=PrintDialog.createPrintPreview(c,g,e,0,m,d,t);b.pageSelector=!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var u=b.writeHead;b.writeHead=function(c){u.apply(this,arguments);null!=a.editor.fontCss&&
+(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=b.renderPage;b.renderPage=function(a,c,b,f,h,l){var m=w.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:m.className="geDisableMathJax";return m}}b.open(null,null,h,!0)}else{e=c.background;if(null==e||""==e||e==mxConstants.NONE)e="#ffffff";b.backgroundColor=e;b.autoOrigin=t;b.appendGraph(c,g,m,d,h,!0)}return b}var f=parseInt(U.value)/100;isNaN(f)&&(f=1,U.value=
+"100 %");var f=.75*f,l=k.value,d=n.value,m=!w.checked,e=null;m&&(m=l==g&&d==g);if(!m&&null!=a.pages&&a.pages.length){var t=0,m=a.pages.length-1;w.checked||(t=parseInt(l)-1,m=parseInt(d)-1);for(var v=t;v<=m;v++){var u=a.pages[v],l=u==a.currentPage?h:null;if(null==l){var l=a.createTemporaryGraph(h.getStylesheet()),d=!0,t=!1,x=null,B=null;null==u.viewState&&null==u.mapping&&null==u.root&&a.updatePageRoot(u);null!=u.viewState?(d=u.viewState.pageVisible,t=u.viewState.mathEnabled,x=u.viewState.background,
+B=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(t="0"!=u.mapping.diagramMap.get("mathEnabled"),x=u.mapping.diagramMap.get("background"),B=u.mapping.diagramMap.get("backgroundImage"),B=null!=B&&0<B.length?JSON.parse(B):null);l.background=x;l.backgroundImage=null!=B?new mxImage(B.src,B.width,B.height):null;l.pageVisible=d;l.mathEnabled=t;var p=l.getGlobalVariable;l.getGlobalVariable=function(a){return"page"==a?u.getName():"pagenumber"==a?v+1:p.apply(this,arguments)};document.body.appendChild(l.container);
+a.updatePageRoot(u);l.model.setRoot(u.root)}e=b(l,e,v!=m);l!=h&&l.container.parentNode.removeChild(l.container)}}else e=b(h);e.mathEnabled&&(m=e.wnd.document,m.writeln('<script type="text/x-mathjax-config">'),m.writeln("MathJax.Hub.Config({"),m.writeln('messageStyle: "none",'),m.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),m.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),m.writeln("TeX: {"),m.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+m.writeln("},"),m.writeln("tex2jax: {"),m.writeln('\tignoreClass: "geDisableMathJax"'),m.writeln("},"),m.writeln("asciimath2jax: {"),m.writeln('\tignoreClass: "geDisableMathJax"'),m.writeln("}"),m.writeln("});"),c&&(m.writeln("MathJax.Hub.Queue(function () {"),m.writeln("window.print();"),m.writeln("});")),m.writeln("\x3c/script>"),m.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));e.closeDocument();!e.mathEnabled&&c&&PrintDialog.printPreview(e)}
+var h=a.editor.graph,d=document.createElement("div"),m=document.createElement("h3");m.style.width="100%";m.style.textAlign="center";m.style.marginTop="0px";mxUtils.write(m,c||mxResources.get("print"));d.appendChild(m);var e=1,g=1,t=document.createElement("div");t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var w=document.createElement("input");w.style.cssText="margin-right:8px;margin-bottom:8px;";w.setAttribute("value","all");w.setAttribute("type","radio");
+w.setAttribute("name","pages-printdialog");t.appendChild(w);m=document.createElement("span");mxUtils.write(m,mxResources.get("printAllPages"));t.appendChild(m);mxUtils.br(t);var u=w.cloneNode(!0);w.setAttribute("checked","checked");u.setAttribute("value","range");t.appendChild(u);m=document.createElement("span");mxUtils.write(m,mxResources.get("pages")+":");t.appendChild(m);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
+"number");k.setAttribute("min","1");k.style.width="50px";t.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("to"));t.appendChild(m);var n=k.cloneNode(!0);t.appendChild(n);mxEvent.addListener(k,"focus",function(){u.checked=!0});mxEvent.addListener(n,"focus",function(){u.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(n,"change",b);if(null!=a.pages&&(e=a.pages.length,null!=a.currentPage))for(m=0;m<a.pages.length;m++)if(a.currentPage==a.pages[m]){g=m+
+1;k.value=g;n.value=g;break}k.setAttribute("max",e);n.setAttribute("max",e);1<e&&d.appendChild(t);var x=document.createElement("div");x.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");x.appendChild(p);m=document.createElement("span");mxUtils.write(m,mxResources.get("adjustTo"));x.appendChild(m);var D=document.createElement("input");D.style.cssText="margin:0 8px 0 8px;";
+D.setAttribute("value","100 %");D.style.width="50px";x.appendChild(D);mxEvent.addListener(D,"focus",function(){p.checked=!0});d.appendChild(x);var t=t.cloneNode(!1),q=p.cloneNode(!0);q.setAttribute("value","fit");p.setAttribute("checked","checked");m=document.createElement("div");m.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";m.appendChild(q);t.appendChild(m);x=document.createElement("table");x.style.display="inline-block";var N=document.createElement("tbody"),
+S=document.createElement("tr"),O=S.cloneNode(!0),I=document.createElement("td"),W=I.cloneNode(!0),R=I.cloneNode(!0),T=I.cloneNode(!0),V=I.cloneNode(!0),K=I.cloneNode(!0);I.style.textAlign="right";T.style.textAlign="right";mxUtils.write(I,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";W.appendChild(Q);m=document.createElement("span");mxUtils.write(m,
+mxResources.get("fitToSheetsAcross"));R.appendChild(m);mxUtils.write(T,mxResources.get("fitToBy"));var P=Q.cloneNode(!0);V.appendChild(P);mxEvent.addListener(Q,"focus",function(){q.checked=!0});mxEvent.addListener(P,"focus",function(){q.checked=!0});m=document.createElement("span");mxUtils.write(m,mxResources.get("fitToSheetsDown"));K.appendChild(m);S.appendChild(I);S.appendChild(W);S.appendChild(R);O.appendChild(T);O.appendChild(V);O.appendChild(K);N.appendChild(S);N.appendChild(O);x.appendChild(N);
+t.appendChild(x);d.appendChild(t);t=document.createElement("div");m=document.createElement("div");m.style.fontWeight="bold";m.style.marginBottom="12px";mxUtils.write(m,mxResources.get("paperSize"));t.appendChild(m);m=document.createElement("div");m.style.marginBottom="12px";var ba=PageSetupDialog.addPageFormatPanel(m,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);t.appendChild(m);m=document.createElement("span");mxUtils.write(m,mxResources.get("pageScale"));t.appendChild(m);
+var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";t.appendChild(U);d.appendChild(t);m=document.createElement("div");m.style.cssText="text-align:right;margin:62px 0 0 0;";t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&m.appendChild(t);a.isOffline()||(x=mxUtils.button(mxResources.get("help"),function(){h.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+x.className="geBtn",m.appendChild(x));PrintDialog.previewEnabled&&(x=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),x.className="geBtn",m.appendChild(x));x=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});x.className="geBtn gePrimaryBtn";m.appendChild(x);a.editor.cancelFirst||m.appendChild(t);d.appendChild(m);this.container=d};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="8.6.6";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="8.6.7";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');EditorUi.prototype.crossOriginImages=!mxClient.IS_IE;EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=
-!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(v){}try{var b=document.createElement("canvas"),h=new Image;h.onload=function(){try{b.getContext("2d").drawImage(h,0,0);var a=
-b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};h.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(v){}try{b=document.createElement("canvas");b.width=b.height=1;var d=b.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(v){}})();EditorUi.prototype.openLink=function(a,b){return this.editor.graph.openLink(a,b)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,h){localStorage.setItem(a,b);h()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
+!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.closableScratchpad=!0;EditorUi.prototype.showCsvImport=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(t){}try{var c=document.createElement("canvas"),b=new Image;b.onload=function(){try{c.getContext("2d").drawImage(b,0,0);var a=
+c.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(u){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}try{c=document.createElement("canvas");c.width=c.height=1;var m=c.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(t){}})();EditorUi.prototype.openLink=function(a,c){return this.editor.graph.openLink(a,c)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,c){c(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,c,b){localStorage.setItem(a,c);b()};EditorUi.prototype.removeLocalData=function(a,c){localStorage.removeItem(a);c()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=
a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isAppCache=function(){return"1"==urlParams.appcache||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,h){h=null!=h?h:24;var c=new Spinner({lines:12,length:h,width:Math.round(h/3),radius:Math.round(h/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=c.spin;c.spin=function(h,d){var e=!1;this.active||(g.call(this,h),this.active=!0,null!=d&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",e.style.fontSize=
-"9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),e.innerHTML=d+"...",h.appendChild(e),c.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=
-Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(h,d)}));this.stop();return a}),e=!0);return e};var d=c.stop;c.stop=function(){d.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,h){function c(a,
-c){var b=e;e+=c;return a.substring(b,e)}function g(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!=h&&h();else if(c(a,4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);do{h=g(a);var d=c(a,4);if(null!=b&&b(e-8,d,h))break;value=c(a,h);c(a,4);if("IEND"==d)break}while(h)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,
-!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(t){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var h=c.indexOf("&lt;mxfile ");if(0<=h){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>h&&(b=c.substring(h,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var d=mxUtils.parseXml(c),p=this.editor.extractGraphModel(d.documentElement,
-null!=this.pages),b=null!=p?mxUtils.getXml(p):""}catch(y){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;
-c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,e=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var d=e.length-1;0<=d;d--){var p=this.updatePageRoot(new DiagramPage(e[d]));null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[d+1]));c.model.execute(new ChangePage(this,p,0==d?p: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(d=0;d<b.length;d++)c.model.execute(new ChangePage(this,b[d],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(a,b,h,e,d,p,f,k,u,m){b=null!=b?b:this.editor.graph;d=null!=d?d:!1;u=null!=u?u:!0;var c,g=null;null==h||h.getMode()==App.MODE_DEVICE||h.getMode()==App.MODE_BROWSER?c="_blank":g=c=e;if(null==a)return"";var t=a;if("mxfile"!=t.nodeName.toLowerCase()){var v=b.zapGremlins(mxUtils.getXml(a)),t=b.compress(v);if(b.decompress(t)!=v)return v;v=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(v,t);t=a.ownerDocument.createElement("mxfile");t.appendChild(v)}m?(t=t.cloneNode(!0),t.removeAttribute("userAgent"),
-t.removeAttribute("version"),t.removeAttribute("editor"),t.removeAttribute("type")):(t.setAttribute("userAgent",navigator.userAgent),t.setAttribute("version",EditorUi.VERSION),t.setAttribute("editor","www.draw.io"),a=null!=h?h.getMode():this.mode,null!=a&&t.setAttribute("type",a));a=mxUtils.getXml(t);if(!p&&!d&&(f||null!=h&&/(\.html)$/i.test(h.getTitle())))a=this.getHtml2(mxUtils.getXml(t),b,null!=h?h.getTitle():null,c,g);else if(p||!d&&null!=h&&/(\.svg)$/i.test(h.getTitle()))null==h||h.getMode()!=
-App.MODE_DEVICE&&h.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,u,g);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var g=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,g);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
-this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(g=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(g),g=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(g))),mxUtils.setTextContent(this.pages[d].node,g),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,h,d,e,p,f,k,u){e=null!=e?e:!0;f=null!=f?f:this.getXmlFileData(e,null!=p?p:!1);u=null!=u?u:this.getCurrentFile();
-p=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))){p=this.createTemporaryGraph(p.getStylesheet());var c=p.getGlobalVariable,g=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:c.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(g.root)}a=this.createFileData(f,p,u,window.location.href,a,b,h,d,e,k);p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);
-return a};EditorUi.prototype.getHtml=function(a,b,h,e,d,p){p=null!=p?p:!0;var c=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=p?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),f=b.view.scale;p=Math.floor(c.x/f-b.view.translate.x);f=Math.floor(c.y/f-b.view.translate.y);c=b.background;null==d&&(b=this.getBasenames().join(";"),0<b.length&&(g="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",p);a.setAttribute("y0",f)}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!=d&&(d=d.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==d?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=d?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==d?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=d?'<meta http-equiv="refresh" content="0;URL=\''+d+"'\"/>\n":"")+"</head>\n<body"+(null==d&&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==d?'<script type="text/javascript" src="'+g+'">\x3c/script>':
-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+d+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,h,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
-this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=h?"<title>"+mxUtils.htmlEntities(h)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+function(a,c,b){b=null!=b?b:24;var f=new Spinner({lines:12,length:b,width:Math.round(b/3),radius:Math.round(b/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),h=f.spin;f.spin=function(b,d){var m=!1;this.active||(h.call(this,b),this.active=!0,null!=d&&(m=document.createElement("div"),m.style.position="absolute",m.style.whiteSpace="nowrap",m.style.background="#4B4243",m.style.color="white",m.style.fontFamily="Helvetica, Arial",m.style.fontSize=
+"9pt",m.style.padding="6px",m.style.paddingLeft="10px",m.style.paddingRight="10px",m.style.zIndex=2E9,m.style.left=Math.max(0,a)+"px",m.style.top=Math.max(0,c+70)+"px",mxUtils.setPrefixedStyle(m.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(m.style,"boxShadow","2px 2px 3px 0px #ddd"),m.innerHTML=d+"...",b.appendChild(m),f.status=m,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(m.style.left=
+Math.round(Math.max(0,a-m.offsetWidth/2))+"px",m.style.top=Math.round(Math.max(0,c+70-m.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(b,d)}));this.stop();return a}),m=!0);return m};var d=f.stop;f.stop=function(){d.call(this);this.active=!1;null!=f.status&&(f.status.parentNode.removeChild(f.status),f.status=null)};f.pause=function(){return function(){}};return f};EditorUi.parsePng=function(a,c,b){function f(a,
+c){var b=d;d+=c;return a.substring(b,d)}function h(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var d=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=b&&b();else if(f(a,4),"IHDR"!=f(a,4))null!=b&&b();else{f(a,17);do{b=h(a);var e=f(a,4);if(null!=c&&c(d-8,e,b))break;value=f(a,b);f(a,4);if("IEND"==e)break}while(b)}};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(m){}return!1};var b=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(a){var c=b.apply(this,arguments);if(null==c)try{var h=a.indexOf("&lt;mxfile ");if(0<=h){var d=a.lastIndexOf("&lt;/mxfile&gt;");d>h&&(c=a.substring(h,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var e=mxUtils.parseXml(a),g=this.editor.extractGraphModel(e.documentElement,
+null!=this.pages),c=null!=g?mxUtils.getXml(g):""}catch(w){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;
+c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(a,c,b,d,e,g,w,k,n,l){c=null!=c?c:this.editor.graph;e=null!=e?e:!1;n=null!=n?n:!0;var f,h=null;null==b||b.getMode()==App.MODE_DEVICE||b.getMode()==App.MODE_BROWSER?f="_blank":h=f=d;if(null==a)return"";var m=a;if("mxfile"!=m.nodeName.toLowerCase()){var t=c.zapGremlins(mxUtils.getXml(a)),m=c.compress(t);if(c.decompress(m)!=t)return t;t=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(t,m);m=a.ownerDocument.createElement("mxfile");m.appendChild(t)}l?(m=m.cloneNode(!0),m.removeAttribute("userAgent"),
+m.removeAttribute("version"),m.removeAttribute("editor"),m.removeAttribute("type")):(m.setAttribute("userAgent",navigator.userAgent),m.setAttribute("version",EditorUi.VERSION),m.setAttribute("editor","www.draw.io"),a=null!=b?b.getMode():this.mode,null!=a&&m.setAttribute("type",a));a=mxUtils.getXml(m);if(!g&&!e&&(w||null!=b&&/(\.html)$/i.test(b.getTitle())))a=this.getHtml2(mxUtils.getXml(m),c,null!=b?b.getTitle():null,f,h);else if(g||!e&&null!=b&&/(\.svg)$/i.test(b.getTitle()))null==b||b.getMode()!=
+App.MODE_DEVICE&&b.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,c,d,null,k,n,h);return a};EditorUi.prototype.getXmlFileData=function(a,c){a=null!=a?a:!0;c=null!=c?c:!1;var b=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(b)));mxUtils.setTextContent(this.currentPage.node,f);b=this.fileNode.cloneNode(!1);if(c)b.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
+this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);b.appendChild(this.pages[d].node)}}return b};EditorUi.prototype.getFileData=function(a,c,b,d,e,g,w,k,n){e=null!=e?e:!0;w=null!=w?w:this.getXmlFileData(e,null!=g?g:!1);n=null!=n?n:this.getCurrentFile();
+g=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(c||!a&&null!=n&&/(\.svg)$/i.test(n.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}a=this.createFileData(w,g,n,window.location.href,a,c,b,d,e,k);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);
+return a};EditorUi.prototype.getHtml=function(a,c,b,d,e,g){g=null!=g?g:!0;var f=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=c){var f=g?c.getGraphBounds():c.getBoundingBox(c.getSelectionCells()),m=c.view.scale;g=Math.floor(f.x/m-c.view.translate.x);m=Math.floor(f.y/m-c.view.translate.y);f=c.background;null==e&&(c=this.getBasenames().join(";"),0<c.length&&(h="https://www.draw.io/embed.js?s="+c));a.setAttribute("x0",g);a.setAttribute("y0",m)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));null!=e&&(e=e.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==e?null!=b?"<title>"+mxUtils.htmlEntities(b)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+"</head>\n<body"+(null==e&&null!=f&&f!=mxConstants.NONE?' style="background-color:'+f+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==e?'<script type="text/javascript" src="'+h+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,c,b,d,e){null!=e&&(e=e.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==e?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=e?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==e?null!=b?"<title>"+mxUtils.htmlEntities(b)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=e?'<meta http-equiv="refresh" content="0;URL=\''+e+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==e?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+e+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,h,e,d,p,f){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),g=c+"."+a;if("xml"==a){var m='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,d));this.saveData(g,a,m,"text/xml")}else if("html"==
-a)m=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(g,a,m,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?g=c+".png":"jpeg"==a&&(g=c+".jpg"),this.saveRequest(g,a,mxUtils.bind(this,function(c,b){try{var g=this.editor.graph.pageVisible;null!=p&&(this.editor.graph.pageVisible=p);var h=this.createDownloadRequest(c,a,e,b,f);this.editor.graph.pageVisible=g;return h}catch(z){this.handleError(z)}}));else{var t=null,
-v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var k=this.editor.graph.background;if(f||k==mxConstants.NONE)k=null;var l=this.editor.graph.getSvg(k,null,null,null,null,e);h&&this.editor.graph.addSvgShadow(l);this.convertImages(l,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
-v('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else g=c+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),e)}}catch(E){this.handleError(E)}};EditorUi.prototype.createDownloadRequest=function(a,b,h,e,d){var c=this.editor.graph.getGraphBounds();h=this.getFileData(!0,null,null,null,h,"xmlpng"!=b);var g="";if(c.width*c.height>MAX_AREA||h.length>
-MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var f=0;f<this.pages.length;f++)if(this.pages[f]==this.currentPage){g="&from="+f;break}f=this.editor.graph.background;"png"==b&&d&&(f=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+g+"&bg="+(null!=f?f:mxConstants.NONE)+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(h)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=
-function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var e=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=
-window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();
-this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){null!=window.console&&console.log("error in fileLoaded:",a,
-v);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=v&&null!=v.message?":err:"+encodeURIComponent(v.message):"")+(null!=v&&null!=v.stack?"&stack="+encodeURIComponent(v.stack):"")}catch(p){}this.handleError(v,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):e()}))}else e();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};
-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,h,e,d,p,f){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=
-function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);
-delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,e=c.previousSibling;b.insertBefore(c,a);b.insertBefore(e,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=
-JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,h){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:
-null;this.removeLibrarySidebar(a.getHash());var g=null,e=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var h=0;h<b.length;h++){var e=b[h],d=e.data;if(null!=d){var d=this.convertDataUri(d),m="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==e.aspect&&(m+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(m+"image="+d,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(d=this.stringToCells(this.editor.graph.decompress(e.xml)),0<d.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var d=0;d<b.length;d++)mxUtils.bind(this,function(a){var b=a.data;null!=b&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){b=
-this.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.sidebar.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var b=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(b,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[d]);h=null!=h&&0<h.length?h:
-a.getTitle();var f=this.sidebar.addPalette(a.getHash(),h,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var u=f.parentNode.previousSibling;h=u.getAttribute("title");null!=h&&0<h.length&&".scratchpad"!=a.title&&u.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+h);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");u.style.position=
-"relative";var w=document.createElement("img");w.setAttribute("src",Dialog.prototype.closeImage);w.setAttribute("title",mxResources.get("close"));w.setAttribute("valign","absmiddle");w.setAttribute("border","0");w.style.margin="0 3px";var k=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(w),mxEvent.addListener(w,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=k?this.confirm(mxResources.get("allChangesLost"),
-null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));if(a.isEditable()){var l=this.editor.graph,n=null,q=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),f,b,a,a.getMode());mxEvent.consume(c)}),D=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n),n=w.cloneNode(!1),n.setAttribute("src",Editor.spinImage),n.setAttribute("title",mxResources.get("saving")),n.style.cursor="default",
-n.style.marginRight="2px",n.style.marginTop="-2px",m.insertBefore(n,m.firstChild),u.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=n&&null!=n.parentNode&&(n.parentNode.removeChild(n),u.style.paddingRight=18*m.childNodes.length+"px")})):null==k&&(k=w.cloneNode(!1),k.setAttribute("src",IMAGE_PATH+"/download.png"),k.setAttribute("title",mxResources.get("save")),m.insertBefore(k,m.firstChild),mxEvent.addListener(k,"click",mxUtils.bind(this,
-function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==k||a.isModified()||(u.style.paddingRight=18*m.childNodes.length+"px",k.parentNode.removeChild(k),k=null)});mxEvent.consume(c)})),u.style.paddingRight=18*m.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,h,e){a=l.cloneCells(mxUtils.sortCells(l.model.getTopmostCells(a)));for(var d=0;d<a.length;d++){var m=l.getCellGeometry(a[d]);null!=m&&m.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);D(h);null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)}),K=mxUtils.bind(this,function(a){if(l.isSelectionEmpty())l.getRubberband().isActive()?(l.getRubberband().execute(a),l.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
-l.getSelectionCells(),c=l.view.getBounds(b),g=l.view.scale;c.x/=g;c.y/=g;c.width/=g;c.height/=g;c.x-=l.view.translate.x;c.y-=l.view.translate.y;A(b,c)}mxEvent.consume(a)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)",
-f.style.cursor="copy",l.panningManager.stop(),l.autoScroll=!1,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!1),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.panningManager&&null!=l.graphHandler&&(f.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),f.style.cursor="default",this.sidebar.showTooltips=!0,l.panningManager.stop(),l.graphHandler.reset(),
-l.isMouseDown=!1,l.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(a){l.isMouseDown&&null!=l.graphHandler.shape&&(l.graphHandler.shape.node.style.visibility="visible",f.style.border="3px solid transparent",f.style.cursor="",l.autoScroll=!0,null!=l.graphHandler.guide&&l.graphHandler.guide.setVisible(!0),null!=l.graphHandler.hint&&(l.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(a){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(a){f.style.border="3px solid transparent";f.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(c,h,d,m,p,t,w,u,k){if(null!=c&&"image/"==h.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,t),c)],c[0].vertex=!0,A(c,new mxRectangle(0,0,p,t),a,mxEvent.isAltDown(a)?null:w.substring(0,w.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null);else{var v=!1,l=mxUtils.bind(this,function(c,
-h){if(null!=c&&"text/xml"==h){var d=mxUtils.parseXml(c);if("mxlibrary"==d.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(d.documentElement));e(m,f);b=b.concat(m);D(a);this.spinner.stop();v=!0}catch(U){}else if("mxfile"==d.documentElement.nodeName)try{for(var p=d.documentElement.getElementsByTagName("diagram"),d=0;d<p.length;d++){var m=mxUtils.getTextContent(p[d]),t=this.stringToCells(this.editor.graph.decompress(m)),w=this.editor.graph.getBoundingBoxFromGeometry(t);A(t,new mxRectangle(0,
-0,w.width,w.height),a)}v=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<b.length&&(g.parentNode.removeChild(g),g=null)});null!=k&&null!=w&&(/(\.vsdx)($|\?)/i.test(w)||/(\.vssx)($|\?)/i.test(w)||/(\.vsd)($|\?)/i.test(w))?this.importVisio(k,function(a){l(a,"text/xml")},null,w):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,w)&&
-null!=k?this.parseFile(k,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(c,h)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(f,"dragleave",function(a){null!=g?g.style.border="3px dotted lightGray":(f.style.border="3px solid transparent",f.style.cursor="");a.stopPropagation();
-a.preventDefault()}));w=w.cloneNode(!1);w.setAttribute("src",IMAGE_PATH+"/edit.gif");w.setAttribute("title",mxResources.get("edit"));m.insertBefore(w,m.firstChild);mxEvent.addListener(w,"click",q);mxEvent.addListener(f,"dblclick",function(a){mxEvent.getSource(a)==f&&q(a)});h=w.cloneNode(!1);h.setAttribute("src",Editor.plusImage);h.setAttribute("title",mxResources.get("add"));m.insertBefore(h,m.firstChild);mxEvent.addListener(h,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||
-(h=document.createElement("span"),h.setAttribute("title",mxResources.get("help")),h.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(h,"?"),mxEvent.addGestureListeners(h,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),m.insertBefore(h,m.firstChild))}u.appendChild(m);u.style.paddingRight=18*m.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&
-(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat=
-"right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=
-3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=
-null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage=
-"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
-EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showFooter=function(a){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=a,b.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,h,e,d){a=new ImageDialog(this,a,b,h,e,d);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,
-!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,h,e,d){a=new LibraryDialog(this,a,b,h,e,d);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
-this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,
-function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,h){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=a&&null!=a.error?a.error:a;if(null!=g||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),d=null;b=null!=b?b:mxResources.get("error");if(null!=g)if(null!=g.retry&&(e=mxResources.get("cancel"),d=function(){c();g.retry()}),"undefined"!=
-typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==g.code||404==g.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var f=window.location.hash;null!=f&&"#G"==f.substring(0,2)&&(f=f.substring(2),
-a+=' <a href="https://drive.google.com/open?id='+f+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else g.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=g.message?a=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error&&(a=mxUtils.htmlEntities(g.response.error));this.showError(b,a,e,h,d)}else null!=h&&h()};EditorUi.prototype.showError=
-function(a,b,h,e,d,f,k,l,u,m,w,n){a=new ErrorDialog(this,a,b,h||mxResources.get("ok"),e,d,f,k,n,l,u);this.showDialog(a.container,m||340,w||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,h,e,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=
-b&&b()},function(){c();null!=h&&h()},e,d)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
-b,h){var c=a.toDataURL("image/"+h);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+h))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,h){var c="jpeg"==h?"jpg":h,g=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,h);this.saveData(g,c,a.substring(a.lastIndexOf(",")+1),"image/"+h,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
-(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,h,e,d){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,h):new Blob([a],{type:h}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)h=window.open("about:blank","_blank"),null==h?mxUtils.popup(a,!0):(h.document.write(a),
-h.document.close(),h.document.execCommand("SaveAs",!0,b),h.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),g=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(mxClient.IS_GC)var f=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),g=65==(f?parseInt(f[2],
-10):!1)?!1:g;if(g||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,h):new Blob([a],{type:h}));g?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(u){}}else this.createEchoRequest(a,b,h,e,d).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,h,e,d,f){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
-h?"&mime="+h:"")+(null!=d?"&format="+d:"")+(null!=f?"&base64="+f:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),g=c.length,e=Math.ceil(g/1024),d=Array(e),f=0;f<e;++f){for(var k=1024*f,u=Math.min(k+1024,g),m=Array(u-k),w=0;k<u;++w,++k)m[w]=c[k].charCodeAt(0);d[f]=new Uint8Array(m)}return new Blob(d,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,h,e,d,f,k){f=null!=f?f:!1;k=null!=k?k:"vsdx"!=d&&
-(!mxClient.IS_IOS||!navigator.standalone);d=this.getServiceCount(f);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,c){try{if("_blank"==c)if(null==h||"image/"!=h.substring(0,6)||"image/svg"==h.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(a,!0):(g.document.write(mxUtils.htmlEntities(a,!1)),g.document.close())}else this.openInNewWindow(a,h,e);else c==App.MODE_DEVICE||"download"==c?this.doSaveLocalFile(a,b,h,e):null!=b&&0<b.length&&this.pickFolder(c,
-mxUtils.bind(this,function(g){try{this.exportFile(a,b,h,e,c,g)}catch(H){this.handleError(H)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,f,k,null,1<d,4<d&&(!f||6>d)?3:4,a,h,e);this.showDialog(b.container,420,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,h){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=
-window.open("about:blank");null==c?mxUtils.popup(a,!0):("image/svg+xml"==b?c.document.write("<html>"+a+"</html>"):c.document.write('<html><img src="data:'+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(h?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=
-null;var b=a(mxUtils.bind(this,function(a){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var g=b.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign=
-"center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=g.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";g=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.exportDialog.style.zIndex=g.zIndex;var h=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});h.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){h.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var b=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
-a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",b);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(b.substring(b.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
-Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,h,e,d){this.isLocalFileSave()?this.saveLocalFile(h,a,e,d,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(h,a,e,d,b,c)}),h,d,e)};EditorUi.prototype.saveRequest=function(a,b,h,e,d,f,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var c=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=
-a&&0<a.length){var g=h("_blank"==c?null:a,c==App.MODE_DEVICE||"download"==c||null==c||"_blank"==c?"0":"1");null!=g&&(c==App.MODE_DEVICE||"download"==c||"_blank"==c?g.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(h){f=null!=f?f:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,f,!0,c,h)}catch(F){this.handleError(F)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&
-299>=g.getStatus())try{this.exportFile(g.getText(),a,f,!0,c,h)}catch(F){this.handleError(F)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<c,4<c?3:4,e,f,d);this.showDialog(a.container,380,c==(mxClient.IS_IOS?0:1)?160:4<c?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,h,e,d,f){};EditorUi.prototype.pickFolder=function(a,b,h){b(null)};EditorUi.prototype.exportSvg=function(a,b,h,e,d,f,k,l,u){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();h=null!=h?h:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var g=this.editor.graph.getSvg(c,a,k,l,null,h);e&&this.editor.graph.addSvgShadow(g);var p=this.getBaseFilename()+".svg",
-t=mxUtils.bind(this,function(a){this.spinner.stop();d&&a.setAttribute("content",this.getFileData(!0,null,null,null,h,u));if(null!=this.editor.fontCss){var b=a.ownerDocument,b=null!=b.createElementNS?b.createElementNS(mxConstants.NS_SVG,"style"):b.createElement("style");b.setAttribute("type","text/css");mxUtils.setTextContent(b,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(b)}var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(p,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){f?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,t,this.thumbImageCache)):t(g)}))}};EditorUi.prototype.addCheckbox=function(a,b,h,e,d,f){f=null!=f?f:!0;var c=
-document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");h&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");f&&(a.appendChild(c),h=document.createElement("span"),mxUtils.write(h,b),a.appendChild(h),d||mxUtils.br(a),mxEvent.addListener(h,"click",mxUtils.bind(this,function(a){"disabled"!=c.getAttribute("disabled")&&(c.checked=!c.checked,mxEvent.consume(a))})));return c};EditorUi.prototype.addEditButton=
-function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var g=this.getCurrentFile(),e="";null!=g&&g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var d=document.createElement("select");d.style.width="120px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("makeCopy"));d.appendChild(g);g=document.createElement("option");
-g.setAttribute("value","custom");mxUtils.write(g,mxResources.get("custom")+"...");d.appendChild(g);a.appendChild(d);mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if("custom"==d.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:d.value="blank"},mxResources.get("url"),null,null,null,null,function(){d.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)?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===d.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return d}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){f.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
-Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var g=document.createElement("select");g.style.width="100px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));g.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));g.appendChild(d);d=document.createElement("option");
-d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));g.appendChild(d);b&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),g.appendChild(d));a.appendChild(g);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",f=null,f=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();f.style.padding=
-mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return g.value},focus:function(){g.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,f,p,k,l){var c=this.getCurrentFile(),g=[];e&&(g.push("lightbox=1"),"auto"!=a&&g.push("target="+
-a),null!=b&&b!=mxConstants.NONE&&g.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&g.push("edit="+encodeURIComponent(f)),p&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));if(d&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&g.push("page="+a);break}a=!0;null!=k?d="#U"+encodeURIComponent(k):(c=this.getCurrentFile(),l||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?
-this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<g.length?"?"+g.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,
-b,d,e,f,p,k,l,u,m,w){this.getBasenames();var c={};""!=f&&f!=mxConstants.NONE&&(c.highlight=f);"auto"!==e&&(c.target=e);u||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];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);l&&d.push("layers");0<d.length&&(u&&d.push("lightbox"),c.toolbar=d.join(" "));null!=m&&0<m.length&&(c.edit=m);null!=
-a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(g);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var f=document.createElement("input");f.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-f.setAttribute("value","url");f.setAttribute("type","radio");f.setAttribute("name","type-embedhtmldialog");g=f.cloneNode(!0);g.setAttribute("value","copy");h.appendChild(g);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(k);mxUtils.br(h);h.appendChild(f);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));h.appendChild(k);var m=this.getCurrentFile();null==d&&null!=m&&m.constructor==window.DriveFile&&(k=
-document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),h.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));g.setAttribute("checked","checked");null==d&&f.setAttribute("disabled","disabled");c.appendChild(h);var w=this.addLinkSection(c),l=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,
-":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value="100%";c.appendChild(t);var n=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,q=q=this.addCheckbox(c,mxResources.get("allPages"),h,!h),D=this.addCheckbox(c,mxResources.get("layers"),!0),A=this.addCheckbox(c,mxResources.get("lightbox"),!0),K=this.addEditButton(c,A),z=K.getEditInput();
-z.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&A.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(f.checked?d:null,l.checked,t.value,w.getTarget(),w.getColor(),n.checked,q.checked,D.checked,A.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);g.focus()};
-EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,f,p){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(g);var h=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",
-m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var k=document.createElement("div");k.style.whiteSpace="normal";mxUtils.write(k,mxResources.get("linkAccountRequired"));m.appendChild(k);k=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));k.style.marginTop="12px";k.className="geBtn";m.appendChild(k);c.appendChild(m);k=document.createElement("a");
-k.style.paddingLeft="12px";k.style.color="gray";k.style.fontSize="11px";k.setAttribute("href","javascript:void(0);");mxUtils.write(k,mxResources.get("check"));m.appendChild(k);mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
-this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,t=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",c.appendChild(l),mxUtils.write(c,mxResources.get("height")+":"),t=document.createElement("input"),t.setAttribute("type","text"),t.style.width="50px",
-t.style.marginLeft="6px",t.style.marginBottom="10px",t.value=e+"px",c.appendChild(t),mxUtils.br(c);var v=this.addLinkSection(c,p);d=null!=this.pages&&1<this.pages.length;var n=null;if(null==h||h.constructor!=window.DriveFile||b)n=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var q=this.addCheckbox(c,mxResources.get("lightbox"),!0),A=this.addEditButton(c,q),K=A.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=K.style.marginLeft;z.style.marginBottom="16px";
-z.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?(z.removeAttribute("disabled"),K.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&q.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){f(v.getTarget(),v.getColor(),null==n?!0:n.checked,q.checked,A.getLink(),z.checked,null!=l?l.value:null,null!=
-t?t.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):v.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-c.appendChild(g);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),f=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0),g=this.editor.graph,k=e?null:this.addCheckbox(c,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,null!=f?f.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,
-300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,f,p,k,l){k=null!=k?k:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=this.editor.graph,h="jpeg"==l?196:300,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(t);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width=
-"60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.value=this.lastExportBorder||"0";c.appendChild(v);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background,null,null,"jpeg"!=
-l),y=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,g.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");p&&(c.appendChild(x),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(y,"change",function(){y.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(x.setAttribute("checked",
-"checked"),x.defaultChecked=!0);var K=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var I=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=l),B=null!=this.pages&&1<this.pages.length,
-J=this.addCheckbox(c,B?mxResources.get("allPages"):"",B,!B,null,"jpeg"!=l);J.style.marginLeft="24px";J.style.marginBottom="16px";B||(J.style.visibility="hidden");mxEvent.addListener(I,"change",function(){I.checked&&B?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});k&&B||J.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=v.value;this.lastExportZoom=n.value;f(n.value,q.checked,!y.checked,K.checked,I.checked,z.checked,
-v.value,x.checked,!J.checked)}),null,d,e);this.showDialog(a.container,340,h,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-c.appendChild(h)}var k=this.addCheckbox(c,mxResources.get("fit"),!0),m=this.addCheckbox(c,mxResources.get("shadow"),g.shadowVisible&&e,!e),l=this.addCheckbox(c,d),t=this.addCheckbox(c,mxResources.get("lightbox"),!0),n=this.addEditButton(c,t),v=n.getEditInput(),q=1<g.model.getChildCount(g.model.getRoot()),D=this.addCheckbox(c,mxResources.get("layers"),q,!q);D.style.marginLeft=v.style.marginLeft;D.style.marginBottom="12px";D.style.marginTop="8px";mxEvent.addListener(t,"change",function(){t.checked?
-(q&&D.removeAttribute("disabled"),v.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&t.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(k.checked,m.checked,l.checked,t.checked,n.getLink(),D.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,d,e,f,p,k,l){function c(b){var c=" ",h="";e&&(c=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",h+="cursor:pointer;");
-a&&(h+="max-width:100%;");var m="";d&&(m=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');k('<img src="'+b+'"'+m+(""!=h?' style="'+h+'"':"")+c+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),
-g.width*g.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&299>=t.getStatus()?c("data:image/png;base64,"+t.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,d,e,f,p,k){var c=this.editor.graph.getSvg(),g=c.getElementsByTagName("a");if(null!=g)for(var h=0;h<g.length;h++){var l=g[h].getAttribute("href");null!=l&&"#"==l.charAt(0)&&"_blank"==g[h].getAttribute("target")&&g[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var t=" ",n="";e&&(t="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(f?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+t+"/>")}))}else n="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(f?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=n&&c.setAttribute("style",n),k(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
-" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var g=a.getElementsByTagName("diagram");if(0<
-g.length){var c=g[0],d=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=c&&(g=b.decompress(mxUtils.getTextContent(c)),null!=g&&0<g.length&&(a=mxUtils.parseXml(g).documentElement))}g=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(p){}finally{this.editor.graph=g}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
-g=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),g=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==g&&(g=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(g)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(m){null!=b&&b(m)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,d,e,f,p,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,p);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=f)this.convertImages(b,mxUtils.bind(this,function(a){f((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,f,p,k,l,u){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,d,l):null,u)}catch(H){"Invalid image"==H.message?this.downloadFile(u):this.handleError(H)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,p,k)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},c=this.editor.fontCss.split("url("),d=0,e={},f=mxUtils.bind(this,function(){if(0==d){for(var g=[c[0]],h=1;h<c.length;h++){var f=
-c[h].indexOf(")");g.push('url("');g.push(e[b(c[h].substring(0,f))]);g.push('"'+c[h].substring(f))}this.editor.resolvedFontCss=g.join("");a()}});if(0<c.length)for(var k=1;k<c.length;k++){var l=c[k].indexOf(")"),u=null,m=c[k].indexOf("format(",l);0<m&&(u=b(c[k].substring(m+7,c[k].indexOf(")",m))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var b="application/x-font-ttf";if("svg"==u||/(\.svg)($|\?)/i.test(a))b="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))b=
-"application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))b="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))b="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))b="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.sfnt)($|\?)/i.test(a))b="application/font-sfnt";var c=a;/^https?:\/\//.test(c)&&!this.isCorsEnabledForUrl(c)&&(c=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(c,mxUtils.bind(this,function(b){e[a]=b;d--;f()}),mxUtils.bind(this,
-function(a){d--;f()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b(c[k].substring(0,l)),u)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,f,p,k,l,u,m,w,n,q,C){p=null!=p?p:!0;n=null!=n?n:this.editor.graph;q=null!=q?q:0;var c=u?null:n.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==u&&(c=this.editor.graph.defaultPageBackgroundColor);this.convertImages(n.getSvg(c,null,null,C,null,null!=k?k:!0),mxUtils.bind(this,function(g){var d=new Image;d.onload=mxUtils.bind(this,
-function(){try{var e=document.createElement("canvas"),h=parseInt(g.getAttribute("width")),m=parseInt(g.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=p?Math.min(1,Math.min(3*b/(4*m),b/h)):b/h);h=Math.ceil(l*h)+2*q;m=Math.ceil(l*m)+2*q;e.setAttribute("width",h);e.setAttribute("height",m);var k=e.getContext("2d");null!=c&&(k.beginPath(),k.rect(0,0,h,m),k.fillStyle=c,k.fill());k.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(d,q/l,q/l);a(e)},0):(k.drawImage(d,q/l,q/l),a(e))}catch(P){null!=
-f&&f(P)}});d.onerror=function(a){null!=f&&f(a)};try{m&&this.editor.graph.addSvgShadow(g);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;g.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(n,g,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(g))}))});this.loadFonts(e)}catch(z){null!=f&&f(z)}}),d,w)};EditorUi.prototype.createImageUrlConverter=
-function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,d=this;a.convert=function(c){if(null!=c){var g="http://"==c.substring(0,7)||"https://"==c.substring(0,8);g&&!navigator.onLine?c=d.svgBrokenImage.src:!g||c.substring(0,a.baseUrl.length)==a.baseUrl||d.crossOriginImages&&d.isCorsEnabledForUrl(c)?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c)}return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==
-e&&(e=this.createImageUrlConverter());var c=0,g=d||{};d=mxUtils.bind(this,function(d,h){for(var f=a.getElementsByTagName(d),m=0;m<f.length;m++)mxUtils.bind(this,function(d){var f=e.convert(d.getAttribute(h));if(null!=f&&"data:"!=f.substring(0,5)){var m=g[f];null==m?(c++,this.convertImageToDataUri(f,function(e){null!=e&&(g[f]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,m)}else null!=f&&d.setAttribute(h,f)})(f[m])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=
-function(a,b,d,e,f,k){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);f=null!=f?f:!0;var g=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var g=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var g=Array(a.length),e=0;e<a.length;e++)g[e]=
-String.fromCharCode(a[e]);g=g.join("")}k=null!=k?k:"data:image/png;base64,";g=k+this.base64Encode(g)}b(g)}}else null!=d&&d({code:App.ERROR_UNKNOWN},a)}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){f&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(u){null!=d&&d(u)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
-"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var c=new Image,
-g=this;this.crossOriginImages&&(c.crossOrigin="anonymous");c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);try{b(a.toDataURL())}catch(y){b(g.svgBrokenImage.src)}};c.onerror=function(){b(g.svgBrokenImage.src)};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,f){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),k=this.editor.extractGraphModel(h.documentElement,
-null!=this.pages);if(null!=k&&"mxfile"==k.nodeName&&null!=this.pages){var m=k.getElementsByTagName("diagram");if(1==m.length)k=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){g.model.beginUpdate();try{for(a=0;a<m.length;a++){var l=this.updatePageRoot(new DiagramPage(m[a])),t=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[t+1]));g.model.execute(new ChangePage(this,l,l,t))}}finally{g.model.endUpdate()}}}null!=k&&"mxGraphModel"===
-k.nodeName&&(c=g.importGraphModel(k,b,d,e))}}catch(F){throw f||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return c};EditorUi.prototype.importVisio=function(a,b,d,e){e=null!=e?e:a.name;d=null!=d?d:mxUtils.bind(this,function(a){this.handleError(a)});var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var c=new FormData;c.append("file1",a);var g=new XMLHttpRequest;g.open("POST",VSD_CONVERT_URL);g.responseType=
-"blob";g.onreadystatechange=mxUtils.bind(this,function(){if(4==g.readyState)if(200<=g.status&&299>=g.status)try{this.doImportVisio(g.response,b,d)}catch(x){d(x)}else d({})});g.send(c)}else try{this.doImportVisio(a,b,d)}catch(x){d(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?c():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",c))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,d,e,f){var c=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,f)}catch(y){this.handleError(y)}finally{null!=f&&f()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
-mxscript("js/diagramly/Extensions.js",c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,f){f=JSON.parse(a);a=[];if(null!=f.state){f=JSON.parse(f.state);for(var c in f.Pages)a.push(f.Pages[c]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(f);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var g=this.currentPage;
-for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(g)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,f,k,l){k=null!=k?k:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
-b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var g=this.extractGraphModelFromPng(a),h=this.importXml(g,b,d,k,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(g=a.substring(a.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),h=this.importXml(g,b,d,k,!0),0<h.length)return h}catch(w){}this.loadImage(a,mxUtils.bind(this,function(g){if("data:"==a.substring(0,5))this.resizeImage(g,a,mxUtils.bind(this,function(a,g,e){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="+this.convertDataUri(a)+";"))}),l,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/g.width,this.maxImageSize/
-g.height)),h=Math.round(g.width*e);g=Math.round(g.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(g),c.fireEvent(new mxEventObject("textInserted","cells",
-[g]))}finally{c.getModel().endUpdate()}c.setSelectionCell(g)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,k);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,k);else{c=this.editor.graph;f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=
-a,c.updateCellSize(f),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(f.value)&&c.setLinkForCell(f,f.value),f.geometry.width+=c.gridSize,f.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+
-" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,b,d,e,f,k,l,n,u,m,w){m=null!=m?m:!0;var c=!1,g=null,h=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,
-10)?this.loadLibrary(new LocalLibrary(this,a,l)):b=this.importXml(a,d,e,m);null!=n&&n(b)});"image"==b.substring(0,5)?(u=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(g=this.importXml(b,d,e,m),u=!0)),u||(g=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),m&&g.isGridEnabled()&&(d=g.snap(d),e=g.snap(e)),g=[g.insertVertex(null,null,"",d,e,f,k,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,d,e,m);null!=n&&n(a)})):null!=u&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?(c=!0,this.importVisio(u,h)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(c=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-(200<=a.status&&299>=a.status?h(a.responseText):null!=n&&n(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(g=this.insertTextAt(this.validateFileData(a),d,e,!0,null,m));c||null==n||n(g);return g};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,k;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);
-if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}k=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&
-15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,d,e,f,k,l,n,u,m,w,q){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;m=null!=m?m:this.maxImageBytes;var c=null!=b&&null!=d,g=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=w||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>p){h=!0;break}var v=mxUtils.bind(this,function(){var h=this.editor.graph,
-p=h.gridSize;f=null!=f?f:mxUtils.bind(this,function(a,b,d,g,e,h,f,m,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,f)),null):this.importFile(a,b,d,g,e,h,f,m,k,c,q)});k=null!=k?k:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var t=a.length,u=t,v=[],y=mxUtils.bind(this,function(a,b){v[a]=b;if(0==--u){this.spinner.stop();if(null!=n)n(v);else{var c=[];h.getModel().beginUpdate();
-try{for(var d=0;d<v.length;d++){var g=v[d]();null!=g&&(c=c.concat(g))}}finally{h.getModel().endUpdate()}}k(c)}}),x=0;x<t;x++)mxUtils.bind(this,function(c){var k=a[c],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==l||l(k))if("image/"==k.type.substring(0,6))if("image/svg"==k.type.substring(0,9)){var n=a.target.result,t=n.indexOf(","),u=decodeURIComponent(escape(atob(n.substring(t+1)))),v=mxUtils.parseXml(u),u=v.getElementsByTagName("svg");if(0<u.length){var u=u[0],z=q?null:u.getAttribute("content");
-null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?y(c,mxUtils.bind(this,function(){try{if(n.substring(0,t+1),null!=v){var a=v.getElementsByTagName("svg");if(0<a.length){var m=a[0],l=parseFloat(m.getAttribute("width")),w=parseFloat(m.getAttribute("height")),u=m.getAttribute("viewBox");if(null==u||0==u.length)m.setAttribute("viewBox",
-"0 0 "+l+" "+w);else if(isNaN(l)||isNaN(w)){var q=u.split(" ");3<q.length&&(l=parseFloat(q[2]),w=parseFloat(q[3]))}n=this.createSvgDataUri(mxUtils.getXml(m));var z=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,w)),y=f(n,k.type,b+c*p,d+c*p,Math.max(1,Math.round(l*z)),Math.max(1,Math.round(w*z)),k.name,g);if(isNaN(l)||isNaN(w)){var B=new Image;B.onload=mxUtils.bind(this,function(){l=Math.max(1,B.width);w=Math.max(1,B.height);y[0].geometry.width=l;y[0].geometry.height=w;m.setAttribute("viewBox",
-"0 0 "+l+" "+w);n=this.createSvgDataUri(mxUtils.getXml(m));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));h.setCellStyles("image",n,[y[0]])});B.src=this.createSvgDataUri(mxUtils.getXml(m))}return y}}}catch(ka){}return null})):y(c,mxUtils.bind(this,function(){return f(z,"text/xml",b+c*p,d+c*p,0,0,k.name)}))}}else{u=!1;if("image/png"==k.type){var B=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=B&&0<B.length){var x=new Image;x.src=a.target.result;y(c,
-mxUtils.bind(this,function(){return f(B,"text/xml",b+c*p,d+c*p,x.width,x.height,k.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(h){this.resizeImage(h,a.target.result,mxUtils.bind(this,function(h,
-l,n){y(c,mxUtils.bind(this,function(){if(null!=h&&h.length<m){var t=g&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(e/l,e/n)):1;return f(h,k.type,b+c*p,d+c*p,Math.round(l*t),Math.round(n*t),k.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,e,w)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else f(a.target.result,k.type,b+c*p,d+c*p,240,160,k.name,function(a){y(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(k.name)||
-/(\.vssx)($|\?)/i.test(k.name)||/(\.vsd)($|\?)/i.test(k.name)?f(null,k.type,b+c*p,d+c*p,240,160,k.name,function(a){y(c,function(){return a})},k):"image"==k.type.substring(0,5)?n.readAsDataURL(k):n.readAsText(k)})(x)});h?this.confirmImageResize(function(a){g=a;v()},u):v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,g=
-function(d,g){if(d||b)mxSettings.setResizeImages(d?g:null),mxSettings.save();c();a(g)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){g(a,!0)},function(a){g(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):
-g(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=new FormData;c.append("format","xml");c.append("upfile",a,d);var g=new XMLHttpRequest;g.open("POST",OPEN_URL);g.onreadystatechange=function(){b(g)};g.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,f,k){f=null!=f?f:this.maxImageSize;var c=Math.max(1,a.width),g=Math.max(1,a.height);if(e&&this.isResampleImage(b,
-k))try{var h=Math.max(c/f,g/f);if(1<h){var m=Math.round(c/h),l=Math.round(g/h),p=document.createElement("canvas");p.width=m;p.height=l;p.getContext("2d").drawImage(a,0,0,m,l);var n=p.toDataURL();if(n.length<b.length){var t=document.createElement("canvas");t.width=m;t.height=l;var q=t.toDataURL();n!==q&&(b=n,c=m,g=l)}}}catch(D){}d(b,c,g)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var b=d,f=0;8>f;f++)b=1==(b&1)?3988292384^b>>>1:b>>>1,EditorUi.prototype.crcTable[d]=b;EditorUi.prototype.updateCRC=
-function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,f){function c(a,b){var c=k;k+=b;return a.substring(c,k)}function g(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var k=0;if(c(a,8)!=String.fromCharCode(137)+
-"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(c(a,4),"IHDR"!=c(a,4))null!=f&&f();else{c(a,17);f=a.substring(0,k);do{var m=g(a);if("IDAT"==c(a,4)){f=a.substring(0,k-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);f+=h(d.length)+b+d+h(e^4294967295);f+=a.substring(k-8,a.length);break}f+=a.substring(k-8,k-4+m);c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,
-!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&
-"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(v){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&
-(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph;d.addListener("pageLinkClicked",function(b,c){a(c.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<
-c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var f=d.addClickHandler;d.addClickHandler=function(b,c,e){var g=c;c=function(b,c){if(null==c){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(c=e.getAttribute("href"))}null==c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=g&&g(b,c)};f.call(this,b,c,e)};k.apply(this,arguments);mxClient.IS_SVG&&
-this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:l.apply(this,arguments)};var n=
-d.createLinkForHint;d.createLinkForHint=function(c,e){var g=d.isPageLink(c);if(g){var f=c.indexOf(",");0<f&&(f=b.getPageById(c.substring(f+1)),e=null!=f?f.getName():mxResources.get("pageNotFound"))}f=n.call(this,c,e);g&&mxEvent.addListener(f,"click",function(b){a(c);mxEvent.consume(b)});return f};var q=d.labelLinkClicked;d.labelLinkClicked=function(b,c,e){var g=c.getAttribute("href");if(null==g||!d.isPageLink(g)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!d.isEnabled()||
-null!=b&&d.isCellLocked(b.cell))a(g),d.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable){var m=function(){window.setTimeout(function(){w.innerHTML="&nbsp;";w.focus();document.execCommand("selectAll",!1,
-null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=
-a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var g=c.items;for(index in g){var f=g[index];if("file"===f.kind){if(b.isEditing())this.importFiles([f.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([f.getAsFile()],
-h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML="&nbsp;";var H=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,
-function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||H||(w.style.left=d.container.scrollLeft+10+"px",w.style.top=d.container.scrollTop+10+"px",d.container.appendChild(w),H=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll",!1,null)},0):(w.focus(),document.execCommand("selectAll",
-!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!H||224!=b&&17!=b&&91!=b||(H=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(w),m())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,function(a){d.isEnabled()&&(this.copyCells(w,!0),
-m())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(w.innerHTML="&nbsp;",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML="&nbsp;"}),0))}),!0);var F=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==w?!0:F.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||
-0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,
-"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,g,f){b.insertImage(a,g,f)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?
-this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&
-document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){u=document.createElement("div");u.style.position="absolute";u.style.top="95px";u.style.left="250px";u.style.width="2000px";u.style.height="30px";u.style.background="whiteSmoke";document.body.appendChild(u);var C=document.createElement("div");C.style.position="absolute";C.style.top="125px";C.style.left="220px";C.style.width=
-"30px";C.style.height="1000px";C.style.background="whiteSmoke";document.body.appendChild(C);var E=document.createElement("div");E.style.position="absolute";E.style.top="95px";E.style.left="220px";E.style.width="30px";E.style.height="30px";E.style.background="whiteSmoke";document.body.appendChild(E);this.vRuler=new mxRuler(this.editor.graph,C,!0);this.hRuler=new mxRuler(this.editor.graph,u,!1)}if("1"==urlParams.test){u=document.getElementById("geFooter");null!=u&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:D.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&
-(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,
-"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,e=d.view.scale,g=b.x/e-c.x,f=b.y/e-c.y;mxEvent.isAltDown(a)&&(f=g=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,g,f,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,g,f,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var m=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=m;var k=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(m=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(m=b[0].getAttribute("href")));var l=!0,p=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(m,g,f,!0,k,null,l))});k&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;p()},mxEvent.isControlDown(a)):p()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,
-null,"",g,f,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(h,g,f,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),g,f,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
-EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
-mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
-mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;
-if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===
-c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var f=e.lastIndexOf("%3E");0<=f&&f<e.length-3&&(e=e.substring(0,f+3))}catch(u){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);
-this.isCompatibleString(k)&&(g=!0,e=k)}catch(u){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(g=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,g.x+c,g.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&
-this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(u){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
-12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
-else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):
-0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,
-e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
-var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=
-e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml");var g=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(w){this.handleError(w,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
-e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();g(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?g(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(m){this.handleError(m,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=
-function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),
-this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),
-c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),g=0;g<e;g++)this.addBasenamesForCell(d.model.getChildAt(a,g),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&
-(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
-this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
-function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(g){function f(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(J){}return a}if(g.source==(window.opener||window.parent)){var m=g.data;if("json"==urlParams.proto){try{m=
-JSON.parse(m)}catch(B){m=null}if(null==m)return;if("dialog"==m.action){this.showError(null!=m.titleKey?mxResources.get(m.titleKey):m.title,null!=m.messageKey?mxResources.get(m.messageKey):m.message,null!=m.buttonKey?mxResources.get(m.buttonKey):m.button);null!=m.modified&&(this.editor.modified=m.modified);return}if("prompt"==m.action){this.spinner.stop();var h=new FilenameDialog(this,m.defaultValue||"",null!=m.okKey?mxResources.get(m.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",
-value:a,message:m}),"*")},null!=m.titleKey?mxResources.get(m.titleKey):m.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==m.action){h=null;h="data:image/png;base64,"==m.xml.substring(0,22)?this.extractGraphModelFromPng(m.xml):f(m.xml);this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[m.name||this.defaultFilename]),h,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:m}),"*")}),mxUtils.bind(this,
-function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:m}),"*")}),m.editKey?mxResources.get(m.editKey):null,m.discardKey?mxResources.get(m.discardKey):null,m.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:m}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{h.init()}catch(B){k.postMessage(JSON.stringify({event:"draft",
-error:B.toString(),message:m}),"*")}return}if("template"==m.action){this.spinner.stop();var h=1==m.enableRecent,l=1==m.enableSearch,h=new NewDialog(this,!1,null!=m.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=m.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,g,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=
-a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,c){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==m.action)this.searchReadyCallback(m.list,m.errorMsg);else if("recentDocsList"==
-m.action)this.recentReadyCallback(m.list,m.errorMsg);else{if("status"==m.action){null!=m.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(m.messageKey))):null!=m.message&&this.editor.setStatus(mxUtils.htmlEntities(m.message));null!=m.modified&&(this.editor.modified=m.modified);return}if("spinner"==m.action){var p=null!=m.messageKey?mxResources.get(m.messageKey):m.message;null==m.show||m.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==m.action){if("png"==
-m.format||"xmlpng"==m.format){if(null==m.spin&&null==m.spinKey||this.spinner.spin(document.body,null!=m.spinKey?mxResources.get(m.spinKey):m.spin)){var n=null!=m.xml?m.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,t=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=m.format;b.message=m;b.data=a;b.xml=encodeURIComponent(n);k.postMessage(JSON.stringify(b),"*")}),v=mxUtils.bind(this,function(a){null==
-a&&(a=Editor.blankImage);"xmlpng"==m.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);t(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),y=q.getGlobalVariable,z=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:y.apply(this,arguments)};document.body.appendChild(q.container);
-q.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){v(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){v(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==m.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?t("data:image/png;base64,"+a.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=
-m.xml&&0<m.xml.length&&this.setFileData(m.xml);p=this.createLoadMessage("export");if("html2"==m.format||"html"==m.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),p.xml=mxUtils.getXml(h),p.data=this.getFileData(null,null,!0,null,null,null,h),p.format=m.format;else if("html"==m.format)n=this.editor.getGraphXml(),p.data=this.getHtml(n,this.editor.graph),p.xml=mxUtils.getXml(n),p.format=m.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;
-h==mxConstants.NONE&&(h=null);p.xml=this.getFileData(!0);p.format="svg";if(m.embedImages||null==m.embedImages){if(null==m.spin&&null==m.spinKey||this.spinner.spin(document.body,null!=m.spinKey?mxResources.get(m.spinKey):m.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==m.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(h),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}h="xmlsvg"==m.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));p.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==m.action)d=1==m.autosave,this.hideDialog(),null!=m.modified&&null==urlParams.modified&&(urlParams.modified=
-m.modified),null!=m.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=m.saveAndExit),null!=m.title&&null!=this.buttonContainer&&(h=document.createElement("span"),mxUtils.write(h,m.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(h),this.embedFilenameSpan=h),m=null!=m.xmlpng?this.extractGraphModelFromPng(m.xmlpng):null!=m.xml&&"data:image/png;base64,"==m.xml.substring(0,22)?this.extractGraphModelFromPng(m.xml):m.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(m)}),"*");return}}}m=f(m);c=!0;try{a(m,g)}catch(B){this.handleError(B)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var x=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=x();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=x();if(d!=e&&!c){var g=this.createLoadMessage("autosave");g.xml=d;d=JSON.stringify(g);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",
-b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
-"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f=null,k="",l="auto",n="auto",m=null,w=null,q=40,F=40,C=0,E=this.editor.graph;
-E.getGraphBounds();for(var D=function(){E.setSelectionCells(U);E.scrollCellToVisible(E.getSelectionCell())},A=E.getFreeInsertPoint(),K=A.x,z=A.y,A=z,I=null,B="auto",J=[],P=null,V=null,T=0;T<b.length&&"#"==b[T].charAt(0);){a=b[T];for(T++;T<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[T].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[T].substring(1)),T++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var O=mxUtils.trim(a.substring(1,R)),N=mxUtils.trim(a.substring(R+1));"label"==O?I=E.sanitizeHtml(N):
-"style"==O?e=N:"identity"==O&&0<N.length&&"-"!=N?f=N:"namespace"==O&&0<N.length&&"-"!=N?k=N:"width"==O?l=N:"height"==O?n=N:"left"==O&&0<N.length?m=N:"top"==O&&0<N.length?w=N:"ignore"==O?V=N.split(","):"connect"==O?J.push(JSON.parse(N)):"link"==O?P=N:"padding"==O?C=parseFloat(N):"edgespacing"==O?q=parseFloat(N):"nodespacing"==O?F=parseFloat(N):"layout"==O&&(B=N)}}}var L=this.editor.csvToArray(b[T]);a=null;if(null!=f)for(var Q=0;Q<L.length;Q++)if(f==L[Q]){a=Q;break}null==I&&(I="%"+L[0]+"%");if(null!=
-J)for(var S=0;S<J.length;S++)null==d[J[S].to]&&(d[J[S].to]={});E.model.beginUpdate();try{for(Q=T+1;Q<b.length;Q++){var Y=this.editor.csvToArray(b[Q]);if(Y.length==L.length){var G=null,aa=null!=a?k+Y[a]:null;null!=aa&&(G=E.model.getCell(aa));null==G&&(G=new mxCell(I,new mxGeometry(K,A,0,0),e||"whiteSpace=wrap;html=1;"),G.vertex=!0,G.id=aa);for(var M=0;M<Y.length;M++)E.setAttributeForCell(G,L[M],Y[M]);E.setAttributeForCell(G,"placeholders","1");G.style=E.replacePlaceholders(G,G.style);for(S=0;S<J.length;S++)d[J[S].to][G.getAttribute(J[S].to)]=
-G;null!=P&&"link"!=P&&(E.setLinkForCell(G,G.getAttribute(P)),E.setAttributeForCell(G,P,null));E.fireEvent(new mxEventObject("cellsInserted","cells",[G]));var X=this.editor.graph.getPreferredSizeForCell(G);G.vertex&&(null!=m&&null!=G.getAttribute(m)&&(G.geometry.x=K+parseFloat(G.getAttribute(m))),null!=w&&null!=G.getAttribute(w)&&(G.geometry.y=z+parseFloat(G.getAttribute(w))),"@"==l.charAt(0)&&null!=G.getAttribute(l.substring(1))?G.geometry.width=parseFloat(G.getAttribute(l.substring(1))):G.geometry.width=
-"auto"==l?X.width+C:parseFloat(l),"@"==n.charAt(0)&&null!=G.getAttribute(n.substring(1))?G.geometry.height=parseFloat(G.getAttribute(n.substring(1))):G.geometry.height="auto"==n?X.height+C:parseFloat(n),A+=G.geometry.height+F);c.push(E.addCell(G))}}for(var Z=c.slice(),U=c.slice(),S=0;S<J.length;S++)for(var W=J[S],Q=0;Q<c.length;Q++){var G=c[Q],ha=G.getAttribute(W.from);if(null!=ha){E.setAttributeForCell(G,W.from,null);for(var ia=ha.split(","),M=0;M<ia.length;M++){var ba=d[W.to][ia[M]];null!=ba&&(I=
-W.label,null!=W.fromlabel&&(I=(G.getAttribute(W.fromlabel)||"")+(I||"")),null!=W.tolabel&&(I=(I||"")+(ba.getAttribute(W.tolabel)||"")),U.push(E.insertEdge(null,null,I||"",W.invert?ba:G,W.invert?G:ba,W.style||E.createCurrentEdgeStyle())),mxUtils.remove(W.invert?G:ba,Z))}}}if(null!=V)for(Q=0;Q<c.length;Q++)for(G=c[Q],M=0;M<V.length;M++)E.setAttributeForCell(G,mxUtils.trim(V[M]),null);var da=new mxParallelEdgeLayout(E);da.spacing=q;var ja=function(){da.execute(E.getDefaultParent());for(var a=0;a<c.length;a++){var b=
-E.getCellGeometry(c[a]);b.x=Math.round(E.snap(b.x));b.y=Math.round(E.snap(b.y));"auto"==l&&(b.width=Math.round(E.snap(b.width)));"auto"==n&&(b.height=Math.round(E.snap(b.height)))}};if("circle"==B){var ea=new mxCircleLayout(E);ea.resetEdges=!1;var ka=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(E.getDefaultParent());ja()},!0,D);D=null}else if("horizontaltree"==B||"verticaltree"==B||"auto"==B&&U.length==
-2*c.length-1&&1==Z.length){E.view.validate();var fa=new mxCompactTreeLayout(E,"horizontaltree"==B);fa.levelDistance=F;fa.edgeRouting=!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(E.getDefaultParent(),0<Z.length?Z[0]:null)},!0,D);D=null}else if("horizontalflow"==B||"verticalflow"==B||"auto"==B&&1==Z.length){E.view.validate();var ga=new mxHierarchicalLayout(E,"horizontalflow"==B?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ga.intraCellSpacing=F;ga.disableEdgeStyle=!1;this.executeLayout(function(){ga.execute(E.getDefaultParent(),
-U);E.moveCells(U,K,z)},!0,D);D=null}else if("organic"==B||"auto"==B&&U.length>c.length){E.view.validate();var ca=new mxFastOrganicLayout(E);ca.forceConstant=3*F;ca.resetEdges=!1;var la=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(c,a)};da=new mxParallelEdgeLayout(E);da.spacing=q;this.executeLayout(function(){ca.execute(E.getDefaultParent());ja()},!0,D);D=null}this.hideDialog()}finally{E.model.endUpdate()}null!=D&&D()}}catch(ma){this.handleError(ma)}};
-EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
-null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
-b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=0;null==this.drive&&"function"!==typeof window.DriveClient||
-c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.trello&&"function"!==typeof window.TrelloClient||c++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&c++;mxClient.IS_IOS||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("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d);
-a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=
-this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
-"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,f=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
-"min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
-IMAGE_PATH+'/clear.gif"/>'}a!=f&&(this.offlineStatus.innerHTML=b,f=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),d=this.getCurrentFile(),e=null!=d||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=d&&d.isEditable()&&d.isAutosaveOptional());
-this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);
-this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=d);this.actions.get("makeCopy").setEnabled(null!=d&&!d.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("publishLink").setEnabled(null!=d&&!d.isRestricted());this.actions.get("tags").setEnabled(b&&(null==d||!d.isRestricted()));this.actions.get("find").setEnabled(e);this.actions.get("layers").setEnabled(e);this.actions.get("outline").setEnabled(e);
-this.actions.get("rename").setEnabled(null!=d&&d.isRenamable());this.actions.get("close").setEnabled(null!=d);this.menus.get("publish").setEnabled(null!=d&&!d.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,f,k){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,f,k)),"image/svg+xml");else{var g=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),m=Math.floor(h.width*f/c.view.scale),l=Math.floor(h.height*f/c.view.scale);
-g.length<=MAX_REQUEST_SIZE&&m*l<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+l+"&border="+k+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
-setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
-a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=
-a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
-setCurrentVertexStyle:function(a){mxSettings.settings.currentVertexStyle=a},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(a){mxSettings.settings.createTarget=a},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(a){mxSettings.settings.pageFormat=a},init:function(){mxSettings.settings={language:"",configVersion:Editor.configVersion,libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,c,b,d,e,g,w){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var f=this.getBaseFilename(),h=f+"."+a;if("xml"==a){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(c?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(h,a,l,"text/xml")}else if("html"==
+a)l=this.getHtml2(this.getFileData(!0),this.editor.graph,f),this.saveData(h,a,l,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?h=f+".png":"jpeg"==a&&(h=f+".jpg"),this.saveRequest(h,a,mxUtils.bind(this,function(c,b){try{var f=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var h=this.createDownloadRequest(c,a,d,b,w);this.editor.graph.pageVisible=f;return h}catch(B){this.handleError(B)}}));else{var m=null,
+t=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var u=this.editor.graph.background;if(w||u==mxConstants.NONE)u=null;var k=this.editor.graph.getSvg(u,null,null,null,null,d);b&&this.editor.graph.addSvgShadow(k);this.convertImages(k,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 h=f+".svg",m=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,c,b,d,e){var f=this.editor.graph.getGraphBounds();b=this.getFileData(!0,null,null,null,b,"xmlpng"!=c);var h="";if(f.width*f.height>MAX_AREA||b.length>
+MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};f="0";if("xmlpng"==c&&(f="1",c="png",null!=this.pages&&null!=this.currentPage))for(var m=0;m<this.pages.length;m++)if(this.pages[m]==this.currentPage){h="&from="+m;break}m=this.editor.graph.background;"png"==c&&e&&(m=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+c+h+"&bg="+(null!=m?m:mxConstants.NONE)+"&base64="+d+"&embedXml="+f+"&xml="+encodeURIComponent(b)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=
+function(a,c){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,c,b){var f=window.location.hash,h=mxUtils.bind(this,function(b){var h=null!=a.data?a.data:"";null!=b&&0<b.length&&(0<h.length&&(h+="\n"),h+=b);b=new LocalFile(this,"csv"!=a.format&&0<h.length?h:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);b.getHash=function(){return f};this.fileLoaded(b);"csv"==a.format&&this.importCsv(h,mxUtils.bind(this,function(a){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var d=null!=a.interval?parseInt(a.interval):6E4,l=null,m=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()),e()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+e=mxUtils.bind(this,function(){window.clearTimeout(l);l=window.setTimeout(m,d)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){e();m()}));e();m()}null!=c&&c()});if(null!=a.url){var d=a.url;/^https?:\/\//.test(d)&&!this.isCorsEnabledForUrl(d)&&(d=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(d,mxUtils.bind(this,function(a){h(a)}),mxUtils.bind(this,function(a){null!=b&&b(a)}))}else h(a.data)};EditorUi.prototype.updateDiagram=function(a){function c(a){var c=new mxCellOverlay(a.image||
+d.warningImage,a.tooltip,a.align,a.valign,a.offset);c.addListener(mxEvent.CLICK,function(c,b){editorUi.alert(a.tooltip)});return c}var b=null;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var d=this.editor.graph,e=d.getModel();e.beginUpdate();var g=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var w=e.getCell(a.getAttribute("id"));if(null!=w){try{var k=a.getAttribute("value");if(null!=k){var n=mxUtils.parseXml(k).documentElement;
+if(null!=n)if("1"==n.getAttribute("replace-value"))e.setValue(w,n);else for(var l=n.attributes,v=0;v<l.length;v++)d.setAttributeForCell(w,l[v].nodeName,0<l[v].nodeValue.length?l[v].nodeValue:null)}}catch(B){null!=window.console&&console.log("Error in value for "+w.id+": "+B)}try{var p=a.getAttribute("style");null!=p&&d.model.setStyle(w,p)}catch(B){null!=window.console&&console.log("Error in style for "+w.id+": "+B)}try{var q=a.getAttribute("icon");if(null!=q){var y=0<q.length?JSON.parse(q):null;null!=
+y&&y.append||d.removeCellOverlays(w);null!=y&&d.addCellOverlay(w,c(y))}}catch(B){null!=window.console&&console.log("Error in icon for "+w.id+": "+B)}try{var E=a.getAttribute("geometry");if(null!=E){var E=JSON.parse(E),C=d.getCellGeometry(w);if(null!=C){C=C.clone();for(key in E){var A=parseFloat(E[key]);"dx"==key?C.x+=A:"dy"==key?C.y+=A:"dw"==key?C.width+=A:"dh"==key?C.height+=A:C[key]=parseFloat(E[key])}d.model.setGeometry(w,C)}}}catch(B){null!=window.console&&console.log("Error in icon for "+w.id+
+": "+B)}}}else if("model"==a.nodeName){for(var J=a.firstChild;null!=J&&J.nodeType!=mxConstants.NODETYPE_ELEMENT;)J=J.nextSibling;null!=J&&(new mxCodec(a.firstChild)).decode(J,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(d.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))d.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(g=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
+1);a=a.nextSibling}}finally{e.endUpdate()}null!=g&&this.chromelessResize&&this.chromelessResize(!0,g)}return b};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();
+this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
+this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
+this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(t){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(t){}}catch(t){null!=
+window.console&&console.log("error in fileLoaded:",a,t);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=t&&null!=t.message?":err:"+encodeURIComponent(t.message):"")+(null!=t&&null!=t.stack?"&stack="+encodeURIComponent(t.stack):"")}catch(u){}this.handleError(t,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){if(EditorUi.enableLogging)try{var c=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=c+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+
+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(h){}};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,c,b,d,e,g,w){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=
+function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=
+function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,c,b){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
+(this.scratchpad=a);var f=this.sidebar.palettes[a.getHash()],f=null!=f?f[f.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var h=null,d=mxUtils.bind(this,function(c,b){if(0==c.length&&a.isEditable())null==h&&(h=document.createElement("div"),mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),h.style.border="3px dotted lightGray",h.style.textAlign="center",h.style.padding="8px",h.style.color="#B3B3B3",mxUtils.write(h,mxResources.get("dragElementsHere"))),b.appendChild(h);else for(var f=
+0;f<c.length;f++){var l=c[f],d=l.data;if(null!=d){var d=this.convertDataUri(d),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+d,l.w,l.h,"",l.title||"",!1,!1,!0))}else null!=l.xml&&(d=this.stringToCells(this.editor.graph.decompress(l.xml)),0<d.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(d,l.w,l.h,l.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
+c)for(var e=0;e<c.length;e++)mxUtils.bind(this,function(a){var c=a.data;null!=c&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){c=this.convertDataUri(c);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+c,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var c=this.stringToCells(this.editor.graph.decompress(a.xml));
+return this.sidebar.createVertexTemplateFromCells(c,a.w,a.h,a.title||"",!0,!1,!0)}))})(c[e]);b=null!=b&&0<b.length?b:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),b,!0,mxUtils.bind(this,function(a){d(c,a)}));this.repositionLibrary(f);var k=g.parentNode.previousSibling;b=k.getAttribute("title");null!=b&&0<b.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+b);var l=document.createElement("div");l.style.position="absolute";l.style.right="0px";l.style.top=
+"0px";l.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(l.style.backgroundColor="inherit");k.style.position="relative";var v=document.createElement("img");v.setAttribute("src",Dialog.prototype.closeImage);v.setAttribute("title",mxResources.get("close"));v.setAttribute("valign","absmiddle");v.setAttribute("border","0");v.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)l.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));if(a.isEditable()){var p=this.editor.graph,q=null,E=mxUtils.bind(this,function(b){this.showLibraryDialog(a.getTitle(),g,c,a,a.getMode());mxEvent.consume(b)}),C=mxUtils.bind(this,function(b){a.setModified(!0);a.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=v.cloneNode(!1),
+q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",l.insertBefore(q,l.firstChild),k.style.paddingRight=18*l.childNodes.length+"px",this.saveLibrary(a.getTitle(),c,a,a.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),k.style.paddingRight=18*l.childNodes.length+"px")})):null==n&&(n=v.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",
+mxResources.get("save")),l.insertBefore(n,l.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,function(b){this.saveLibrary(a.getTitle(),c,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(k.style.paddingRight=18*l.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(b)})),k.style.paddingRight=18*l.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,b,f,l){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var d=
+0;d<a.length;d++){var e=p.getCellGeometry(a[d]);null!=e&&e.translate(-b.x,-b.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,b.width,b.height,l||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:b.width,h:b.height};null!=l&&(a.title=l);c.push(a);C(f);null!=h&&null!=h.parentNode&&0<c.length&&(h.parentNode.removeChild(h),h=null)}),J=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),
+p.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=p.getSelectionCells(),b=p.view.getBounds(c),f=p.view.scale;b.x/=f;b.y/=f;b.width/=f;b.height/=f;b.x-=p.view.translate.x;b.y-=p.view.translate.y;A(c,b)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility=
+"hidden",null!=h?h.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",p.panningManager.stop(),p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(g.style.border="3px solid transparent",null!=h&&(h.style.border="3px dotted lightGray"),
+g.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,J(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility=
+"visible"),null!=h&&(h.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=h?h.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=h&&(h.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(b,f,l,e,m,v,t,w,k){if(null!=b&&"image/"==f.substring(0,6))b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(b),b=[new mxCell("",new mxGeometry(0,0,m,v),b)],b[0].vertex=!0,A(b,new mxRectangle(0,0,m,v),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=h&&null!=h.parentNode&&
+0<c.length&&(h.parentNode.removeChild(h),h=null);else{var u=!1,n=mxUtils.bind(this,function(b,f){if(null!=b&&"text/xml"==f){var l=mxUtils.parseXml(b);if("mxlibrary"==l.documentElement.nodeName)try{var e=JSON.parse(mxUtils.getTextContent(l.documentElement));d(e,g);c=c.concat(e);C(a);this.spinner.stop();u=!0}catch(U){}else if("mxfile"==l.documentElement.nodeName)try{for(var m=l.documentElement.getElementsByTagName("diagram"),l=0;l<m.length;l++){var e=mxUtils.getTextContent(m[l]),v=this.stringToCells(this.editor.graph.decompress(e)),
+t=this.editor.graph.getBoundingBoxFromGeometry(v);A(v,new mxRectangle(0,0,t.width,t.height),a)}u=!0}catch(U){null!=window.console&&console.log("error in drop handler:",U)}}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=h&&null!=h.parentNode&&0<c.length&&(h.parentNode.removeChild(h),h=null)});null!=k&&null!=t&&(/(\.vsdx?)($|\?)/i.test(t)||/(\.vssx)($|\?)/i.test(t))?this.importVisio(k,function(a){n(a,"text/xml")},null,t):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(b,t)&&null!=k?this.parseFile(k,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?n(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):n(b,f)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=h?h.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",
+g.style.cursor="");a.stopPropagation();a.preventDefault()}));v=v.cloneNode(!1);v.setAttribute("src",IMAGE_PATH+"/edit.gif");v.setAttribute("title",mxResources.get("edit"));l.insertBefore(v,l.firstChild);mxEvent.addListener(v,"click",E);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&E(a)});b=v.cloneNode(!1);b.setAttribute("src",Editor.plusImage);b.setAttribute("title",mxResources.get("add"));l.insertBefore(b,l.firstChild);mxEvent.addListener(b,"click",J);this.isOffline()||".scratchpad"!=
+a.title||null==EditorUi.scratchpadHelpLink||(b=document.createElement("span"),b.setAttribute("title",mxResources.get("help")),b.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(b,"?"),mxEvent.addGestureListeners(b,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),l.insertBefore(b,l.firstChild))}k.appendChild(l);k.style.paddingRight=18*l.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=
+4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("src",Dialog.prototype.closeImage);c.setAttribute("title",mxResources.get("hide"));a.appendChild(c);mxClient.IS_QUIRKS&&(c.style.position=
+"relative",c.style.styleFloat="right",c.style.top="-30px",c.style.left="164px",c.style.cursor="pointer");mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),
+Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",
+Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor=
+"#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
+EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showFooter=function(a){var c=document.getElementById("geFooter");null!=c&&(this.footerHeight=a,c.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,c,b,d,e){a=new ImageDialog(this,a,c,b,d,e);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,
+!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var 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,c,b,d,e){a=new LibraryDialog(this,a,c,b,d,e);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
+this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");c.className="geTitle";c.style.height="100%";c.style.paddingTop="9px";mxUtils.write(c,mxResources.get("moreShapes")+"...");mxEvent.addListener(c,"click",mxUtils.bind(this,
+function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(c);return a};EditorUi.prototype.handleError=function(a,c,b){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},h=null!=a&&null!=a.error?a.error:a;if(null!=h||null!=c){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok"),e=null;c=null!=c?c:mxResources.get("error");if(null!=h)if(null!=h.retry&&(d=mxResources.get("cancel"),e=function(){f();h.retry()}),"undefined"!=
+typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&h.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==h.code||404==h.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&h.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var g=window.location.hash;null!=g&&"#G"==g.substring(0,2)&&(g=g.substring(2),
+a+=' <a href="https://drive.google.com/open?id='+g+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else h.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):h.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=h.message?a=mxUtils.htmlEntities(h.message):null!=h.response&&null!=h.response.error&&(a=mxUtils.htmlEntities(h.response.error));this.showError(c,a,d,b,e)}else null!=b&&b()};EditorUi.prototype.showError=
+function(a,c,b,d,e,g,w,k,n,l,v,p){a=new ErrorDialog(this,a,c,b||mxResources.get("ok"),d,e,g,w,p,k,n);this.showDialog(a.container,l||340,v||150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,c){var b=new ErrorDialog(this,null,a,mxResources.get("ok"),c);this.showDialog(b.container,340,100,!0,!1);b.init()};EditorUi.prototype.confirm=function(a,c,b,d,e){var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){f();null!=
+c&&c()},function(){f();null!=b&&b()},d,e)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
+c,b){var f=a.toDataURL("image/"+b);if(6>=f.length||f==a.cloneNode(!1).toDataURL("image/"+b))throw{message:"Invalid image"};null!=c&&(f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(c))));return f};EditorUi.prototype.saveCanvas=function(a,c,b){var f="jpeg"==b?"jpg":b,h=this.getBaseFilename()+"."+f;a=this.createImageDataUri(a,c,b);this.saveData(h,f,a.substring(a.lastIndexOf(",")+1),"image/"+b,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
+(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,c,b,d,e){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,b):new Blob([a],{type:b}),navigator.msSaveOrOpenBlob(a,c);else if(mxClient.IS_IE)b=window.open("about:blank","_blank"),null==b?mxUtils.popup(a,!0):(b.document.write(a),
+b.document.close(),b.document.execCommand("SaveAs",!0,c),b.close());else if(mxClient.IS_IOS)c=new TextareaDialog(this,c+":",a,null,null,mxResources.get("close")),c.textarea.style.width="600px",c.textarea.style.height="380px",this.showDialog(c.container,620,460,!0,!0),c.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a"),h=!mxClient.IS_SF&&"undefined"!==typeof f.download;if(mxClient.IS_GC)var m=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),h=65==(m?parseInt(m[2],
+10):!1)?!1:h;if(h||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,b):new Blob([a],{type:b}));h?f.download=c:f.setAttribute("target","_blank");document.body.appendChild(f);try{window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.click(),f.parentNode.removeChild(f)}catch(D){}}else this.createEchoRequest(a,c,b,d,e).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,c,b,d,e,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+b?"&mime="+b:"")+(null!=e?"&format="+e:"")+(null!=g?"&base64="+g:"")+(null!=c?"&filename="+encodeURIComponent(c):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,c){c=c||"";for(var b=atob(a),f=b.length,d=Math.ceil(f/1024),e=Array(d),g=0;g<d;++g){for(var k=1024*g,n=Math.min(k+1024,f),l=Array(n-k),v=0;k<n;++v,++k)l[v]=b[k].charCodeAt(0);e[g]=new Uint8Array(l)}return new Blob(e,{type:c})};EditorUi.prototype.saveLocalFile=function(a,c,b,d,e,g,w){g=null!=g?g:!1;w=null!=w?w:"vsdx"!=e&&
+(!mxClient.IS_IOS||!navigator.standalone);e=this.getServiceCount(g);c=new CreateDialog(this,c,mxUtils.bind(this,function(c,f){try{if("_blank"==f)if(null==b||"image/"!=b.substring(0,6)||"image/svg"==b.substring(0,9)&&!mxClient.IS_SVG){var h=window.open("about:blank");null==h?mxUtils.popup(a,!0):(h.document.write(mxUtils.htmlEntities(a,!1)),h.document.close())}else this.openInNewWindow(a,b,d);else f==App.MODE_DEVICE||"download"==f?this.doSaveLocalFile(a,c,b,d):null!=c&&0<c.length&&this.pickFolder(f,
+mxUtils.bind(this,function(h){try{this.exportFile(a,c,b,d,f,h)}catch(G){this.handleError(G)}}))}catch(v){this.handleError(v)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,w,null,1<e,4<e&&(!g||6>e)?3:4,a,b,d);this.showDialog(c.container,420,e==(mxClient.IS_IOS?0:1)?160:4<e?390:270,!0,!0);c.init()};EditorUi.prototype.openInNewWindow=function(a,c,b){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=
+window.open("about:blank");null==f?mxUtils.popup(a,!0):("image/svg+xml"==c?f.document.write("<html>"+a+"</html>"):f.document.write('<html><img src="data:'+c+(b?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),f.document.close())}else f=window.open("data:"+c+(b?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0)};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=
+null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var f=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=f.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.exportDialog.style.zIndex=f.zIndex;var h=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});h.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){h.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
+a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,c,b,d,e){this.isLocalFileSave()?this.saveLocalFile(b,a,d,e,c):this.saveRequest(a,c,mxUtils.bind(this,function(a,f){return this.createEchoRequest(b,a,d,e,c,f)}),b,e,d)};EditorUi.prototype.saveRequest=function(a,c,b,d,e,g,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,f){if("_blank"==f||null!=
+a&&0<a.length){var h=b("_blank"==f?null:a,f==App.MODE_DEVICE||"download"==f||null==f||"_blank"==f?"0":"1");null!=h&&(f==App.MODE_DEVICE||"download"==f||"_blank"==f?h.simulate(document,"_blank"):this.pickFolder(f,mxUtils.bind(this,function(b){g=null!=g?g:"pdf"==c?"application/pdf":"image/"+c;if(null!=d)try{this.exportFile(d,a,g,!0,f,b)}catch(z){this.handleError(z)}else this.spinner.spin(document.body,mxResources.get("saving"))&&h.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=h.getStatus()&&
+299>=h.getStatus())try{this.exportFile(h.getText(),a,g,!0,f,b)}catch(z){this.handleError(z)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,k,null,1<f,4<f?3:4,d,g,e);this.showDialog(a.container,380,f==(mxClient.IS_IOS?0:1)?160:4<f?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
+EditorUi.prototype.exportFile=function(a,c,b,d,e,g){};EditorUi.prototype.pickFolder=function(a,c,b){c(null)};EditorUi.prototype.exportSvg=function(a,c,b,d,e,g,k,n,p){if(this.spinner.spin(document.body,mxResources.get("export"))){var f=this.editor.graph.isSelectionEmpty();b=null!=b?b:f;f=c?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==c&&(f="#ffffff");var h=this.editor.graph.getSvg(f,a,k,n,null,b);d&&this.editor.graph.addSvgShadow(h);var m=this.getBaseFilename()+".svg",
+w=mxUtils.bind(this,function(a){this.spinner.stop();e&&a.setAttribute("content",this.getFileData(!0,null,null,null,b,p));if(null!=this.editor.fontCss){var c=a.ownerDocument,c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(c)}var f='<!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()||f.length<=MAX_REQUEST_SIZE?this.saveData(m,"svg",f,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(f)}))});this.convertMath(this.editor.graph,h,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,w,this.thumbImageCache)):w(h)}))}};EditorUi.prototype.addCheckbox=function(a,c,b,d,e,g){g=null!=g?g:!0;var f=
+document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");b&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");g&&(a.appendChild(f),b=document.createElement("span"),mxUtils.write(b,c),a.appendChild(b),e||mxUtils.br(a),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){"disabled"!=f.getAttribute("disabled")&&(f.checked=!f.checked,mxEvent.consume(a))})));return f};EditorUi.prototype.addEditButton=
+function(a,c){var b=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);b.style.marginLeft="24px";var f=this.getCurrentFile(),d="";null!=f&&f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("makeCopy"));e.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","custom");mxUtils.write(f,mxResources.get("custom")+"...");e.appendChild(f);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,d,mxResources.get("ok"),function(a){null!=a?d=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(b,"change",mxUtils.bind(this,function(){b.checked&&(null==c||
+c.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return b.checked?"blank"===e.value?"_blank":d:null},getEditInput:function(){return b},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,c){function b(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var f=document.createElement("select");f.style.width="100px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));f.appendChild(d);d=document.createElement("option");
+d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));f.appendChild(d);c&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),f.appendChild(d));a.appendChild(f);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;b()});mxEvent.consume(a)}));b();g.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return f.value},focus:function(){f.focus()}}};EditorUi.prototype.createLink=function(a,c,b,d,e,g,k,n){var f=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+
+a),null!=c&&c!=mxConstants.NONE&&h.push("highlight="+("#"==c.charAt(0)?c.substring(1):c)),null!=e&&0<e.length&&h.push("edit="+encodeURIComponent(e)),g&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));if(b&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&h.push("page="+a);break}a=!0;null!=k?b="#U"+encodeURIComponent(k):(f=this.getCurrentFile(),n||null==f||f.constructor!=window.DriveFile?b="#R"+encodeURIComponent(b?
+this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(b="#"+f.getHash(),a=!1));a&&null!=f&&null!=f.getTitle()&&f.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(f.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<h.length?"?"+h.join("&"):"")+b};EditorUi.prototype.createHtml=function(a,
+c,b,d,e,g,k,n,p,l,v){this.getBasenames();var f={};""!=e&&e!=mxConstants.NONE&&(f.highlight=e);"auto"!==d&&(f.target=d);p||(f.lightbox=!1);f.nav=this.editor.graph.foldingEnabled;b=parseInt(b);isNaN(b)||100==b||(f.zoom=b/100);b=[];k&&(b.push("pages"),f.resize=!0,null!=this.pages&&null!=this.currentPage&&(f.page=mxUtils.indexOf(this.pages,this.currentPage)));c&&(b.push("zoom"),f.resize=!0);n&&b.push("layers");0<b.length&&(p&&b.push("lightbox"),f.toolbar=b.join(" "));null!=l&&0<l.length&&(f.edit=l);null!=
+a?f.url=a:f.xml=this.getFileData(!0,null,null,null,null,!k);c='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=b?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(f))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";v(c,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,c,b,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("html"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(e);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");e=g.cloneNode(!0);e.setAttribute("value","copy");h.appendChild(e);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(m);mxUtils.br(h);h.appendChild(g);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));h.appendChild(m);var l=this.getCurrentFile();null==b&&null!=l&&l.constructor==window.DriveFile&&(m=
+document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(l.getId())})));e.setAttribute("checked","checked");null==b&&g.setAttribute("disabled","disabled");f.appendChild(h);var v=this.addLinkSection(f),k=this.addCheckbox(f,mxResources.get("zoom"),!0,null,!0);mxUtils.write(f,
+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";f.appendChild(n);var p=this.addCheckbox(f,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,q=q=this.addCheckbox(f,mxResources.get("allPages"),h,!h),C=this.addCheckbox(f,mxResources.get("layers"),!0),A=this.addCheckbox(f,mxResources.get("lightbox"),!0),J=this.addEditButton(f,A),B=J.getEditInput();
+B.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled");B.checked&&A.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,f,mxUtils.bind(this,function(){d(g.checked?b:null,k.checked,n.value,v.getTarget(),v.getColor(),p.checked,q.checked,C.checked,A.checked,J.getLink())}),null,a,c);this.showDialog(a.container,340,384,!0,!0);e.focus()};
+EditorUi.prototype.showPublishLinkDialog=function(a,c,b,d,e,g){var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(h);var m=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=m&&m.constructor==window.DriveFile&&!c){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",
+l=document.createElement("div");l.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var v=document.createElement("div");v.style.whiteSpace="normal";mxUtils.write(v,mxResources.get("linkAccountRequired"));l.appendChild(v);v=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(m.getId())}));v.style.marginTop="12px";v.className="geBtn";l.appendChild(v);f.appendChild(l);v=document.createElement("a");
+v.style.paddingLeft="12px";v.style.color="gray";v.style.fontSize="11px";v.setAttribute("href","javascript:void(0);");mxUtils.write(v,mxResources.get("check"));l.appendChild(v);mxEvent.addListener(v,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(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 k=null,n=null;if(null!=b||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),k=document.createElement("input"),k.setAttribute("type","text"),k.style.marginRight="16px",k.style.width="50px",k.style.marginLeft="6px",k.style.marginRight="16px",k.style.marginBottom="10px",k.value="100%",f.appendChild(k),mxUtils.write(f,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",
+n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=d+"px",f.appendChild(n),mxUtils.br(f);var t=this.addLinkSection(f,g);b=null!=this.pages&&1<this.pages.length;var p=null;if(null==m||m.constructor!=window.DriveFile||c)p=this.addCheckbox(f,mxResources.get("allPages"),b,!b);var u=this.addCheckbox(f,mxResources.get("lightbox"),!0),q=this.addEditButton(f,u),J=q.getEditInput(),B=this.addCheckbox(f,mxResources.get("layers"),!0);B.style.marginLeft=J.style.marginLeft;B.style.marginBottom="16px";
+B.style.marginTop="8px";mxEvent.addListener(u,"change",function(){u.checked?(B.removeAttribute("disabled"),J.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),J.setAttribute("disabled","disabled"));J.checked&&u.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){e(t.getTarget(),t.getColor(),null==p?!0:p.checked,u.checked,q.getLink(),B.checked,null!=k?k.value:null,null!=
+n?n.value:null)}),null,mxResources.get("create"),h);this.showDialog(c.container,340,254+a,!0,!0);null!=k?(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?k.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,c,b,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(e);var h=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),!0),e=this.editor.graph,m=d?null:this.addCheckbox(f,mxResources.get("transparentBackground"),e.background==mxConstants.NONE||null==e.background);null!=m&&(m.style.marginBottom="16px");a=new CustomDialog(this,f,mxUtils.bind(this,function(){b(!h.checked,null!=g?g.checked:!1,null!=m?m.checked:!1)}),null,a,c);this.showDialog(a.container,
+300,d?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,c,b,d,e,g,k,n){k=null!=k?k:!0;var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=this.editor.graph,m="jpeg"==n?196:300,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";f.appendChild(t);mxUtils.write(f,mxResources.get("zoom")+":");var w=document.createElement("input");w.setAttribute("type","text");w.style.marginRight="16px";w.style.width=
+"60px";w.style.marginLeft="4px";w.style.marginRight="12px";w.value=this.lastExportZoom||"100%";f.appendChild(w);mxUtils.write(f,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||"0";f.appendChild(p);mxUtils.br(f);var u=this.addCheckbox(f,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=
+n),q=this.addCheckbox(f,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.style.marginLeft="24px";x.setAttribute("disabled","disabled");x.setAttribute("type","checkbox");g&&(f.appendChild(x),mxUtils.write(f,mxResources.get("crop")),mxUtils.br(f),m+=26,mxEvent.addListener(q,"change",function(){q.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(x.setAttribute("checked",
+"checked"),x.defaultChecked=!0);var J=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||B.setAttribute("disabled","disabled");c&&(f.appendChild(B),mxUtils.write(f,mxResources.get("embedImages")),mxUtils.br(f),m+=26);var L=this.addCheckbox(f,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=n),H=null!=this.pages&&1<this.pages.length,
+F=this.addCheckbox(f,H?mxResources.get("allPages"):"",H,!H,null,"jpeg"!=n);F.style.marginLeft="24px";F.style.marginBottom="16px";H||(F.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&H?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")});k&&H||F.setAttribute("disabled","disabled");a=new CustomDialog(this,f,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=w.value;e(w.value,u.checked,!q.checked,J.checked,L.checked,B.checked,
+p.value,x.checked,!F.checked)}),null,b,d);this.showDialog(a.container,340,m,!0,!0);w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,c,b,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=c){var g=document.createElement("h3");mxUtils.write(g,c);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+f.appendChild(g)}var m=this.addCheckbox(f,mxResources.get("fit"),!0),l=this.addCheckbox(f,mxResources.get("shadow"),h.shadowVisible&&d,!d),v=this.addCheckbox(f,b),k=this.addCheckbox(f,mxResources.get("lightbox"),!0),n=this.addEditButton(f,k),t=n.getEditInput(),p=1<h.model.getChildCount(h.model.getRoot()),q=this.addCheckbox(f,mxResources.get("layers"),p,!p);q.style.marginLeft=t.style.marginLeft;q.style.marginBottom="12px";q.style.marginTop="8px";mxEvent.addListener(k,"change",function(){k.checked?
+(p&&q.removeAttribute("disabled"),t.removeAttribute("disabled")):(q.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&k.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});c=new CustomDialog(this,f,mxUtils.bind(this,function(){a(m.checked,l.checked,v.checked,k.checked,n.getLink(),q.checked)}),null,mxResources.get("embed"),e);this.showDialog(c.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,c,b,d,e,g,k,n){function f(c){var f=" ",l="";d&&(f=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");
+a&&(l+="max-width:100%;");var m="";b&&(m=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+c+'"'+m+(""!=l?' style="'+l+'"':"")+f+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var c=d?this.getFileData(!0):null;a=this.createImageDataUri(a,c,"png");f(a)}),null,null,null,mxUtils.bind(this,function(a){n({message:mxResources.get("unknownError")})}),null,!0,b?2:1,null,c);else if(c=this.getFileData(!0),
+h.width*h.height<=MAX_AREA&&c.length<=MAX_REQUEST_SIZE){var m="";b&&(m="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var t=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+m+"&xml="+encodeURIComponent(c));t.send(mxUtils.bind(this,function(){200<=t.getStatus()&&299>=t.getStatus()?f("data:image/png;base64,"+t.getText()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+c,b,d,e,g,k){var f=this.editor.graph.getSvg(),h=f.getElementsByTagName("a");if(null!=h)for(var l=0;l<h.length;l++){var m=h[l].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==h[l].getAttribute("target")&&h[l].removeAttribute("target")}d&&f.setAttribute("content",this.getFileData(!0));c&&this.editor.graph.addSvgShadow(f);if(b){var n=" ",t="";d&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",t+="cursor:pointer;");a&&(t+="max-width:100%;");this.convertImages(f,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=t?' style="'+t+'"':"")+n+"/>")}))}else t="",d&&(f.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(e?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),t+="cursor:pointer;"),a&&(a=parseInt(f.getAttribute("width")),c=parseInt(f.getAttribute("height")),f.setAttribute("viewBox","0 0 "+a+" "+c),t+="max-width:100%;max-height:"+c+"px;",f.removeAttribute("height")),""!=t&&f.setAttribute("style",t),k(mxUtils.getXml(f))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+" "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,c,b,d){d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,c){if(null!=a){var b=null;if("diagram"==a.nodeName)b=a;else if("mxfile"==a.nodeName){var f=a.getElementsByTagName("diagram");if(0<
+f.length){var b=f[0],d=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a?b.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:d.apply(this,arguments)}}}null!=b&&(f=c.decompress(mxUtils.getTextContent(b)),null!=f&&0<f.length&&(a=mxUtils.parseXml(f).documentElement))}f=this.editor.graph;try{this.editor.graph=c,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=f}return a};EditorUi.prototype.getEmbeddedPng=function(a,c,b){var f=this.editor.graph,
+d=null;if(null!=b&&0<b.length)f=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(f.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(b).documentElement,!0),f),d=b;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var f=this.createTemporaryGraph(f.getStylesheet()),e=f.getGlobalVariable,h=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(f.container);
+f.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(b){try{null==d&&(d=this.getFileData(!0));var e=b.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(d)));a(e.substring(e.lastIndexOf(",")+1));f!=this.editor.graph&&f.container.parentNode.removeChild(f.container)}catch(l){null!=c&&c(l)}}),null,null,null,mxUtils.bind(this,function(a){null!=c&&c(a)}),null,null,null,null,f.shadowVisible,null,f)};EditorUi.prototype.getEmbeddedSvg=
+function(a,c,b,d,e,g,k){k=c.background;k==mxConstants.NONE&&(k=null);c=c.getSvg(k,null,null,null,null,g);null!=a&&c.setAttribute("content",a);null!=b&&c.setAttribute("resource",b);if(null!=e)this.convertImages(c,mxUtils.bind(this,function(a){e((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(c)};EditorUi.prototype.exportImage=function(a,c,b,d,e,g,k,n,p){p=null!=p?p:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var f=this.editor.graph.isSelectionEmpty();b=null!=b?b:f;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,b,n):null,p)}catch(G){"Invalid image"==G.message?this.downloadFile(p):this.handleError(G)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,b,a||1,c,d,null,null,g,k)}catch(v){this.spinner.stop(),this.handleError(v)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),d=0,e={},g=mxUtils.bind(this,function(){if(0==d){for(var f=[b[0]],h=1;h<b.length;h++){var l=
+b[h].indexOf(")");f.push('url("');f.push(e[c(b[h].substring(0,l))]);f.push('"'+b[h].substring(l))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var n=b[k].indexOf(")"),p=null,l=b[k].indexOf("format(",n);0<l&&(p=c(b[k].substring(l+7,b[k].indexOf(")",l))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;d++;var c="application/x-font-ttf";if("svg"==p||/(\.svg)($|\?)/i.test(a))c="image/svg+xml";else if("otf"==p||"embedded-opentype"==p||/(\.otf)($|\?)/i.test(a))c=
+"application/x-font-opentype";else if("woff"==p||/(\.woff)($|\?)/i.test(a))c="application/font-woff";else if("woff2"==p||/(\.woff2)($|\?)/i.test(a))c="application/font-woff2";else if("eot"==p||/(\.eot)($|\?)/i.test(a))c="application/vnd.ms-fontobject";else if("sfnt"==p||/(\.sfnt)($|\?)/i.test(a))c="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(c){e[a]=c;d--;g()}),mxUtils.bind(this,
+function(a){d--;g()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c(b[k].substring(0,n)),p)}}else a()};EditorUi.prototype.exportToCanvas=function(a,c,b,d,e,g,k,n,p,l,v,q,z,y){g=null!=g?g:!0;q=null!=q?q:this.editor.graph;z=null!=z?z:0;var f=p?null:q.background;f==mxConstants.NONE&&(f=null);null==f&&(f=d);null==f&&0==p&&(f=this.editor.graph.defaultPageBackgroundColor);this.convertImages(q.getSvg(f,null,null,y,null,null!=k?k:!0),mxUtils.bind(this,function(b){var d=new Image;d.onload=mxUtils.bind(this,
+function(){try{var h=document.createElement("canvas"),l=parseInt(b.getAttribute("width")),m=parseInt(b.getAttribute("height"));n=null!=n?n:1;null!=c&&(n=g?Math.min(1,Math.min(3*c/(4*m),c/l)):c/l);l=Math.ceil(n*l)+2*z;m=Math.ceil(n*m)+2*z;h.setAttribute("width",l);h.setAttribute("height",m);var k=h.getContext("2d");null!=f&&(k.beginPath(),k.rect(0,0,l,m),k.fillStyle=f,k.fill());k.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(d,z/n,z/n);a(h)},0):(k.drawImage(d,z/n,z/n),a(h))}catch(M){null!=
+e&&e(M)}});d.onerror=function(a){null!=e&&e(a)};try{l&&this.editor.graph.addSvgShadow(b);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(q,b,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(b))}))});this.loadFonts(h)}catch(B){null!=e&&e(B)}}),b,v)};EditorUi.prototype.createImageUrlConverter=
+function(){var a=new mxUrlConverter;a.updateBaseUrl();var c=a.convert,b=this;a.convert=function(f){if(null!=f){var d="http://"==f.substring(0,7)||"https://"==f.substring(0,8);d&&!navigator.onLine?f=b.svgBrokenImage.src:!d||f.substring(0,a.baseUrl.length)==a.baseUrl||b.crossOriginImages&&b.isCorsEnabledForUrl(f)?"chrome-extension://"!=f.substring(0,19)&&(f=c.apply(this,arguments)):f=PROXY_URL+"?url="+encodeURIComponent(f)}return f};return a};EditorUi.prototype.convertImages=function(a,c,b,d){null==
+d&&(d=this.createImageUrlConverter());var f=0,e=b||{};b=mxUtils.bind(this,function(b,h){for(var g=a.getElementsByTagName(b),l=0;l<g.length;l++)mxUtils.bind(this,function(b){var l=d.convert(b.getAttribute(h));if(null!=l&&"data:"!=l.substring(0,5)){var g=e[l];null==g?(f++,this.convertImageToDataUri(l,function(d){null!=d&&(e[l]=d,b.setAttribute(h,d));f--;0==f&&c(a)})):b.setAttribute(h,g)}else null!=l&&b.setAttribute(h,l)})(g[l])});b("image","xlink:href");b("img","src");0==f&&c(a)};EditorUi.prototype.loadUrl=
+function(a,c,b,d,e,g){try{var f=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);e=null!=e?e:!0;var h=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var d=a.getText();if(f){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),e=0;e<a.length;e++)d[e]=
+String.fromCharCode(a[e]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}c(d)}}else null!=b&&b({code:App.ERROR_UNKNOWN},a)}),function(){null!=b&&b({code:App.ERROR_UNKNOWN})},f,this.timeout,function(){e&&null!=b&&b({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(D){null!=b&&b(D)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
+"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,c){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){c(this.createSvgDataUri(a.getText()))}),function(){c(this.svgBrokenImage.src)});else{var b=new Image,
+f=this;this.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(w){c(f.svgBrokenImage.src)}};b.onerror=function(){c(f.svgBrokenImage.src)};b.src=a}};EditorUi.prototype.importXml=function(a,c,b,d,e){c=null!=c?c:0;b=null!=b?b:0;var f=[];try{var h=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),m=this.editor.extractGraphModel(g.documentElement,
+null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var l=m.getElementsByTagName("diagram");if(1==l.length)m=mxUtils.parseXml(h.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){h.model.beginUpdate();try{for(a=0;a<l.length;a++){var k=this.updatePageRoot(new DiagramPage(l[a])),n=this.pages.length;null==k.getName()&&k.setName(mxResources.get("pageWithNumber",[n+1]));h.model.execute(new ChangePage(this,k,k,n))}}finally{h.model.endUpdate()}}}null!=m&&"mxGraphModel"===
+m.nodeName&&(f=h.importGraphModel(m,c,b,d))}}catch(z){throw e||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return f};EditorUi.prototype.importVisio=function(a,c,b,d){d=null!=d?d:a.name;b=null!=b?b:mxUtils.bind(this,function(a){this.handleError(a)});var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio)if(/(\.vsd)($|\?)/i.test(d)&&null!=VSD_CONVERT_URL){var f=new FormData;f.append("file1",a,d);var e=new XMLHttpRequest;e.open("POST",VSD_CONVERT_URL);e.responseType=
+"blob";e.onreadystatechange=mxUtils.bind(this,function(){if(4==e.readyState)if(200<=e.status&&299>=e.status)try{this.doImportVisio(e.response,c,b)}catch(x){b(x)}else b({})});e.send(f)}else try{this.doImportVisio(a,c,b)}catch(x){b(x)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,c,b,d,e){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,c,b,d,e)}catch(w){this.handleError(w)}finally{null!=e&&e()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(f,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
+mxscript("js/diagramly/Extensions.js",f):mxscript("js/extensions.min.js",f))};EditorUi.prototype.insertLucidChart=function(a,c,b,d,e){e=JSON.parse(a);a=[];if(null!=e.state){e=JSON.parse(e.state);for(var f in e.Pages)a.push(e.Pages[f]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(e);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],c,b,d),null!=this.pages){var h=this.currentPage;
+for(c=1;c<a.length;c++)this.insertPage(),this.pasteLucidChart(a[c]);this.selectPage(h)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,c,b,d,e,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
+c,b,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var f=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),l=this.importXml(h,c,b,g,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+
+1)),l=this.importXml(h,c,b,g,!0),0<l.length)return l}catch(v){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(b),d,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
+d.height)),l=Math.round(d.width*e);d=Math.round(d.height*e);f.setSelectionCell(f.insertVertex(null,null,"",f.snap(c),f.snap(b),l,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,a,f.snap(c),f.snap(b),1,1,"text;"+(d?"html=1;":"")),f.updateCellSize(e),f.fireEvent(new mxEventObject("textInserted","cells",
+[e]))}finally{f.getModel().endUpdate()}f.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,c,b,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,c,b,g);else{f=this.editor.graph;e=null;f.getModel().beginUpdate();try{e=f.insertVertex(f.getDefaultParent(),null,"",f.snap(c),f.snap(b),1,1,"text;"+(d?"html=1;":"")),f.fireEvent(new mxEventObject("textInserted","cells",[e])),e.value=
+a,f.updateCellSize(e),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(e.value)&&f.setLinkForCell(e,e.value),e.geometry.width+=f.gridSize,e.geometry.height+=f.gridSize}finally{f.getModel().endUpdate()}return[e]}}return[]};EditorUi.prototype.formatFileSize=function(a){var 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,c){return/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)};EditorUi.prototype.importFile=function(a,c,b,d,e,g,k,n,p,l,v){l=null!=l?l:!0;var f=!1,h=null,m=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,b,d,l);null!=n&&n(c)});"image"==c.substring(0,5)?(p=!1,"image/png"==c.substring(0,9)&&(c=v?null:this.extractGraphModelFromPng(a),null!=c&&0<c.length&&(h=this.importXml(c,b,d,l),p=!0)),p||(h=this.editor.graph,c=a.indexOf(";"),0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1))),l&&h.isGridEnabled()&&(b=h.snap(b),d=h.snap(d)),h=[h.insertVertex(null,null,"",b,d,e,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,b,d,l);null!=n&&n(a)})):null!=p&&null!=k&&(/(\.vsdx?)($|\?)/i.test(k)||/(\.vssx)($|\?)/i.test(k))?(f=!0,this.importVisio(p,m)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(f=!0,this.parseFile(null!=p?p:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&
+299>=a.status?m(a.responseText):null!=n&&n(null))}),k)):/(\.vsd)($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(a),b,d,!0,null,l));f||null==n||n(h);return h};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,g,k;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}k=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&
+15)<<2|(k&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return c};EditorUi.prototype.importFiles=function(a,c,b,d,e,g,k,n,p,l,v,q){c=null!=c?c:0;b=null!=b?b:0;d=null!=d?d:this.maxImageSize;l=null!=l?l:this.maxImageBytes;var f=null!=c&&null!=b,h=!0,m=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var w=v||this.resampleThreshold,t=0;t<a.length;t++)if("image/"==a[t].type.substring(0,6)&&a[t].size>w){m=!0;break}var u=mxUtils.bind(this,function(){var m=this.editor.graph,
+p=m.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,c,b,d,e,l,h,g,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,c,b,d,e,l,h,g,m,f,q)});g=null!=g?g:mxUtils.bind(this,function(a){m.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var w=a.length,t=w,u=[],x=mxUtils.bind(this,function(a,c){u[a]=c;if(0==--t){this.spinner.stop();if(null!=n)n(u);else{var b=[];m.getModel().beginUpdate();
+try{for(var f=0;f<u.length;f++){var d=u[f]();null!=d&&(b=b.concat(d))}}finally{m.getModel().endUpdate()}}g(b)}}),y=0;y<w;y++)mxUtils.bind(this,function(f){var g=a[f],n=new FileReader;n.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var n=a.target.result,w=n.indexOf(","),t=decodeURIComponent(escape(atob(n.substring(w+1)))),u=mxUtils.parseXml(t),t=u.getElementsByTagName("svg");if(0<t.length){var t=t[0],B=q?null:t.getAttribute("content");
+null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?x(f,mxUtils.bind(this,function(){try{if(n.substring(0,w+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var l=a[0],k=parseFloat(l.getAttribute("width")),v=parseFloat(l.getAttribute("height")),t=l.getAttribute("viewBox");if(null==t||0==t.length)l.setAttribute("viewBox",
+"0 0 "+k+" "+v);else if(isNaN(k)||isNaN(v)){var q=t.split(" ");3<q.length&&(k=parseFloat(q[2]),v=parseFloat(q[3]))}n=this.createSvgDataUri(mxUtils.getXml(l));var B=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,v)),x=e(n,g.type,c+f*p,b+f*p,Math.max(1,Math.round(k*B)),Math.max(1,Math.round(v*B)),g.name,h);if(isNaN(k)||isNaN(v)){var y=new Image;y.onload=mxUtils.bind(this,function(){k=Math.max(1,y.width);v=Math.max(1,y.height);x[0].geometry.width=k;x[0].geometry.height=v;l.setAttribute("viewBox",
+"0 0 "+k+" "+v);n=this.createSvgDataUri(mxUtils.getXml(l));var a=n.indexOf(";");0<a&&(n=n.substring(0,a)+n.substring(n.indexOf(",",a+1)));m.setCellStyles("image",n,[x[0]])});y.src=this.createSvgDataUri(mxUtils.getXml(l))}return x}}}catch(da){}return null})):x(f,mxUtils.bind(this,function(){return e(B,"text/xml",c+f*p,b+f*p,0,0,g.name)}))}}else{t=!1;if("image/png"==g.type){var y=q?null:this.extractGraphModelFromPng(a.target.result);if(null!=y&&0<y.length){var G=new Image;G.src=a.target.result;x(f,
+mxUtils.bind(this,function(){return e(y,"text/xml",c+f*p,b+f*p,G.width,G.height,g.name)}));t=!0}}t||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(m){this.resizeImage(m,a.target.result,mxUtils.bind(this,function(m,
+k,n){x(f,mxUtils.bind(this,function(){if(null!=m&&m.length<l){var t=h&&this.isResampleImage(a.target.result,v)?Math.min(1,Math.min(d/k,d/n)):1;return e(m,g.type,c+f*p,b+f*p,Math.round(k*t),Math.round(n*t),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,v)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else e(a.target.result,g.type,c+f*p,b+f*p,240,160,g.name,function(a){x(f,function(){return a})})});/(\.vsdx?)($|\?)/i.test(g.name)||
+/(\.vssx)($|\?)/i.test(g.name)?e(null,g.type,c+f*p,b+f*p,240,160,g.name,function(a){x(f,function(){return a})},g):"image"==g.type.substring(0,5)?n.readAsDataURL(g):n.readAsText(g)})(y)});m?this.confirmImageResize(function(a){h=a;u()},p):u()};EditorUi.prototype.confirmImageResize=function(a,c){c=null!=c?c:!1;var b=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(f,d){if(f||c)mxSettings.setResizeImages(f?
+d:null),mxSettings.save();b();a(d)};null==f||c?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){d(a,!0)},function(a){d(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,f)};EditorUi.prototype.parseFile=function(a,c,
+b){b=null!=b?b:a.name;var f=new FormData;f.append("format","xml");f.append("upfile",a,b);var d=new XMLHttpRequest;d.open("POST",OPEN_URL);d.onreadystatechange=function(){c(d)};d.send(f)};EditorUi.prototype.isResampleImage=function(a,c){c=null!=c?c:this.resampleThreshold;return a.length>c};EditorUi.prototype.resizeImage=function(a,c,b,d,e,g){e=null!=e?e:this.maxImageSize;var f=Math.max(1,a.width),h=Math.max(1,a.height);if(d&&this.isResampleImage(c,g))try{var m=Math.max(f/e,h/e);if(1<m){var l=Math.round(f/
+m),k=Math.round(h/m),n=document.createElement("canvas");n.width=l;n.height=k;n.getContext("2d").drawImage(a,0,0,l,k);var p=n.toDataURL();if(p.length<c.length){var t=document.createElement("canvas");t.width=l;t.height=k;var q=t.toDataURL();p!==q&&(c=p,f=l,h=k)}}}catch(C){}b(c,f,h)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,g=0;8>g;g++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,c,b,d){for(var f=0;f<d;f++)a=EditorUi.prototype.crcTable[(a^
+c[b+f])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,c,b,d,e){function f(a,c){var b=m;m+=c;return a.substring(b,m)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,
+4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,m);do{var l=g(a);if("IDAT"==f(a,4)){e=a.substring(0,m-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,c,0,4);d=this.updateCRC(d,b,0,b.length);e+=h(b.length)+c+b+h(d^4294967295);e+=a.substring(m-8,a.length);break}e+=a.substring(m-8,m-4+l);f(a,l);f(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var 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=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(c=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(c=a[1]));if(null!=c||"IDAT"==b)return!0}))}catch(t){}null!=
+c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c));return c};EditorUi.prototype.loadImage=function(a,c,b){var f=new Image;f.onload=function(){c(f)};null!=b&&(f.onerror=b);f.src=a};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var b=a.indexOf(",");0<b&&(a=c.getPageById(a.substring(b+1)))&&c.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var c=this,b=this.editor.graph;
+b.addListener("pageLinkClicked",function(c,b){a(b.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var d=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=c.pages&&null!=c.currentPage)for(var b=0;b<c.pages.length;b++)if(c.pages[b]==c.currentPage){0<b&&(a+=(0<a.length?"&":"?")+"page="+b);break}"1"==urlParams.dev&&(a+=(0<a.length?
+"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var e=b.addClickHandler;b.addClickHandler=function(c,f,d){var l=f;f=function(c,f){if(null==f){var d=mxEvent.getSource(c);"a"==d.nodeName.toLowerCase()&&(f=d.getAttribute("href"))}null==f||!b.isPageLink(f)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c)||(a(f),mxEvent.consume(c));null!=l&&l(c,f)};e.call(this,c,f,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);c.actions.get("print").funct=
+function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var g=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==a?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:g.apply(this,arguments)};var n=b.createLinkForHint;b.createLinkForHint=function(f,d){var e=b.isPageLink(f);if(e){var l=f.indexOf(",");
+0<l&&(l=c.getPageById(f.substring(l+1)),d=null!=l?l.getName():mxResources.get("pageNotFound"))}l=n.call(this,f,d);e&&mxEvent.addListener(l,"click",function(c){a(f);mxEvent.consume(c)});return l};var p=b.labelLinkClicked;b.labelLinkClicked=function(c,f,d){var e=f.getAttribute("href");if(null==e||!b.isPageLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))p.apply(this,arguments);else{if(!b.isEnabled()||null!=c&&b.isCellLocked(c.cell))a(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=
+function(){var a=c.defaultFilename,b=c.getCurrentFile();null!=b&&(a=null!=b.getTitle()?b.getTitle():a);return a};var q=this.actions.get("print");q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);q.visible=q.isEnabled();if(!this.editor.chromeless||this.editor.editable){var l=function(){window.setTimeout(function(){v.innerHTML="&nbsp;";v.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,
+!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||b.container.addEventListener("paste",mxUtils.bind(this,function(a){var c=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var b=a.clipboardData||a.originalEvent.clipboardData,f=!1,d=0;d<b.types.length;d++)if("text/"===b.types[d].substring(0,5)){f=!0;break}if(!f){var e=
+b.items;for(index in e){var l=e[index];if("file"===l.kind){if(c.isEditing())this.importFiles([l.getAsFile()],0,0,this.maxImageSize,function(a,b,f,d,e,l){c.insertImage(a,e,l)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()});else{var g=this.editor.graph.getInsertPoint();this.importFiles([l.getAsFile()],g.x,g.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(N){}}),!1);var v=document.createElement("div");v.style.position="absolute";
+v.style.whiteSpace="nowrap";v.style.overflow="hidden";v.style.display="block";v.contentEditable=!0;mxUtils.setOpacity(v,0);v.style.width="1px";v.style.height="1px";v.innerHTML="&nbsp;";var G=!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)||G||(v.style.left=b.container.scrollLeft+10+"px",v.style.top=b.container.scrollTop+10+"px",b.container.appendChild(v),G=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){v.focus();document.execCommand("selectAll",!1,null)},0):(v.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(){!G||224!=c&&17!=c&&91!=c||(G=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),v.parentNode.removeChild(v))}),0)}));mxEvent.addListener(v,"copy",mxUtils.bind(this,function(a){b.isEnabled()&&(mxClipboard.copy(b),this.copyCells(v),l())}));mxEvent.addListener(v,"cut",mxUtils.bind(this,function(a){b.isEnabled()&&(this.copyCells(v,!0),l())}));mxEvent.addListener(v,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(v.innerHTML=
+"&nbsp;",v.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,v);v.innerHTML="&nbsp;"}),0))}),!0);var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==v?!0:z.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var c=
+this.editor.graph,b=c.cellEditor.text2,f=null;null!=b&&(mxEvent.addListener(b,"dragleave",function(a){null!=f&&(f.parentNode.removeChild(f),f=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(a){null==f&&(!mxClient.IS_IE||10<document.documentMode)&&(f=this.highlightElement(b));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=f&&(f.parentNode.removeChild(f),f=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,function(a,b,f,d,e,l){c.insertImage(a,e,l)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var c=0;c<a.length;c++)a[c]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var b=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b)?this.loadImage(decodeURIComponent(b),mxUtils.bind(this,function(a){var f=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,f)),d/Math.max(1,a));c.insertImage(decodeURIComponent(b),f*d,a*d)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==
+typeof mxRuler){q=document.createElement("div");q.style.position="absolute";q.style.top="95px";q.style.left="250px";q.style.width="2000px";q.style.height="30px";q.style.background="whiteSmoke";document.body.appendChild(q);var y=document.createElement("div");y.style.position="absolute";y.style.top="125px";y.style.left="220px";y.style.width="30px";y.style.height="1000px";y.style.background="whiteSmoke";document.body.appendChild(y);var E=document.createElement("div");E.style.position="absolute";E.style.top=
+"95px";E.style.left="220px";E.style.width="30px";E.style.height="30px";E.style.background="whiteSmoke";document.body.appendChild(E);this.vRuler=new mxRuler(this.editor.graph,y,!0);this.hRuler=new mxRuler(this.editor.graph,q,!1)}if("1"==urlParams.test){q=document.getElementById("geFooter");null!=q&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
+"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,c){if(0<this.editor.graph.getSelectionCount()){var b=this.editor.graph.getSelectionCell(),b=this.editor.graph.getModel().getStyle(b);
+this.styleInput.value=b||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:C.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),
+A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+f=b.view.translate,d=b.view.scale,e=c.x/d-f.x,l=c.y/d-f.y;mxEvent.isAltDown(a)&&(l=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,l,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var g=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,e,l,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var h=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=h;var m=null,f=c.getElementsByTagName("img");null!=f&&1==f.length?(h=f[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(m=!0)):(c=c.getElementsByTagName("a"),null!=c&&1==c.length&&(h=c[0].getAttribute("href")));var k=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(h,e,l,!0,m,null,k))});m&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){k=
+a;n()},mxEvent.isControlDown(a)):n()}else null!=g&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)?this.loadImage(decodeURIComponent(g),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,c)),f/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",e,l,c*f,a*f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+g+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(g,
+e,l,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,l,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,c){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,c){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,c){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
+mxUtils.bind(this,function(a,c){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,c){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,c){var b=this.editor.graph;if(b.isSelectionEmpty())a.innerHTML="";else{var f=mxUtils.sortCells(b.model.getTopmostCells(b.getSelectionCells())),d=mxUtils.getXml(this.editor.graph.encodeCells(f));mxUtils.setTextContent(a,encodeURIComponent(d));c?(b.removeCells(f,
+!1),b.lastPasteXml=null):(b.lastPasteXml=d,b.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,c){if(!mxEvent.isConsumed(a)){var b=c.getElementsByTagName("span");if(null!=b&&0<b.length&&"application/vnd.lucid.chart.objects"===b[0].getAttribute("data-lucid-type")){var f=b[0].getAttribute("data-lucid-content");null!=f&&0<f.length&&(this.importLucidChart(f,0,0),mxEvent.consume(a))}else{var f=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||
+8==document.documentMode?mxUtils.getTextContent(c):c.textContent),e=!1;try{var g=d.lastIndexOf("%3E");0<=g&&g<d.length-3&&(d=d.substring(0,g+3))}catch(D){}try{var b=c.getElementsByTagName("span"),k=null!=b&&0<b.length?mxUtils.trim(decodeURIComponent(b[0].textContent)):decodeURIComponent(d);this.isCompatibleString(k)&&(e=!0,d=k)}catch(D){}f.lastPasteXml==d?f.pasteCounter++:(f.lastPasteXml=d,f.pasteCounter=0);b=f.pasteCounter*f.gridSize;if(null!=d&&0<d.length&&(e||this.isCompatibleString(d)?f.setSelectionCells(this.importXml(d,
+b,b)):(e=f.getInsertPoint(),f.isMouseInsertPoint()&&(b=0,f.lastPasteXml==d&&0<f.pasteCounter&&f.pasteCounter--),f.setSelectionCells(this.insertTextAt(d,e.x+b,e.y+b,!0))),!f.isSelectionEmpty())){f.scrollCellToVisible(f.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(f.view.getState(f.getSelectionCell()));try{mxEvent.consume(a)}catch(D){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var c=null,b=0;b<a.length;b++)mxEvent.addListener(a[b],"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[b],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==c&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(c=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[b],"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var b=this.extractGraphModelFromEvent(a);if(null==b){var f=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=f&&(10==document.documentMode||11==document.documentMode?b=f.getData("Text"):(b=null,b=0<=mxUtils.indexOf(f.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(f.types,"text/html")?f.getData("text/html"):null,null!=b&&0<b.length?(f=document.createElement("div"),f.innerHTML=b,f=f.getElementsByTagName("img"),0<f.length&&(b=f[0].getAttribute("src"))):0<=mxUtils.indexOf(f.types,"text/plain")&&(b=f.getData("text/plain"))),null!=b&&("data:image/png;base64,"==b.substring(0,22)?(b=this.extractGraphModelFromPng(b),null!=b&&0<b.length&&this.openLocalFile(b,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(b)?
+(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(b))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(b)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))))}else this.openLocalFile(b,null,!0)}a.stopPropagation();a.preventDefault()}))};
+EditorUi.prototype.highlightElement=function(a){var c=0,b=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else c=a.offsetTop,b=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=c+"px";g.style.left=b+"px";g.style.width=
+Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var c=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=c){var b=new mxCodec(c.ownerDocument),d=new mxGraphModel;b.decode(c,d);c=d.getChildAt(d.getRoot(),0);for(b=0;b<d.getChildCount(c);b++)a.push(d.getChildAt(c,b))}return a};EditorUi.prototype.openFiles=
+function(a,c){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var b=0;b<a.length;b++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){var f=b.target.result,d=a.name;if(null!=d&&0<d.length){!this.useCanvasForExport&&/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml");var e=mxUtils.bind(this,function(a){d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,c);try{this.loadLibrary(new LocalLibrary(this,a,d))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,d,c)});if(/(\.vsdx?)($|\?)/i.test(d)||/(\.vssx)($|\?)/i.test(d))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();e(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(f,d))this.parseFile(a,mxUtils.bind(this,
+function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?e(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if('{"state":"{\\"Properties\\":'==f.substring(0,26))/(\.json)$/i.test(d)&&(d=d.substring(0,d.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,d,c),this.importLucidChart(f,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));
+else if("<mxlibrary"==b.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,c);try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(f=this.extractGraphModelFromPng(f)),this.spinner.stop(),this.openLocalFile(f,d,c)}});b.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?b.readAsDataURL(a):b.readAsText(a)})(a[b])};EditorUi.prototype.openLocalFile=function(a,c,b){var f=this.getCurrentFile(),d=mxUtils.bind(this,function(){window.openFile=null;if(null==c&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var f=mxUtils.parseXml(a);null!=f&&(this.editor.setGraphXml(f.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,
+c||this.defaultFilename,b))});null!=a&&0<a.length&&(null==f||!f.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?d():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=f&&f.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,c),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
+null,d,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var c=0;c<this.pages.length;c++)this.updatePageRoot(this.pages[c]),this.addBasenamesForCell(this.pages[c].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var c=[],b;for(b in a)c.push(b);return c};EditorUi.prototype.addBasenamesForCell=function(a,c){function b(a){if(null!=a){var b=a.lastIndexOf(".");0<b&&(a=a.substring(b+1,
+a.length));null==c[a]&&(c[a]=!0)}}var f=this.editor.graph,d=f.getCellStyle(a);b(mxStencilRegistry.getBasenameForStencil(d[mxConstants.STYLE_SHAPE]));f.model.isEdge(a)&&(b(mxMarker.getPackageForType(d[mxConstants.STYLE_STARTARROW])),b(mxMarker.getPackageForType(d[mxConstants.STYLE_ENDARROW])));for(var d=f.model.getChildCount(a),e=0;e<d;e++)this.addBasenamesForCell(f.model.getChildAt(a,e),c)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=
+a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),
+null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,c,b){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!=b?b:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,c){null!=a?a.getPublicUrl(c):c(null)};EditorUi.prototype.createLoadMessage=function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,scale:c.view.scale,page:c.view.getBackgroundPageBounds(),bounds:c.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,
+c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&
+(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(F){}return a}if(f.source==(window.opener||window.parent)){var l=f.data;if("json"==urlParams.proto){try{l=JSON.parse(l)}catch(H){l=null}if(null==l)return;if("dialog"==l.action){this.showError(null!=l.titleKey?mxResources.get(l.titleKey):l.title,null!=l.messageKey?mxResources.get(l.messageKey):l.message,null!=l.buttonKey?mxResources.get(l.buttonKey):l.button);null!=l.modified&&
+(this.editor.modified=l.modified);return}if("prompt"==l.action){this.spinner.stop();var h=new FilenameDialog(this,l.defaultValue||"",null!=l.okKey?mxResources.get(l.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:l}),"*")},null!=l.titleKey?mxResources.get(l.titleKey):l.title);this.showDialog(h.container,300,80,!0,!1);h.init();return}if("draft"==l.action){h=null;h="data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):g(l.xml);
+this.spinner.stop();h=new DraftDialog(this,mxResources.get("draftFound",[l.name||this.defaultFilename]),h,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:l}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:l}),"*")}),l.editKey?mxResources.get(l.editKey):null,l.discardKey?mxResources.get(l.discardKey):null,l.ignore?mxUtils.bind(this,function(){this.hideDialog();
+k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:l}),"*")}):null);this.showDialog(h.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{h.init()}catch(H){k.postMessage(JSON.stringify({event:"draft",error:H.toString(),message:l}),"*")}return}if("template"==l.action){this.spinner.stop();var h=1==l.enableRecent,n=1==l.enableSearch,h=new NewDialog(this,!1,null!=l.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=l.callback?
+k.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,name:b}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,h?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,c){this.searchReadyCallback=c;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,c,b){k.postMessage(JSON.stringify({event:"template",
+docUrl:a,info:c,name:b}),"*")});this.showDialog(h.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));h.init();return}if("searchDocsList"==l.action)this.searchReadyCallback(l.list,l.errorMsg);else if("recentDocsList"==l.action)this.recentReadyCallback(l.list,l.errorMsg);else{if("status"==l.action){null!=l.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(l.messageKey))):null!=l.message&&this.editor.setStatus(mxUtils.htmlEntities(l.message));
+null!=l.modified&&(this.editor.modified=l.modified);return}if("spinner"==l.action){var m=null!=l.messageKey?mxResources.get(l.messageKey):l.message;null==l.show||l.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==l.action){if("png"==l.format||"xmlpng"==l.format){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin)){var p=null!=l.xml?l.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var q=this.editor.graph,
+w=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=l.format;c.message=l;c.data=a;c.xml=encodeURIComponent(p);k.postMessage(JSON.stringify(c),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==l.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container);w(a)});if(this.isExportToCanvas()){if(null!=
+this.pages&&this.currentPage!=this.pages[0]){var q=this.createTemporaryGraph(q.getStylesheet()),u=q.getGlobalVariable,B=this.pages[0];q.getGlobalVariable=function(a){return"page"==a?B.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(q.container);q.model.setRoot(B.root)}this.exportToCanvas(mxUtils.bind(this,function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(null)}),null,null,null,null,null,null,q)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==l.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?w("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=l.xml&&0<l.xml.length&&this.setFileData(l.xml);m=this.createLoadMessage("export");if("html2"==l.format||"html"==l.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))h=this.getXmlFileData(),m.xml=mxUtils.getXml(h),m.data=
+this.getFileData(null,null,!0,null,null,null,h),m.format=l.format;else if("html"==l.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=l.format;else{mxSvgCanvas2D.prototype.foAltText=null;h=this.editor.graph.background;h==mxConstants.NONE&&(h=null);m.xml=this.getFileData(!0);m.format="svg";if(l.embedImages||null==l.embedImages){if(null==l.spin&&null==l.spinKey||this.spinner.spin(document.body,null!=l.spinKey?mxResources.get(l.spinKey):l.spin))this.editor.graph.setEnabled(!1),
+"xmlsvg"==l.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(h),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(m),"*")}));return}h="xmlsvg"==l.format?this.getEmbeddedSvg(this.getFileData(!0),
+this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(h));m.data=this.createSvgDataUri(h)}k.postMessage(JSON.stringify(m),"*")}return}if("load"==l.action)d=1==l.autosave,this.hideDialog(),null!=l.modified&&null==urlParams.modified&&(urlParams.modified=l.modified),null!=l.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=l.saveAndExit),null!=l.title&&null!=this.buttonContainer&&(h=document.createElement("span"),mxUtils.write(h,l.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
+"12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(h),this.embedFilenameSpan=h),l=null!=l.xmlpng?this.extractGraphModelFromPng(l.xmlpng):null!=l.xml&&"data:image/png;base64,"==l.xml.substring(0,22)?this.extractGraphModelFromPng(l.xml):l.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",
+data:JSON.stringify(l)}),"*");return}}}l=g(l);b=!0;try{a(l,f)}catch(H){this.handleError(H)}b=!1;null!=urlParams.modified&&this.editor.setStatus("");var x=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=x();d&&null==c&&(c=mxUtils.bind(this,function(a,c){var f=x();if(f!=e&&!b){var d=this.createLoadMessage("autosave");d.xml=f;f=JSON.stringify(d);(window.opener||window.parent).postMessage(f,
+"*")}e=f}),this.editor.graph.model.addListener(mxEvent.CHANGE,c),this.editor.graph.addListener("gridSizeChanged",c),this.editor.graph.addListener("shadowVisibleChanged",c),this.addListener("pageFormatChanged",c),this.addListener("pageScaleChanged",c),this.addListener("backgroundColorChanged",c),this.addListener("backgroundImageChanged",c),this.addListener("foldingEnabledChanged",c),this.addListener("mathEnabledChanged",c),this.addListener("gridEnabledChanged",c),this.addListener("guidesEnabledChanged",
+c),this.addListener("pageViewChanged",c));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(g,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?
+"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var c=document.createElement("button");mxUtils.write(c,mxResources.get("save"));c.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");c.className="geBigButton";c.style.fontSize="12px";c.style.padding="4px 6px 4px 6px";c.style.borderRadius="3px";mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(c);"1"==urlParams.saveAndExit&&(c=document.createElement("a"),
+mxUtils.write(c,mxResources.get("saveAndExit")),c.setAttribute("title",mxResources.get("saveAndExit")),c.style.fontSize="12px",c.style.marginLeft="6px",c.style.padding="4px",c.style.cursor="pointer",mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(c));c=document.createElement("a");mxUtils.write(c,mxResources.get("exit"));c.setAttribute("title",mxResources.get("exit"));c.style.fontSize="12px";c.style.marginLeft="6px";c.style.marginRight=
+"20px";c.style.padding="4px";c.style.cursor="pointer";mxEvent.addListener(c,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(c);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
+null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,c){try{var b=a.split("\n"),d=[];if(0<b.length){var f={},e=null,g=null,k="",n="auto",l="auto",p=null,q=null,z=40,y=40,E=0,C=this.editor.graph;C.getGraphBounds();for(var A=function(){null!=c?c(aa):(C.setSelectionCells(aa),C.scrollCellToVisible(C.getSelectionCell()))},J=C.getFreeInsertPoint(),B=J.x,L=J.y,J=L,H=null,
+F="auto",M=[],X=null,Z=null,N=0;N<b.length&&"#"==b[N].charAt(0);){a=b[N];for(N++;N<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[N].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[N].substring(1)),N++;if("#"!=a.charAt(1)){var S=a.indexOf(":");if(0<S){var O=mxUtils.trim(a.substring(1,S)),I=mxUtils.trim(a.substring(S+1));"label"==O?H=C.sanitizeHtml(I):"style"==O?e=I:"identity"==O&&0<I.length&&"-"!=I?g=I:"namespace"==O&&0<I.length&&"-"!=I?k=I:"width"==O?n=I:"height"==O?l=I:"left"==O&&0<I.length?
+p=I:"top"==O&&0<I.length?q=I:"ignore"==O?Z=I.split(","):"connect"==O?M.push(JSON.parse(I)):"link"==O?X=I:"padding"==O?E=parseFloat(I):"edgespacing"==O?z=parseFloat(I):"nodespacing"==O?y=parseFloat(I):"layout"==O&&(F=I)}}}var W=this.editor.csvToArray(b[N]),S=null;if(null!=g)for(var R=0;R<W.length;R++)if(g==W[R]){S=R;break}null==H&&(H="%"+W[0]+"%");if(null!=M)for(var T=0;T<M.length;T++)null==f[M[T].to]&&(f[M[T].to]={});C.model.beginUpdate();try{for(R=N+1;R<b.length;R++){var V=this.editor.csvToArray(b[R]);
+if(V.length==W.length){var K=null,Q=null!=S?k+V[S]:null;null!=Q&&(K=C.model.getCell(Q));null==K&&(K=new mxCell(H,new mxGeometry(B,J,0,0),e||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=Q);for(var P=0;P<V.length;P++)C.setAttributeForCell(K,W[P],V[P]);C.setAttributeForCell(K,"placeholders","1");K.style=C.replacePlaceholders(K,K.style);for(T=0;T<M.length;T++)f[M[T].to][K.getAttribute(M[T].to)]=K;null!=X&&"link"!=X&&(C.setLinkForCell(K,K.getAttribute(X)),C.setAttributeForCell(K,X,null));C.fireEvent(new mxEventObject("cellsInserted",
+"cells",[K]));var ba=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=p&&null!=K.getAttribute(p)&&(K.geometry.x=B+parseFloat(K.getAttribute(p))),null!=q&&null!=K.getAttribute(q)&&(K.geometry.y=L+parseFloat(K.getAttribute(q))),"@"==n.charAt(0)&&null!=K.getAttribute(n.substring(1))?K.geometry.width=parseFloat(K.getAttribute(n.substring(1))):K.geometry.width="auto"==n?ba.width+E:parseFloat(n),"@"==l.charAt(0)&&null!=K.getAttribute(l.substring(1))?K.geometry.height=parseFloat(K.getAttribute(l.substring(1))):
+K.geometry.height="auto"==l?ba.height+E:parseFloat(l),J+=K.geometry.height+y);d.push(C.addCell(K))}}for(var U=d.slice(),aa=d.slice(),T=0;T<M.length;T++)for(var Y=M[T],R=0;R<d.length;R++){var K=d[R],ia=K.getAttribute(Y.from);if(null!=ia){C.setAttributeForCell(K,Y.from,null);for(var ja=ia.split(","),P=0;P<ja.length;P++){var ca=f[Y.to][ja[P]];null!=ca&&(H=Y.label,null!=Y.fromlabel&&(H=(K.getAttribute(Y.fromlabel)||"")+(H||"")),null!=Y.tolabel&&(H=(H||"")+(ca.getAttribute(Y.tolabel)||"")),aa.push(C.insertEdge(null,
+null,H||"",Y.invert?ca:K,Y.invert?K:ca,Y.style||C.createCurrentEdgeStyle())),mxUtils.remove(Y.invert?K:ca,U))}}}if(null!=Z)for(R=0;R<d.length;R++)for(K=d[R],P=0;P<Z.length;P++)C.setAttributeForCell(K,mxUtils.trim(Z[P]),null);var fa=new mxParallelEdgeLayout(C);fa.spacing=z;var ka=function(){fa.execute(C.getDefaultParent());for(var a=0;a<d.length;a++){var c=C.getCellGeometry(d[a]);c.x=Math.round(C.snap(c.x));c.y=Math.round(C.snap(c.y));"auto"==n&&(c.width=Math.round(C.snap(c.width)));"auto"==l&&(c.height=
+Math.round(C.snap(c.height)))}};if("circle"==F){var da=new mxCircleLayout(C);da.resetEdges=!1;var la=da.isVertexIgnored;da.isVertexIgnored=function(a){return la.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){da.execute(C.getDefaultParent());ka()},!0,A);A=null}else if("horizontaltree"==F||"verticaltree"==F||"auto"==F&&aa.length==2*d.length-1&&1==U.length){C.view.validate();var ga=new mxCompactTreeLayout(C,"horizontaltree"==F);ga.levelDistance=y;ga.edgeRouting=!1;ga.resetEdges=
+!1;this.executeLayout(function(){ga.execute(C.getDefaultParent(),0<U.length?U[0]:null)},!0,A);A=null}else if("horizontalflow"==F||"verticalflow"==F||"auto"==F&&1==U.length){C.view.validate();var ha=new mxHierarchicalLayout(C,"horizontalflow"==F?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ha.intraCellSpacing=y;ha.disableEdgeStyle=!1;this.executeLayout(function(){ha.execute(C.getDefaultParent(),aa);C.moveCells(aa,B,L)},!0,A);A=null}else if("organic"==F||"auto"==F&&aa.length>d.length){C.view.validate();
+var ea=new mxFastOrganicLayout(C);ea.forceConstant=3*y;ea.resetEdges=!1;var na=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return na.apply(this,arguments)||0>mxUtils.indexOf(d,a)};fa=new mxParallelEdgeLayout(C);fa.spacing=z;this.executeLayout(function(){ea.execute(C.getDefaultParent());ka()},!0,A);A=null}this.hideDialog()}finally{C.model.endUpdate()}null!=A&&A()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(a){var c="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&
+null!=a&&0<window.location.search.length){var b="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(c+=b+d+"="+urlParams[d],b="&")}else c=window.location.search;return c};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var c=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var b="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&
+(a=0==c?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],c++))}return a};EditorUi.prototype.showLinkDialog=function(a,c,b){a=new LinkDialog(this,a,c,b,!0);this.showDialog(a.container,440,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var c=n.apply(this,arguments),b=this.editor.graph,d=c.getSourceGraphBounds;c.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(b.container)&&b.pageVisible&&null!=this.source.minimumGraphSize){var a=
+this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/c),Math.ceil(this.source.minimumGraphSize.height-2*a.y/c))}return d.apply(this,arguments)};var e=c.getSourceContainerSize;c.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),c=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*c-2*
+a.x),Math.ceil(this.source.minimumGraphSize.height*c-2*a.y))}return e.apply(this,arguments)};c.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(b.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(c.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(c.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,
+8/a)};var g=c.init;c.init=function(){g.apply(this,arguments);c.outline.view.getBackgroundPageBounds=function(){var a=b.getPageLayout(),c=b.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)};c.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,b){var d=b.getProperty("change"),f=c.source,e=c.outline;e.pageScale=f.pageScale;e.pageFormat=
+f.pageFormat;e.background=f.background;e.pageVisible=f.pageVisible;e.background=f.background;var g=mxUtils.getCurrentStyle(f.container);e.container.style.backgroundColor=g.backgroundColor;null!=f.view.backgroundPageShape&&null!=e.view.backgroundPageShape&&(e.view.backgroundPageShape.fill=f.view.backgroundPageShape.fill);c.outline.view.clear(d.previousPage.root,!0);c.outline.view.validate()});return c};EditorUi.prototype.getServiceCount=function(a,c){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||
+b++;c||null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;c||null==this.gitHub||b++;c||null==this.trello&&"function"!==typeof window.TrelloClient||b++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&b++;mxClient.IS_IOS||b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),c=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();
+this.menus.get("viewPanels").setEnabled(c);this.menus.get("viewZoom").setEnabled(c);var b=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!b);this.actions.get("print").setEnabled(!b);this.menus.get("exportAs").setEnabled(!b);this.menus.get("embed").setEnabled(!b);b="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(b);this.menus.get("newLibrary").setEnabled(b);this.menus.get("extras").setEnabled(b);
+a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(c);this.actions.get("zoomIn").setEnabled(c);this.actions.get("zoomOut").setEnabled(c);this.actions.get("resetView").setEnabled(c);this.menus.get("edit").setEnabled(c);this.menus.get("view").setEnabled(c);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=
+this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isAppCache()){var d=applicationCache;if(null!=d&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
+"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var d=window.applicationCache,e=null,c=mxUtils.bind(this,function(){var a=d.status,c;a==d.CHECKING&&(a=d.DOWNLOADING);switch(a){case d.UNCACHED:c="";break;case d.IDLE:c=
+"min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case d.DOWNLOADING:c='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case d.UPDATEREADY:c='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case d.OBSOLETE:c='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:c='<img title="Unknown" border="0" src="'+
+IMAGE_PATH+'/clear.gif"/>'}a!=e&&(this.offlineStatus.innerHTML=c,e=a)});mxEvent.addListener(d,"checking",c);mxEvent.addListener(d,"noupdate",c);mxEvent.addListener(d,"downloading",c);mxEvent.addListener(d,"progress",c);mxEvent.addListener(d,"cached",c);mxEvent.addListener(d,"updateready",c);mxEvent.addListener(d,"obsolete",c);mxEvent.addListener(d,"error",c);c()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var a=this.editor.graph,c=this.isDiagramActive(),b=this.getCurrentFile(),d=null!=b||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());
+this.actions.get("guides").setEnabled(c);this.actions.get("editData").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);
+this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled(c&&(null==b||!b.isRestricted()));this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.actions.get("tags").setEnabled(c&&(null==b||!b.isRestricted()));this.actions.get("find").setEnabled(d);this.actions.get("layers").setEnabled(d);this.actions.get("outline").setEnabled(d);
+this.actions.get("rename").setEnabled(null!=b&&b.isRenamable());this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);q.apply(this,
+arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,c,b,d,e,g){var f=a.editor.graph;if("xml"==b)a.hideDialog(),a.saveData(c,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==b)a.hideDialog(),a.saveData(c,"svg",mxUtils.getXml(f.getSvg(d,e,g)),"image/svg+xml");else{var h=a.getFileData(!0,null,null,null,null,!0),k=f.getGraphBounds(),l=Math.floor(k.width*e/f.view.scale),n=Math.floor(k.height*e/f.view.scale);
+h.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(c,b,function(a,c){return new mxXmlRequest(EXPORT_URL,"format="+b+"&base64="+(c||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+n+"&border="+g+"&xml="+encodeURIComponent(h))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){mxSettings.settings.ui=b},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(b){mxSettings.settings.showStartScreen=b},getGridColor:function(){return mxSettings.settings.gridColor},
+setGridColor:function(b){mxSettings.settings.gridColor=b},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(b){mxSettings.settings.autosave=b},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(b){mxSettings.settings.resizeImages=b},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(b){mxSettings.settings.openCounter=b},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(b){mxSettings.settings.libraries=
+b},addCustomLibrary:function(b){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,b)&&("L.scratchpad"===b?mxSettings.settings.customLibraries.splice(0,0,b):mxSettings.settings.customLibraries.push(b));mxSettings.save()},removeCustomLibrary:function(b){mxSettings.load();mxUtils.remove(b,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(b){mxSettings.settings.plugins=
+b},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(b){mxSettings.settings.recentColors=b},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(b){mxSettings.settings.formatWidth=b},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(b){mxSettings.settings.currentEdgeStyle=b},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
+setCurrentVertexStyle:function(b){mxSettings.settings.currentVertexStyle=b},isCreateTarget:function(){return mxSettings.settings.createTarget},setCreateTarget:function(b){mxSettings.settings.createTarget=b},getPageFormat:function(){return mxSettings.settings.pageFormat},setPageFormat:function(b){mxSettings.settings.pageFormat=b},init:function(){mxSettings.settings={language:"",configVersion:Editor.configVersion,libraries:Sidebar.prototype.defaultEntries,customLibraries:Editor.defaultCustomLibraries,
plugins:[],recentColors:[],formatWidth:mxSettings.defaultFormatWidth,currentEdgeStyle:Graph.prototype.defaultEdgeStyle,currentVertexStyle:Graph.prototype.defaultVertexStyle,createTarget:!1,pageFormat:mxGraph.prototype.pageFormat,search:!0,showStartScreen:!0,gridColor:mxGraphView.prototype.gridColor,autosave:!EditorUi.isElectronApp,resizeImages:null,openCounter:0,version:mxSettings.currentVersion,isNew:!0}},save:function(){if(isLocalStorage&&"undefined"!==typeof JSON)try{delete mxSettings.settings.isNew,
-mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(a){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key));null==mxSettings.settings&&mxSettings.init()},parse:function(a){null!=a&&(a=JSON.parse(a),a.configVersion!=Editor.configVersion?mxSettings.settings=null:(mxSettings.settings=a,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==
+mxSettings.settings.version=mxSettings.currentVersion,localStorage.setItem(mxSettings.key,JSON.stringify(mxSettings.settings))}catch(b){}},load:function(){isLocalStorage&&"undefined"!==typeof JSON&&mxSettings.parse(localStorage.getItem(mxSettings.key));null==mxSettings.settings&&mxSettings.init()},parse:function(b){null!=b&&(b=JSON.parse(b),b.configVersion!=Editor.configVersion?mxSettings.settings=null:(mxSettings.settings=b,null==mxSettings.settings.plugins&&(mxSettings.settings.plugins=[]),null==
mxSettings.settings.recentColors&&(mxSettings.settings.recentColors=[]),null==mxSettings.settings.libraries&&(mxSettings.settings.libraries=Sidebar.prototype.defaultEntries),null==mxSettings.settings.customLibraries&&(mxSettings.settings.customLibraries=Editor.defaultCustomLibraries),null==mxSettings.settings.ui&&(mxSettings.settings.ui=""),null==mxSettings.settings.formatWidth&&(mxSettings.settings.formatWidth=mxSettings.defaultFormatWidth),null!=mxSettings.settings.lastAlert&&delete mxSettings.settings.lastAlert,
null==mxSettings.settings.currentEdgeStyle?mxSettings.settings.currentEdgeStyle=Graph.prototype.defaultEdgeStyle:10>=mxSettings.settings.version&&(mxSettings.settings.currentEdgeStyle.orthogonalLoop=1,mxSettings.settings.currentEdgeStyle.jettySize="auto"),null==mxSettings.settings.currentVertexStyle&&(mxSettings.settings.currentVertexStyle=Graph.prototype.defaultVertexStyle),null==mxSettings.settings.createTarget&&(mxSettings.settings.createTarget=!1),null==mxSettings.settings.pageFormat&&(mxSettings.settings.pageFormat=
mxGraph.prototype.pageFormat),null==mxSettings.settings.search&&(mxSettings.settings.search=!0),null==mxSettings.settings.showStartScreen&&(mxSettings.settings.showStartScreen=!0),null==mxSettings.settings.gridColor&&(mxSettings.settings.gridColor=mxGraphView.prototype.gridColor),null==mxSettings.settings.autosave&&(mxSettings.settings.autosave=!0),null!=mxSettings.settings.scratchpadSeen&&delete mxSettings.settings.scratchpadSeen))},clear:function(){isLocalStorage&&localStorage.removeItem(mxSettings.key)}};
-("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(a,e,d){EditorUi.call(this,a,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(a,d,e){var b=null;try{b=window.open(a)}catch(n){}null==b||void 0===b?this.showDialog((new PopupDialog(this,a,d,e)).container,320,140,!0,!0):null!=d&&d()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(a){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(a)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
-App.DrawPlugins){for(a=0;a<App.DrawPlugins.length;a++)try{App.DrawPlugins[a](this)}catch(b){null!=window.console&&console.log("Plugin Error:",b,App.DrawPlugins[a])}window.Draw.loadPlugin=mxUtils.bind(this,function(a){a(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
+("undefined"==typeof mxLoadSettings||mxLoadSettings)&&mxSettings.load();App=function(b,e,d){EditorUi.call(this,b,e,null!=d?d:"1"==urlParams.lightbox||"min"==uiTheme);mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(c,b,d){var e=null;try{e=window.open(c)}catch(p){}null==e||void 0===e?this.showDialog((new PopupDialog(this,c,b,d)).container,320,140,!0,!0):null!=b&&b()});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&!this.editor.editable||this.addFileDropHandler([document]);if(null!=
+App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}window.Draw.loadPlugin=mxUtils.bind(this,function(c){c(this)})}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";
App.DROPBOX_APPKEY="libwls2fa9szdji";App.DROPBOX_URL="js/dropbox/Dropbox-sdk.min.js";App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL="https://js.live.net/v7.2/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL="https://code.jquery.com/jquery-1.7.1.min.js";App.FOOTER_PLUGIN_URL="https://www.jgraph.com/drawio-footer.js";
App.pluginRegistry={"4xAKTrabTpTzahoLthkwPNUn":"/plugins/explore.js",ex:"/plugins/explore.js",p1:"/plugins/p1.js",ac:"/plugins/connect.js",acj:"/plugins/connectJira.js",ac148:"/plugins/cConf-1-4-8.js",voice:"/plugins/voice.js",tips:"/plugins/tooltips.js",svgdata:"/plugins/svgdata.js",doors:"/plugins/doors.js",electron:"plugins/electron.js",number:"/plugins/number.js",sql:"/plugins/sql.js",props:"/plugins/props.js",text:"/plugins/text.js",anim:"/plugins/animation.js",update:"/plugins/update.js",trees:"/plugins/trees/trees.js",
"import":"/plugins/import.js",replay:"/plugins/replay.js",anon:"/plugins/anonymize.js",tr:"/plugins/trello.js",f5:"/plugins/rackF5.js"};
-App.getStoredMode=function(){var a=null;null==a&&isLocalStorage&&(a=localStorage.getItem(".mode"));if(null==a&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var b=mxUtils.trim(e[d]);if("MODE="==b.substring(0,5)){a=b.substring(5);break}}null!=a&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",a))}return a};
+App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage.getItem(".mode"));if(null==b&&"undefined"!=typeof Storage){for(var e=document.cookie.split(";"),d=0;d<e.length;d++){var c=mxUtils.trim(e[d]);if("MODE="==c.substring(0,5)){b=c.substring(5);break}}null!=b&&isLocalStorage&&(e=new Date,e.setYear(e.getFullYear()-1),document.cookie="MODE=; expires="+e.toUTCString(),localStorage.setItem(".mode",b))}return b};
(function(){mxClient.IS_CHROMEAPP||("1"!=urlParams.offline&&("db.draw.io"==window.location.hostname&&null==urlParams.mode&&(urlParams.mode="dropbox"),App.mode=urlParams.mode,null==App.mode&&(App.mode=App.getStoredMode())),null!=window.mxscript&&("1"!=urlParams.embed&&("function"===typeof window.DriveClient&&("0"!=urlParams.gapi&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_GOOGLE||null!=urlParams.state&&""==window.location.hash||null!=window.location.hash&&
"#G"==window.location.hash.substring(0,2)?mxscript("https://apis.google.com/js/api.js"):"0"!=urlParams.chrome||null!=window.location.hash&&"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"===window.location.hash.substring(0,45)||(window.DriveClient=null):window.DriveClient=null),"function"===typeof window.DropboxClient&&("0"!=urlParams.db&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?App.mode==App.MODE_DROPBOX||null!=window.location.hash&&"#D"==window.location.hash.substring(0,
2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
-App.main=function(a,e){var d=null;EditorUi.enableLogging&&(window.onerror=function(a,b,e,f,k){try{if(a!=d&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){d=a;var c=new Image,g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";c.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(e)+(null!=f?":colno:"+encodeURIComponent(f):"")+(null!=k&&null!=k.stack?"&stack="+encodeURIComponent(k.stack):"")}}catch(y){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var b=document.createElement("iframe");b.setAttribute("width","0");b.setAttribute("height",
-"0");b.setAttribute("src","offline.html");document.body.appendChild(b)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var b=mxSettings.getPlugins(),f=urlParams.p;App.initPluginCallback();if(null!=f){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var l=f.split(";"),f=0;f<l.length;f++){var n=App.pluginRegistry[l[f]];null!=n?mxscript(k+n):null!=window.console&&console.log("Unknown plugin:",l[f])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
-null,null,null,mxClient.IS_SVG);if(null!=b&&0<b.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;l=!0;for(f=0;f<b.length&&l;f++)"/"!=b[f].charAt(0)&&b[f].substring(0,k.length)!=k&&(l=!1);if(l||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[b.join("\n")]).replace(/\\n/g,
-"\n")))for(f=0;f<b.length;f++)try{mxscript(b[f])}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();
-mxResources.loadDefaultBundle=!1;b=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[b]:[b,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(b){mxResources.parse(b[0].getText());1<b.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=b[1].getDocumentElement());b=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
+App.main=function(b,e){var d=null;EditorUi.enableLogging&&(window.onerror=function(c,a,b,e,g){try{if(c!=d&&(null==c||null==a||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){d=c;var f=new Image,h=0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";f.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+h+"&v="+encodeURIComponent(EditorUi.VERSION)+
+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(b)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=g&&null!=g.stack?"&stack="+encodeURIComponent(g.stack):"")}}catch(w){}});if(null!=window.mxscript){if("1"==urlParams.offline||"1"==urlParams.appcache){mxscript("js/shapes.min.js");mxscript("js/stencils.min.js");mxscript("js/extensions.min.js");var c=document.createElement("iframe");c.setAttribute("width","0");c.setAttribute("height",
+"0");c.setAttribute("src","offline.html");document.body.appendChild(c)}if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=mxSettings.getPlugins(),g=urlParams.p;App.initPluginCallback();if(null!=g){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var n=g.split(";"),g=0;g<n.length;g++){var p=App.pluginRegistry[n[g]];null!=p?mxscript(k+p):null!=window.console&&console.log("Unknown plugin:",n[g])}}else"0"==urlParams.chrome||EditorUi.isElectronApp||mxscript(App.FOOTER_PLUGIN_URL,
+null,null,null,mxClient.IS_SVG);if(null!=c&&0<c.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;n=!0;for(g=0;g<c.length&&n;g++)"/"!=c[g].charAt(0)&&c[g].substring(0,k.length)!=k&&(n=!1);if(n||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",[c.join("\n")]).replace(/\\n/g,
+"\n")))for(g=0;g<c.length;g++)try{mxscript(c[g])}catch(q){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();
+mxResources.loadDefaultBundle=!1;c=mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage);mxUtils.getAll("1"!=urlParams.dev?[c]:[c,"dark"==uiTheme?STYLE_PATH+"/dark-default.xml":STYLE_PATH+"/default.xml"],function(c){mxResources.parse(c[0].getText());1<c.length&&(Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=c[1].getDocumentElement());c=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=
urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=
null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&
-("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=a&&a(b);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
+("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(c);"0"!=urlParams.chrome&&"1"==urlParams.test&&(mxLog.show(),mxLog.debug("Started in "+((new Date).getTime()-t0.getTime())+"ms"),mxLog.debug("Export:",EXPORT_URL),mxLog.debug("Development mode:",
"1"==urlParams.dev?"active":"inactive"),mxLog.debug("Test mode:","1"==urlParams.test?"active":"inactive"))},function(){document.getElementById("geStatus").innerHTML='Error loading page. <a href="javascript:void(0);" onclick="location.reload();">Please try refreshing.</a>'})};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture="https://lh3.googleusercontent.com/-HIzvXUy6QUY/AAAAAAAAAAI/AAAAAAAAAAA/giuR7PQyjEk/photo.jpg?sz=30";App.prototype.shareImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowOTgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxMjU2NzdEMTcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoxMjU2NzdEMDcwRDIxMUUxQjc0MDkxRDhCNUQzOEFGRCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowNjgwMTE3NDA3MjA2ODExODcxRkM4MUY1OTFDMjQ5OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowNzgwMTE3NDA3MjA2ODExODhDNkFGMDBEQkQ0RTgwOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrM/fs0AAADgSURBVHjaYmDAA/7//88MwgzkAKDGFiD+BsQ/QWxSNaf9RwN37twpI8WAS+gGfP78+RpQSoRYA36iG/D379+vQClNdLVMOMz4gi7w79+/n0CKg1gD9qELvH379hzIHGK9oA508ieY8//8+fO5rq4uFCilRKwL1JmYmNhhHEZGRiZ+fn6Q2meEbDYG4u3/cYCfP38uA7kOm0ZOIJ7zn0jw48ePPiDFhmzArv8kgi9fvuwB+w5qwH9ykjswbFSZyM4sEMDPBDTlL5BxkFSd7969OwZ2BZKYGhDzkmjOJ4AAAwBhpRqGnEFb8QAAAABJRU5ErkJggg==";
App.prototype.chevronUpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NDg2NEE3NUY1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NDg2NEE3NjA1MUVBMTFFM0I3MUVEMTc0N0YyOUI4QzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0ODY0QTc1RDUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0ODY0QTc1RTUxRUExMUUzQjcxRUQxNzQ3RjI5QjhDMSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pg+qUokAAAAMUExURQAAANnZ2b+/v////5bgre4AAAAEdFJOU////wBAKqn0AAAAL0lEQVR42mJgRgMMRAswMKAKMDDARBjg8lARBoR6KImkH0wTbygT6YaS4DmAAAMAYPkClOEDDD0AAAAASUVORK5CYII=":
IMAGE_PATH+"/chevron-up.png";
@@ -7422,341 +7429,343 @@ App.prototype.chevronDownImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGg
App.prototype.formatShowImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REY1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5RTA1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlERDU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlERTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PlnMQ/8AAAAJUExURQAAAP///3FxcTfTiAsAAAACdFJOU/8A5bcwSgAAACFJREFUeNpiYEQDDEQJMMABTAAixcQ00ALoDiPRcwABBgB6DADly9Yx8wAAAABJRU5ErkJggg==":IMAGE_PATH+
"/format-show.png";
App.prototype.formatHideImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODdCREY5REI1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODdCREY5REM1NkQ3MTFFNTkyNjNEMTA5NjgwODUyRTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4N0JERjlEOTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4N0JERjlEQTU2RDcxMUU1OTI2M0QxMDk2ODA4NTJFOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqjT9SMAAAAGUExURQAAAP///6XZn90AAAACdFJOU/8A5bcwSgAAAB9JREFUeNpiYEQDDEQJMMABTAAmNdAC6A4j0XMAAQYAcbwA1Xvj1CgAAAAASUVORK5CYII=":IMAGE_PATH+
-"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.timeout=25E3;"1"!=urlParams.embed?App.prototype.menubarHeight=60:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(a){App.DrawPlugins.push(a)})};
+"/format-hide.png";App.prototype.fullscreenImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABpJREFUCNdjgAAbGxAy4AEh5gNwBBGByoIBAIueBd12TUjqAAAAAElFTkSuQmCC":IMAGE_PATH+"/fullscreen.png";App.prototype.timeout=25E3;"1"!=urlParams.embed?App.prototype.menubarHeight=60:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};
App.prototype.init=function(){EditorUi.prototype.init.apply(this,arguments);this.defaultLibraryName=mxResources.get("untitledLibrary");this.descriptorChangedListener=mxUtils.bind(this,this.descriptorChanged);this.gitHub=mxClient.IS_IE&&10!=document.documentMode&&!mxClient.IS_IE11&&!mxClient.IS_EDGE||"0"==urlParams.gh||"1"==urlParams.embed&&"1"!=urlParams.gh?null:new GitHubClient(this);null!=this.gitHub&&this.gitHub.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()}));
-if("1"!=urlParams.embed||"1"==urlParams.od){var a=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=a)});a()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){"undefined"!==
-typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var a=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
-"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile&&(a=document.getElementById("geFooterItem2"),null!=a&&(a.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();
-this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&a()}))}))})),window.DrawGapiClientCallback=null):a()}else null==
-window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var b=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&
-(window.DrawDropboxClientCallback=b)});b()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();
+if("1"!=urlParams.embed||"1"==urlParams.od){var b=mxUtils.bind(this,function(){"undefined"!==typeof OneDrive?(this.oneDrive=new OneDriveClient(this),this.oneDrive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.oneDrive))):null==window.DrawOneDriveClientCallback&&(window.DrawOneDriveClientCallback=b)});b()}if("1"!=urlParams.embed||"1"==urlParams.tr){var e=mxUtils.bind(this,function(){"undefined"!==
+typeof window.Trello?(this.trello=new TrelloClient(this),this.trello.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.trello))):null==window.DrawTrelloClientCallback&&(window.DrawTrelloClientCallback=e)});e()}if("1"!=urlParams.embed||"1"==urlParams.gapi){var d=mxUtils.bind(this,function(){if("undefined"!==typeof gapi){var c=mxUtils.bind(this,function(){this.drive=new DriveClient(this);
+"420247213240"==this.drive.appId&&this.editor.addListener("fileLoaded",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.constructor==DriveFile&&(c=document.getElementById("geFooterItem2"),null!=c&&(c.innerHTML='<a href="https://support.draw.io/display/DO/2014/11/27/Switching+application+in+Google+Drive" target="_blank" title="IMPORTANT NOTICE" >IMPORTANT NOTICE</a>'))}));this.drive.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries();
+this.checkLicense()}));this.fireEvent(new mxEventObject("clientLoaded","client",this.drive))});null!=window.DrawGapiClientCallback?(gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(b){null!=gapi.drive&&null!=gapi.drive.realtime&&gapi.client.load("drive","v2",mxUtils.bind(this,function(){this.defineCustomObjects();gapi.auth.init(mxUtils.bind(this,function(){null!=gapi.client.drive&&c()}))}))})),window.DrawGapiClientCallback=null):c()}else null==
+window.DrawGapiClientCallback&&(window.DrawGapiClientCallback=d)});d()}if("1"!=urlParams.embed||"1"==urlParams.db){var c=mxUtils.bind(this,function(){"function"===typeof Dropbox&&"undefined"!==typeof Dropbox.choose?(window.DrawDropboxClientCallback=null,this.dropbox=new DropboxClient(this),this.dropbox.addListener("userChanged",mxUtils.bind(this,function(){this.updateUserElement();this.restoreLibraries()})),this.fireEvent(new mxEventObject("clientLoaded","client",this.dropbox))):null==window.DrawDropboxClientCallback&&
+(window.DrawDropboxClientCallback=c)});c()}"1"!=urlParams.embed?(this.bg=this.createBackground(),document.body.appendChild(this.bg),this.diagramContainer.style.visibility="hidden",this.formatContainer.style.visibility="hidden",this.hsplit.style.display="none",this.sidebarContainer.style.display="none",this.sidebarFooterContainer.style.display="none","1"==urlParams.local?this.setMode(App.MODE_DEVICE):this.mode=App.mode):null!=this.menubar&&(this.menubar.container.style.paddingTop="0px");this.updateHeader();
null!=this.menubar&&(this.buttonContainer=document.createElement("div"),this.buttonContainer.style.display="inline-block",this.buttonContainer.style.paddingRight="48px",this.buttonContainer.style.position="absolute",this.buttonContainer.style.right="0px",this.menubar.container.appendChild(this.buttonContainer));"atlas"==uiTheme&&null!=this.menubar&&(null!=this.toggleElement&&(this.toggleElement.click(),this.toggleElement.style.display="none"),this.icon=document.createElement("img"),this.icon.setAttribute("src",
IMAGE_PATH+"/logo-flat-small.png"),this.icon.setAttribute("title",mxResources.get("draw.io")),this.icon.style.paddingTop="11px",this.icon.style.marginLeft="4px",this.icon.style.marginRight="6px",mxClient.IS_QUIRKS&&(this.icon.style.marginTop="12px"),this.menubar.container.insertBefore(this.icon,this.menubar.container.firstChild))};
App.prototype.isDriveDomain=function(){return"0"!=urlParams.drive&&("test.draw.io"==window.location.hostname||"cdn.draw.io"==window.location.hostname||"www.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"jgraph.github.io"==window.location.hostname)};App.prototype.isLegacyDriveDomain=function(){return 0==urlParams.drive||"legacy.draw.io"==window.location.hostname};
-App.prototype.checkLicense=function(){var a=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=a?a.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),b=e;0<=d&&(b=e.substring(d+1),e=this.crc32(e.substring(0,d))+"@"+b);mxUtils.post("/license","domain="+encodeURIComponent(b)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(a.displayName)+"&lc="+encodeURIComponent(a.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(a){try{if(200<=
-a.getStatus()&&299>=a.getStatus()){var d=a.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,b)}}}catch(n){}}))}};
-App.prototype.handleLicense=function(a,e){var d=document.getElementById("geFooter"),b=null;if(null!=d&&null!=a)if(b=a.expiry,null!=a.footer)d.innerHTML=decodeURIComponent(a.footer);else if(this.hideFooter(),null!=b&&"never"!=b){var f=new Date(Date.parse(b)),k=Math.round((f-Date.now())/864E5);if(90>k){var l="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(e);d.style.height="100%";d.style.margin="0px";d.style.display=
-"";0>k?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+l+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[e,f.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
-l+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[e,f.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return b};App.prototype.getEditBlankXml=function(){var a=this.getCurrentFile();return null!=a&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==a.realtime?a.getData():this.getFileData(!0)};
-App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var a=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
-App.prototype.addRecent=function(a){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var d=0;d<e.length;d++)e[d].id==a.id&&e.splice(d,1);null!=e&&(e.unshift(a),e=e.slice(0,5),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var a=localStorage.getItem(".recent");if(null!=a)return JSON.parse(a)}catch(e){}return null}};
-App.prototype.resetRecent=function(a){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(a){}};
-App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var a=this.getCurrentFile();if(null!=a)if(a.constructor!=LocalFile||""!=a.getHash()||a.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if((a.constructor!=DriveFile||null==a.realtime||a.realtime.saving)&&a.isModified())return mxResources.get("allChangesLost");a.close(!0)}else return mxResources.get("ensureDataSaved")};
-App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var a=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(a+=" app");null!=e&&(a=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+a);document.title=a}};App.prototype.createCrcTable=function(){for(var a=[],e,d=0;256>d;d++){e=d;for(var b=0;8>b;b++)e=e&1?3988292384^e>>>1:e>>>1;a[d]=e}return a};
-App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var e=-1,d=0;d<a.length;d++)e=e>>>8^this.crcTable[(e^a.charCodeAt(d))&255];return(e^-1)>>>0};
-App.prototype.getThumbnail=function(a,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var b=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var b=this.createTemporaryGraph(b.getStylesheet()),f=b.getGlobalVariable,k=this.pages[0];b.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(b.container);b.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!b.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
-function(a){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(a)}),a,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,b),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var l=document.createElement("canvas"),n=b.getGraphBounds(),q=a/n.width,q=Math.min(1,Math.min(3*a/(4*n.height),q)),c=Math.floor(n.x),g=Math.floor(n.y);l.setAttribute("width",Math.ceil(q*(n.width+4)));l.setAttribute("height",Math.ceil(q*(n.height+4)));var h=l.getContext("2d");
-h.scale(q,q);h.translate(-c,-g);var t=b.background;if(null==t||""==t||t==mxConstants.NONE)t="#ffffff";h.save();h.fillStyle=t;h.fillRect(c,g,Math.ceil(n.width+4),Math.ceil(n.height+4));h.restore();var v=new mxJsCanvas(l),p=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var y=new mxImageExport;y.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())};y.drawText=function(a,
-b){};y.drawState(b.getView().getState(b.model.root),p);p.finish(mxUtils.bind(this,function(){y.drawState(b.getView().getState(b.model.root),v);b!=this.editor.graph&&b.container.parentNode.removeChild(b.container);e(l)}));d=!0}}catch(x){b!=this.editor.graph&&b.container.parentNode.removeChild(b.container)}return d};
-App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
-(function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()+1);document.cookie="MODE="+e+"; expires="+b.toUTCString()}null!=this.appIcon&&(b=this.getCurrentFile(),e=null!=b?b.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),e=("1"==urlParams.dev?urlParams.lic:null)||(null!=b?b.email:null);if(!this.isOffline()&&!this.editor.chromeless&&null!=e){var d=e.lastIndexOf("@"),c=e;0<=d&&(c=e.substring(d+1),e=this.crc32(e.substring(0,d))+"@"+c);mxUtils.post("/license","domain="+encodeURIComponent(c)+"&email="+encodeURIComponent(e)+"&ds="+encodeURIComponent(b.displayName)+"&lc="+encodeURIComponent(b.locale)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(b){try{if(200<=
+b.getStatus()&&299>=b.getStatus()){var d=b.getText();if(0<d.length){var e=JSON.parse(d);null!=e&&this.handleLicense(e,c)}}}catch(p){}}))}};
+App.prototype.handleLicense=function(b,e){var d=document.getElementById("geFooter"),c=null;if(null!=d&&null!=b)if(c=b.expiry,null!=b.footer)d.innerHTML=decodeURIComponent(b.footer);else if(this.hideFooter(),null!=c&&"never"!=c){var g=new Date(Date.parse(c)),k=Math.round((g-Date.now())/864E5);if(90>k){var n="https://support.draw.io/display/DKB/draw.io+footer+state+that+license+is+expiring+on+Google+For+Work+account?domain="+encodeURIComponent(e);d.style.height="100%";d.style.margin="0px";d.style.display=
+"";0>k?(this.footerHeight=80,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert geBlink"><a href="'+n+'" style="padding-top:16px;" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseHasExpired",[e,g.toLocaleDateString()])+"</a></td></tr></table>"):(this.footerHeight=46,d.innerHTML='<table height="100%"><tr><td valign="middle" align="center" class="geStatusAlert"><a href="'+
+n+'" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top" style="margin-right:6px">'+mxResources.get("licenseWillExpire",[e,g.toLocaleDateString()])+"</a></td></tr></table>");this.refresh()}}return c};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()&&null==b.realtime?b.getData():this.getFileData(!0)};
+App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);var b=this.getCurrentFile();this.actions.get("revisionHistory").setEnabled(null!=b&&(b.constructor==DriveFile&&b.isEditable()||b.constructor==DropboxFile))};App.prototype.updateDraft=function(){isLocalStorage&&null!=localStorage&&localStorage.setItem(".draft",JSON.stringify({modified:(new Date).getTime(),data:this.getFileData()}))};App.prototype.getDraft=function(){return null};
+App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var e=this.getRecent();if(null==e)e=[];else for(var d=0;d<e.length;d++)e[d].id==b.id&&e.splice(d,1);null!=e&&(e.unshift(b),e=e.slice(0,5),localStorage.setItem(".recent",JSON.stringify(e)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(e){}return null}};
+App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(e){}};App.prototype.removeDraft=function(){if(isLocalStorage&&null!=localStorage&&"0"==urlParams.splash)try{localStorage.removeItem(".draft")}catch(b){}};
+App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()){if((b.constructor!=DriveFile||null==b.realtime||b.realtime.saving)&&b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
+App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,e=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title=b}};App.prototype.createCrcTable=function(){for(var b=[],e,d=0;256>d;d++){e=d;for(var c=0;8>c;c++)e=e&1?3988292384^e>>>1:e>>>1;b[d]=e}return b};
+App.prototype.crc32=function(b){this.crcTable=this.crcTable||this.createCrcTable();for(var e=-1,d=0;d<b.length;d++)e=e>>>8^this.crcTable[(e^b.charCodeAt(d))&255];return(e^-1)>>>0};
+App.prototype.getThumbnail=function(b,e){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),g=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?k.getName():"pagenumber"==a?1:g.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
+function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);e(a)}),b,this.thumbImageCache,"#ffffff",function(){e()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var n=document.createElement("canvas"),p=c.getGraphBounds(),q=b/p.width,q=Math.min(1,Math.min(3*b/(4*p.height),q)),a=Math.floor(p.x),f=Math.floor(p.y);n.setAttribute("width",Math.ceil(q*(p.width+4)));n.setAttribute("height",Math.ceil(q*(p.height+4)));var h=n.getContext("2d");
+h.scale(q,q);h.translate(-a,-f);var m=c.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";h.save();h.fillStyle=m;h.fillRect(a,f,Math.ceil(p.width+4),Math.ceil(p.height+4));h.restore();var t=new mxJsCanvas(n),u=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var w=new mxImageExport;w.drawShape=function(a,c){a.shape instanceof mxShape&&a.shape.checkBounds()&&(c.save(),c.translate(.5,.5),a.shape.paint(c),c.translate(-.5,-.5),c.restore())};w.drawText=function(a,
+c){};w.drawState(c.getView().getState(c.model.root),u);u.finish(mxUtils.bind(this,function(){w.drawState(c.getView().getState(c.model.root),t);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);e(n)}));d=!0}}catch(x){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
+App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);mxClient.IS_QUIRKS&&new mxDivResizer(b);return b};
+(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,d){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+e+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),e=null!=c?c.getMode():null,e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
-App.prototype.appIconClicked=function(a){if(mxEvent.isAltDown(a))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):
-d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(a)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="MODE=; expires="+a.toUTCString()}};App.prototype.getDiagramId=function(){var a=window.location.hash;null!=a&&0<a.length&&(a=a.substring(1));return a};
-App.prototype.open=function(){try{if(null!=window.opener){var a=urlParams.create;null!=a&&(a=decodeURIComponent(a));if(null!=a&&0<a.length&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)){var e=mxUtils.parseXml(window.opener[a]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b,e){this.spinner.stop();null==b&&(b=urlParams.title,e=!0,b=null!=b?decodeURIComponent(b):this.defaultFilename);0<(this.useCanvasForExport?
--1:".png"==b.substring(b.length-4))&&(b=b.substring(0,b.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,a,b):new LocalFile(this,a,b,e))}))}}catch(d){}};
-App.prototype.loadGapi=function(a){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,a()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);a()}))}))}))};
-App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(a){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
+App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var e=this.getCurrentFile(),d=null!=e?e.getMode():null;d==App.MODE_GOOGLE?null!=e.desc&&0<e.desc.parents.length?this.openLink("https://drive.google.com/drive/folders/"+e.desc.parents[0].id):this.openLink("https://drive.google.com/?authuser=0"):d==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):d==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):d==App.MODE_TRELLO?this.openLink("https://trello.com/"):
+d==App.MODE_GITHUB&&(null!=e&&e.constructor==GitHubFile?this.openLink(e.meta.html_url):this.openLink("https://github.com/"))}mxEvent.consume(b)};App.prototype.clearMode=function(){if(isLocalStorage)localStorage.removeItem(".mode");else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie="MODE=; expires="+b.toUTCString()}};App.prototype.getDiagramId=function(){var b=window.location.hash;null!=b&&0<b.length&&(b=b.substring(1));return b};
+App.prototype.open=function(){try{if(null!=window.opener){var b=urlParams.create;null!=b&&(b=decodeURIComponent(b));if(null!=b&&0<b.length&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)){var e=mxUtils.parseXml(window.opener[b]);this.editor.setGraphXml(e.documentElement)}else null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,c,e){this.spinner.stop();null==c&&(c=urlParams.title,e=!0,c=null!=c?decodeURIComponent(c):this.defaultFilename);0<(this.useCanvasForExport?
+-1:".png"==c.substring(c.length-4))&&(c=c.substring(0,c.length-4)+".xml");this.fileLoaded(mxClient.IS_IOS?new StorageFile(this,b,c):new LocalFile(this,b,c,e))}))}}catch(d){}};
+App.prototype.loadGapi=function(b){"undefined"!==typeof gapi&&gapi.load(("0"!=urlParams.picker?"picker,":"")+"auth:client,drive-realtime,drive-share",mxUtils.bind(this,function(e){null==gapi.drive||null==gapi.drive.realtime?(this.drive=this.mode=null,b()):gapi.client.load("drive","v2",mxUtils.bind(this,function(){gapi.auth.init(mxUtils.bind(this,function(){null==gapi.client.drive&&(this.drive=this.mode=null);b()}))}))}))};
+App.prototype.load=function(){if("1"!=urlParams.embed){if(this.spinner.spin(document.body,mxResources.get("starting"))){try{this.stateArg=null!=urlParams.state&&null!=this.drive?JSON.parse(decodeURIComponent(urlParams.state)):null}catch(b){}this.editor.graph.setEnabled(null!=this.getCurrentFile());null!=window.location.hash&&0!=window.location.hash.length||null==this.drive||null==this.stateArg||null==this.stateArg.userId||this.drive.setUserId(this.stateArg.userId);null!=urlParams.fileId?(window.location.hash=
"G"+urlParams.fileId,window.location.search=this.getSearch(["fileId"])):null==this.drive?(this.mode==App.MODE_GOOGLE&&(this.mode=null),this.start()):this.loadGapi(mxUtils.bind(this,function(){this.start()}))}}else this.restoreLibraries(),"1"==urlParams.gapi&&this.loadGapi(function(){})};
-App.prototype.showAlert=function(a){if(null!=a&&0<a.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=a;a=document.createElement("a");a.className="geAlertLink";a.style.textAlign="right";a.style.marginTop="20px";a.style.display="block";a.setAttribute("href","javascript:void(0);");a.setAttribute("title",
-mxResources.get("close"));a.innerHTML=mxResources.get("close");e.appendChild(a);mxEvent.addListener(a,"click",function(a){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(a))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
-App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(a){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(n){null!=document.body&&this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=
-a?a.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var a=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var a=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var b=urlParams.title,b=null!=b?decodeURIComponent(b):
-this.defaultFilename;a=new LocalFile(this,a,b,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var d=urlParams.create;null!=d?a(b[decodeURIComponent(d)]):(d=urlParams.data,null!=d?a(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(c,d){d.source==b&&a(c)})))}}else if(null==
-this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(c){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),q=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename,
+App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";b.style.display="block";b.setAttribute("href","javascript:void(0);");b.setAttribute("title",
+mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(b){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(b))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},2E3)},15E3)}};
+App.prototype.start=function(){this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{if("1"!=urlParams.client&&"1"!=urlParams.embed&&mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(c){try{var b=this.getDiagramId(),d=this.getCurrentFile();null!=d&&d.getHash()==b||this.loadFile(b,!0)}catch(p){null!=document.body&&this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=
+c?c.getHash():""}))}})),(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var b=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var c=mxUtils.bind(this,function(a){"data:image/png;base64,"==a.substring(0,22)&&(a=this.extractGraphModelFromPng(a));var c=urlParams.title,c=null!=c?decodeURIComponent(c):
+this.defaultFilename;a=new LocalFile(this,a,c,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(a.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(a);this.getCurrentFile().setModified(!this.editor.chromeless)}),b=window.opener||window.parent;if(b!=window){var d=urlParams.create;null!=d?c(b[decodeURIComponent(d)]):(d=urlParams.data,null!=d?c(decodeURIComponent(d)):this.installMessageHandler(mxUtils.bind(this,function(a,d){d.source==b&&c(a)})))}}else if(null==
+this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=d;else{d=!1;try{d=null!=window.opener&&null!=window.opener.openFile}catch(a){}if(d)this.spinner.spin(document.body,mxResources.get("loading"));else if(d=this.getDiagramId(),"0"!=urlParams.splash||null!=d&&0!=d.length)this.loadFile(this.getDiagramId());else{var e=this.getDraft(),q=null!=e?e.data:this.getFileData(),d=Editor.useLocalStorage;this.createFile(this.defaultFilename,
q,null,null,null,null,null,!0);Editor.useLocalStorage=d;null!=e&&(d=this.getCurrentFile(),null!=d&&d.addUnsavedStatus())}}});null!=this.drive&&this.defineCustomObjects();var e=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=e&&0<e.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create",
-"title"]))}),b=mxUtils.bind(this,function(a){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,a,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;a=this.getServiceCount(!0);var d=4>=a?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(a,b){if(null==b){this.hideDialog();var c=Editor.useLocalStorage;this.createFile(0<a.length?a:this.defaultFilename,this.getFileData(),null,
-null,null,null,null,!0);Editor.useLocalStorage=c}else this.createFile(a,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,a>d?390:270,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?b(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(f){this.handleError(f,
-mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(a){b(a)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?
-(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):a()}}catch(f){this.handleError(f)}};
-App.prototype.showSplash=function(a){var e=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var a=new SplashDialog(this);this.showDialog(a.container,340,2>e||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(a){a&&!mxClient.IS_CHROMEAPP&&(a=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=a)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||a){a=4==e?2:3;var b=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),a);this.showDialog(b.container,3>a?260:300,4<=e?420:300,!0,!1);b.init()}else null==urlParams.create&&d()};
-App.prototype.addLanguageMenu=function(a,e){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var b=document.createElement("span");b.style.display="inline-block";
-b.style.fontSize="12px";b.style.margin="5px 24px 0 0";b.style.color="gray";mxUtils.write(b,mxResources.get("language"));d.appendChild(b)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var e=mxUtils.getOffset(d);
-b.popup(e.x,e.y+d.offsetHeight,null,a);this.setCurrentMenu(b)}));a.appendChild(d)}return d};
+"title"]))}),c=mxUtils.bind(this,function(c){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,c,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var b=urlParams.title,b=null!=b?decodeURIComponent(b):this.defaultFilename;c=this.getServiceCount(!0);var d=4>=c?4:3,b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){if(null==b){this.hideDialog();var a=Editor.useLocalStorage;this.createFile(0<c.length?c:this.defaultFilename,this.getFileData(),null,
+null,null,null,null,!0);Editor.useLocalStorage=a}else this.createFile(c,this.getFileData(!0),null,b)}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d);this.showDialog(b.container,380,c>d?390:270,!0,!1,mxUtils.bind(this,function(c){c&&null==this.getCurrentFile()&&this.showSplash()}));b.init()}}),e=decodeURIComponent(e);if("http://"!=e.substring(0,7)&&"https://"!=e.substring(0,8))try{null!=window.opener&&null!=window.opener[e]?c(window.opener[e]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(g){this.handleError(g,
+mxResources.get("errorLoadingFile"))}else this.loadTemplate(e,function(b){c(b)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action&&null!=this.stateArg.ids&&(window.location.hash="G"+this.stateArg.ids[0]),(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?
+(this.setMode(App.MODE_GOOGLE),this.actions.get("new").funct()):b()}}catch(g){this.handleError(g)}};
+App.prototype.showSplash=function(b){var e=this.getServiceCount(!0,!0),d=mxUtils.bind(this,function(){var c=new SplashDialog(this);this.showDialog(c.container,340,2>e||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?200:260,!0,!0,mxUtils.bind(this,function(c){c&&!mxClient.IS_CHROMEAPP&&(c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,"1"!=urlParams.local),Editor.useLocalStorage=c)}),!0)});if(this.editor.isChromelessView())this.handleError({message:mxResources.get("noFileSelected")},
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash()}));else if(null==this.mode||b){b=4==e?2:3;var c=new StorageDialog(this,mxUtils.bind(this,function(){this.hideDialog();d()}),b);this.showDialog(c.container,3>b?260:300,4<=e?420:300,!0,!1);c.init()}else null==urlParams.create&&d()};
+App.prototype.addLanguageMenu=function(b,e){var d=null;if((!this.isOfflineApp()||mxClient.IS_CHROMEAPP)&&null!=this.menus.get("language")){d=document.createElement("div");d.setAttribute("title",mxResources.get("language"));d.className="geIcon geSprite geSprite-globe";d.style.position="absolute";d.style.cursor="pointer";d.style.bottom="20px";d.style.right="20px";if(e){d.style.direction="rtl";d.style.textAlign="right";d.style.right="24px";var c=document.createElement("span");c.style.display="inline-block";
+c.style.fontSize="12px";c.style.margin="5px 24px 0 0";c.style.color="gray";mxUtils.write(c,mxResources.get("language"));d.appendChild(c)}mxEvent.addListener(d,"click",mxUtils.bind(this,function(c){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(this.menus.get("language").funct);b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var e=mxUtils.getOffset(d);
+b.popup(e.x,e.y+d.offsetHeight,null,c);this.setCurrentMenu(b)}));b.appendChild(d)}return d};
App.prototype.defineCustomObjects=function(){null!=gapi.drive.realtime&&null!=gapi.drive.realtime.custom&&(gapi.drive.realtime.custom.registerType(mxRtCell,"Cell"),mxRtCell.prototype.cellId=gapi.drive.realtime.custom.collaborativeField("cellId"),mxRtCell.prototype.type=gapi.drive.realtime.custom.collaborativeField("type"),mxRtCell.prototype.value=gapi.drive.realtime.custom.collaborativeField("value"),mxRtCell.prototype.xmlValue=gapi.drive.realtime.custom.collaborativeField("xmlValue"),mxRtCell.prototype.style=
gapi.drive.realtime.custom.collaborativeField("style"),mxRtCell.prototype.geometry=gapi.drive.realtime.custom.collaborativeField("geometry"),mxRtCell.prototype.visible=gapi.drive.realtime.custom.collaborativeField("visible"),mxRtCell.prototype.collapsed=gapi.drive.realtime.custom.collaborativeField("collapsed"),mxRtCell.prototype.connectable=gapi.drive.realtime.custom.collaborativeField("connectable"),mxRtCell.prototype.parent=gapi.drive.realtime.custom.collaborativeField("parent"),mxRtCell.prototype.children=
gapi.drive.realtime.custom.collaborativeField("children"),mxRtCell.prototype.source=gapi.drive.realtime.custom.collaborativeField("source"),mxRtCell.prototype.target=gapi.drive.realtime.custom.collaborativeField("target"))};mxRtCell=function(){};mxCodecRegistry.getCodec(mxCell).exclude.push("rtCell");mxCell.prototype.mxTransient.push("rtCell");
-App.prototype.pickFile=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(a);if(null!=e)e.pickFile();else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=
-Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(b,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(a==App.MODE_BROWSER?new StorageFile(this,b,d):new LocalFile(this,b,d))}));var b=this.dialog,f=b.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=d;f.apply(b,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
+App.prototype.pickFile=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getPeerForMode(b);if(null!=e)e.pickFile();else if(b!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){this.hideDialog();window.openNew=null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";var d=
+Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,function(c,d){this.useCanvasForExport||".png"!=d.substring(d.length-4)||(d=d.substring(0,d.length-4)+".xml");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,c,d):new LocalFile(this,c,d))}));var c=this.dialog,g=c.close;this.dialog.close=mxUtils.bind(this,function(b){Editor.useLocalStorage=d;g.apply(c,arguments);null==this.getCurrentFile()&&this.showSplash()})}else{var k=
document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&this.openFiles(k.files)}));k.click()}}};
-App.prototype.pickLibrary=function(a){a=null!=a?a:this.mode;if(a==App.MODE_GOOGLE||a==App.MODE_DROPBOX||a==App.MODE_ONEDRIVE||a==App.MODE_GITHUB||a==App.MODE_TRELLO){var e=a==App.MODE_GOOGLE?this.drive:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(a,b){if(null!=b)try{this.loadLibrary(b)}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&e.getLibrary(a,mxUtils.bind(this,function(a){this.spinner.stop();try{this.loadLibrary(a)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)}))}))}else if(a!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=a==App.MODE_BROWSER;window.openFile=
-new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{this.loadLibrary(a==App.MODE_BROWSER?new StorageLibrary(this,b,d):new LocalLibrary(this,b,d))}catch(l){this.handleError(l,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var b=document.createElement("input");
-b.setAttribute("type","file");mxEvent.addListener(b,"change",mxUtils.bind(this,function(){if(null!=b.files)for(var a=0;a<b.files.length;a++)mxUtils.bind(this,function(a){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,a.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}});b.readAsText(a)})(b.files[a])}));b.click()}};
-App.prototype.saveLibrary=function(a,e,d,b,f,k,l){b=null!=b?b:this.mode;f=null!=f?f:!1;k=null!=k?k:!1;var n=this.createLibraryDataFromImages(e),q=mxUtils.bind(this,function(a){this.spinner.stop();null!=l&&l();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&b==App.MODE_DEVICE&&(d=new LocalLibrary(this,n,a));if(null==d)this.pickFolder(b,mxUtils.bind(this,function(c){b==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(a,
-n,c,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,this.drive.libraryMimeType):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,c):b==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(a,n,mxUtils.bind(this,
-function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,c):b==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,c):b==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(a,n,mxUtils.bind(this,function(a){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(a,e)}),q,c):b==App.MODE_BROWSER?(c=mxUtils.bind(this,function(){var b=new StorageLibrary(this,n,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(b,e)}),q)}),null==localStorage.getItem(a)?c():this.confirm(mxResources.get("replaceIt",[a]),c)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(f||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(n);var c=mxUtils.bind(this,
-function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=l&&l()}),q)});if(a!=d.getTitle()){var g=d.getHash();d.rename(a,mxUtils.bind(this,function(a){d.constructor!=LocalLibrary&&g!=d.getHash()&&(mxSettings.removeCustomLibrary(g),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(g);c()}),q)}else c()}};
-App.prototype.saveFile=function(a){var e=this.getCurrentFile();if(null!=e){var d=mxUtils.bind(this,function(){this.removeDraft();e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(a||null==e.getTitle()||null==this.mode){var b=null!=e.getTitle()?e.getTitle():this.defaultFilename,f=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;a=this.getServiceCount(!0);isLocalStorage&&a++;var l=4>=a?2:6<a?4:3,b=new CreateDialog(this,
-b,mxUtils.bind(this,function(a,b){null!=a&&0<a.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(a,d)):"download"==b?(new LocalFile(this,null,a)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(c){this.createFile(a,this.getFileData(/(\.xml)$/i.test(a)||0>a.indexOf("."),/(\.svg)$/i.test(a),
-/(\.html)$/i.test(a)),null,b,d,null==this.mode,c)}),b!==App.MODE_GITHUB):null!=b&&this.save(a,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,f,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,l);this.showDialog(b.container,460,a>l?390:270,!0,!0);b.init()}else this.save(e.getTitle(),d)}};
-EditorUi.prototype.loadTemplate=function(a,e,d){var b=a;this.isCorsEnabledForUrl(b)||(b="t="+(new Date).getTime(),b=PROXY_URL+"?url="+encodeURIComponent(a)+"&"+b);this.loadUrl(b,mxUtils.bind(this,function(b){/(\.vsdx)($|\?)/i.test(a)?this.importVisio(this.base64ToBlob(b.substring(b.indexOf(",")+1)),function(a){e(a)}):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&e(a.responseText)}),a):(/(\.png)($|\?)/i.test(a)&&(b=this.extractGraphModelFromPng(b)),e(b))}),d,/(\.png)($|\?)/i.test(a)||/(\.vsdx)($|\?)/i.test(a))};App.prototype.getPeerForMode=function(a){return a==App.MODE_GOOGLE?this.drive:a==App.MODE_GITHUB?this.gitHub:a==App.MODE_DROPBOX?this.dropbox:a==App.MODE_ONEDRIVE?this.oneDrive:a==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(a,e,d,b,f,k,l,n){b=n?null:null!=b?b:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(a){q();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});b==App.MODE_GOOGLE&&null!=this.drive?(l=null!=this.stateArg?this.stateArg.folderId:l,this.drive.insertFile(a,e,l,mxUtils.bind(this,
-function(a){q();this.fileCreated(a,d,k,f)}),c)):b==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(b,mxUtils.bind(this,function(b){this.gitHub.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,f)}),c,!1,b)})):b==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,f)}),c,!1,l):b==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,f)}),c):
-b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,f)}),c,!1,l):b==App.MODE_BROWSER?(q(),b=mxUtils.bind(this,function(){var b=new StorageFile(this,e,a);b.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(b,d,k,f)}),c)}),null==localStorage.getItem(a)?b():this.confirm(mxResources.get("replaceIt",[a]),b,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(q(),this.fileCreated(new LocalFile(this,
-e,a,null==b),d,k,f))}};
-App.prototype.fileCreated=function(a,e,d,b){var f=window.location.pathname;null!=e&&0<e.length&&(f+="?libs="+e);f=this.getUrl(f);a.getMode()!=App.MODE_DEVICE&&(f+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,l=window.location.protocol+"//"+window.location.hostname+f,n=k,q=null;null!=k&&/\.svg$/i.test(a.getTitle())&&(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),
-n=this.decodeNodeIntoGraph(n,q));a.setData(this.createFileData(k,q,a,l));null!=q&&q.container.parentNode.removeChild(q.container);var c=mxUtils.bind(this,function(){this.spinner.stop()}),g=mxUtils.bind(this,function(){c();var g=this.getCurrentFile();null==d&&null!=g&&(d=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=e&&this.sidebar.showEntries(e)}),
-l=mxUtils.bind(this,function(){d||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=b&&b();null==d||d?l():(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle(),null==a.getMode())),null!=b&&b(),window.openWindow(f,null,l))});a.constructor==LocalFile||a.constructor==DriveFile?g():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,
-function(){g()}),mxUtils.bind(this,function(a){c();this.handleError(a)}))}};
-App.prototype.loadFile=function(a,e,d,b){this.hideDialog();var f=mxUtils.bind(this,function(){if(null==a||0==a.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var f=localStorage.getItem(a);if(null!=f)this.fileLoaded(new StorageFile(this,f,a)),null!=b&&b();else throw{message:mxResources.get("fileNotFound")};}catch(c){this.handleError(c,
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d),null!=b&&b();else if("R"==a.charAt(0))this.spinner.stop(),f=decodeURIComponent(a.substring(1)),
-"<"!=f.charAt(0)&&(f=this.editor.graph.decompress(f)),f=new LocalFile(this,f,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),f.getHash=function(){return a},this.fileLoaded(f),null!=b&&b();else if("U"==a.charAt(0)){var k=decodeURIComponent(a.substring(1));this.loadTemplate(k,mxUtils.bind(this,function(c){this.spinner.stop();if(null!=c&&0<c.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var f=k,l=k.lastIndexOf("."),n=f.lastIndexOf("/");
-l>n&&0<n&&(f=f.substring(n+1,l),l=k.substring(l),this.useCanvasForExport||".png"!=l||(l=".xml"),".svg"===l||".xml"===l||".html"===l||".png"===l)&&(d=f+l)}c=new LocalFile(this,c,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);c.getHash=function(){return a};this.fileLoaded(c)||"https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),c=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+
-k.substring(31,k.lastIndexOf("&")),e,b),!0):!1}),!c()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",c))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else f=null,"G"==a.charAt(0)?f=this.drive:"D"==a.charAt(0)?f=this.dropbox:"W"==a.charAt(0)?f=this.oneDrive:"H"==a.charAt(0)?f=this.gitHub:"T"==a.charAt(0)&&(f=this.trello),null==f?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(a=decodeURIComponent(a.substring(1)),f.getFile(a,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);null!=b&&b()}),mxUtils.bind(this,function(b){null!=window.console&&null!=b&&console.log("error in loadFile:",a,b);this.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==
-a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),k=this.getCurrentFile(),l=mxUtils.bind(this,function(){null!=k&&k.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=k&&(window.location.hash=k.getHash())}),f,mxResources.get("cancel"),mxResources.get("discardChanges")):f()});null==a||0==a.length?l():null!=k&&k.isModified()&&!e?window.openWindow(this.getUrl()+"#"+a,null,l):l()};
-App.prototype.getLibraryStorageHint=function(a){var e=a.getTitle();a.constructor!=LocalLibrary&&(e+="\n"+a.getHash());a.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":a.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":a.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":a.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":a.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":a.constructor==StorageLibrary?e+=" ("+
-mxResources.get("browser")+")":a.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};
-App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var a=mxUtils.bind(this,function(a){mxSettings.removeCustomLibrary(a);delete this.pendingLibraries[a]}),e=mxUtils.bind(this,function(d,b){var e=0,k=[],l=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=b&&b()}});if(null!=d)for(var n=0;n<d.length;n++){var q=encodeURIComponent(decodeURIComponent(d[n]));mxUtils.bind(this,
-function(b,d){if(null!=b&&0<b.length&&null==this.pendingLibraries[b]&&null==this.sidebar.palettes[b]){e++;var c=mxUtils.bind(this,function(a){delete this.pendingLibraries[b];k[d]=a;e--;l()}),f=mxUtils.bind(this,function(){a(b);e--;l()});this.pendingLibraries[b]=!0;var g=b.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var a=decodeURIComponent(b.substring(1));this.getLocalData(a,mxUtils.bind(this,function(b){".scratchpad"==a&&null==
-b&&(b=this.emptyLibraryXml);null!=b?c(new StorageLibrary(this,b,a)):f()}))}catch(u){f()}}),0);else if("U"==g){var p=decodeURIComponent(b.substring(1));if(!this.isOffline()){g=p;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{c(new UrlLibrary(this,a.getText(),p))}catch(u){f()}else f()}),function(){f()})}catch(x){f()}}}else{var n=null;"G"==g?null!=
-this.drive&&null!=this.drive.user&&(n=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(b.substring(1)),mxUtils.bind(this,function(a){try{c(a)}catch(u){f()}}),function(a){f()}):(delete this.pendingLibraries[b],
-f())}}})(q,n)}l()});e(mxSettings.getCustomLibraries(),function(){e((urlParams.clibs||"").split(";"))})}};
-App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
-"0px",this.shareButton.style.cssFloat="right",a=document.createElement("img"),a.setAttribute("src",this.shareImage),a.setAttribute("align","absmiddle"),a.style.marginRight="4px",a.style.marginTop="-3px",this.shareButton.appendChild(a),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_TRELLO){var e=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=e&&e.pickLibrary(mxUtils.bind(this,function(c,b){if(null!=b)try{this.loadLibrary(b)}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&e.getLibrary(c,mxUtils.bind(this,function(c){this.spinner.stop();try{this.loadLibrary(c)}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(c){this.handleError(c,null!=c?mxResources.get("errorLoadingFile"):null)}))}))}else if(b!=App.MODE_DEVICE||!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11){window.openNew=!1;window.openKey="open";var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=
+new OpenFile(mxUtils.bind(this,function(c){this.hideDialog(c)}));window.openFile.setConsumer(mxUtils.bind(this,function(c,d){try{this.loadLibrary(b==App.MODE_BROWSER?new StorageLibrary(this,c,d):new LocalLibrary(this,c,d))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}else{var c=document.createElement("input");
+c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files)for(var b=0;b<c.files.length;b++)mxUtils.bind(this,function(c){var b=new FileReader;b.onload=mxUtils.bind(this,function(b){try{this.loadLibrary(new LocalLibrary(this,b.target.result,c.name))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}});b.readAsText(c)})(c.files[b])}));c.click()}};
+App.prototype.saveLibrary=function(b,e,d,c,g,k,n){c=null!=c?c:this.mode;g=null!=g?g:!1;k=null!=k?k:!1;var p=this.createLibraryDataFromImages(e),q=mxUtils.bind(this,function(a){this.spinner.stop();null!=n&&n();this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});null==d&&c==App.MODE_DEVICE&&(d=new LocalLibrary(this,p,b));if(null==d)this.pickFolder(c,mxUtils.bind(this,function(a){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.drive.insertFile(b,
+p,a,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,a):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,p,mxUtils.bind(this,
+function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,a):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,p,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(a,e)}),q,a):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,p,mxUtils.bind(this,function(a){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(a,e)}),q,a):c==App.MODE_BROWSER?(a=mxUtils.bind(this,function(){var a=new StorageLibrary(this,p,b);a.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(a,e)}),q)}),null==localStorage.getItem(b)?a():this.confirm(mxResources.get("replaceIt",[b]),a)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(g||this.spinner.spin(document.body,mxResources.get("saving"))){d.setData(p);var a=mxUtils.bind(this,
+function(){d.save(!0,mxUtils.bind(this,function(a){this.spinner.stop();this.hideDialog(!0);k||this.libraryLoaded(d,e);null!=n&&n()}),q)});if(b!=d.getTitle()){var f=d.getHash();d.rename(b,mxUtils.bind(this,function(c){d.constructor!=LocalLibrary&&f!=d.getHash()&&(mxSettings.removeCustomLibrary(f),mxSettings.addCustomLibrary(d.getHash()));this.removeLibrarySidebar(f);a()}),q)}else a()}};
+App.prototype.saveFile=function(b){var e=this.getCurrentFile();if(null!=e){var d=mxUtils.bind(this,function(){this.removeDraft();e.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus("")});if(b||null==e.getTitle()||null==this.mode){var c=null!=e.getTitle()?e.getTitle():this.defaultFilename,g=!mxClient.IS_IOS||!navigator.standalone,k=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var n=4>=b?2:6<b?4:3,c=new CreateDialog(this,
+c,mxUtils.bind(this,function(c,b){null!=c&&0<c.length&&(null==k&&b==App.MODE_DEVICE?(this.setMode(App.MODE_DEVICE),this.save(c,d)):"download"==b?(new LocalFile(this,null,c)).save():"_blank"==b?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname))):k!=b?this.pickFolder(b,mxUtils.bind(this,function(a){this.createFile(c,this.getFileData(/(\.xml)$/i.test(c)||0>c.indexOf("."),/(\.svg)$/i.test(c),
+/(\.html)$/i.test(c)),null,b,d,null==this.mode,a)}),b!==App.MODE_GITHUB):null!=b&&this.save(c,d))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,g,this.isOffline()?null:"https://desk.draw.io/support/solutions/articles/16000042485",!0,n);this.showDialog(c.container,460,b>n?390:270,!0,!0);c.init()}else this.save(e.getTitle(),d)}};
+EditorUi.prototype.loadTemplate=function(b,e,d){var c=b;this.isCorsEnabledForUrl(c)||(c="t="+(new Date).getTime(),c=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+c);this.loadUrl(c,mxUtils.bind(this,function(c){/(\.vsdx)($|\?)/i.test(b)?this.importVisio(this.base64ToBlob(c.substring(c.indexOf(",")+1)),function(c){e(c)},d,b):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,b)?this.parseFile(new Blob([c],{type:"application/octet-stream"}),mxUtils.bind(this,function(c){4==c.readyState&&
+200<=c.status&&299>=c.status&&"<mxGraphModel"==c.responseText.substring(0,13)&&e(c.responseText)}),b):'{"state":"{\\"Properties\\":'==c.substring(0,26)?this.importLucidChart(c,0,0,!1,mxUtils.bind(this,function(){e(this.getFileData(!0))})):(/(\.png)($|\?)/i.test(b)&&(c=this.extractGraphModelFromPng(c)),e(c))}),d,/(\.png)($|\?)/i.test(b)||/(\.vsdx)($|\?)/i.test(b))};
+App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
+App.prototype.createFile=function(b,e,d,c,g,k,n,p){c=p?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;var q=mxUtils.bind(this,function(){this.spinner.stop()}),a=mxUtils.bind(this,function(a){q();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});c==App.MODE_GOOGLE&&null!=this.drive?(n=null!=this.stateArg?this.stateArg.folderId:n,this.drive.insertFile(b,e,n,mxUtils.bind(this,
+function(a){q();this.fileCreated(a,d,k,g)}),a)):c==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(c,mxUtils.bind(this,function(c){this.gitHub.insertFile(b,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),a,!1,c)})):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),a,!1,n):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),a):
+c==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,e,mxUtils.bind(this,function(a){q();this.fileCreated(a,d,k,g)}),a,!1,n):c==App.MODE_BROWSER?(q(),c=mxUtils.bind(this,function(){var c=new StorageFile(this,e,b);c.saveFile(b,!1,mxUtils.bind(this,function(){this.fileCreated(c,d,k,g)}),a)}),null==localStorage.getItem(b)?c():this.confirm(mxResources.get("replaceIt",[b]),c,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(q(),this.fileCreated(new LocalFile(this,
+e,b,null==c),d,k,g))}};
+App.prototype.fileCreated=function(b,e,d,c){var g=window.location.pathname;null!=e&&0<e.length&&(g+="?libs="+e);g=this.getUrl(g);b.getMode()!=App.MODE_DEVICE&&(g+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var k=b.getData(),k=0<k.length?this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,!0):null,n=window.location.protocol+"//"+window.location.hostname+g,p=k,q=null;null!=k&&/\.svg$/i.test(b.getTitle())&&(q=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(q.container),
+p=this.decodeNodeIntoGraph(p,q));b.setData(this.createFileData(k,q,b,n));null!=q&&q.container.parentNode.removeChild(q.container);var a=mxUtils.bind(this,function(){this.spinner.stop()}),f=mxUtils.bind(this,function(){a();var f=this.getCurrentFile();null==d&&null!=f&&(d=!f.isModified()&&null==f.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);d&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")));null!=e&&this.sidebar.showEntries(e)}),
+n=mxUtils.bind(this,function(){d||null==f||!f.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==d||d?n():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),null==b.getMode())),null!=c&&c(),window.openWindow(g,null,n))});b.constructor==LocalFile||b.constructor==DriveFile?f():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,
+function(){f()}),mxUtils.bind(this,function(c){a();this.handleError(c)}))}};
+App.prototype.loadFile=function(b,e,d,c){this.hideDialog();var g=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage)try{b=decodeURIComponent(b.substring(1));var g=localStorage.getItem(b);if(null!=g)this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c();else throw{message:mxResources.get("fileNotFound")};}catch(a){this.handleError(a,
+mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=d)this.spinner.stop(),this.fileLoaded(d),null!=c&&c();else if("S"==b.charAt(0)){this.spinner.stop();try{this.loadDescriptor(JSON.parse(this.editor.graph.decompress(b.substring(1))),
+c,mxUtils.bind(this,function(a){this.handleError(a,mxResources.get("errorLoadingFile"))}))}catch(a){this.handleError(a,mxResources.get("errorLoadingFile"))}}else if("R"==b.charAt(0))this.spinner.stop(),g=decodeURIComponent(b.substring(1)),"<"!=g.charAt(0)&&(g=this.editor.graph.decompress(g)),g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0),g.getHash=function(){return b},this.fileLoaded(g),null!=c&&c();else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1));
+this.loadTemplate(k,mxUtils.bind(this,function(a){this.spinner.stop();if(null!=a&&0<a.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var g=k,n=k.lastIndexOf("."),p=g.lastIndexOf("/");n>p&&0<p&&(g=g.substring(p+1,n),n=k.substring(n),this.useCanvasForExport||".png"!=n||(n=".xml"),".svg"===n||".xml"===n||".html"===n||".png"===n)&&(d=g+n)}a=new LocalFile(this,a,null!=urlParams.title?decodeURIComponent(urlParams.title):d,!0);a.getHash=function(){return b};this.fileLoaded(a)||
+"https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient||(this.hideDialog(),a=mxUtils.bind(this,function(){return null!=this.drive?(this.spinner.stop(),this.loadFile("G"+k.substring(31,k.lastIndexOf("&")),e,c),!0):!1}),!a()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",a))}}),mxUtils.bind(this,function(){this.spinner.stop();this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}))}else g=
+null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"T"==b.charAt(0)&&(g=this.trello),null==g?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""})):(b=decodeURIComponent(b.substring(1)),g.getFile(b,mxUtils.bind(this,function(a){this.spinner.stop();this.fileLoaded(a);
+null!=c&&c()}),mxUtils.bind(this,function(a){null!=window.console&&null!=a&&console.log("error in loadFile:",b,a);this.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null,mxUtils.bind(this,function(){var a=this.getCurrentFile();null==a?(window.location.hash="",this.showSplash()):window.location.hash=a.getHash()}))})))}),k=this.getCurrentFile(),n=mxUtils.bind(this,function(){null!=k&&k.isModified()?this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=k&&(window.location.hash=
+k.getHash())}),g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()});null==b||0==b.length?n():null!=k&&k.isModified()&&!e?window.openWindow(this.getUrl()+"#"+b,null,n):n()};
+App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
+mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};
+App.prototype.restoreLibraries=function(){if(null!=this.sidebar){null==this.pendingLibraries&&(this.pendingLibraries={});var b=mxUtils.bind(this,function(b){mxSettings.removeCustomLibrary(b);delete this.pendingLibraries[b]}),e=mxUtils.bind(this,function(d,c){var e=0,k=[],n=mxUtils.bind(this,function(){if(0==e){if(null!=d)for(var a=d.length-1;0<=a;a--)null!=k[a]&&this.loadLibrary(k[a]);null!=c&&c()}});if(null!=d)for(var p=0;p<d.length;p++){var q=encodeURIComponent(decodeURIComponent(d[p]));mxUtils.bind(this,
+function(a,c){if(null!=a&&0<a.length&&null==this.pendingLibraries[a]&&null==this.sidebar.palettes[a]){e++;var d=mxUtils.bind(this,function(b){delete this.pendingLibraries[a];k[c]=b;e--;n()}),f=mxUtils.bind(this,function(){b(a);e--;n()});this.pendingLibraries[a]=!0;var g=a.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var c=decodeURIComponent(a.substring(1));this.getLocalData(c,mxUtils.bind(this,function(a){".scratchpad"==c&&null==
+a&&(a=this.emptyLibraryXml);null!=a?d(new StorageLibrary(this,a,c)):f()}))}catch(D){f()}}),0);else if("U"==g){var p=decodeURIComponent(a.substring(1));if(!this.isOffline()){g=p;this.isCorsEnabledForUrl(g)||(g="t="+(new Date).getTime(),g=PROXY_URL+"?url="+encodeURIComponent(p)+"&"+g);try{mxUtils.get(g,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus())try{d(new UrlLibrary(this,a.getText(),p))}catch(D){f()}else f()}),function(){f()})}catch(x){f()}}}else{var q=null;"G"==g?null!=
+this.drive&&null!=this.drive.user&&(q=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(q=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(q=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(q=this.dropbox):"W"==g&&null!=this.oneDrive&&null!=this.oneDrive.getUser()&&(q=this.oneDrive);null!=q?q.getLibrary(decodeURIComponent(a.substring(1)),mxUtils.bind(this,function(a){try{d(a)}catch(D){f()}}),function(a){f()}):(delete this.pendingLibraries[a],
+f())}}})(q,p)}n()});e(mxSettings.getCustomLibraries(),function(){e((urlParams.clibs||"").split(";"))})}};
+App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();null!=b&&b.constructor==DriveFile?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.padding="0 10px 0 10px",this.shareButton.style.marginTop="-4px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth=
+"0px",this.shareButton.style.cssFloat="right",b=document.createElement("img"),b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),
this.shareButton=null)}};
-App.prototype.save=function(a,e){var d=this.getCurrentFile(),b=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(b=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,b)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.bind(this,function(a){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
-e&&e()}),f=mxUtils.bind(this,function(a){this.handleError(a,null!=a?mxResources.get("errorSavingFile"):null)});a==d.getTitle()?d.save(!0,b,f):d.saveAs(a,b,f)}};
-App.prototype.pickFolder=function(a,e,d){d=null!=d?d:!0;var b=this.spinner.pause();d&&a==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(a){b();if(a.action==google.picker.Action.PICKED){var d=null;null!=a.docs&&0<a.docs.length&&"folder"==a.docs[0].type&&(d=a.docs[0].id);e(d)}})):d&&a==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(a){b();null!=a&&null!=a.value&&0<a.value.length&&(a=a.value[0].id,e(a))})):d&&a==App.MODE_GITHUB&&
-null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):d&&a==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(a){b();e(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(a,e,d,b,f,k){f==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):f==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,a,k,mxUtils.bind(this,function(a){this.spinner.stop()}),
-mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),d,b,!1):f==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):f==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,k,b):f==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,b?this.base64ToBlob(a,d):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,k):f==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,a)}),null==localStorage.getItem(e)?
+App.prototype.save=function(b,e){var d=this.getCurrentFile(),c=mxResources.get("saving");null!=d&&d.constructor==DriveFile&&(c=mxResources.get("createRevision"));if(null!=d&&this.spinner.spin(document.body,c)){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var c=mxUtils.bind(this,function(c){this.spinner.stop();this.getCurrentFile()==d&&(d.isModified()?d.isAutosave()||d.addUnsavedStatus():this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))));null!=
+e&&e()}),g=mxUtils.bind(this,function(c){this.handleError(c,null!=c?mxResources.get("errorSavingFile"):null)});b==d.getTitle()?d.save(!0,c,g):d.saveAs(b,c,g)}};
+App.prototype.pickFolder=function(b,e,d){d=null!=d?d:!0;var c=this.spinner.pause();d&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(b){c();if(b.action==google.picker.Action.PICKED){var d=null;null!=b.docs&&0<b.docs.length&&"folder"==b.docs[0].type&&(d=b.docs[0].id);e(d)}})):d&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(b){c();null!=b&&null!=b.value&&0<b.value.length&&(b=b.value[0].id,e(b))})):d&&b==App.MODE_GITHUB&&
+null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(b){c();e(b)})):d&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(b){c();e(b)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,e,d,c,g,k){g==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(c){this.spinner.stop();this.handleError(c)})):g==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,k,mxUtils.bind(this,function(c){this.spinner.stop()}),
+mxUtils.bind(this,function(c){this.spinner.stop();this.handleError(c)}),d,c,!1):g==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(c){this.spinner.stop();this.handleError(c)}),!1,k):g==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(c){this.spinner.stop();this.handleError(c)}),!0,k,c):g==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,d):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(c){this.spinner.stop();this.handleError(c)}),!1,k):g==App.MODE_BROWSER&&(d=mxUtils.bind(this,function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?
d():this.confirm(mxResources.get("replaceIt",[e]),d))};
-App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
-""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var e=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),e,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};
-App.prototype.showAuthDialog=function(a,e,d,b){var f=this.spinner.pause();this.showDialog((new AuthDialog(this,a,e,mxUtils.bind(this,function(a){try{null!=d&&d(a,mxUtils.bind(this,function(){this.hideDialog();f()}))}catch(l){this.editor.setStatus(mxUtils.htmlEntities(l.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(a){null!=b&&b();a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(a,e,d,b,f,k){var l=e;/\.svg$/i.test(l)||(l=l.substring(0,e.lastIndexOf("."))+b);var n=!1;null!=this.gitHub&&a.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(n=!0);if((/\.vsdx$/i.test(e)||/\.vsd$/i.test(e))&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var q=new XMLHttpRequest;q.open("GET",a,!0);n||(q.responseType="blob");q.onload=mxUtils.bind(this,function(){var a=null;n?(a=JSON.parse(q.responseText),
-a=this.base64ToBlob(a.content,"application/octet-stream")):a=new Blob([q.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){f(new LocalFile(this,a,l,!0))}),k,e)});q.send()}else{var c=mxUtils.bind(this,function(b){try{/\.png$/i.test(e)?(temp=this.extractGraphModelFromPng(b),null!=temp?f(new LocalFile(this,temp,l,!0)):f(new LocalFile(this,b,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,a)?this.parseFile(new Blob([b],{type:"application/octet-stream"}),
-mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?f(new LocalFile(this,a.responseText,l,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):f(new LocalFile(this,b,l,!0))}catch(h){null!=k&&k(h)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||null!=d&&"image/"==d.substring(0,6);n?mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=f){a=JSON.parse(a.getText());var b=a.content;"base64"===a.encoding&&(b=/\.png$/i.test(e)?
-"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));c(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(a,c,k,d)}};
-App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(a){this.appIconClicked(a)}));var a=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
-"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=a;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&(a=a.getMode(),a==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":a==App.MODE_DROPBOX?
-this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":a==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":a==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":a==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=a}));
+App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(b.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),b=b.getHash(),0<b.length?window.location.hash=b:0<window.location.hash.length&&(window.location.hash=
+""))}};App.prototype.toggleChat=function(){var b=this.getCurrentFile();if(null!=b){if(null==b.chatWindow){var e=document.body.offsetWidth-300;b.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),e,80,250,350,b.realtime);b.chatWindow.window.setVisible(!1)}b.chatWindow.window.setVisible(!b.chatWindow.window.isVisible())}};
+App.prototype.showAuthDialog=function(b,e,d,c){var g=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(c){try{null!=d&&d(c,mxUtils.bind(this,function(){this.hideDialog();g()}))}catch(n){this.editor.setStatus(mxUtils.htmlEntities(n.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(b){null!=c&&c();b&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,e,d,c,g,k){var n=e;/\.svg$/i.test(n)||(n=n.substring(0,e.lastIndexOf("."))+c);var p=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(p=!0);if(/\.vsdx?$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var q=new XMLHttpRequest;q.open("GET",b,!0);p||(q.responseType="blob");q.onload=mxUtils.bind(this,function(){var a=null;p?(a=JSON.parse(q.responseText),a=this.base64ToBlob(a.content,
+"application/octet-stream")):a=new Blob([q.response],{type:"application/octet-stream"});this.importVisio(a,mxUtils.bind(this,function(a){g(new LocalFile(this,a,n,!0))}),k,e)});q.send()}else{var a=mxUtils.bind(this,function(a){try{/\.png$/i.test(e)?(temp=this.extractGraphModelFromPng(a),null!=temp?g(new LocalFile(this,temp,n,!0)):g(new LocalFile(this,a,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,b)?this.parseFile(new Blob([a],{type:"application/octet-stream"}),
+mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(new LocalFile(this,a.responseText,n,!0)):null!=k&&k({message:mxResources.get("errorLoadingFile")}))}),e):g(new LocalFile(this,a,n,!0))}catch(h){null!=k&&k(h)}});d=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||null!=d&&"image/"==d.substring(0,6);p?mxUtils.get(b,mxUtils.bind(this,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){if(null!=g){c=JSON.parse(c.getText());var b=c.content;"base64"===c.encoding&&(b=/\.png$/i.test(e)?
+"data:image/png;base64,"+b:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(b):atob(b));a(b)}}else null!=k&&k({code:App.ERROR_UNKNOWN})}),function(){null!=k&&k({code:App.ERROR_UNKNOWN})},!1,this.timeout,function(){null!=k&&k({code:App.ERROR_TIMEOUT,retry:fn})}):this.loadUrl(b,a,k,d)}};
+App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="40px";this.appIcon.style.backgroundColor="#f18808";this.appIcon.style.height=this.menubarHeight+"px";mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,"click",mxUtils.bind(this,function(c){this.appIconClicked(c)}));var b=mxClient.IS_SVG?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
+"url('"+IMAGE_PATH+"/logo-white.png')";this.appIcon.style.backgroundImage=b;this.appIcon.style.backgroundPosition="center center";this.appIcon.style.backgroundRepeat="no-repeat";mxUtils.setPrefixedStyle(this.appIcon.style,"transition","all 125ms linear");mxEvent.addListener(this.appIcon,"mouseover",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&(c=c.getMode(),c==App.MODE_GOOGLE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/google-drive-logo-white.svg)":c==App.MODE_DROPBOX?
+this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/dropbox-logo-white.svg)":c==App.MODE_ONEDRIVE?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/onedrive-logo-white.svg)":c==App.MODE_GITHUB?this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/github-logo-white.svg)":c==App.MODE_TRELLO&&(this.appIcon.style.backgroundImage="url("+IMAGE_PATH+"/trello-logo-white-orange.svg)"))}));mxEvent.addListener(this.appIcon,"mouseout",mxUtils.bind(this,function(){this.appIcon.style.backgroundImage=b}));
"1"!=urlParams.embed&&this.menubarContainer.appendChild(this.appIcon);this.fnameWrapper=document.createElement("div");this.fnameWrapper.style.position="absolute";this.fnameWrapper.style.right="120px";this.fnameWrapper.style.left="50px";this.fnameWrapper.style.top="6px";this.fnameWrapper.style.height="26px";this.fnameWrapper.style.display="none";this.fnameWrapper.style.overflow="hidden";this.fnameWrapper.style.textOverflow="ellipsis";this.fname=document.createElement("a");this.fname.setAttribute("href",
-"javascript:void(0);");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(a){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&this.actions.get("rename").funct();mxEvent.consume(a)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
+"javascript:void(0);");this.fname.setAttribute("title",mxResources.get("rename"));this.fname.className="geItem";this.fname.style.padding="2px 8px 2px 8px";this.fname.style.display="inline";this.fname.style.fontSize="18px";this.fname.style.whiteSpace="nowrap";mxEvent.addListener(this.fname,"click",mxUtils.bind(this,function(c){var b=this.getCurrentFile();null!=b&&b.isRenamable()&&this.actions.get("rename").funct();mxEvent.consume(c)}));this.fnameWrapper.appendChild(this.fname);"1"!=urlParams.embed&&
(this.menubarContainer.appendChild(this.fnameWrapper),this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.boxSizing="border-box",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px");this.toggleFormatElement=document.createElement("a");this.toggleFormatElement.setAttribute("href","javascript:void(0);");this.toggleFormatElement.setAttribute("title",mxResources.get("formatPanel")+" ("+Editor.ctrlKey+
"+Shift+P)");this.toggleFormatElement.style.position="absolute";this.toggleFormatElement.style.display="inline-block";this.toggleFormatElement.style.top="5px";this.toggleFormatElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"26px":"10px";this.toggleFormatElement.style.padding="2px";this.toggleFormatElement.style.fontSize="14px";this.toggleFormatElement.className="atlas"!=uiTheme?"geButton":"";this.toggleFormatElement.style.width="16px";this.toggleFormatElement.style.height="16px";this.toggleFormatElement.style.backgroundPosition=
-"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(a){this.actions.get("formatPanel").funct();mxEvent.consume(a)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
+"50% 50%";this.toggleFormatElement.style.backgroundRepeat="no-repeat";this.toolbarContainer.appendChild(this.toggleFormatElement);"dark"==uiTheme&&(this.toggleFormatElement.style.filter="invert(100%)");mxEvent.addListener(this.toggleFormatElement,"click",mxUtils.bind(this,function(c){this.actions.get("formatPanel").funct();mxEvent.consume(c)}));var e=mxUtils.bind(this,function(){this.toggleFormatElement.style.backgroundImage=0<this.formatWidth?"url('"+this.formatShowImage+"')":"url('"+this.formatHideImage+
"')"});this.addListener("formatWidthChanged",e);e();this.fullscreenElement=document.createElement("a");this.fullscreenElement.setAttribute("href","javascript:void(0);");this.fullscreenElement.setAttribute("title",mxResources.get("fullscreen"));this.fullscreenElement.style.position="absolute";this.fullscreenElement.style.display="inline-block";this.fullscreenElement.style.top="5px";this.fullscreenElement.style.right="atlas"!=uiTheme&&"1"!=urlParams.embed?"42px":"26px";this.fullscreenElement.style.padding=
-"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var d=this.hsplitPosition,b=!1;"dark"==uiTheme&&
-(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(a){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!b);this.toggleFormatPanel(!b);this.hsplitPosition=b?d:0;this.hideFooter();b=!b;mxEvent.consume(a)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
+"2px";this.fullscreenElement.style.fontSize="14px";this.fullscreenElement.className="atlas"!=uiTheme?"geButton":"";this.fullscreenElement.style.width="16px";this.fullscreenElement.style.height="16px";this.fullscreenElement.style.backgroundPosition="50% 50%";this.fullscreenElement.style.backgroundRepeat="no-repeat";this.fullscreenElement.style.backgroundImage="url('"+this.fullscreenImage+"')";this.toolbarContainer.appendChild(this.fullscreenElement);var d=this.hsplitPosition,c=!1;"dark"==uiTheme&&
+(this.fullscreenElement.style.filter="invert(100%)");mxEvent.addListener(this.fullscreenElement,"click",mxUtils.bind(this,function(b){"atlas"!=uiTheme&&"1"!=urlParams.embed&&this.toggleCompactMode(!c);this.toggleFormatPanel(!c);this.hsplitPosition=c?d:0;this.hideFooter();c=!c;mxEvent.consume(b)}));"atlas"==uiTheme&&(mxUtils.setOpacity(this.toggleFormatElement,70),mxUtils.setOpacity(this.fullscreenElement,70),this.toggleFormatElement.style.right="6px",this.fullscreenElement.style.right="22px",this.toggleFormatElement.style.top=
"8px",this.fullscreenElement.style.top="8px");"1"!=urlParams.embed&&(this.toggleElement=document.createElement("a"),this.toggleElement.setAttribute("href","javascript:void(0);"),this.toggleElement.setAttribute("title",mxResources.get("collapseExpand")),this.toggleElement.className="geButton",this.toggleElement.style.position="absolute",this.toggleElement.style.display="inline-block",this.toggleElement.style.width="16px",this.toggleElement.style.height="16px",this.toggleElement.style.color="#666",
this.toggleElement.style.top="5px",this.toggleElement.style.right="10px",this.toggleElement.style.padding="2px",this.toggleElement.style.fontSize="14px",this.toggleElement.style.textDecoration="none",this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')",this.toggleElement.style.backgroundPosition="50% 50%",this.toggleElement.style.backgroundRepeat="no-repeat","dark"==uiTheme&&(this.toggleElement.style.filter="invert(100%)"),mxEvent.addListener(this.toggleElement,"click",mxUtils.bind(this,
-function(a){this.toggleCompactMode();mxEvent.consume(a)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};
-App.prototype.toggleCompactMode=function(a){a||"none"!=this.appIcon.style.display?(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="4px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility=
+function(c){this.toggleCompactMode();mxEvent.consume(c)})),"atlas"!=uiTheme&&this.toolbarContainer.appendChild(this.toggleElement),740>=screen.height&&"undefined"!==typeof this.toggleElement.click&&window.setTimeout(mxUtils.bind(this,function(){this.toggleElement.click()}),0))}};
+App.prototype.toggleCompactMode=function(b){b||"none"!=this.appIcon.style.display?(this.menubar.container.style.position="relative",this.menubar.container.style.paddingLeft="4px",this.menubar.container.style.paddingTop="0px",this.menubar.container.style.paddingBottom="0px",this.menubar.container.style.top="0px",this.toolbar.container.style.paddingLeft="4px",this.buttonContainer.style.visibility="hidden",this.appIcon.style.display="none",this.fnameWrapper.style.display="none",this.fnameWrapper.style.visibility=
"hidden",this.menubarHeight=EditorUi.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronDownImage+"')"):(this.menubar.container.style.position="absolute",this.menubar.container.style.paddingLeft="52px",this.menubar.container.style.paddingTop="",this.menubar.container.style.paddingBottom="",this.menubar.container.style.top="29px",this.toolbar.container.style.paddingLeft="56px",this.buttonContainer.style.visibility="visible",this.appIcon.style.display=
"block",this.fnameWrapper.style.display="block",this.fnameWrapper.style.visibility="visible",this.menubarHeight=App.prototype.menubarHeight,this.refresh(),this.toggleElement.style.backgroundImage="url('"+this.chevronUpImage+"')")};
App.prototype.updateUserElement=function(){if(null!=this.drive&&null!=this.drive.getUser()||null!=this.oneDrive&&null!=this.oneDrive.getUser()||null!=this.dropbox&&null!=this.dropbox.getUser()||null!=this.gitHub&&null!=this.gitHub.getUser()||null!=this.trello&&this.trello.isAuthorized()){null==this.userElement&&(this.userElement=document.createElement("a"),this.userElement.setAttribute("href","javascript:void(0);"),this.userElement.className="geItem",this.userElement.style.position="absolute",this.userElement.style.fontSize=
"8pt",this.userElement.style.top="4px",this.userElement.style.right="30px",this.userElement.style.color="#666",this.userElement.style.margin="4px",this.userElement.style.padding="2px",this.userElement.style.paddingRight="16px",this.userElement.style.verticalAlign="middle",this.userElement.style.backgroundImage="url("+IMAGE_PATH+"/expanded.gif)",this.userElement.style.backgroundPosition="100% 60%",this.userElement.style.backgroundRepeat="no-repeat",this.menubarContainer.appendChild(this.userElement),
-mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(a){if(null==this.userPanel){var d=document.createElement("div");d.className="geDialog";d.style.position="absolute";d.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";d.style.right="36px";d.style.padding="0px";this.userPanel=d}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var b=!1;this.userPanel.innerHTML="";d=document.createElement("img");d.setAttribute("src",
-Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.className="geDialogClose";d.style.top="8px";d.style.right="8px";mxEvent.addListener(d,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(d);null!=this.drive&&(d=this.drive.getUser(),null!=d&&(b=!0,this.userPanel.innerHTML+='<table title="User ID: '+d.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+
+mxEvent.addListener(this.userElement,"click",mxUtils.bind(this,function(b){if(null==this.userPanel){var d=document.createElement("div");d.className="geDialog";d.style.position="absolute";d.style.top=this.userElement.clientTop+this.userElement.clientHeight+6+"px";d.style.right="36px";d.style.padding="0px";this.userPanel=d}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var c=!1;this.userPanel.innerHTML="";d=document.createElement("img");d.setAttribute("src",
+Dialog.prototype.closeImage);d.setAttribute("title",mxResources.get("close"));d.className="geDialogClose";d.style.top="8px";d.style.right="8px";mxEvent.addListener(d,"click",mxUtils.bind(this,function(){null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)}));this.userPanel.appendChild(d);null!=this.drive&&(d=this.drive.getUser(),null!=d&&(c=!0,this.userPanel.innerHTML+='<table title="User ID: '+d.id+'" style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+
(null!=d.pictureUrl?'<img width="80" height="80" style="margin-right:10px;border-radius:50%;" src="'+d.pictureUrl+'"/>':'<img width="80" height="80" style="margin-right:4px;margin-top:2px;" src="'+this.defaultUserPicture+'"/>')+'</td><td valign="top" style="white-space:nowrap;'+(null!=d.pictureUrl?"padding-top:14px;":"")+'"><b>'+mxUtils.htmlEntities(d.displayName)+"</b><br><small>"+mxUtils.htmlEntities(d.email)+"</small><br><br><small>"+mxResources.get("googleDrive")+"</small></tr></table>",d=document.createElement("div"),
-d.style.textAlign="center",d.style.padding="12px",d.style.background="whiteSmoke",d.style.borderTop="1px solid #e0e0e0",d.style.whiteSpace="nowrap",d.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var a=this.getCurrentFile();null!=a&&a.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display=
-"none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");a.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=a&&a.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(d)));
-d=mxUtils.bind(this,function(a,d,e,n){null!=a&&(b&&this.userPanel.appendChild(document.createElement("hr")),b=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=d?'<img style="margin-right:10px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(a.displayName)+"</b>"+(null!=a.email?'<br><font color="gray">'+mxUtils.htmlEntities(a.email)+"</font>":"")+(null!=n?
-"<br><br><small>"+mxUtils.htmlEntities(n)+"</small>":"")+"</td></tr></table>",a=document.createElement("div"),a.style.textAlign="center",a.style.padding="12px",a.style.background="whiteSmoke",a.style.borderTop="1px solid #e0e0e0",a.style.whiteSpace="nowrap",null!=e&&a.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(a))});null!=this.dropbox&&d(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=
-a&&a.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&d(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==OneDriveFile){var b=mxUtils.bind(this,
-function(){this.oneDrive.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&d(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==GitHubFile){var b=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});
-a.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&d(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var a=this.getCurrentFile();if(null!=a&&a.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});a.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.trello.logout()}),mxResources.get("trello"));b||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(a)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||null==this.userPanel||null==this.userPanel.parentNode||
-this.userPanel.parentNode.removeChild(this.userPanel)})));var a=null;null!=this.drive&&null!=this.drive.getUser()?a=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?a=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?a=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(a=this.gitHub.getUser());null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,a.displayName),this.userElement.style.display="block")):
-this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var a=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){a.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(a){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
-var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,
-arguments);var a=this.editorUi,d=a.editor.graph,k=mxUtils.bind(d,d.isEnabled),l=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),q=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
-"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||a.isOffline()||((new Image).src=IMAGE_PATH+
-"/help.png");a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&
-a.exportSvg(b/100,c,d,e,g,f,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var g=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,
-mxResources.get(c?"compressed":"allPages"),!0);f.style.marginBottom="16px";mxEvent.addListener(g,"change",function(){g.checked?f.setAttribute("disabled","disabled"):f.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!f.checked:null,null,!g.checked,c?null:!f.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){a.showPublishLinkDialog(mxResources.get("url"),
-!0,null,null,function(b,c,d,e,g,f){b=new EmbedDialog(a,a.createLink(b,c,d,e,g,f,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,g,f,m,h,k,l){a.createHtml(b,c,d,e,g,f,m,h,k,l,mxUtils.bind(this,function(b,c){var d=
-a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,
-360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);g.style.marginBottom="16px";a.pdfPageExport||
-mxEvent.addListener(e,"change",function(){e.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){function b(){a.fileLoaded(null)}var c=a.getCurrentFile();null!=c&&c.isModified()?a.confirm(mxResources.get("allChangesLost"),
-null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",function(){var b=a.getCurrentFile();if(null==b||b.constructor!=
-DriveFile&&b.constructor!=DropboxFile||null==a.drive&&b.constructor==DriveFile||null==a.dropbox&&b.constructor==DropboxFile)a.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(a.spinner.spin(document.body,mxResources.get("loading")))if(b.constructor==DropboxFile){var c=a.dropbox.client.filesListRevisions({path:b.stat.path_lower,limit:100});c.then(mxUtils.bind(this,function(c){a.spinner.stop();try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate:c.client_modified,
-fileSize:c.size,getXml:function(d,e){a.dropbox.readFile({path:b.stat.path_lower,rev:c.rev},d,e)},getUrl:function(){return a.getUrl(window.location.pathname+"?rev="+c.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(c.entries[e]);var g=new RevisionDialog(a,d);a.showDialog(g.container,640,480,!0,!0);g.init()}catch(D){a.handleError(D)}}));c["catch"](function(b){a.spinner.stop();a.handleError(b)})}else a.drive.executeRequest(gapi.client.drive.revisions.list({fileId:b.getId()}),function(c){a.spinner.stop();
-for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,g){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){g(a)})},function(a){g(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,c.items);a.showDialog(d.container,
-640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,a.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(b)))});
-if("undefined"!==typeof MathJax){var g=a.actions.addAction("mathematicalTypesetting",function(){var b=new ChangePageSetup(a);b.ignoreColor=!0;b.ignoreImage=!0;b.mathEnabled=!a.isMathEnabled();d.model.execute(b)});g.setToggleAction(!0);g.setSelectedCallback(function(){return a.isMathEnabled()});g.isEnabled=k}isLocalStorage&&(g=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
-var h=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var t="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
-a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],g=e.indexOf("=");if(0<=g){var f=e.substring(0,g),e=e.substring(g+1);null==a.copiedStyle[f]&&"none"==e&&(a.copiedStyle[f]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
-null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),g=0;g<t.length;g++){var f=t[g],h=a.copiedStyle[f];e.style[f]!=h&&d.setCellStyles(f,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
-320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,g,h,!k,l)}),!0,!1,"png"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
-function(b,c,d){a.downloadFile(c?"xmlpng":"png",null,null,b,null,null,d)}))}));a.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,g,f,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||
-a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}));g=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return d.shadowVisible});var v=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){v||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){v=!1}),
-v=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){a.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});a.actions.addAction("support...",function(){a.openLink("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
-a.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?a.openLink("shortcuts.svg"):a.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){a.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});g=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=
-new TagsWindow(a,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
-this.tagsWindow.window.isVisible()}));g=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));
-g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){a.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],g=null;""!=e&&(g=b.addItem(e,
-null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(g,Editor.checkmarkImage));return g});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var p=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var b=p.apply(this,arguments);if(null!=
-b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&
-a.isOffline())this.addMenuItems(b,["about"],c);else{var e=b.addItem("Search:",null,null,c,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","25");g.style.marginLeft="8px";mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(a){var b=mxUtils.trim(g.value);13==a.keyCode&&0<b.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+
-encodeURIComponent(b)),g.value="",this.editorUi.logEvent({category:"Help",action:"search",label:b}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(g.value="")}));e.firstChild.nextSibling.appendChild(g);mxEvent.addGestureListeners(g,function(a){document.activeElement!=g&&g.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){g.focus()},0);this.addMenuItems(b,
-["-","quickStart","userManual","keyboardShortcuts","-"],c);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"],c);this.addMenuItems(b,["support","-"],c);a.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(b,["download"],c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(b,["offline"],c);this.addMenuItems(b,["-","about"],c)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);
+d.style.textAlign="center",d.style.padding="12px",d.style.background="whiteSmoke",d.style.borderTop="1px solid #e0e0e0",d.style.whiteSpace="nowrap",d.appendChild(mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.constructor==DriveFile?this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("signOut"));this.diagramContainer.style.display="none";this.formatContainer.style.display=
+"none";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";null!=this.tabContainer&&(this.tabContainer.style.display="none");c.close();window.setTimeout(mxUtils.bind(this,function(){this.showDialog=function(){};window.location.hash="";this.drive.clearUserId();gapi.auth.signOut();window.location.reload()}),null!=c&&c.constructor==DriveFile?2E3:0)})):(this.drive.clearUserId(),this.drive.setUser(null),gapi.auth.signOut())}))),this.userPanel.appendChild(d)));
+d=mxUtils.bind(this,function(b,d,e,p){null!=b&&(c&&this.userPanel.appendChild(document.createElement("hr")),c=!0,this.userPanel.innerHTML+='<table style="font-size:10pt;padding:20px 20px 10px 10px;"><tr><td valign="top">'+(null!=d?'<img style="margin-right:10px;" src="'+d+'" width="40" height="40"/></td>':"")+'<td valign="middle" style="white-space:nowrap;"><b>'+mxUtils.htmlEntities(b.displayName)+"</b>"+(null!=b.email?'<br><font color="gray">'+mxUtils.htmlEntities(b.email)+"</font>":"")+(null!=p?
+"<br><br><small>"+mxUtils.htmlEntities(p)+"</small>":"")+"</td></tr></table>",b=document.createElement("div"),b.style.textAlign="center",b.style.padding="12px",b.style.background="whiteSmoke",b.style.borderTop="1px solid #e0e0e0",b.style.whiteSpace="nowrap",null!=e&&b.appendChild(mxUtils.button(mxResources.get("signOut"),e)),this.userPanel.appendChild(b))});null!=this.dropbox&&d(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=
+c&&c.constructor==DropboxFile){var b=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&d(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.constructor==OneDriveFile){var b=mxUtils.bind(this,
+function(){this.oneDrive.logout();window.location.hash=""});c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&d(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.constructor==GitHubFile){var b=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});
+c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.trello&&d(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.constructor==TrelloFile){var b=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});c.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}else this.trello.logout()}),mxResources.get("trello"));c||(d=document.createElement("div"),d.style.textAlign="center",d.style.padding="20px 20px 10px 10px",d.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(d));document.body.appendChild(this.userPanel)}mxEvent.consume(b)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(b){mxEvent.isConsumed(b)||null==this.userPanel||null==this.userPanel.parentNode||
+this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):
+this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};var editorResetGraph=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);this.graph.pageFormat=mxSettings.getPageFormat()};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){b.apply(this,arguments);this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-10+"px"};Menus.prototype.createHelpLink=function(c){var b=document.createElement("span");b.setAttribute("title",mxResources.get("help"));b.style.cssText="color:blue;text-decoration:underline;margin-left:12px;cursor:help;";
+var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);b.appendChild(d);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();this.editorUi.openLink(c);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(c,b){null!=c&&c.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var e=Menus.prototype.init;Menus.prototype.init=function(){e.apply(this,
+arguments);var c=this.editorUi,b=c.editor.graph,d=mxUtils.bind(b,b.isEnabled),n=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),p=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),q=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
+"drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),a=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||c.isOffline()||((new Image).src=IMAGE_PATH+
+"/help.png");c.actions.addAction("new...",function(){var a=c.isOffline(),b=new NewDialog(c,a);c.showDialog(b.container,a?350:620,a?70:440,!0,!0,function(a){a&&null==c.getCurrentFile()&&c.showSplash()});b.init()});c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,d,e,f,g,h,k,n){a=parseInt(a);!isNaN(a)&&0<a&&
+c.exportSvg(a/100,b,d,e,f,g,h,!k,n)}),!0,null,"svg")}));c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var a=document.createElement("div");a.style.whiteSpace="nowrap";var d=null==c.pages||1>=c.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(e);var f=c.addCheckbox(a,mxResources.get("selectionOnly"),!1,b.isSelectionEmpty()),g=c.addCheckbox(a,
+mxResources.get(d?"compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});a=new CustomDialog(c,a,mxUtils.bind(this,function(){c.downloadFile("xml",d?!g.checked:null,null,!f.checked,d?null:!g.checked)}),null,mxResources.get("export"));c.showDialog(a.container,300,146,!0,!0)}));c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),
+!0,null,null,function(a,b,d,e,f,g){a=new EmbedDialog(c,c.createLink(a,b,d,e,f,g,null,!0));c.showDialog(a.container,440,240,!0,!0);a.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(a){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,a,function(a,b,d,e,f,l,g,h,k,n){c.createHtml(a,b,d,e,f,l,g,h,k,n,mxUtils.bind(this,function(a,b){var d=
+c.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+a+"\n"+b+"\n</body>\n</html>";c.saveData(d+".html","html",e,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(c.isOffline()||c.printPdfExport)c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,
+360,null!=c.pages&&1<c.pages.length?420:360,!0,!0);else{var a=document.createElement("div");a.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatPdf"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";a.appendChild(d);var e=c.addCheckbox(a,mxResources.get("selectionOnly"),!1,b.isSelectionEmpty()),f=c.addCheckbox(a,mxResources.get("crop"),!b.pageVisible||!c.pdfPageExport,!c.pdfPageExport);f.style.marginBottom="16px";c.pdfPageExport||
+mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});a=new CustomDialog(c,a,mxUtils.bind(this,function(){c.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));c.showDialog(a.container,300,146,!0,!0)}}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function a(){c.fileLoaded(null)}var b=c.getCurrentFile();null!=b&&b.isModified()?c.confirm(mxResources.get("allChangesLost"),
+null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){b.getSelectionCells();if(1==b.getSelectionCount()){var a=b.getSelectionCell(),d=b.view.getState(a);null!=d&&null!=d.shape&&null!=d.shape.stencil&&(a=new EditShapeDialog(c,a,mxResources.get("editShape")+":",630,400),c.showDialog(a.container,640,480,!0,!1),a.init())}}));c.actions.addAction("revisionHistory...",function(){var a=c.getCurrentFile();if(null==a||a.constructor!=
+DriveFile&&a.constructor!=DropboxFile||null==c.drive&&a.constructor==DriveFile||null==c.dropbox&&a.constructor==DropboxFile)c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"));else if(c.spinner.spin(document.body,mxResources.get("loading")))if(a.constructor==DropboxFile){var b=c.dropbox.client.filesListRevisions({path:a.stat.path_lower,limit:100});b.then(mxUtils.bind(this,function(b){c.spinner.stop();try{for(var d=[],e=b.entries.length-1;0<=e;e--)(function(b){d.push({modifiedDate:b.client_modified,
+fileSize:b.size,getXml:function(d,e){c.dropbox.readFile({path:a.stat.path_lower,rev:b.rev},d,e)},getUrl:function(){return c.getUrl(window.location.pathname+"?rev="+b.rev+"&chrome=0&edit=_blank")+window.location.hash}})})(b.entries[e]);var f=new RevisionDialog(c,d);c.showDialog(f.container,640,480,!0,!0);f.init()}catch(C){c.handleError(C)}}));b["catch"](function(a){c.spinner.stop();c.handleError(a)})}else c.drive.executeRequest(gapi.client.drive.revisions.list({fileId:a.getId()}),function(b){c.spinner.stop();
+for(var d=0;d<b.items.length;d++)(function(d){d.getXml=function(e,f){c.drive.executeRequest(gapi.client.drive.revisions.get({fileId:a.getId(),revisionId:b.items[b.items.length-1]===d?a.desc.headRevisionId:d.id}),function(a){c.drive.getXmlFile(a,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return c.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(b.items[d]);d=new RevisionDialog(c,b.items);c.showDialog(d.container,
+640,480,!0,!0);d.init()},function(a){c.spinner.stop();c.handleError(a)})});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");c.actions.addAction("upload...",function(){var a=c.getCurrentFile();null!=a&&(window.drawdata=c.getFileData(),a=null!=a.getTitle()?a.getTitle():c.defaultFilename,c.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(c.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(a)))});
+if("undefined"!==typeof MathJax){var f=c.actions.addAction("mathematicalTypesetting",function(){var a=new ChangePageSetup(c);a.ignoreColor=!0;a.ignoreImage=!0;a.mathEnabled=!c.isMathEnabled();b.model.execute(a)});f.setToggleAction(!0);f.setSelectedCallback(function(){return c.isMathEnabled()});f.isEnabled=d}isLocalStorage&&(f=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),f.setToggleAction(!0),f.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
+var h=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});h.setToggleAction(!0);h.setSelectedCallback(function(){return h.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var a=b.getSelectionCells(),d=[],e=0;e<a.length;e++)b.getModel().isVertex(a[e])&&d.push(a[e]);0<d.length&&(a=new EditGeometryDialog(c,d),c.showDialog(a.container,180,180,!0,!0),a.init())},null,null,Editor.ctrlKey+"+Shift+M");var m="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
+c.actions.addAction("copyStyle",function(){var a=b.view.getState(b.getSelectionCell());if(b.isEnabled()&&null!=a){c.copiedStyle=mxUtils.clone(a.style);for(var a=b.getModel().getStyle(a.cell),a=null!=a?a.split(";"):[],d=0;d<a.length;d++){var e=a[d],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==c.copiedStyle[g]&&"none"==e&&(c.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){if(b.isEnabled()&&!b.isSelectionEmpty()&&
+null!=c.copiedStyle){b.getModel().beginUpdate();try{for(var a=b.getSelectionCells(),d=0;d<a.length;d++)for(var e=b.view.getState(a[d]),f=0;f<m.length;f++){var g=m[f],h=c.copiedStyle[g];e.style[g]!=h&&b.setCellStyles(g,h,[a[d]])}}finally{b.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var a=new BackgroundImageDialog(c,function(a){c.setBackgroundImage(a)});c.showDialog(a.container,
+320,170,!0,!0);a.init()}}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,d,e,f,g,h,k,n){a=parseInt(a);!isNaN(a)&&0<a&&c.exportImage(a/100,b,d,e,f,h,!k,n)}),!0,!1,"png"):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,
+function(a,b,d){c.downloadFile(b?"xmlpng":"png",null,null,a,null,null,d)}))}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(a,b,d,e,f,g,h,k,n){a=parseInt(a);!isNaN(a)&&0<a&&c.exportImage(a/100,!1,d,e,!1,h,!k,!1,"jpeg")}),!0,!1,"jpeg"):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||
+c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(a,b){c.downloadFile("jpeg",null,null,a)}),!0)}));f=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){b.setShadowVisible(!b.shadowVisible)}));f.setToggleAction(!0);f.setSelectedCallback(function(){return b.shadowVisible});var t=!1;c.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(c.showDialog((new AboutDialog(c)).container,220,300,!0,!0,function(){t=!1}),
+t=!0)},null,null,"F1"));c.actions.addAction("userManual...",function(){c.openLink("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});c.actions.addAction("support...",function(){c.openLink("https://about.draw.io/support/")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+c.openLink("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?c.openLink("shortcuts.svg"):c.openLink("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});c.actions.addAction("feedback...",function(){var a=new FeedbackDialog(c);c.showDialog(a.container,610,360,!0,!0);a.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});f=c.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=
+new TagsWindow(c,document.body.offsetWidth-380,230,300,120),this.tagsWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&
+this.tagsWindow.window.isVisible()}));f=c.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(c,document.body.offsetWidth-300,110,240,140),this.findWindow.window.addListener("show",function(){c.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){c.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),c.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));
+f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){c.exportVisio()}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(a,b){var d=mxUtils.bind(this,function(d){var e=""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=a.addItem(e,
+null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),b),(d==mxLanguage||""==d&&null==mxLanguage)&&a.addCheckmark(f,Editor.checkmarkImage));return f});d("");a.addSeparator(b);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(a){var c=u.apply(this,arguments);if(null!=
+c){var b=this.get("language");null!=b&&(b=c.addMenu("",b.funct),b.setAttribute("title",mxResources.get("language")),b.style.width="16px",b.style.paddingTop="2px",b.style.paddingLeft="4px",b.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',b.style.zIndex="1",b.style.position="absolute",b.style.top="2px",b.style.right="17px",b.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(b,60),document.body.appendChild(b))}return c}}this.put("help",new Menu(mxUtils.bind(this,function(a,d){if(!mxClient.IS_CHROMEAPP&&
+c.isOffline())this.addMenuItems(a,["about"],d);else{var e=a.addItem("Search:",null,null,d,null,null,!1);e.style.backgroundColor="dark"==uiTheme?"#505759":"whiteSmoke";e.style.cursor="default";var f=document.createElement("input");f.setAttribute("type","text");f.setAttribute("size","25");f.style.marginLeft="8px";mxEvent.addListener(f,"keydown",mxUtils.bind(this,function(a){var c=mxUtils.trim(f.value);13==a.keyCode&&0<c.length?(this.editorUi.openLink("https://desk.draw.io/support/search/solutions?term="+
+encodeURIComponent(c)),f.value="",this.editorUi.logEvent({category:"Help",action:"search",label:c}),null!=this.editorUi.menubar&&window.setTimeout(mxUtils.bind(this,function(){this.editorUi.menubar.hideMenu()}),0)):27==a.keyCode&&(f.value="")}));e.firstChild.nextSibling.appendChild(f);mxEvent.addGestureListeners(f,function(a){document.activeElement!=f&&f.focus();mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)});window.setTimeout(function(){f.focus()},0);this.addMenuItems(a,
+["-","quickStart","userManual","keyboardShortcuts","-"],d);mxClient.IS_CHROMEAPP||this.addMenuItems(a,["feedback"],d);this.addMenuItems(a,["support","-"],d);c.isOffline()||navigator.standalone||"1"==urlParams.embed||this.addMenuItems(a,["download"],d);c.isOfflineApp()||"1"==urlParams.embed||this.addMenuItems(a,["offline"],d);this.addMenuItems(a,["-","about"],d)}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);
this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",
-mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,
-null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){d.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+d.compress(mxUtils.getXml(d.encodeCells(d.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(b,["-","createSidebarEntry","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),
-this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),g=e.createElement("output");e.appendChild(g);e=new mxXmlCanvas2D(g);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);var f=0,h=e.save;e.save=function(){f++;h.apply(this,arguments)};var m=e.restore;e.restore=function(){f--;m.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",
-a,f);k.apply(this,arguments);mxLog.debug("leaving shape",a,f)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(g));mxLog.debug("stateCounter",f)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&
-null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&
-a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&
-null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,
-!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+
-"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,g,f,h,m,k,l){a.createHtml(b,c,d,e,g,f,h,m,k,l,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");
-d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var g=a.document.createElement("div");g.marginLeft="26px";g.marginTop="26px";mxUtils.write(g,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+
-window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";g.appendChild(e);a.document.body.insertBefore(g,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];d.body.appendChild(a);g.parentNode.removeChild(g)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&
-a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,g,f,function(b){a.spinner.stop();
-b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,g,f,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);
-b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,g,f,h,m){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),
-function(k){a.spinner.stop();k=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+m+';" src="'+a.createLink(b,c,d,e,g,f,k)+'"></iframe>');a.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));a.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,g,f){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,
-a.createLink(b,c,d,e,g,f,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){a.openLink("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)g=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),
-g.setToggleAction(!0),g.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,170,!0,!1)});g=a.actions.addAction("search",function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});g.setToggleAction(!0);g.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=
-function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),
-a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,"*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&this.addMenuItems(b,
-["exportJpg"],c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPng","exportJpg"],c);this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportHtml","exportXml","exportUrl"],
-c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,e){function g(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,
-null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=null});var g=a.dialog,f=g.close;a.dialog.close=function(b){Editor.useLocalStorage=e;f.apply(g,arguments);b&&null==a.getCurrentFile()&&"1"!=
-urlParams.embed&&a.showSplash()}}}function f(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=k(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");h(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var h=mxUtils.bind(this,function(b,c,e){var g=d.view,f=d.getGraphBounds(),
-h=d.snap(Math.ceil(Math.max(0,f.x/g.scale-g.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(f.y+f.height)/g.scale-g.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(g){var f=!0,m=mxUtils.bind(this,function(){a.resizeImage(g,b,mxUtils.bind(this,function(g,m,l){g=f?Math.min(1,Math.min(a.maxImageSize/m,a.maxImageSize/l)):1;a.importFile(b,c,h,k,Math.round(m*g),Math.round(l*g),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),
-f)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){f=a;m()}):m()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),k=mxUtils.bind(this,function(a){var b="text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=
-typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){f(a.drive)},e):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){f(a.gitHub)},e);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){f(a.dropbox)},e):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
-e,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){f(a.oneDrive)},e):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){f(a.trello)},e):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);b.addSeparator(e);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+
-"...",null,function(){g(!1)},e);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){g(!0)},e);a.isOffline()||(b.addSeparator(e),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?"image/png":"text/xml";a.loadUrl(PROXY_URL+"?url="+encodeURIComponent(b),function(a){h(a,c,b)},function(){a.spinner.stop();
-a.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==c)}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},e));a.showCsvImport&&b.addItem(mxResources.get("csv")+"...",null,function(){a.showImportCsvDialog()},e)})).isEnabled=k;this.put("theme",new Menu(mxUtils.bind(this,function(b,c){var d=b.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"!=uiTheme&&"dark"!=
-uiTheme&&"min"!=uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"min"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"atlas"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage);d=b.addItem(mxResources.get("dark"),
-null,function(){mxSettings.setUi("dark");mxSettings.save();a.alert(mxResources.get("restartForChangeRequired"))},c);"dark"==uiTheme&&b.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():this.editorUi.defaultFilename,c=new FilenameDialog(this.editorUi,c,mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&0<a.length&&null!=b&&this.editorUi.spinner.spin(document.body,
-mxResources.get("renaming"))&&b.rename(a,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),b.constructor==DriveFile||b.constructor==StorageFile?mxResources.get("diagramName"):null,function(b){if(null!=b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(c.container,300,80,!0,!0);
-c.init()}})).isEnabled=function(){return this.enabled&&k.apply(this,arguments)};a.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var b=a.getCurrentFile();if(null!=b){var c=null!=b.getTitle()?b.getTitle():a.defaultFilename,d="",e=c.lastIndexOf(".");0<=e&&(d=c.substring(e),c=c.substring(0,e));c=mxResources.get("copyOf",[c])+d;b.constructor==DriveFile?(c=new CreateDialog(a,c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,
-mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),
-null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(this.editorUi.getFileData(!0),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));
-this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){a.openLink("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){a.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));
-this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var y="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText plantUml formatSql".split(" "),x=function(b,c,d,e){b.addItem(d,
-null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var b=new ParseDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},u=function(a,b,c,e){var g=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(g.x,g.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted",
-"cells",[a]))}finally{d.getModel().endUpdate()}d.scrollCellToVisible(a);d.setSelectionCell(a);d.container.focus();d.editAfterInsert&&d.startEditing(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(u("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",
-function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&u("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&u("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;a.actions.addAction("insertRhombus",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&u("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=
-k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<y.length;c++)"-"==y[c]?a.addSeparator(b):x(a,b,mxResources.get(y[c])+"...",y[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+
-" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,d){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickFile(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},
-d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,
-function(){a.pickFile(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=
-new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("newLibrary",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?
-b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},
-d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+
-" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=
-a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){a.pickLibrary(App.MODE_GOOGLE)},d):l&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickLibrary(App.MODE_GITHUB)},d);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickLibrary(App.MODE_DROPBOX)},d):n&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+
-"...)",null,function(){},d,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){a.pickLibrary(App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickLibrary(App.MODE_TRELLO)},d):c&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&
-"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){a.pickLibrary(App.MODE_DEVICE)},d);a.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=b;a.isCorsEnabledForUrl(b)||(c=
-PROXY_URL+"?url="+encodeURIComponent(b));mxUtils.get(c,function(c){if(200<=c.getStatus()&&299>=c.getStatus()){a.spinner.stop();try{a.loadLibrary(new UrlLibrary(this,c.getText(),b))}catch(D){a.handleError(D,mxResources.get("errorLoadingFile"))}}else a.spinner.stop(),a.handleError(null,mxResources.get("errorLoadingFile"))},function(){a.spinner.stop();a.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()},d))}));this.put("edit",
-new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(b,c){this.addMenuItems(b,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(b,["-","search"],c);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(b,
-"scratchpad",c);a.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(b,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),c);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(b,"shadowVisible",c);this.addMenuItems(b,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),c)})));this.put("extras",new Menu(mxUtils.bind(this,function(b,
-c){"1"!=urlParams.embed&&(this.addSubmenu("theme",b,c),b.addSeparator(c));this.addMenuItems(b,["copyConnect","collapseExpand","-"],c);if("undefined"!==typeof MathJax){var d=this.addMenuItem(b,"mathematicalTypesetting",c);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(b,["autosave"],c);this.addMenuItems(b,["-","createShape","editDiagram"],c);b.addSeparator(c);"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(b,["showStartScreen"],
-c);a.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(b,"plugins",c);b.addSeparator(c);this.addMenuItem(b,"tags",c)})));this.put("file",new Menu(mxUtils.bind(this,function(b,c){if("1"==urlParams.embed)this.addSubmenu("importFrom",b,c),this.addSubmenu("exportAs",b,c),this.addSubmenu("embed",b,c),"1"==urlParams.libraries&&(this.addMenuItems(b,["-"],c),this.addSubmenu("newLibrary",b,c),this.addSubmenu("openLibraryFrom",b,c)),this.addMenuItems(b,["-","pageSetup","print","-","save"],c),"1"==urlParams.saveAndExit&&
-this.addMenuItems(b,["saveAndExit"],c),this.addMenuItems(b,["exit"],c);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(b,["exportOptionsDisabled"],c),null==d.realtime?this.addMenuItems(b,["save","share","-"],c):(d.isAutosave()||this.addMenuItems(b,["save"],c),this.addMenuItems(b,["share","chatWindowTitle","-"],c))):this.addMenuItems(b,["new"],c);this.addSubmenu("openFrom",b,c);isLocalStorage&&this.addSubmenu("openRecent",b,c);null!=
-d&&d.constructor==DriveFile?this.addMenuItems(b,["new","-","rename","makeCopy","moveToFolder"],c):(this.addMenuItems(b,["-","save","saveAs","-","rename"],c),a.isOfflineApp()?a.isOffline()||this.addMenuItems(b,["upload"],c):(this.addMenuItems(b,["makeCopy"],c),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(b,["moveToFolder"],c)));b.addSeparator(c);this.addSubmenu("importFrom",b,c);this.addSubmenu("exportAs",b,c);b.addSeparator(c);this.addSubmenu("embed",b,c);this.addSubmenu("publish",b,c);
-b.addSeparator(c);this.addSubmenu("newLibrary",b,c);this.addSubmenu("openLibraryFrom",b,c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(b,["-","revisionHistory"],c);null!=d&&d.constructor==DriveFile&&this.addMenuItems(b,["createRevision"],c);this.addMenuItems(b,["-","pageSetup"],c);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["print"],c);this.addMenuItems(b,["-","close"])}})))};var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(a,
-e){if(480>=screen.width&&a==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","bottom");b.setAttribute("src",Editor.helpImage);e.appendChild(b)}d.apply(this,arguments)}})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
-DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,e,d){this.ui=a;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
-function MovePage(a,e,d){this.ui=a;this.oldIndex=e;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
-function SelectPage(a,e){this.ui=a;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))}
-SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,e=this.ui.editor,d=e.graph,b=e.graph.compress(d.zapGremlins(mxUtils.getXml(e.getGraphXml(!0))));mxUtils.setTextContent(a.node,b);a.viewState=d.getViewState();a.root=d.model.root;d.view.clear(a.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;d.model.rootChanged(a.root);d.setViewState(a.viewState);
-e.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.sizeDidChange();this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(a,e,d,b){SelectPage.call(this,a,d);this.relatedPage=e;this.index=b;this.previousIndex=null}
-mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
-EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==a)return this.pages[e];return null};
-EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,e=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var b=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";b!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(a.view,arguments)});var d=!1,b=null,f=mxUtils.bind(this,function(){this.updateTabContainer();var e=this.currentPage;null!=e&&e!=b&&(null==e.viewState||null==e.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):
-(a.container.scrollLeft=a.view.translate.x*a.view.scale+e.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+e.viewState.scrollTop),b=e);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=
-!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){f();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var e=a.getAttribute("page"),d=a.getAttribute("pageScale"),b=a.getAttribute("pageWidth"),f=a.getAttribute("pageHeight"),k=a.getAttribute("background"),l=a.getAttribute("backgroundImage"),l=null!=l&&0<l.length?JSON.parse(l):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=l?new mxImage(l.src,l.width,l.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=b&&null!=f?new mxRectangle(0,0,parseFloat(b),parseFloat(f)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
-a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
+mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(a,["-","rulerInch","rulerCM","rulerPixel"],d));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=b.getGraphBounds(),c=b.view.translate,e=b.view.scale;b.insertVertex(d,
+null,"",a.x/e-c.x,a.y/e-c.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),mxResources.parse("createSidebarEntry=Create sidebar entry"),this.editorUi.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){b.isSelectionEmpty()||(mxLog.show(),mxLog.debug("sb.createVertexTemplateFromData('"+b.compress(mxUtils.getXml(b.encodeCells(b.getSelectionCells())))+"', width, height, 'Title');"))})),this.addMenuItems(a,["-","createSidebarEntry","showBoundingBox"],d),mxResources.parse("testXmlImageExport=XML Image Export"),
+this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,c=b.getGraphBounds(),d=b.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-c.x)/d),Math.floor((1-c.y)/d));e.scale(1/d);var l=0,g=e.save;e.save=function(){l++;g.apply(this,arguments)};var h=e.restore;e.restore=function(){l--;h.apply(this,arguments)};var k=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",
+a,l);k.apply(this,arguments);mxLog.debug("leaving shape",a,l)};a.drawState(b.getView().getState(b.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",l)})),this.addMenuItems(a,["testXmlImageExport"],d),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&
+null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&null!=a.realtime&&
+c.spinner.spin(document.body,mxResources.get("export"))&&(a=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+a.getHash().substring(1)+"/realtime",null,"GET"),a.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var c=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+c)},a.send(function(a){c.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&c.saveLocalFile(a.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&
+null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(a,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],d),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(a,["-","testShowConsole"]))})));c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,
+!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.addAction("createShape...",function(){c.getCurrentFile();if(b.isEnabled()){var a=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle);a.vertex=!0;a=new EditShapeDialog(c,a,mxResources.get("editShape")+":",630,400);c.showDialog(a.container,640,480,!0,!1);a.init()}});c.actions.put("embedHtml",new Action(mxResources.get("html")+
+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(a){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",a,function(a,b,d,e,f,l,g,h,k,n){c.createHtml(a,b,d,e,f,l,g,h,k,n,mxUtils.bind(this,function(a,b){var d=new EmbedDialog(c,a+"\n"+b,null,null,function(){var c=window.open(),d=c.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");
+d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(a);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(b);d.writeln("</body>");d.writeln("</html>");d.close();if(!e){var f=c.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=c.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+
+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);c.document.body.insertBefore(f,c.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(b)[1];d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});c.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&
+c.getPublicUrl(c.getCurrentFile(),function(a){c.spinner.stop();null!=a?(a=encodeURIComponent(a),a=new EmbedDialog(c,EXPORT_URL+"?format=png&url="+a,0),c.showDialog(a.container,440,240,!0,!0),a.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(a,b,d,e,f,g){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(a,b,d,e,f,g,function(a){c.spinner.stop();
+a=new EmbedDialog(c,a);c.showDialog(a.container,440,240,!0,!0);a.init()},function(a){c.spinner.stop();c.handleError(a)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(a,b,d,e,f,g){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(a,b,d,e,f,g,function(a){c.spinner.stop();a=new EmbedDialog(c,a);c.showDialog(a.container,440,240,!0,!0);
+a.init()},function(a){c.spinner.stop();c.handleError(a)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var a=b.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((a.y+a.height-b.view.translate.y)/b.view.scale)+2,function(a,b,d,e,f,g,l,h){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(k){c.spinner.stop();k=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+l+";height:"+h+';" src="'+c.createLink(a,b,d,e,f,g,k)+'"></iframe>');c.showDialog(k.container,440,240,!0,!0);k.init()})},!0)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(a,b,d,e,f,g){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(l){c.spinner.stop();l=new EmbedDialog(c,
+c.createLink(a,b,d,e,f,g,l));c.showDialog(l.container,440,240,!0,!0);l.init()})})}));c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(a){c.spinner.stop();a=new GoogleSitesDialog(c,a);c.showDialog(a.container,420,256,!0,!0);a.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)f=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),
+f.setToggleAction(!0),f.setSelectedCallback(function(){return null!=c.scratchpad}),c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,360,170,!0,!1)});f=c.actions.addAction("search",function(){var a=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!a);isLocalStorage&&(mxSettings.settings.search=!a,mxSettings.save())});f.setToggleAction(!0);f.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=
+function(a){b.isEditing()&&b.stopEditing();var d="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var e=c.createLoadMessage("save");e.xml=d;a&&(e.exit=!0);d=JSON.stringify(e)}(window.opener||window.parent).postMessage(d,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));null!=c.getCurrentFile()&&c.saveFile()},c.actions.addAction("saveAndExit",function(){c.actions.get("save").funct(!0)}),
+c.actions.addAction("exit",function(){var a=function(){c.editor.modified=!1;var a="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(a,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,a,mxResources.get("cancel"),mxResources.get("discardChanges")):a()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){c.isExportToCanvas()?(this.addMenuItems(a,["exportPng"],b),c.jpgSupported&&this.addMenuItems(a,
+["exportJpg"],b)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPng","exportJpg"],b);this.addMenuItems(a,["exportSvg","-"],b);c.isOffline()||c.printPdfExport?this.addMenuItems(a,["exportPdf"],b):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["exportPdf"],b);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(a,["exportVsdx"],b);this.addMenuItems(a,["-","exportHtml","exportXml","exportUrl"],
+b);c.isOffline()||(a.addSeparator(b),this.addMenuItem(a,"export",b).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(d,e){function f(a){if(a&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var d=document.createElement("input");d.setAttribute("type","file");mxEvent.addListener(d,"change",function(){null!=d.files&&c.importFiles(d.files,
+null,null,c.maxImageSize)});d.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!a;window.openFile=new OpenFile(function(a){c.hideDialog(a)});window.openFile.setConsumer(function(a,d){b.setSelectionCells(c.importXml(a))});c.showDialog((new OpenDialog(c)).container,360,220,!0,!0,function(){window.openFile=null});var f=c.dialog,g=f.close;c.dialog.close=function(a){Editor.useLocalStorage=e;g.apply(f,arguments);a&&null==c.getCurrentFile()&&"1"!=
+urlParams.embed&&c.showSplash()}}}function g(a){a.pickFile(function(b){c.spinner.spin(document.body,mxResources.get("loading"))&&a.getFile(b,function(a){var b=h(a.getTitle());/\.svg$/i.test(a.getTitle())&&!c.editor.isDataSvg(a.getData())&&(a.setData(c.createSvgDataUri(a.getData())),b="image/svg+xml");l(a.getData(),b,a.getTitle())},function(a){c.handleError(a,null!=a?mxResources.get("errorLoadingFile"):null)},a==c.drive)},!0)}var l=mxUtils.bind(this,function(a,d,e){var f=b.view,g=b.getGraphBounds(),
+l=b.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*b.gridSize)),h=b.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*b.gridSize));"data:image/"==a.substring(0,11)?c.loadImage(a,mxUtils.bind(this,function(f){var g=!0,k=mxUtils.bind(this,function(){c.resizeImage(f,a,mxUtils.bind(this,function(f,k,n){f=g?Math.min(1,Math.min(c.maxImageSize/k,c.maxImageSize/n)):1;c.importFile(a,d,l,h,Math.round(k*f),Math.round(n*f),e,function(a){c.spinner.stop();b.setSelectionCells(a);b.scrollCellToVisible(b.getSelectionCell())})}),
+g)});a.length>c.resampleThreshold?c.confirmImageResize(function(a){g=a;k()}):k()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(a,d,l,h,0,0,e,function(a){c.spinner.stop();b.setSelectionCells(a);b.scrollCellToVisible(b.getSelectionCell())})}),h=mxUtils.bind(this,function(a){var c="text/xml";/\.png$/i.test(a)?c="image/png":/\.jpe?g$/i.test(a)?c="image/jpg":/\.gif$/i.test(a)&&(c="image/gif");return c});"undefined"!=typeof google&&"undefined"!=
+typeof google.picker&&(null!=c.drive?d.addItem(mxResources.get("googleDrive")+"...",null,function(){g(c.drive)},e):n&&d.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1));null!=c.gitHub&&d.addItem(mxResources.get("github")+"...",null,function(){g(c.gitHub)},e);null!=c.dropbox?d.addItem(mxResources.get("dropbox")+"...",null,function(){g(c.dropbox)},e):p&&d.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},
+e,null,!1);null!=c.oneDrive?d.addItem(mxResources.get("oneDrive")+"...",null,function(){g(c.oneDrive)},e):q&&d.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);null!=c.trello?d.addItem(mxResources.get("trello")+"...",null,function(){g(c.trello)},e):a&&d.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},e,null,!1);d.addSeparator(e);isLocalStorage&&"0"!=urlParams.browser&&d.addItem(mxResources.get("browser")+
+"...",null,function(){f(!1)},e);mxClient.IS_IOS||d.addItem(mxResources.get("device")+"...",null,function(){f(!0)},e);c.isOffline()||(d.addSeparator(e),d.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(c,"",mxResources.get("import"),function(a){if(null!=a&&0<a.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var b=/(\.png)($|\?)/i.test(a)?"image/png":"text/xml";c.loadUrl(PROXY_URL+"?url="+encodeURIComponent(a),function(c){l(c,b,a)},function(){c.spinner.stop();
+c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==b)}},mxResources.get("url"));c.showDialog(a.container,300,80,!0,!0);a.init()},e));c.showCsvImport&&d.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},e)})).isEnabled=d;this.put("theme",new Menu(mxUtils.bind(this,function(a,b){var d=a.addItem(mxResources.get("kennedy"),null,function(){mxSettings.setUi("");mxSettings.save();c.alert(mxResources.get("restartForChangeRequired"))},b);"atlas"!=uiTheme&&"dark"!=
+uiTheme&&"min"!=uiTheme&&a.addCheckmark(d,Editor.checkmarkImage);d=a.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");mxSettings.save();c.alert(mxResources.get("restartForChangeRequired"))},b);"min"==uiTheme&&a.addCheckmark(d,Editor.checkmarkImage);d=a.addItem(mxResources.get("atlas"),null,function(){mxSettings.setUi("atlas");mxSettings.save();c.alert(mxResources.get("restartForChangeRequired"))},b);"atlas"==uiTheme&&a.addCheckmark(d,Editor.checkmarkImage);d=a.addItem(mxResources.get("dark"),
+null,function(){mxSettings.setUi("dark");mxSettings.save();c.alert(mxResources.get("restartForChangeRequired"))},b);"dark"==uiTheme&&a.addCheckmark(d,Editor.checkmarkImage)})));this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();if(null!=a){var b=null!=a.getTitle()?a.getTitle():this.editorUi.defaultFilename,b=new FilenameDialog(this.editorUi,b,mxResources.get("rename"),mxUtils.bind(this,function(c){null!=c&&0<c.length&&null!=a&&this.editorUi.spinner.spin(document.body,
+mxResources.get("renaming"))&&a.rename(c,mxUtils.bind(this,function(a){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(a){this.editorUi.handleError(a,null!=a?mxResources.get("errorRenamingFile"):null)}))}),a.constructor==DriveFile||a.constructor==StorageFile?mxResources.get("diagramName"):null,function(a){if(null!=a&&0<a.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1});this.editorUi.showDialog(b.container,300,80,!0,!0);
+b.init()}})).isEnabled=function(){return this.enabled&&d.apply(this,arguments)};c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var a=c.getCurrentFile();if(null!=a){var b=null!=a.getTitle()?a.getTitle():c.defaultFilename,d="",e=b.lastIndexOf(".");0<=e&&(d=b.substring(e),b=b.substring(0,e));b=mxResources.get("copyOf",[b])+d;a.constructor==DriveFile?(b=new CreateDialog(c,b,mxUtils.bind(this,function(b,d){"download"==d&&(d=App.MODE_GOOGLE);null!=b&&0<b.length&&(d==App.MODE_GOOGLE?c.spinner.spin(document.body,
+mxResources.get("saving"))&&a.save(!1,mxUtils.bind(this,function(){a.saveAs(b,mxUtils.bind(this,function(a){c.spinner.stop();var b=c.getUrl();window.openWindow(b+"#G"+a.id,null,mxUtils.bind(this,function(){window.location.hash="G"+a.id}))}),mxUtils.bind(this,function(a){c.handleError(a)}))}),mxUtils.bind(this,function(a){c.handleError(a)})):this.editorUi.createFile(b,this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),
+null,null,null,null,!0),c.showDialog(b.container,420,380,!0,!0),b.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),b)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var a=c.getCurrentFile();a.getMode()!=App.MODE_GOOGLE&&a.getMode()!=App.MODE_ONEDRIVE||c.pickFolder(a.getMode(),mxUtils.bind(this,function(b){c.spinner.spin(document.body,mxResources.get("moving"))&&a.move(b,mxUtils.bind(this,function(a){c.spinner.stop()}),mxUtils.bind(this,function(a){c.handleError(a)}))}))}));
+this.put("publish",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,["publishLink"],c)})));c.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){c.openLink("https://www.draw.io/app")}));c.actions.put("download",new Action(mxResources.get("download")+"...",function(){c.openLink("https://download.draw.io")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));
+this.put("embed",new Menu(mxUtils.bind(this,function(a,b){"1"==urlParams.test&&this.addMenuItems(a,["liveImage","-"],b);this.addMenuItems(a,["embedImage","embedSvg","-","embedHtml"],b);navigator.standalone||c.isOffline()||this.addMenuItems(a,["embedIframe"],b);c.isOffline()||this.addMenuItems(a,["-","googleSites","googleDocs"],b)})));var w="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle - fromText plantUml formatSql".split(" "),x=function(a,b,d,e){("plantUml"!=
+e||EditorUi.enablePlantUml)&&a.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e||"formatSql"==e||"plantUml"==e){var a=new ParseDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else a=new CreateGraphDialog(c,d,e),c.showDialog(a.container,620,420,!0,!1);a.init()}),b)},D=function(a,c,d,e){var f=b.isMouseInsertPoint()?b.getInsertPoint():b.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,c,d),e);a.vertex=!0;b.getModel().beginUpdate();
+try{a=b.addCell(a),b.fireEvent(new mxEventObject("cellsInserted","cells",[a]))}finally{b.getModel().endUpdate()}b.scrollCellToVisible(a);b.setSelectionCell(a);b.container.focus();b.editAfterInsert&&b.startEditing(a);return a};c.actions.addAction("insertText",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&b.startEditingAtCell(D("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=d;c.actions.addAction("insertRectangle",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&D("",120,60,"whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+K").isEnabled=d;c.actions.addAction("insertEllipse",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&D("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=d;c.actions.addAction("insertRhombus",function(){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&
+D("",80,80,"rhombus;whiteSpace=wrap;html=1;")}).isEnabled=d;this.put("insert",new Menu(mxUtils.bind(this,function(a,c){this.addMenuItems(a,"insertText insertRectangle - insertEllipse insertRhombus - insertLink insertImage".split(" "),c);a.addSeparator(c);for(var b=0;b<w.length;b++)"-"==w[b]?a.addSeparator(c):x(a,c,mxResources.get(w[b])+"...",w[b])})));this.put("openRecent",new Menu(function(a,b){var d=c.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(){c.loadFile(d.id)},b)})(d[e]);a.addSeparator(b)}a.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},b)}));this.put("openFrom",new Menu(function(b,d){null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=
+c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},d);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},d):p&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",
+null,function(){},d,null,!1);null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},d):a&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},d);c.isOffline()||
+(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(c,"",mxResources.get("open"),function(a){null!=a&&0<a.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(a):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(a)))},mxResources.get("url"));c.showDialog(a.container,300,80,!0,!0);a.init()},d))}));this.put("newLibrary",new Menu(function(b,
+d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},d);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+
+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},d):p&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,
+function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},d):a&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},d)}));this.put("openLibraryFrom",
+new Menu(function(b,d){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},d):n&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1));null!=c.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},d);null!=c.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},
+d):p&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},d):q&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=c.trello?b.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},d):a&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},d,null,!1);b.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},d);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},d);c.isOffline()||(b.addSeparator(d),b.addItem(mxResources.get("url")+"...",null,function(){var a=new FilenameDialog(c,"",mxResources.get("open"),function(a){if(null!=a&&0<a.length&&c.spinner.spin(document.body,
+mxResources.get("loading"))){var b=a;c.isCorsEnabledForUrl(a)||(b=PROXY_URL+"?url="+encodeURIComponent(a));mxUtils.get(b,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,b.getText(),a))}catch(C){c.handleError(C,mxResources.get("errorLoadingFile"))}}else c.spinner.stop(),c.handleError(null,mxResources.get("errorLoadingFile"))},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));
+c.showDialog(a.container,300,80,!0,!0);a.init()},d))}));this.put("edit",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"undo redo - cut copy paste delete - duplicate - find - editData editTooltip editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","-"]));this.addMenuItems(a,
+["-","search"],b);if(isLocalStorage||mxClient.IS_CHROMEAPP){var d=this.addMenuItem(a,"scratchpad",b);c.isOffline()&&!mxClient.IS_CHROMEAPP||this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000042367")}this.addMenuItems(a,"shapes - pageView pageScale - scrollbars tooltips - grid guides".split(" "),b);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(a,"shadowVisible",b);this.addMenuItems(a,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),
+b)})));this.put("extras",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&(this.addSubmenu("theme",a,b),a.addSeparator(b));this.addMenuItems(a,["copyConnect","collapseExpand","-"],b);if("undefined"!==typeof MathJax){var d=this.addMenuItem(a,"mathematicalTypesetting",b);this.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}"1"!=urlParams.embed&&this.addMenuItems(a,["autosave"],b);this.addMenuItems(a,["-","createShape","editDiagram"],b);a.addSeparator(b);
+"1"!=urlParams.embed&&isLocalStorage&&this.addMenuItems(a,["showStartScreen"],b);c.isOfflineApp()||"1"==urlParams.embed||this.addMenuItem(a,"plugins",b);a.addSeparator(b);this.addMenuItem(a,"tags",b)})));this.put("file",new Menu(mxUtils.bind(this,function(a,b){if("1"==urlParams.embed)this.addSubmenu("importFrom",a,b),this.addSubmenu("exportAs",a,b),this.addSubmenu("embed",a,b),"1"==urlParams.libraries&&(this.addMenuItems(a,["-"],b),this.addSubmenu("newLibrary",a,b),this.addSubmenu("openLibraryFrom",
+a,b)),this.addMenuItems(a,["-","pageSetup","print","-","save"],b),"1"==urlParams.saveAndExit&&this.addMenuItems(a,["saveAndExit"],b),this.addMenuItems(a,["exit"],b);else{var d=this.editorUi.getCurrentFile();null!=d&&d.constructor==DriveFile?(d.isRestricted()&&this.addMenuItems(a,["exportOptionsDisabled"],b),null==d.realtime?this.addMenuItems(a,["save","share","-"],b):(d.isAutosave()||this.addMenuItems(a,["save"],b),this.addMenuItems(a,["share","chatWindowTitle","-"],b))):this.addMenuItems(a,["new"],
+b);this.addSubmenu("openFrom",a,b);isLocalStorage&&this.addSubmenu("openRecent",a,b);null!=d&&d.constructor==DriveFile?this.addMenuItems(a,["new","-","rename","makeCopy","moveToFolder"],b):(this.addMenuItems(a,["-","save","saveAs","-","rename"],b),c.isOfflineApp()?c.isOffline()||this.addMenuItems(a,["upload"],b):(this.addMenuItems(a,["makeCopy"],b),null!=d&&d.constructor==OneDriveFile&&this.addMenuItems(a,["moveToFolder"],b)));a.addSeparator(b);this.addSubmenu("importFrom",a,b);this.addSubmenu("exportAs",
+a,b);a.addSeparator(b);this.addSubmenu("embed",a,b);this.addSubmenu("publish",a,b);a.addSeparator(b);this.addSubmenu("newLibrary",a,b);this.addSubmenu("openLibraryFrom",a,b);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||this.addMenuItems(a,["-","revisionHistory"],b);null!=d&&d.constructor==DriveFile&&this.addMenuItems(a,["createRevision"],b);this.addMenuItems(a,["-","pageSetup"],b);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(a,["print"],b);this.addMenuItems(a,["-","close"])}})))};
+var d=Menus.prototype.menuCreated;Menus.prototype.menuCreated=function(b,e){if(480>=screen.width&&b==this.get("help")){e.style.paddingRight="0px";e.style.paddingLeft="0px";e.innerHTML="";var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);e.appendChild(c)}d.apply(this,arguments)}})();function DiagramPage(b){this.node=b;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function b(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return b()+b()+"-"+b()+"-"+b()+"-"+b()+"-"+b()+b()+b()}())}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(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,d){this.ui=b;this.page=e;this.previous=this.name=d}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
+function MovePage(b,e,d){this.ui=b;this.oldIndex=e;this.newIndex=d}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
+function SelectPage(b,e){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){var b=this.ui.currentPage,e=this.ui.editor,d=e.graph,c=e.graph.compress(d.zapGremlins(mxUtils.getXml(e.getGraphXml(!0))));mxUtils.setTextContent(b.node,c);b.viewState=d.getViewState();b.root=d.model.root;d.view.clear(b.root,!0);d.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;d.model.rootChanged(b.root);d.setViewState(b.viewState);
+e.fireEvent(new mxEventObject("setViewState","change",this));d.gridEnabled=d.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();d.view.validate();d.sizeDidChange();this.neverShown&&(this.neverShown=!1,d.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};function ChangePage(b,e,d,c){SelectPage.call(this,b,d);this.relatedPage=e;this.index=c;this.previousIndex=null}
+mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
+EditorUi.prototype.getPageById=function(b){if(null!=this.pages)for(var e=0;e<this.pages.length;e++)if(this.pages[e].getId()==b)return this.pages[e];return null};
+EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var b=this.editor.graph,e=b.view.validateBackground;b.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":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var d=!1,c=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var e=this.currentPage;null!=e&&e!=c&&(null==e.viewState||null==e.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):
+(b.container.scrollLeft=b.view.translate.x*b.view.scale+e.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+e.viewState.scrollTop),c=e);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?d||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){d=
+!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(d=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(b,c){for(var d=c.getProperty("edit").changes,e=0;e<d.length;e++)if(d[e]instanceof SelectPage||d[e]instanceof RenamePage||d[e]instanceof MovePage||d[e]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),d=b.getAttribute("pageScale"),c=b.getAttribute("pageWidth"),g=b.getAttribute("pageHeight"),k=b.getAttribute("background"),n=b.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=b.getAttribute("grid"),gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==
+b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=k&&0<k.length?k:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=d?d:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=g?new mxRectangle(0,0,parseFloat(c),parseFloat(g)):this.pageFormat,tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"0"!=
+b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
-Graph.prototype.setViewState=function(a){null!=a?(this.lastPasteXml=a.lastPasteXml,this.pasteCounter=a.pasteCounter||0,this.mathEnabled=a.mathEnabled,this.gridEnabled=a.gridEnabled,this.gridSize=a.gridSize,this.graphHandler.guidesEnabled=a.guidesEnabled,this.foldingEnabled=a.foldingEnabled,this.setShadowVisible(a.shadowVisible,!1),this.scrollbars=a.scrollbars,this.pageVisible=a.pageVisible,this.background=a.background,this.backgroundImage=a.backgroundImage,this.pageScale=a.pageScale,this.pageFormat=
-a.pageFormat,this.view.scale=a.scale,this.view.currentRoot=a.currentRoot,this.defaultParent=a.defaultParent,this.connectionArrowsEnabled=a.arrows,this.setTooltips(a.tooltips),this.setConnectable(a.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=a.translate&&(this.view.translate=a.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=
+Graph.prototype.setViewState=function(b){null!=b?(this.lastPasteXml=b.lastPasteXml,this.pasteCounter=b.pasteCounter||0,this.mathEnabled=b.mathEnabled,this.gridEnabled=b.gridEnabled,this.gridSize=b.gridSize,this.graphHandler.guidesEnabled=b.guidesEnabled,this.foldingEnabled=b.foldingEnabled,this.setShadowVisible(b.shadowVisible,!1),this.scrollbars=b.scrollbars,this.pageVisible=b.pageVisible,this.background=b.background,this.backgroundImage=b.backgroundImage,this.pageScale=b.pageScale,this.pageFormat=
+b.pageFormat,this.view.scale=b.scale,this.view.currentRoot=b.currentRoot,this.defaultParent=b.defaultParent,this.connectionArrowsEnabled=b.arrows,this.setTooltips(b.tooltips),this.setConnectable(b.connect),this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null),this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer()),null!=b.translate&&(this.view.translate=b.translate)):(this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=!0,this.gridSize=
mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.background=this.defaultGraphBackground,this.backgroundImage=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=!1,this.connectionArrowsEnabled=!0);this.preferPageSize=
-this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(a){if(null==a.root){var e=this.editor.extractGraphModel(a.node);if(null!=e){a.graphModelNode=e;a.viewState=this.editor.graph.createViewState(e);var d=new mxCodec(e.ownerDocument);a.root=d.decode(e).root}else a.root=this.editor.graph.model.createRoot()}return a};
-EditorUi.prototype.selectPage=function(a,e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var b=new SelectPage(this,a);b.execute();d.add(b);d.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))};
-EditorUi.prototype.selectNextPage=function(a){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),a?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):a||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(a,e){if(this.editor.graph.isEnabled()){a=null!=a?a:this.createPage();e=null!=e?e:this.pages.length;var d=new ChangePage(this,a,a,e);this.editor.graph.model.execute(d)}return a};
-EditorUi.prototype.createPage=function(a){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));e.setName(null!=a?a:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var a={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(a[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=a[d]);return d};
-EditorUi.prototype.removePage=function(a){var e=this.editor.graph;if(e.isEnabled()){e.model.beginUpdate();try{var d=this.currentPage;if(d==a)if(1<this.pages.length){var b=mxUtils.indexOf(this.pages,a);b==this.pages.length-1?b--:b++;d=this.pages[b]}else d=this.insertPage(),e.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1])));e.model.execute(new ChangePage(this,a,d))}finally{e.model.endUpdate()}}return a};
-EditorUi.prototype.duplicatePage=function(a,e){var d=this.editor.graph,b=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),b=a.node.cloneNode(!1),b.removeAttribute("id"),b=new DiagramPage(b),b.root=d.cloneCells([d.model.root])[0],b.viewState=d.getViewState(),b.viewState.scale=1,b.viewState.scrollLeft=null,b.viewState.scrollRight=null,b.setName(e),b=this.insertPage(b,mxUtils.indexOf(this.pages,a)+1));return b};
-EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,a,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return a};EditorUi.prototype.movePage=function(a,e){this.editor.graph.model.execute(new MovePage(this,a,e))};
-EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="12px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,b=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-d)/this.pages.length)+1),f=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(b,d){this.pages[b]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(c){a.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),f=b):mxEvent.consume(c)}));mxEvent.addListener(d,
-"dragend",mxUtils.bind(this,function(a){f=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=f&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=f&&b!=f&&this.movePage(f,b);a.stopPropagation();a.preventDefault()}));e.appendChild(d)})(k,this.createTabForPage(this.pages[k],b,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);
-b=this.createPageMenuTab();this.tabContainer.appendChild(b);b=null;this.isPageInsertTabVisible()&&(b=this.createPageInsertTab(),this.tabContainer.appendChild(b));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=b&&(b.style.position="absolute",b.style.right="0px",e.style.marginRight="30px");var l=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");l.style.position="absolute";l.style.right=this.editor.chromeless?"29px":"55px";l.style.fontSize="13pt";this.tabContainer.appendChild(l);var n=this.createControlTab(4,
-"&nbsp;&#10095;");n.style.position="absolute";n.style.right=this.editor.chromeless?"0px":"29px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=q+"px";mxEvent.addListener(l,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,q-20);mxUtils.setOpacity(l,0<e.scrollLeft?100:50);mxUtils.setOpacity(n,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(l,
-0<e.scrollLeft?100:50);mxUtils.setOpacity(n,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,q-20);mxUtils.setOpacity(l,0<e.scrollLeft?100:50);mxUtils.setOpacity(n,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(a){var e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="8px 4px 8px 4px";e.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";e.style.borderBottomStyle="solid";e.style.backgroundColor=this.tabContainer.style.backgroundColor;
-e.style.cursor="move";e.style.color="gray";a&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return e};
-EditorUi.prototype.createControlTab=function(a,e){var d=this.createTab(!0);d.style.paddingTop=a+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
-EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.top="0px";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
-function(c){var d=a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var e=this.currentPage;null!=e&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),b))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var b=mxEvent.getClientX(a),e=mxEvent.getClientY(a);d.popup(b,e,null,a);this.setCurrentMenu(d);
-mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
-EditorUi.prototype.createTabForPage=function(a,e,d){d=this.createTab(d);var b=a.getName();d.setAttribute("title",b);mxUtils.write(d,b);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(a,d);42<e&&(d.style.textOverflow="ellipsis");return d};
-EditorUi.prototype.addTabListeners=function(a,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var b=!1,f=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){b=null!=this.currentMenu;f=a==this.currentPage;d.isMouseDown||f||this.selectPage(a)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&f||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!b){var l=new mxPopupMenu(this.createPageMenu(a));l.div.className+=" geMenubarMenu";l.smartSeparators=!0;l.showDisabled=!0;l.autoExpand=!0;l.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(l,arguments);this.resetCurrentMenu();l.destroy()});var n=mxEvent.getClientX(k),q=mxEvent.getClientY(k);l.popup(n,q,null,k);this.setCurrentMenu(l,e)}mxEvent.consume(k)}}))};
-EditorUi.prototype.createPageMenu=function(a,e){return mxUtils.bind(this,function(d,b){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),b);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),b);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,e)}),b);d.addSeparator(b);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
-mxResources.get("copyOf",[a.getName()]))}),b)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,d,b){b.setAttribute("page",d.page.getId());return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;return d};a.afterDecode=function(a,d,b){b.page=a.ui.getPageById(d.getAttribute("page"));b.previous=b.name;return b};mxCodecRegistry.register(a)})();
-(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,d,b){b.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(b.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&a.encodeCell(d.relatedPage.root,b));return b};a.beforeDecode=function(a,d,b){b.ui=a.ui;b.relatedPage=b.ui.getPageById(d.getAttribute("relatedPage"));if(null==b.relatedPage){var e=document.createElement("diagram");e.setAttribute("id",d.getAttribute("relatedPage"));
-e.setAttribute("name",d.getAttribute("name"));b.relatedPage=new DiagramPage(e);d=d.cloneNode(!0);e=d.firstChild;if(null!=e)for(b.relatedPage.root=a.decodeCell(e,!1),b=e.nextSibling,e.parentNode.removeChild(e),e=b;null!=e;){b=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==a.lookup(k)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=b}}return d};a.afterDecode=function(a,d,b){b.index=b.previousIndex;return b};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",e=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,b,d,n,q){b=null!=b?b:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var c=d.slice(),g=[],f=0;f<d.length;f++){var k=this.view.getState(d[f]),l=null!=k?k.style:this.getCellStyle(d[f]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(d[f],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[f]&&g.push(a);return a==d[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[f],
-a))}for(f=0;f<g.length;f++)this.model.setVisible(g[f],!a);d=c;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return y.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=y.getParent(a),b=p.view.getState(a),p.view.getState(a),b="tree"==(null!=b?b.style:p.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=y.getParent(a),b=p.view.getState(a),p.view.getState(a),b=null!=(null!=b?b.style:p.getCellStyle(a)).childLayout);return b}function n(a){a=p.view.getState(a);if(null!=a){var b=p.getIncomingEdges(a.cell);if(0<b.length&&(b=p.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function q(a,b){b=null!=b?b:!0;p.model.beginUpdate();try{var c=p.model.getParent(a),d=p.getIncomingEdges(a),e=p.cloneCells([d[0],a]);p.model.setTerminal(e[0],p.model.getTerminal(d[0],!0),!0);var g=n(a),f=c.geometry;g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;g==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);p.view.currentRoot!=c&&(e[1].geometry.x-=f.x,e[1].geometry.y-=f.y);var h=p.view.getState(a),k=p.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=p.getOutgoingEdges(p.model.getTerminal(d[0],
-!0));if(null!=m){for(var u=g==mxConstants.DIRECTION_SOUTH||g==mxConstants.DIRECTION_NORTH,q=f=d=0;q<m.length;q++){var t=p.model.getTerminal(m[q],!1);if(g==n(t)){var z=p.view.getState(t);t!=a&&null!=z&&(u&&b!=z.getCenterX()<h.getCenterX()||!u&&b!=z.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,z)&&(d=10+Math.max(d,(Math.min(l.x+l.width,z.x+z.width)-Math.max(l.x,z.x))/k),f=10+Math.max(f,(Math.min(l.y+l.height,z.y+z.height)-Math.max(l.y,z.y))/k))}}u?f=0:d=0;for(q=0;q<m.length;q++)if(t=p.model.getTerminal(m[q],
-!1),g==n(t)&&(z=p.view.getState(t),t!=a&&null!=z&&(u&&b!=z.getCenterX()<h.getCenterX()||!u&&b!=z.getCenterY()<h.getCenterY()))){var v=[];p.traverse(z.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});p.moveCells(v,(b?1:-1)*d,(b?1:-1)*f)}}}return p.addCells(e,c)}finally{p.model.endUpdate()}}function c(a){p.model.beginUpdate();try{var b=n(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(c[0],d[1],!1);p.model.setTerminal(d[0],d[1],!0);p.model.setTerminal(d[0],a,!1);
-var e=p.model.getParent(a),g=e.geometry,f=[];p.view.currentRoot!=e&&(d[1].geometry.x-=g.x,d[1].geometry.y-=g.y);p.traverse(a,!0,function(a,b){null!=b&&f.push(b);f.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);p.moveCells(f,h,k);return p.addCells(d,e)}finally{p.model.endUpdate()}}function g(a){p.model.beginUpdate();try{var b=
-p.model.getParent(a),c=p.getIncomingEdges(a),d=p.cloneCells([c[0],a]);p.model.setTerminal(d[0],a,!0);var c=p.getOutgoingEdges(a),e=b.geometry,g=[];p.view.currentRoot==b&&(e=new mxRectangle);for(var f=0;f<c.length;f++){var h=p.model.getTerminal(c[f],!1);null!=h&&g.push(h)}var k=p.view.getBounds(g),l=n(a),m=p.view.translate,u=p.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/u-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/u-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/u-m.y+-e.y+10);return p.addCells(d,b)}finally{p.model.endUpdate()}}function h(a,
-b,c){a=p.getOutgoingEdges(a);c=p.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var g=p.view.getState(p.model.getTerminal(a[e],!1));null!=g&&(!b&&Math.min(g.x+g.width,c.x+c.width)>=Math.max(g.x,c.x)||b&&Math.min(g.y+g.height,c.y+c.height)>=Math.max(g.y,c.y))&&d.push(g)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function t(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=p.getOutgoingEdges(a),null!=d&&0<d.length&&p.setSelectionCell(p.model.getTerminal(d[0],!1))):(c=p.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(p.model.getTerminal(c[0],!0),d,a),c=p.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&p.setSelectionCell(d[c].cell)))))}var v=this,p=v.editor.graph,y=p.getModel();mxResources.parse("selectChildren=Select Children");
-mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=v.menus.createPopupMenu;v.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==p.getSelectionCount()){c=p.getSelectionCell();var e=p.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(p.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(p.getSelectionCell())&&
-(a.addSeparator(),0<p.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};v.actions.addAction("selectChildren",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),
-a=p.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=p.getOutgoingEdges(p.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(p.model.getTerminal(a[c],!1));p.setSelectionCells(b)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),a=p.getIncomingEdges(a);null!=a&&0<a.length&&p.setSelectionCell(p.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",
-function(){if(p.isEnabled()&&1==p.getSelectionCount()){var a=p.getSelectionCell(),b=[];p.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});p.setSelectionCells(b)}},null,null,"Alt+Shift+T");var u=p.removeCells;p.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],g=0;g<a.length;g++){var f=a[g];y.isEdge(f)&&d(f)&&(e.push(f),f=y.getTerminal(f,!1));b(f)?(p.traverse(f,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),f=p.getIncomingEdges(a[g]),a=a.concat(f)):e.push(a[g])}a=e;return u.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var m=p.duplicateCells;p.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var g=p.view.getState(d[e]);if(null!=g&&b(g.cell))for(var f=p.getIncomingEdges(g.cell),g=0;g<f.length;g++)mxUtils.remove(f[g],
-a)}this.model.beginUpdate();try{var h=m.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=p.getIncomingEdges(h[e]),f=p.getIncomingEdges(a[e]);if(0==k.length&&0<f.length){var l=this.cloneCells([f[0]])[0];this.addEdge(l,p.getDefaultParent(),this.model.getTerminal(f[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var w=p.moveCells;p.moveCells=function(a,c,d,e,g,f,h){var k=null;this.model.beginUpdate();try{var l=g,m=this.view.getState(g),n=null!=m?m.style:this.getCellStyle(g);
-if(null!=a&&b(g)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var u=0;u<a.length;u++)if(b(a[u])||p.model.isEdge(a[u])&&null==p.model.getTerminal(a[u],!0)){g=p.model.getParent(a[u]);break}if(null!=l&&g!=l&&null!=this.view.getState(a[0])){var q=p.getIncomingEdges(a[0]);if(0<q.length){var t=p.view.getState(p.model.getTerminal(q[0],!0));if(null!=t){var v=p.view.getState(l);null!=v&&(c=(v.getCenterX()-t.getCenterX())/p.view.scale,d=(v.getCenterY()-t.getCenterY())/p.view.scale)}}}}k=w.apply(this,arguments);
-if(null!=k&&null!=a&&k.length==a.length)for(u=0;u<k.length;u++)if(this.model.isEdge(k[u]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[u],!0))&&this.model.setTerminal(k[u],l,!0);else if(b(a[u])&&(q=p.getIncomingEdges(a[u]),0<q.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==p.getIncomingEdges(k[u]).length){m=l;if(null==m||m==p.model.getParent(a[u]))m=p.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,
-p.getDefaultParent(),m,k[u])}}finally{this.model.endUpdate()}return k};if(null!=v.sidebar){var H=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,c,d,e){var g=p.model,f=null;g.beginUpdate();try{if(f=H.apply(this,arguments),b(a))for(var h=0;h<f.length;h++)if(g.isEdge(f[h])&&null==g.getTerminal(f[h],!0)){g.setTerminal(f[h],a,!0);var k=p.getCellGeometry(f[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{g.endUpdate()}return f}}var F={88:v.actions.get("selectChildren"),
-84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},C=v.onKeyDown;v.onKeyDown=function(a){try{if(p.isEnabled()&&!p.isEditing()&&b(p.getSelectionCell())&&1==p.getSelectionCount()){var d=null;0<p.getIncomingEdges(p.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?c(p.getSelectionCell()):g(p.getSelectionCell()):13==a.which&&(d=q(p.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&p.model.isEdge(d[0])?p.setSelectionCell(p.model.getTerminal(d[0],
-!1)):p.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(p.view.getState(p.getSelectionCell())),p.startEditingAtCell(p.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=F[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(t(p.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(t(p.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(t(p.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(t(p.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||C.apply(this,arguments)};var E=p.connectVertex;p.connectVertex=function(a,d,e,f,h,k){var l=p.getIncomingEdges(a);return b(a)&&0<l.length?(e=n(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?g(a):f==h?c(a):q(a,d!=mxConstants.DIRECTION_NORTH&&
-d!=mxConstants.DIRECTION_WEST)):E.call(this,a,d,e,f,h,k)};p.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&p.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var D=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){D.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+this.pageBreaksVisible=this.pageVisible};EditorUi.prototype.updatePageRoot=function(b){if(null==b.root){var e=this.editor.extractGraphModel(b.node);if(null!=e){b.graphModelNode=e;b.viewState=this.editor.graph.createViewState(e);var d=new mxCodec(e.ownerDocument);b.root=d.decode(e).root}else b.root=this.editor.graph.model.createRoot()}return b};
+EditorUi.prototype.selectPage=function(b,e){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var d=this.editor.graph.model.createUndoableEdit();d.ignoreEdit=!0;var c=new SelectPage(this,b);c.execute();d.add(c);d.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))};
+EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};EditorUi.prototype.insertPage=function(b,e){if(this.editor.graph.isEnabled()){b=null!=b?b:this.createPage();e=null!=e?e:this.pages.length;var d=new ChangePage(this,b,b,e);this.editor.graph.model.execute(d)}return b};
+EditorUi.prototype.createPage=function(b){var e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"));e.setName(null!=b?b:this.createPageName());return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var d=this.pages[e].getName();null!=d&&0<d.length&&(b[d]=d)}e=this.pages.length;do d=mxResources.get("pageWithNumber",[++e]);while(null!=b[d]);return d};
+EditorUi.prototype.removePage=function(b){var e=this.editor.graph;if(e.isEnabled()){e.model.beginUpdate();try{var d=this.currentPage;if(d==b)if(1<this.pages.length){var c=mxUtils.indexOf(this.pages,b);c==this.pages.length-1?c--:c++;d=this.pages[c]}else d=this.insertPage(),e.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1])));e.model.execute(new ChangePage(this,b,d))}finally{e.model.endUpdate()}}return b};
+EditorUi.prototype.duplicatePage=function(b,e){var d=this.editor.graph,c=null;d.isEnabled()&&(d.isEditing()&&d.stopEditing(),c=b.node.cloneNode(!1),c.removeAttribute("id"),c=new DiagramPage(c),c.root=d.cloneCells([d.model.root])[0],c.viewState=d.getViewState(),c.viewState.scale=1,c.viewState.scrollLeft=null,c.viewState.scrollRight=null,c.setName(e),c=this.insertPage(c,mxUtils.indexOf(this.pages,b)+1));return c};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(d){null!=d&&0<d.length&&this.editor.graph.model.execute(new RenamePage(this,b,d))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
+EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="12px";e.style.marginLeft="30px";for(var d=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
+d)/this.pages.length)+1),g=null,k=0;k<this.pages.length;k++)mxUtils.bind(this,function(a,c){this.pages[a]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):c.className="geInactivePage";c.setAttribute("draggable","true");mxEvent.addListener(c,"dragstart",mxUtils.bind(this,function(c){b.isEnabled()?(mxClient.IS_FF&&c.dataTransfer.setData("Text","<diagram/>"),g=a):mxEvent.consume(c)}));mxEvent.addListener(c,
+"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=g&&a!=g&&this.movePage(g,a);b.stopPropagation();b.preventDefault()}));e.appendChild(c)})(k,this.createTabForPage(this.pages[k],c,this.pages[k]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(e);
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(e.clientWidth>this.tabContainer.clientWidth-d){null!=c&&(c.style.position="absolute",c.style.right="0px",e.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var p=this.createControlTab(4,
+"&nbsp;&#10095;");p.style.position="absolute";p.style.right=this.editor.chromeless?"0px":"29px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=q+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){e.scrollLeft-=Math.max(20,q-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(p,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
+0<e.scrollLeft?100:50);mxUtils.setOpacity(p,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){e.scrollLeft+=Math.max(20,q-20);mxUtils.setOpacity(n,0<e.scrollLeft?100:50);mxUtils.setOpacity(p,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="8px 4px 8px 4px";e.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";e.style.borderBottomStyle="solid";e.style.backgroundColor=this.tabContainer.style.backgroundColor;
+e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(b){this.editor.graph.isMouseDown||(e.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(b))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(b){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(b)})));return e};
+EditorUi.prototype.createControlTab=function(b,e){var d=this.createTab(!0);d.style.paddingTop=b+"px";d.style.cursor="pointer";d.style.width="30px";d.style.lineHeight="30px";d.innerHTML=e;null!=d.firstChild&&null!=d.firstChild.style&&mxUtils.setOpacity(d.firstChild,40);return d};
+EditorUi.prototype.createPageMenuTab=function(){var b=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.top="0px";b.style.left="1px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(mxUtils.bind(this,function(b,c){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,
+function(a){var d=b.addItem(this.pages[a].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[a])}),c);this.pages[a]==this.currentPage&&b.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){b.addSeparator(c);b.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),c);var e=this.currentPage;null!=e&&(b.addSeparator(c),b.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(e)}),c),b.addItem(mxResources.get("rename"),
+null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),c),b.addSeparator(c),b.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(e,mxResources.get("copyOf",[e.getName()]))}),c))}}));d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);d.destroy()});var c=mxEvent.getClientX(b),e=mxEvent.getClientY(b);d.popup(c,e,null,b);this.setCurrentMenu(d);
+mxEvent.consume(b)}));return b};EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(b){this.insertPage();mxEvent.consume(b)}));return b};
+EditorUi.prototype.createTabForPage=function(b,e,d){d=this.createTab(d);var c=b.getName();d.setAttribute("title",c);mxUtils.write(d,c);d.style.maxWidth=e+"px";d.style.width=e+"px";this.addTabListeners(b,d);42<e&&(d.style.textOverflow="ellipsis");return d};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var d=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(c){this.renamePage(b);mxEvent.consume(c)}));var c=!1,g=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(e){c=null!=this.currentMenu;g=b==this.currentPage;d.isMouseDown||g||this.selectPage(b)}),null,mxUtils.bind(this,function(k){if(d.isEnabled()&&!d.isMouseDown&&(mxEvent.isTouchEvent(k)&&g||mxEvent.isPopupTrigger(k))){d.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!c){var n=new mxPopupMenu(this.createPageMenu(b));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var p=mxEvent.getClientX(k),q=mxEvent.getClientY(k);n.popup(p,q,null,k);this.setCurrentMenu(n,e)}mxEvent.consume(k)}}))};
+EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(d,c){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,
+mxResources.get("copyOf",[b.getName()]))}),c)})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page","previous"]);b.afterEncode=function(b,d,c){c.setAttribute("page",d.page.getId());return c};b.beforeDecode=function(b,d,c){c.ui=b.ui;return d};b.afterDecode=function(b,d,c){c.page=b.ui.getPageById(d.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);b.afterEncode=function(b,d,c){c.setAttribute("relatedPage",d.relatedPage.getId());null==d.index&&(c.setAttribute("name",d.relatedPage.getName()),null!=d.relatedPage.root&&b.encodeCell(d.relatedPage.root,c));return c};b.beforeDecode=function(b,d,c){c.ui=b.ui;c.relatedPage=c.ui.getPageById(d.getAttribute("relatedPage"));if(null==c.relatedPage){var e=document.createElement("diagram");e.setAttribute("id",d.getAttribute("relatedPage"));
+e.setAttribute("name",d.getAttribute("name"));c.relatedPage=new DiagramPage(e);d=d.cloneNode(!0);e=d.firstChild;if(null!=e)for(c.relatedPage.root=b.decodeCell(e,!1),c=e.nextSibling,e.parentNode.removeChild(e),e=c;null!=e;){c=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var k=e.getAttribute("id");null==b.lookup(k)&&b.decodeCell(e)}e.parentNode.removeChild(e);e=c}}return d};b.afterDecode=function(b,d,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",e=Graph.prototype.foldCells;
+Graph.prototype.foldCells=function(b,c,d,p,q){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),b));this.stopEditing();this.model.beginUpdate();try{for(var a=d.slice(),f=[],g=0;g<d.length;g++){var k=this.view.getState(d[g]),n=null!=k?k.style:this.getCellStyle(d[g]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(d[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=d[g]&&f.push(a);return a==d[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(d[g],
+b))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!b);d=a;d=e.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(a){return w.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b="tree"==(null!=b?b.style:u.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=u.view.getState(a),u.view.getState(a),b=null!=(null!=b?b.style:u.getCellStyle(a)).childLayout);return b}function p(a){a=u.view.getState(a);if(null!=a){var b=u.getIncomingEdges(a.cell);if(0<b.length&&(b=u.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function q(a,b){b=null!=b?b:!0;u.model.beginUpdate();try{var c=u.model.getParent(a),d=u.getIncomingEdges(a),e=u.cloneCells([d[0],a]);u.model.setTerminal(e[0],u.model.getTerminal(d[0],!0),!0);var f=p(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);u.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=u.view.getState(a),l=u.view.scale;if(null!=h){var k=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?k.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:k.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var n=u.getOutgoingEdges(u.model.getTerminal(d[0],
+!0));if(null!=n){for(var m=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<n.length;q++){var w=u.model.getTerminal(n[q],!1);if(f==p(w)){var t=u.view.getState(w);w!=a&&null!=t&&(m&&b!=t.getCenterX()<h.getCenterX()||!m&&b!=t.getCenterY()<h.getCenterY())&&mxUtils.intersects(k,t)&&(d=10+Math.max(d,(Math.min(k.x+k.width,t.x+t.width)-Math.max(k.x,t.x))/l),g=10+Math.max(g,(Math.min(k.y+k.height,t.y+t.height)-Math.max(k.y,t.y))/l))}}m?g=0:d=0;for(q=0;q<n.length;q++)if(w=u.model.getTerminal(n[q],
+!1),f==p(w)&&(t=u.view.getState(w),w!=a&&null!=t&&(m&&b!=t.getCenterX()<h.getCenterX()||!m&&b!=t.getCenterY()<h.getCenterY()))){var v=[];u.traverse(t.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});u.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return u.addCells(e,c)}finally{u.model.endUpdate()}}function a(a){u.model.beginUpdate();try{var b=p(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(c[0],d[1],!1);u.model.setTerminal(d[0],d[1],!0);u.model.setTerminal(d[0],a,!1);
+var e=u.model.getParent(a),f=e.geometry,g=[];u.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);u.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,l=-40):b==mxConstants.DIRECTION_WEST?(h=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);u.moveCells(g,h,l);return u.addCells(d,e)}finally{u.model.endUpdate()}}function f(a){u.model.beginUpdate();try{var b=
+u.model.getParent(a),c=u.getIncomingEdges(a),d=u.cloneCells([c[0],a]);u.model.setTerminal(d[0],a,!0);var c=u.getOutgoingEdges(a),e=b.geometry,f=[];u.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=u.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var l=u.view.getBounds(f),k=p(a),n=u.view.translate,m=u.view.scale;k==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/m-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):k==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/m-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=k==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/m-n.y+-e.y+10);return u.addCells(d,b)}finally{u.model.endUpdate()}}function h(a,
+b,c){a=u.getOutgoingEdges(a);c=u.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=u.view.getState(u.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=p(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():c==b?(d=u.getOutgoingEdges(a),null!=d&&0<d.length&&u.setSelectionCell(u.model.getTerminal(d[0],!1))):(c=u.getIncomingEdges(a),null!=c&&0<c.length&&(d=h(u.model.getTerminal(c[0],!0),d,a),c=u.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&u.setSelectionCell(d[c].cell)))))}var t=this,u=t.editor.graph,w=u.getModel();mxResources.parse("selectChildren=Select Children");
+mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var x=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,b,d){x.apply(this,arguments);if(1==u.getSelectionCount()){b=u.getSelectionCell();var e=u.getOutgoingEdges(b);a.addSeparator();null!=e&&0<e.length&&(c(u.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));c(u.getSelectionCell())&&
+(a.addSeparator(),0<u.getIncomingEdges(b).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};t.actions.addAction("selectChildren",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),
+a=u.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=u.getOutgoingEdges(u.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(u.model.getTerminal(a[c],!1));u.setSelectionCells(b)}}},null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),a=u.getIncomingEdges(a);null!=a&&0<a.length&&u.setSelectionCell(u.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectDescendants",
+function(){if(u.isEnabled()&&1==u.getSelectionCount()){var a=u.getSelectionCell(),b=[];u.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});u.setSelectionCells(b)}},null,null,"Alt+Shift+T");var D=u.removeCells;u.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&d(g)&&(e.push(g),g=w.getTerminal(g,!1));c(g)?(u.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=u.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return D.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,b,d){return c(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(b,d))};var l=u.duplicateCells;u.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=u.view.getState(d[e]);if(null!=f&&c(f.cell))for(var g=u.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var h=l.call(this,a,b);if(h.length==a.length)for(e=0;e<a.length;e++)if(c(a[e])){var k=u.getIncomingEdges(h[e]),g=u.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var n=this.cloneCells([g[0]])[0];this.addEdge(n,u.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var v=u.moveCells;u.moveCells=function(a,b,d,e,f,g,h){var l=null;this.model.beginUpdate();try{var k=f,n=this.view.getState(f),m=null!=n?n.style:this.getCellStyle(f);
+if(null!=a&&c(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var p=0;p<a.length;p++)if(c(a[p])||u.model.isEdge(a[p])&&null==u.model.getTerminal(a[p],!0)){f=u.model.getParent(a[p]);break}if(null!=k&&f!=k&&null!=this.view.getState(a[0])){var q=u.getIncomingEdges(a[0]);if(0<q.length){var w=u.view.getState(u.model.getTerminal(q[0],!0));if(null!=w){var t=u.view.getState(k);null!=t&&(b=(t.getCenterX()-w.getCenterX())/u.view.scale,d=(t.getCenterY()-w.getCenterY())/u.view.scale)}}}}l=v.apply(this,arguments);
+if(null!=l&&null!=a&&l.length==a.length)for(p=0;p<l.length;p++)if(this.model.isEdge(l[p]))c(k)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[p],!0))&&this.model.setTerminal(l[p],k,!0);else if(c(a[p])&&(q=u.getIncomingEdges(a[p]),0<q.length))if(!e)c(k)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],k,!0);else if(0==u.getIncomingEdges(l[p]).length){n=k;if(null==n||n==u.model.getParent(a[p]))n=u.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,
+u.getDefaultParent(),n,l[p])}}finally{this.model.endUpdate()}return l};if(null!=t.sidebar){var G=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,b,d,e){var f=u.model,g=null;f.beginUpdate();try{if(g=G.apply(this,arguments),c(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var l=u.getCellGeometry(g[h]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var z={88:t.actions.get("selectChildren"),
+84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},y=t.onKeyDown;t.onKeyDown=function(b){try{if(u.isEnabled()&&!u.isEditing()&&c(u.getSelectionCell())&&1==u.getSelectionCount()){var d=null;0<u.getIncomingEdges(u.getSelectionCell()).length&&(9==b.which?d=mxEvent.isShiftDown(b)?a(u.getSelectionCell()):f(u.getSelectionCell()):13==b.which&&(d=q(u.getSelectionCell(),!mxEvent.isShiftDown(b))));if(null!=d&&0<d.length)1==d.length&&u.model.isEdge(d[0])?u.setSelectionCell(u.model.getTerminal(d[0],
+!1)):u.setSelectionCell(d[d.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(u.view.getState(u.getSelectionCell())),u.startEditingAtCell(u.getSelectionCell()),mxEvent.consume(b);else if(mxEvent.isAltDown(b)&&mxEvent.isShiftDown(b)){var e=z[b.keyCode];null!=e&&(e.funct(b),mxEvent.consume(b))}else 37==b.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(b)):38==b.keyCode?(m(u.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(b)):39==b.keyCode?(m(u.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(b)):40==b.keyCode&&(m(u.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(b))}}catch(F){console.log("error",F)}mxEvent.isConsumed(b)||y.apply(this,arguments)};var E=u.connectVertex;u.connectVertex=function(b,d,e,g,h,l){var k=u.getIncomingEdges(b);return c(b)&&0<k.length?(e=p(b),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,h=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?f(b):g==h?a(b):q(b,d!=mxConstants.DIRECTION_NORTH&&
+d!=mxConstants.DIRECTION_WEST)):E.call(this,b,d,e,g,h,l)};u.getSubtree=function(a){var b=[a];c(a)&&!e(a)&&u.traverse(a,!0,function(a,c){null!=c&&0>mxUtils.indexOf(b,c)&&b.push(c);0>mxUtils.indexOf(b,a)&&b.push(a);return!0});return b};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);c(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(b),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var A=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var b=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=b.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
-function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
-b.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!0);d.insertEdge(c,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-v.geometry.relative=!0;v.edge=!0;b.insertEdge(v,!0);k.insertEdge(v,!1);var p=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");p.vertex=!0;var y=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-y.geometry.relative=!0;y.edge=!0;b.insertEdge(y,!0);p.insertEdge(y,!1);a.insert(c);a.insert(f);a.insert(v);a.insert(y);a.insert(b);a.insert(d);a.insert(e);a.insert(k);a.insert(p);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
-a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Organization",
-new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");c.geometry.relative=!0;c.edge=!0;
-b.insertEdge(c,!0);e.insertEdge(c,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);g.insertEdge(f,!1);a.insert(c);a.insert(f);a.insert(b);a.insert(e);a.insert(g);return sb.createVertexTemplateFromCells([a],
-a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");d.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
-a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
-a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var c=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;d.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c,a,d],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new f(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
-a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function e(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new f(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,
-b.container.clientHeight-30),function(b){function c(c,d){var g=a.menus.get(c),f=e.addMenu(d,mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));f.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";f.className="geTitle";b.appendChild(f);return f}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
-d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var g=document.createElement("span");
-g.style.cssText="position:relative;top:6px;";mxUtils.write(g,mxResources.get("newLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";g=document.createElement("span");g.style.cssText="position:relative;top:6px;";
-mxUtils.write(g,mxResources.get("openLibrary"));d.appendChild(g);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){J.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var b=c.apply(this,arguments),d=this.editorUi.editor.graph;return b.concat([this.addEntry("tree container",
+function(){var b=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var b=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
+c.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");d.vertex=!0;var a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");a.geometry.relative=!0;a.edge=!0;c.insertEdge(a,!0);d.insertEdge(a,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var 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;c.insertEdge(t,!0);k.insertEdge(t,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");u.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+w.geometry.relative=!0;w.edge=!0;c.insertEdge(w,!0);u.insertEdge(w,!1);b.insert(a);b.insert(g);b.insert(t);b.insert(w);b.insert(c);b.insert(d);b.insert(e);b.insert(k);b.insert(u);return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap central idea",function(){var b=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;return sb.createVertexTemplateFromCells([b],
+b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap branch",function(){var b=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree mindmap sub topic",function(){var b=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");b.vertex=!0;var c=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree orgchart organization division",function(){var b=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");b.vertex=!0;var c=new mxCell("Organization",
+new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");d.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;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var a=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");a.geometry.relative=!0;a.edge=!0;
+c.insertEdge(a,!0);e.insertEdge(a,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);f.insertEdge(g,!1);b.insert(a);b.insert(g);b.insert(c);b.insert(e);b.insert(f);return sb.createVertexTemplateFromCells([b],
+b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree root",function(){var b=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");d.setAttributeForCell(b,"treeRoot","1");b.vertex=!0;return sb.createVertexTemplateFromCells([b],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree division",function(){var b=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
+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.setTerminalPoint(new mxPoint(0,0),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);return sb.createVertexTemplateFromCells([b,c],b.geometry.width,b.geometry.height,b.value)}),this.addEntry("tree sub sections",function(){var b=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
+b.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");c.geometry.setTerminalPoint(new mxPoint(110,-40),!0);c.geometry.relative=!0;c.edge=!0;b.insertEdge(c,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");d.vertex=!0;var a=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");a.geometry.setTerminalPoint(new mxPoint(110,-40),!0);a.geometry.relative=!0;a.edge=!0;d.insertEdge(a,!1);return sb.createVertexTemplateFromCells([c,a,b,d],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new g(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
+a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function e(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new g(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,
+b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
+d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");
+f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
+mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"!=urlParams.lightbox&&
-"0"!=urlParams.chrome){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var b=document.createElement("style");b.type="text/css";b.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
-document.getElementsByTagName("head")[0].appendChild(b)}catch(p){}var f=function(a,b,c,d,e,g,f){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";f(a);this.window=new mxWindow(b,a,c,d,e,g,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+"0"!=urlParams.chrome){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
+document.getElementsByTagName("head")[0].appendChild(c)}catch(w){}var g=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
@@ -7764,53 +7773,52 @@ Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>')
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(38,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=
5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.HIGHLIGHT_SIZE=5;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
-25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var k=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){k.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};var l=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){l.apply(this,arguments);
-var a=this.menus.get("save");null!=a&&a.setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var n=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):n.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,
-arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
-a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var c=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){c.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
-a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
+25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var k=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){k.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};var n=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>d&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):p.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;
+a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var a=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){a.apply(this,arguments);if(null!=this.shareButton){var b=this.shareButton;b.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";b.className="";b.innerHTML="";b.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+b.style.backgroundPosition="center center";b.style.backgroundRepeat="no-repeat";b.style.backgroundSize="24px 24px";b.style.height="24px";b.style.width="24px";mxUtils.setOpacity(b,30);b.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
-b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;g.apply(this,arguments);
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;f.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var h=
EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
-(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);h.apply(this,arguments)};var t=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
-function(a){t.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 v=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(a,b,c,d){var e=f.menus.get(a),g=K.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing=
-"border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?(g.style.backgroundImage="url("+c+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function c(a,b,c,d,e,g){var f=document.createElement("a");f.setAttribute("href","javascript:void(0)");f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing="border-box";f.style.height="30px";f.style.padding="6px";f.style.position="relative";f.style.verticalAlign="top";f.style.top="0px";A.appendChild(f);null!=g?(f.style.backgroundImage="url("+g+")",f.style.backgroundPosition=
-"center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px"):mxUtils.write(f,a);mxEvent.addListener(f,"click",function(a){"disabled"!=f.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(f.style.marginRight="4px");null!=d&&f.setAttribute("title",d);mxUtils.setOpacity(f,null!=g?40:100);null!=e&&(a=function(){e.isEnabled()?(f.removeAttribute("disabled"),mxUtils.setOpacity(f,null!=g?40:100),f.style.cursor=""):(f.setAttribute("disabled","disabled"),
-mxUtils.setOpacity(f,null!=g?10:20),f.style.cursor="default")},e.addListener("stateChanged",a),a());return f}function g(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));A.appendChild(b);return b}
-v.apply(this,arguments);var f=this,h=this.editor.graph;mxUtils.bind(h,h.isEnabled);var k=document.createElement("div");k.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";k.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(k);f.actions.get("insertText").label=mxResources.get("text");f.actions.get("insertText").label=mxResources.get("text");f.actions.get("editDiagram").label=mxResources.get("formatXml")+
-"...";f.actions.get("insertRectangle").label=mxResources.get("rectangle");f.actions.get("insertEllipse").label=mxResources.get("ellipse");f.actions.get("insertRhombus").label=mxResources.get("rhombus");f.actions.get("insertImage").label=mxResources.get("image")+"...";f.actions.get("insertLink").label=mxResources.get("link")+"...";f.actions.get("createShape").label=mxResources.get("shape")+"...";f.actions.get("outline").label=mxResources.get("outline")+"...";f.actions.get("layers").label=mxResources.get("layers")+
-"...";f.actions.put("importFile",new Action("File...",function(){h.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&f.importFiles(a.files,null,null,f.maxImageSize)});a.click()}));f.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){h.popupMenuHandler.hideMenu();f.showImportCsvDialog()}));f.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
-new ParseDialog(f,"Insert from Text");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(f,"Insert from Text","formatSql");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(f,"Insert from Text","plantUml");f.showDialog(a.container,620,420,!0,!1);a.init()}));f.actions.put("toggleShapes",new Action(mxResources.get("shapes")+
-"...",function(){e(f)}));f.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(f)}));var l=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(f,c,d);f.showDialog(a.container,620,420,!0,!1);a.init()}),b)};f.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){f.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?f.menus.addMenuItems(a,"new open - save saveAs -".split(" "),
-b):"1"==urlParams.embed?(f.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&f.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(f.menus.addMenuItems(a,["new"],b),f.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),f.menus.addSubmenu("save",a,b));f.menus.addSubmenu("exportAs",a,b);var c=f.getCurrentFile();null!=c&&c.constructor==DriveFile&&(f.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&f.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));f.menus.addMenuItems(a,
-"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||f.menus.addMenuItems(a,["-","print","-"],b);f.menus.addSubmenu("help",a,b);"1"==urlParams.embed?f.menus.addMenuItems(a,["-","exit"],b):f.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var k=f.menus.get("openFrom"),n=k.funct;k.funct=function(a,b){n.apply(this,arguments);a.addSeparator(b);f.menus.addSubmenu("openRecent",a,b)}}f.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=f.getCurrentFile();
-null!=c&&c.constructor==DriveFile?f.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):f.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||f.menus.addMenuItems(a,["-","revisionHistory"],b);f.menus.addMenuItems(a,["-","autosave"],b)})));var q=f.menus.get("exportAs");f.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){q.funct(a,b);a.addSeparator(b);f.menus.addSubmenu("embed",a,b);
-f.menus.addMenuItems(a,["publishLink"],b)})));var t=f.menus.get("language");f.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&f.menus.addSubmenu("theme",a,b);null!=t&&f.menus.addSubmenu("language",a,b);a.addSeparator(b);f.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&f.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);f.isOfflineApp()||"1"==urlParams.embed||f.menus.addMenuItems(a,["-",
-"plugins"],b)})));f.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));f.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),
-b);f.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);f.menus.addSubmenu("insertLayout",a,b);f.menus.addSubmenu("insertAdvanced",a,b)})));var D="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");f.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<D.length;c++)"-"==D[c]?a.addSeparator(b):l(a,b,mxResources.get(D[c])+"...",D[c])})));f.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){f.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
-b)})));f.toolbar=f.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var A=document.createElement("div");A.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var K=new Menubar(f,A);(k=900>d)||b("diagram");g([k?b("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,c(mxResources.get("shapes"),f.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),f.actions.get("image"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),c(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+")",f.actions.get("image"),
-k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)]);var z=b("insert",!0,k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);g([z,c(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),k?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)]);if(480<=d){var I=f.actions.get("undo"),k=f.actions.get("redo"),I=c("",I.funct,null,mxResources.get("undo")+" ("+I.shortcut+")",I,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),k=c("",k.funct,
-null,mxResources.get("redo")+" ("+k.shortcut+")",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");g([I,k]);if(560<=d){var k=f.actions.get("zoomIn"),I=f.actions.get("zoomOut"),B=f.actions.get("resetView");
-g([c("",function(){h.popupMenuHandler.hideMenu();var a=h.view.scale,b=h.view.translate.x,c=h.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-h.view.scale)&&b==h.view.translate.x&&c==h.view.translate.y&&f.actions.get(h.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",B,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=d?c("",k.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",k,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=d?c("",I.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",I,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null])}}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var J=f.descriptorChanged;f.descriptorChanged=function(){J.apply(this,arguments);var a=f.getCurrentFile();
-if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);A.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else A.removeAttribute("title")};f.setStatusText(f.editor.getStatus());A.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";A.appendChild(f.buttonContainer);f.menubarContainer=
-f.buttonContainer;null!=t&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(z=K.addMenu("",t.funct),z.setAttribute("title",mxResources.get("language")),z.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-z.style.backgroundPosition="center center",z.style.backgroundRepeat="no-repeat",z.style.backgroundSize="24px 24px",z.style.position="absolute",z.style.height="24px",z.style.width="24px",z.style.zIndex="1",z.style.top="11px",z.style.right="14px",mxUtils.setOpacity(z,30),A.appendChild(z));f.tabContainer=document.createElement("div");f.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
-k=f.diagramContainer.parentNode;I=document.createElement("div");I.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";B=f.menus.get("viewZoom");if(null!=B){this.tabContainer.style.right="70px";z=K.addMenu("100%",B.funct);z.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");z.style.whiteSpace="nowrap";z.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";z.style.backgroundPosition=
-"right 6px center";z.style.backgroundRepeat="no-repeat";z.style.paddingRight="10px";z.style.display="block";z.style.position="absolute";z.style.textDecoration="none";z.style.textDecoration="none";z.style.right="0px";z.style.bottom="0px";z.style.overflow="hidden";z.style.textAlign="center";z.style.color="#000";z.style.fontSize="12px";z.style.color="#707070";z.style.width="59px";z.style.borderTop="1px solid lightgray";z.style.borderLeft="1px solid lightgray";z.style.height=parseInt(f.tabContainer.style.height)-
-1+"px";z.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";I.appendChild(z);B=mxUtils.bind(this,function(){z.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,B);f.editor.addListener("resetGraphView",B);f.editor.addListener("pageSelected",B);var P=f.setGraphEnabled;f.setGraphEnabled=function(){P.apply(this,arguments);null!=this.tabContainer&&(z.style.visibility=this.tabContainer.style.visibility)}}I.appendChild(f.tabContainer);
-I.appendChild(A);I.appendChild(f.diagramContainer);k.appendChild(I);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.actions.outlineWindow.window.fit();null!=f.actions.layersWindow&&f.actions.layersWindow.window.fit();null!=f.menus.tagsWindow&&f.menus.tagsWindow.window.fit();null!=f.menus.findWindow&&f.menus.findWindow.window.fit()})}}};
-(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
+(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);h.apply(this,arguments)};var m=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
+function(a){m.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var t=Menus.prototype.init;Menus.prototype.init=function(){t.apply(this,arguments);var a=this.editorUi,c=a.editor.graph;a.actions.get("insertText").label=mxResources.get("text");a.actions.get("insertText").label=mxResources.get("text");a.actions.get("editDiagram").label=mxResources.get("formatXml")+
+"...";a.actions.get("insertRectangle").label=mxResources.get("rectangle");a.actions.get("insertEllipse").label=mxResources.get("ellipse");a.actions.get("insertRhombus").label=mxResources.get("rhombus");a.actions.get("insertImage").label=mxResources.get("image")+"...";a.actions.get("insertLink").label=mxResources.get("link")+"...";a.actions.get("createShape").label=mxResources.get("shape")+"...";a.actions.get("outline").label=mxResources.get("outline")+"...";a.actions.get("layers").label=mxResources.get("layers")+
+"...";a.actions.put("importFile",new Action("File...",function(){c.popupMenuHandler.hideMenu();var b=document.createElement("input");b.setAttribute("type","file");mxEvent.addListener(b,"change",function(){null!=b.files&&a.importFiles(b.files,null,null,a.maxImageSize)});b.click()}));a.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){c.popupMenuHandler.hideMenu();a.showImportCsvDialog()}));a.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var b=
+new ParseDialog(a,"Insert from Text");a.showDialog(b.container,620,420,!0,!1);b.init()}));a.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var b=new ParseDialog(a,"Insert from Text","formatSql");a.showDialog(b.container,620,420,!0,!1);b.init()}));a.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){e(a)}));a.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(a)}));EditorUi.enablePlantUml&&a.actions.put("plantUml",
+new Action(mxResources.get("plantUml")+"...",function(){var b=new ParseDialog(a,"Insert from Text","plantUml");a.showDialog(b.container,620,420,!0,!1);b.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(b,c){a.menus.addSubmenu("preferences",b,c);b.addSeparator(c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?a.menus.addMenuItems(b,"new open - save saveAs -".split(" "),c):"1"==urlParams.embed?(a.menus.addMenuItems(b,["-","save"],c),"1"==urlParams.saveAndExit&&a.menus.addMenuItems(b,
+["saveAndExit"],c),b.addSeparator(c)):(a.menus.addMenuItems(b,["new"],c),a.menus.addSubmenu("openFrom",b,c),b.addSeparator(c),a.menus.addSubmenu("save",b,c));a.menus.addSubmenu("exportAs",b,c);var d=a.getCurrentFile();null!=d&&d.constructor==DriveFile&&(a.menus.addMenuItems(b,["-","share"],c),null!=d.realtime&&a.menus.addMenuItems(b,["chatWindowTitle"],c),b.addSeparator(c));a.menus.addMenuItems(b,"- outline layers - find tags -".split(" "),c);mxClient.IS_IOS&&navigator.standalone||a.menus.addMenuItems(b,
+["-","print","-"],c);a.menus.addSubmenu("help",b,c);"1"==urlParams.embed?a.menus.addMenuItems(b,["-","exit"],c):a.menus.addMenuItems(b,["-","close"])})));if(isLocalStorage){var d=this.get("openFrom"),f=d.funct;d.funct=function(b,c){f.apply(this,arguments);b.addSeparator(c);a.menus.addSubmenu("openRecent",b,c)}}this.put("save",new Menu(mxUtils.bind(this,function(b,c){var d=a.getCurrentFile();null!=d&&d.constructor==DriveFile?a.menus.addMenuItems(b,["createRevision","makeCopy","-","rename","moveToFolder"],
+c):a.menus.addMenuItems(b,["save","saveAs","-","rename","makeCopy"],c);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||a.menus.addMenuItems(b,["-","revisionHistory"],c);a.menus.addMenuItems(b,["-","autosave"],c)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){g.funct(b,c);b.addSeparator(c);a.menus.addSubmenu("embed",b,c);a.menus.addMenuItems(b,["publishLink"],c)})));var h=this.get("language");this.put("preferences",new Menu(mxUtils.bind(this,
+function(b,c){"1"!=urlParams.embed&&a.menus.addSubmenu("theme",b,c);null!=h&&a.menus.addSubmenu("language",b,c);b.addSeparator(c);a.menus.addMenuItems(b,["scrollbars","tooltips","pageScale"],c);"1"!=urlParams.embed&&isLocalStorage&&a.menus.addMenuItems(b,["-","search","scratchpad","-","showStartScreen"],c);a.isOfflineApp()||"1"==urlParams.embed||a.menus.addMenuItems(b,["-","plugins"],c)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),
+c)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),c);a.menus.addSubmenu("importFrom",b,c);b.addSeparator(c);a.menus.addSubmenu("insertLayout",b,c);a.menus.addSubmenu("insertAdvanced",b,c)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+m=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){var b=new CreateGraphDialog(a,d,e);a.showDialog(b.container,620,420,!0,!1);b.init()}),c)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):m(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("options",new Menu(mxUtils.bind(this,function(b,c){a.menus.addMenuItems(b,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
+c)})))};var u=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=f.menus.get(a),g=h.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?
+(g.style.backgroundImage="url("+c+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");
+h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";g.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&
+b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";
+b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));g.appendChild(b);return b}u.apply(this,arguments);var e=document.createElement("div");e.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";e.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(e);var f=this;f.toolbar=this.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var h=new Menubar(f,g);(e=900>d)||a("diagram");c([e?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),
+f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+
+")",f.actions.get("image"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var k=a("insert",!0,e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([k,b(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),e?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=d){var m=f.actions.get("undo"),e=f.actions.get("redo"),m=b("",m.funct,null,mxResources.get("undo")+" ("+m.shortcut+")",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),e=b("",e.funct,
+null,mxResources.get("redo")+" ("+e.shortcut+")",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");c([m,e]);if(560<=d){var e=f.actions.get("zoomIn"),m=f.actions.get("zoomOut"),n=f.actions.get("resetView");
+c([b("",function(){graph.popupMenuHandler.hideMenu();var a=graph.view.scale,b=graph.view.translate.x,c=graph.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-graph.view.scale)&&b==graph.view.translate.x&&c==graph.view.translate.y&&f.actions.get(graph.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",n,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=d?b("",e.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",e,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=d?b("",m.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",m,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var p=f.descriptorChanged;f.descriptorChanged=function(){p.apply(this,arguments);var a=f.getCurrentFile();
+if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);g.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else g.removeAttribute("title")};f.setStatusText(f.editor.getStatus());g.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";g.appendChild(f.buttonContainer);f.menubarContainer=
+f.buttonContainer;e=this.menus.get("language");null!=e&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=d&&(k=h.addMenu("",e.funct),k.setAttribute("title",mxResources.get("language")),k.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+k.style.backgroundPosition="center center",k.style.backgroundRepeat="no-repeat",k.style.backgroundSize="24px 24px",k.style.position="absolute",k.style.height="24px",k.style.width="24px",k.style.zIndex="1",k.style.top="11px",k.style.right="14px",mxUtils.setOpacity(k,30),g.appendChild(k));f.tabContainer=document.createElement("div");f.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+e=f.diagramContainer.parentNode;m=document.createElement("div");m.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";n=f.menus.get("viewZoom");if(null!=n){this.tabContainer.style.right="70px";k=h.addMenu("100%",n.funct);k.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");k.style.whiteSpace="nowrap";k.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";k.style.backgroundPosition=
+"right 6px center";k.style.backgroundRepeat="no-repeat";k.style.paddingRight="10px";k.style.display="block";k.style.position="absolute";k.style.textDecoration="none";k.style.textDecoration="none";k.style.right="0px";k.style.bottom="0px";k.style.overflow="hidden";k.style.textAlign="center";k.style.color="#000";k.style.fontSize="12px";k.style.color="#707070";k.style.width="59px";k.style.borderTop="1px solid lightgray";k.style.borderLeft="1px solid lightgray";k.style.height=parseInt(f.tabContainer.style.height)-
+1+"px";k.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";m.appendChild(k);n=mxUtils.bind(this,function(){k.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,n);f.editor.addListener("resetGraphView",n);f.editor.addListener("pageSelected",n);var q=f.setGraphEnabled;f.setGraphEnabled=function(){q.apply(this,arguments);null!=this.tabContainer&&(k.style.visibility=this.tabContainer.style.visibility)}}m.appendChild(f.tabContainer);
+m.appendChild(g);m.appendChild(f.diagramContainer);e.appendChild(m);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.actions.outlineWindow.window.fit();null!=f.actions.layersWindow&&f.actions.layersWindow.window.fit();null!=f.menus.tagsWindow&&f.menus.tagsWindow.window.fit();null!=f.menus.findWindow&&f.menus.findWindow.window.fit()})}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;
(function(){function c(a){var b=null!=a.Text?a.Text:null!=a.Value?a.Value:a.Lane_0;null==b&&null!=a.State?null!=a.State.t&&(b=a.State):null==b&&null!=a.Note?null!=a.Note.t&&(b=a.Note):null==b&&null!=a.Title?null!=a.Title.t&&(b=a.Title):null!=a.t&&(b=a);null==b&&null!=a.TextAreas&&null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.t&&(b=a.TextAreas.Text.Value);if(null!=b){if(null!=b.t)return b.t=b.t.replace(/</g,"&lt;"),b.t=b.t.replace(/>/g,"&gt;"),b.t;if(null!=b.Value&&
null!=b.Value.t)return b.Value.t=b.Value.t.replace(/</g,"&lt;"),b.Value.t=b.Value.t.replace(/>/g,"&gt;"),b.Value.t}return""}function m(a){return null!=a.Action?a.Action:a}function w(a){if(null!=a.Text){if(null!=a.Text.m)return a.Text.m}else if(null!=a.TextAreas){if(null!=a.TextAreas.Text&&null!=a.TextAreas.Text.Value&&null!=a.TextAreas.Text.Value.m)return a.TextAreas.Text.Value.m}else if(null!=a.m)return a.m;return null}function l(c){return h(c)+f(c)+b(c)+a(c)+d(c)+g(c)+p(c)+D(c)+C(c)+y(c)}function h(a){a=
@@ -8365,8 +8373,8 @@ BmpDecoder.prototype.bit32=function(){for(var c=this.height-1;0<=c;c--)for(var m
(function(c){(function(m){(function(w){var l=function(){function h(){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.debugPaths=!1;this.vsdxModel=null}h.vsdxPlaceholder_$LI$=function(){null==h.vsdxPlaceholder&&(h.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return h.vsdxPlaceholder};
h.prototype.decodeVsdx=function(f,b,a,d){var g=this,p={},D={},C=function(){for(var a=h.vsdxPlaceholder+"/document.xml",d=p[a]?p[a]:null,f=d.firstChild;null!=f&&1!=f.nodeType;)f=f.nextSibling;if(null!=f&&1==f.nodeType)g.importNodes(d,f,a,p);else return null;g.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,p,D);for(var a=g.vsdxModel.getPages(),C=g.RESPONSE_HEADER,y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=y[a].getValue();if(!a.isBackground()){var b=q.createMxGraph();
b.getModel().beginUpdate();q.importPage(a,b,b.getDefaultParent());var d=a.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),a.getPageName());var p=new mxCell(d.getPageName());b.addCell(p,b.getModel().getRoot(),0,null,null);q.importPage(d,b,b.getDefaultParent())}d=a.getPageScale()/a.getDrawingScale();if(1!==d){var p=b.getModel(),c;for(c in p.cells){var f=p.cells[c],D=p.getGeometry(f);if(null!=D&&(q.scaleRect(D,d),q.scaleRect(D.alternateBounds,d),p.isEdge(f)&&(q.scalePoint(D.sourcePoint,
-d),q.scalePoint(D.targetPoint,d),q.scalePoint(D.offset,d),f=D.points,null!=f)))for(D=0;D<f.length;D++)q.scalePoint(f[D],d)}}b.getModel().endUpdate();C=C.concat(g.RESPONSE_DIAGRAM_START);C=C.concat(g.processPage(b,a));C=C.concat(g.RESPONSE_DIAGRAM_END)}},q=g,d=0;d<y.length;d++)a(d);C=C.concat(g.RESPONSE_END);b&&b(C)},y=0,q=0,l=function(){q==y&&C()};JSZip.loadAsync(f).then(function(a){a.forEach(function(a,b){var d=b.name,f=d.toLowerCase(),C=f.length;f.indexOf(".xml")==C-4||f.indexOf(".xml.rels")==C-
-9?(y++,b.async("string").then(function(a){if(0!==a.length){var b=void 0;void 0===b&&(b=0);""===a.substr(b,3)&&(a=a.substring(3));a=mxUtils.parseXml(a);a.vsdxFileName=d;p[d]=a}q++;l()})):0===f.indexOf(h.vsdxPlaceholder+"/media")&&(y++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".emf")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){for(var b=!1,p="",f=0;f<a.length-8;f++)if(g.isPng(a,f)||g.isJpg(a,f)){p=c.mxgraph.online.mxBase64.encodeToString(a,
+d),q.scalePoint(D.targetPoint,d),q.scalePoint(D.offset,d),f=D.points,null!=f)))for(D=0;D<f.length;D++)q.scalePoint(f[D],d)}}b.getModel().endUpdate();C=C.concat(g.RESPONSE_DIAGRAM_START);C=C.concat(g.processPage(b,a));C=C.concat(g.RESPONSE_DIAGRAM_END)}},q=g,d=0;d<y.length;d++)a(d);C=C.concat(g.RESPONSE_END);b&&b(C)},y=0,q=0,l=function(){q==y&&C()};JSZip.loadAsync(f).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,f=d.toLowerCase(),C=f.length;f.indexOf(".xml")==
+C-4||f.indexOf(".xml.rels")==C-9?(y++,b.async("string").then(function(a){if(0!==a.length){var b=void 0;void 0===b&&(b=0);""===a.substr(b,3)&&(a=a.substring(3));a=mxUtils.parseXml(a);a.vsdxFileName=d;p[d]=a}q++;l()})):0===f.indexOf(h.vsdxPlaceholder+"/media")&&(y++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".emf")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){for(var b=!1,p="",f=0;f<a.length-8;f++)if(g.isPng(a,f)||g.isJpg(a,f)){p=c.mxgraph.online.mxBase64.encodeToString(a,
f);b=!0;break}b&&(D[d]=p);q++;l()}):function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".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");D[d]=a.substr(23);q++;l()}):b.async("base64").then(function(a){D[d]=a;q++;l()}))})},function(a){null!=d&&d(a)})};h.prototype.createMxGraph=function(){var c=
new mxGraph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};h.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 g=mxUtils.htmlEntities(b.getPageName()),d=d+('<diagram name="'+g+'">');return d+=Graph.prototype.compress(a)};h.prototype.isJpg=function(c,b){return 255===c[b]&&216===c[b+1]&&255===c[b+
2]};h.prototype.isPng=function(c,b){return 137===c[b]&&80===c[b+1]&&78===c[b+2]&&71===c[b+3]&&13===c[b+4]&&10===c[b+5]&&26===c[b+6]&&10===c[b+7]};h.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c};h.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};h.prototype.importNodes=function(c,b,a,d){var g=a.lastIndexOf("/"),p=a,f=a;if(-1!==g&&(p=a.substring(0,g),f=a.substring(g+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,p+"/_rels/"+f+
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 6ece50f4..e831ef61 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -2985,12 +2985,12 @@ EditorUi.prototype.loadTemplate = function(url, onload, onerror)
this.loadUrl(realUrl, mxUtils.bind(this, function(data)
{
- if (/(\.vsdx)($|\?)/i.test(url))
+ if (/(\.vsdx)($|\?)/i.test(url))
{
this.importVisio(this.base64ToBlob(data.substring(data.indexOf(',') + 1)), function(xml)
{
onload(xml);
- });
+ }, onerror, url);
}
else if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, url))
{
@@ -3004,6 +3004,13 @@ EditorUi.prototype.loadTemplate = function(url, onload, onerror)
}
}), url);
}
+ else if (data.substring(0, 26) == '{"state":"{\\"Properties\\":')
+ {
+ this.importLucidChart(data, 0, 0, false, mxUtils.bind(this, function()
+ {
+ onload(this.getFileData(true));
+ }));
+ }
else
{
if (/(\.png)($|\?)/i.test(url))
@@ -3386,6 +3393,24 @@ App.prototype.loadFile = function(id, sameWindow, file, success)
success();
}
}
+ else if (id.charAt(0) == 'S')
+ {
+ this.spinner.stop();
+
+ try
+ {
+ this.loadDescriptor(JSON.parse(
+ this.editor.graph.decompress(id.substring(1))),
+ success, mxUtils.bind(this, function(e)
+ {
+ this.handleError(e, mxResources.get('errorLoadingFile'));
+ }));
+ }
+ catch (e)
+ {
+ this.handleError(e, mxResources.get('errorLoadingFile'));
+ }
+ }
else if (id.charAt(0) == 'R')
{
// Raw file encoded into URL
@@ -4322,8 +4347,8 @@ App.prototype.convertFile = function(url, filename, mimeType, extension, success
gitHubUrl = true;
}
- // Workaround for wrong binary response with VSDX/VSD files
- if ((/\.vsdx$/i.test(filename) || /\.vsd$/i.test(filename)) && Graph.fileSupport && new XMLHttpRequest().upload &&
+ // Workaround for wrong binary response with VSD(X) files
+ if (/\.vsdx?$/i.test(filename) && Graph.fileSupport && new XMLHttpRequest().upload &&
typeof new XMLHttpRequest().responseType === 'string')
{
var req = new XMLHttpRequest();
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 32ff6b2e..384fa149 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -2551,7 +2551,7 @@ var ParseDialog = function(editorUi, title, defaultType)
var tableOption = document.createElement('option');
tableOption.setAttribute('value', 'table');
- mxUtils.write(tableOption, mxResources.get('table'));
+ mxUtils.write(tableOption, mxResources.get('formatSql'));
typeSelect.appendChild(tableOption);
if (defaultType == 'formatSql')
diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js
index 8853d8b9..46aea75f 100644
--- a/src/main/webapp/js/diagramly/DriveClient.js
+++ b/src/main/webapp/js/diagramly/DriveClient.js
@@ -640,7 +640,7 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
var binary = /\.png$/i.test(resp.title);
// Handles .vsdx, Gliffy and PNG+XML files by creating a temporary file
- if (/\.vsdx$/i.test(resp.title) || /\.gliffy$/i.test(resp.title) ||
+ if (/\.vsdx?$/i.test(resp.title) || /\.gliffy$/i.test(resp.title) ||
(!this.ui.useCanvasForExport && binary))
{
var url = resp.downloadUrl + '&access_token=' + gapi.auth.getToken().access_token;
@@ -655,7 +655,7 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
else
{
this.loadRealtime(resp, mxUtils.bind(this, function(doc)
- {
+ {
try
{
// Converts XML files to realtime including old realtime model
@@ -675,7 +675,7 @@ DriveClient.prototype.getFile = function(id, success, error, readXml, readLibrar
{
error(e);
}
- }), error);
+ }), error);
}
}
}
diff --git a/src/main/webapp/js/diagramly/DropboxClient.js b/src/main/webapp/js/diagramly/DropboxClient.js
index 607aa18e..f7cd1cd6 100644
--- a/src/main/webapp/js/diagramly/DropboxClient.js
+++ b/src/main/webapp/js/diagramly/DropboxClient.js
@@ -296,7 +296,7 @@ DropboxClient.prototype.getFile = function(path, success, error, asLibrary)
asLibrary = (asLibrary != null) ? asLibrary : false;
var binary = /\.png$/i.test(path);
- if (/^https:\/\//i.test(path) || /\.vsdx$/i.test(path) || /\.gliffy$/i.test(path) ||
+ if (/^https:\/\//i.test(path) || /\.vsdx?$/i.test(path) || /\.gliffy$/i.test(path) ||
(!this.ui.useCanvasForExport && binary))
{
var fn = mxUtils.bind(this, function()
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 101558f0..0ed9ff03 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -1247,6 +1247,378 @@
};
/**
+ * Loads the given file descriptor. The descriptor may define the following properties:
+ *
+ * - url: The url to load the data from (proxy is used if CORS is not enabled)
+ * - data: The data to be inserted. If both, data and url are defined, then the data
+ * is preprendended to the data returned from the given URL.
+ * - format: Currently, only 'csv' is supported as an optional value. Default is XML.
+ * - update: Optional URL to fetch updates from (POST request with the page XML).
+ * - interval: Optional interval for fetching updates. Default is 60000 (60 seconds).
+ */
+ EditorUi.prototype.loadDescriptor = function(desc, success, error)
+ {
+ var hash = window.location.hash;
+
+ var loadData = mxUtils.bind(this, function(data)
+ {
+ var realData = (desc.data != null) ? desc.data : '';
+
+ if (data != null && data.length > 0)
+ {
+ if (realData.length > 0)
+ {
+ realData += '\n';
+ }
+
+ realData += data;
+ }
+
+ var xml = (desc.format != 'csv' && realData.length > 0) ? realData : this.emptyDiagramXml;
+ var tempFile = new LocalFile(this, xml, (urlParams['title'] != null) ?
+ decodeURIComponent(urlParams['title']) : this.defaultFilename, true);
+ tempFile.getHash = function()
+ {
+ return hash;
+ };
+ this.fileLoaded(tempFile);
+
+ if (desc.format == 'csv')
+ {
+ this.importCsv(realData, mxUtils.bind(this, function(cells)
+ {
+ this.editor.undoManager.clear();
+ this.editor.setModified(false);
+ this.editor.setStatus('');
+ }));
+ }
+
+ // Installs updates
+ if (desc.update != null)
+ {
+ var interval = (desc.interval != null) ? parseInt(desc.interval) : 60000;
+ var currentThread = null;
+
+ var doUpdate = mxUtils.bind(this, function()
+ {
+ var page = this.currentPage;
+
+ mxUtils.post(desc.update, 'xml=' + encodeURIComponent(
+ mxUtils.getXml(this.editor.getGraphXml())),
+ mxUtils.bind(this, function(req)
+ {
+ if (page === this.currentPage)
+ {
+ if (req.getStatus() >= 200 && req.getStatus() <= 300)
+ {
+ var doc = this.updateDiagram(req.getText());
+ schedule();
+ }
+ else
+ {
+ this.handleError({message: mxResources.get('error') + ' ' + req.getStatus()});
+ }
+ }
+ }), mxUtils.bind(this, function(err)
+ {
+ this.handleError(err);
+ }));
+ });
+
+ var schedule = mxUtils.bind(this, function()
+ {
+ window.clearTimeout(currentThread);
+ currentThread = window.setTimeout(doUpdate, interval);
+ });
+
+ this.editor.addListener('pageSelected', mxUtils.bind(this, function()
+ {
+ schedule();
+ doUpdate();
+ }));
+
+ schedule();
+ doUpdate();
+ }
+
+ if (success != null)
+ {
+ success();
+ }
+ });
+
+ if (desc.url != null)
+ {
+ var realUrl = desc.url;
+
+ if ((/^https?:\/\//.test(realUrl)) && !this.isCorsEnabledForUrl(realUrl))
+ {
+ realUrl = PROXY_URL + '?url=' + encodeURIComponent(desc.url);
+ }
+
+ // LATER: Remove cache-control header
+ this.loadUrl(realUrl, mxUtils.bind(this, function(data)
+ {
+ loadData(data);
+ }), mxUtils.bind(this, function(err)
+ {
+ if (error != null)
+ {
+ error(err)
+ }
+ }));
+ }
+ else
+ {
+ loadData(desc.data);
+ }
+ };
+
+ /**
+ * Translates this point by the given vector.
+ *
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+ EditorUi.prototype.updateDiagram = function(xml)
+ {
+ var doc = null;
+
+ function createOverlay(desc)
+ {
+ var overlay = new mxCellOverlay(desc.image || graph.warningImage,
+ desc.tooltip, desc.align, desc.valign, desc.offset);
+
+ // Installs a handler for clicks on the overlay
+ overlay.addListener(mxEvent.CLICK, function(sender, evt)
+ {
+ editorUi.alert(desc.tooltip);
+ });
+
+ return overlay;
+ };
+
+ if (xml != null && xml.length > 0)
+ {
+ doc = mxUtils.parseXml(xml);
+ var node = (doc != null) ? doc.documentElement : null;
+
+ if (node != null && node.nodeName == 'updates')
+ {
+ var graph = this.editor.graph;
+ var model = graph.getModel();
+ model.beginUpdate();
+ var fit = null;
+
+ try
+ {
+ node = node.firstChild;
+
+ while (node != null)
+ {
+ if (node.nodeName == 'update')
+ {
+ // Resolves the cell ID
+ var cell = model.getCell(node.getAttribute('id'));
+
+ if (cell != null)
+ {
+ // Changes the value
+ try
+ {
+ var value = node.getAttribute('value');
+
+ if (value != null)
+ {
+ var valueNode = mxUtils.parseXml(value).documentElement;
+
+ if (valueNode != null)
+ {
+ if (valueNode.getAttribute('replace-value') == '1')
+ {
+ model.setValue(cell, valueNode);
+ }
+ else
+ {
+ var attrs = valueNode.attributes;
+
+ for (var j = 0; j < attrs.length; j++)
+ {
+ graph.setAttributeForCell(cell, attrs[j].nodeName,
+ (attrs[j].nodeValue.length > 0) ? attrs[j].nodeValue : null);
+ }
+ }
+ }
+ }
+ }
+ catch (e)
+ {
+ if (window.console != null)
+ {
+ console.log('Error in value for ' + cell.id + ': ' + e);
+ }
+ }
+
+ // Changes the style
+ try
+ {
+ var style = node.getAttribute('style');
+
+ if (style != null)
+ {
+ graph.model.setStyle(cell, style);
+ }
+ }
+ catch (e)
+ {
+ if (window.console != null)
+ {
+ console.log('Error in style for ' + cell.id + ': ' + e);
+ }
+ }
+
+ // Adds or removes an overlay icon
+ try
+ {
+ var icon = node.getAttribute('icon');
+
+ if (icon != null)
+ {
+ var desc = (icon.length > 0) ? JSON.parse(icon) : null;
+
+ if (desc == null || !desc.append)
+ {
+ graph.removeCellOverlays(cell);
+ }
+
+ if (desc != null)
+ {
+ graph.addCellOverlay(cell, createOverlay(desc));
+ }
+ }
+ }
+ catch (e)
+ {
+ if (window.console != null)
+ {
+ console.log('Error in icon for ' + cell.id + ': ' + e);
+ }
+ }
+
+ // Replaces the geometry
+ try
+ {
+ var geo = node.getAttribute('geometry');
+
+ if (geo != null)
+ {
+ geo = JSON.parse(geo);
+ var curr = graph.getCellGeometry(cell);
+
+ if (curr != null)
+ {
+ curr = curr.clone();
+
+ // Partially overwrites geometry
+ for (key in geo)
+ {
+ var val = parseFloat(geo[key]);
+
+ if (key == 'dx')
+ {
+ curr.x += val;
+ }
+ else if (key == 'dy')
+ {
+ curr.y += val;
+ }
+ else if (key == 'dw')
+ {
+ curr.width += val;
+ }
+ else if (key == 'dh')
+ {
+ curr.height += val;
+ }
+ else
+ {
+ curr[key] = parseFloat(geo[key]);
+ }
+ }
+
+ graph.model.setGeometry(cell, curr);
+ }
+ }
+ }
+ catch (e)
+ {
+ if (window.console != null)
+ {
+ console.log('Error in icon for ' + cell.id + ': ' + e);
+ }
+ }
+ } // if cell != null
+ } // if node.nodeName == 'update
+ else if (node.nodeName == 'model')
+ {
+ // Finds first child element
+ var dataNode = node.firstChild;
+
+ while (dataNode != null && dataNode.nodeType != mxConstants.NODETYPE_ELEMENT)
+ {
+ dataNode = dataNode.nextSibling;
+ }
+
+ if (dataNode != null)
+ {
+ var dec = new mxCodec(node.firstChild);
+ dec.decode(dataNode, model);
+ }
+ }
+ else if (node.nodeName == 'view')
+ {
+ if (node.hasAttribute('scale'))
+ {
+ graph.view.scale = parseFloat(node.getAttribute('scale'));
+ }
+
+ if (node.hasAttribute('dx') || node.hasAttribute('dy'))
+ {
+ graph.view.translate = new mxPoint(parseFloat(node.getAttribute('dx') || 0),
+ parseFloat(node.getAttribute('dy') || 0));
+ }
+ }
+ else if (node.nodeName == 'fit')
+ {
+ if (node.hasAttribute('max-scale'))
+ {
+ fit = parseFloat(node.getAttribute('max-scale'));
+ }
+ else
+ {
+ fit = 1;
+ }
+ }
+
+ node = node.nextSibling;
+ } // end of while
+ }
+ finally
+ {
+ model.endUpdate();
+ }
+
+ if (fit != null && this.chromelessResize)
+ {
+ this.chromelessResize(true, fit);
+ }
+ }
+ }
+
+ return doc;
+ };
+
+ /**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
@@ -2096,8 +2468,8 @@
if (evt.dataTransfer.files.length > 0)
{
- this.importFiles(evt.dataTransfer.files, 0, 0, this.maxImageSize, mxUtils.bind(this, function(data, mimeType, x, y, w, h, img, doneFn, file)
- {
+ this.importFiles(evt.dataTransfer.files, 0, 0, this.maxImageSize, mxUtils.bind(this, function(data, mimeType, x, y, w, h, img, doneFn, file)
+ {
if (data != null && mimeType.substring(0, 6) == 'image/')
{
var style = 'shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image=' +
@@ -2178,7 +2550,7 @@
}
});
- if (file != null && img != null && ((/(\.vsdx)($|\?)/i.test(img)) || /(\.vssx)($|\?)/i.test(img) || (/(\.vsd)($|\?)/i.test(img))))
+ if (file != null && img != null && ((/(\.vsdx?)($|\?)/i.test(img)) || /(\.vssx)($|\?)/i.test(img)))
{
this.importVisio(file, function(xml)
{
@@ -5232,11 +5604,11 @@
{
if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
- if (success != null)
- {
- var data = req.getText();
-
- // Returns PNG as base64 encoded data URI
+ if (success != null)
+ {
+ var data = req.getText();
+
+ // Returns PNG as base64 encoded data URI
if (binary)
{
// NOTE: This requires BinaryToArray VB script in the page
@@ -5259,23 +5631,23 @@
dataUriPrefix = (dataUriPrefix != null) ? dataUriPrefix : 'data:image/png;base64,';
data = dataUriPrefix + this.base64Encode(data);
}
-
- success(data);
- }
+
+ success(data);
+ }
}
else if (error != null)
- {
- error({code: App.ERROR_UNKNOWN}, req);
- }
+ {
+ error({code: App.ERROR_UNKNOWN}, req);
+ }
}), function()
{
- if (error != null)
- {
- error({code: App.ERROR_UNKNOWN});
- }
+ if (error != null)
+ {
+ error({code: App.ERROR_UNKNOWN});
+ }
}, binary, this.timeout, function()
{
- if (retry && error != null)
+ if (retry && error != null)
{
error({code: App.ERROR_TIMEOUT, retry: fn});
}
@@ -5466,18 +5838,18 @@
{
if (/(\.vsd)($|\?)/i.test(filename) && VSD_CONVERT_URL != null)
{
- var formData = new FormData();
- formData.append("file1", file);
+ var formData = new FormData();
+ formData.append('file1', file, filename);
+
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', VSD_CONVERT_URL);
+ xhr.responseType = 'blob';
- var xhr = new XMLHttpRequest();
- xhr.open('POST', VSD_CONVERT_URL);
- xhr.responseType = "blob";
-
- xhr.onreadystatechange = mxUtils.bind(this, function()
- {
- if (xhr.readyState == 4)
- {
- if (xhr.status >= 200 && xhr.status <= 299)
+ xhr.onreadystatechange = mxUtils.bind(this, function()
+ {
+ if (xhr.readyState == 4)
+ {
+ if (xhr.status >= 200 && xhr.status <= 299)
{
try
{
@@ -5488,14 +5860,14 @@
onerror(e);
}
}
- else
- {
- onerror({});
- }
- }
- });
-
- xhr.send(formData);
+ else
+ {
+ onerror({});
+ }
+ }
+ });
+
+ xhr.send(formData);
}
else
{
@@ -5972,11 +6344,7 @@
}
}));
}
-// else if (file != null && filename != null && ((/(\.vsdx)($|\?)/i.test(filename)) || /(\.vssx)($|\?)/i.test(filename) || /(\.vsd)($|\?)/i.test(filename)))
-// {
-//
-// }
- else if (file != null && filename != null && ((/(\.vsdx)($|\?)/i.test(filename)) || /(\.vssx)($|\?)/i.test(filename) || /(\.vsd)($|\?)/i.test(filename)))
+ else if (file != null && filename != null && ((/(\.vsdx?)($|\?)/i.test(filename)) || /(\.vssx)($|\?)/i.test(filename)))
{
// LATER: done and async are a hack before making this asynchronous
async = true;
@@ -6384,7 +6752,7 @@
});
// Handles special cases
- if (/(\.vsdx)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name) || /(\.vsd)($|\?)/i.test(file.name))
+ if (/(\.vsdx?)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name))
{
fn(null, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells)
{
@@ -8193,7 +8561,7 @@
}
});
- if (/(\.vsdx)($|\?)/i.test(name) || /(\.vssx)($|\?)/i.test(name) || /(\.vsd)($|\?)/i.test(name))
+ if (/(\.vsdx?)($|\?)/i.test(name) || /(\.vssx)($|\?)/i.test(name))
{
this.importVisio(file, mxUtils.bind(this, function(xml)
{
@@ -9245,10 +9613,10 @@
if (this.importCsvDialog == null)
{
this.importCsvDialog = new TextareaDialog(this, mxResources.get('csv') + ':',
- Editor.defaultCsvValue, mxUtils.bind(this, function(newValue)
- {
- this.importCsv(newValue);
- }), null, null, 620, 430, null, true, true, mxResources.get('import'));
+ Editor.defaultCsvValue, mxUtils.bind(this, function(newValue)
+ {
+ this.importCsv(newValue);
+ }), null, null, 620, 430, null, true, true, mxResources.get('import'));
}
this.showDialog(this.importCsvDialog.container, 640, 520, true, true);
@@ -9258,7 +9626,7 @@
/**
* TODO: Move to Editor
*/
- EditorUi.prototype.importCsv = function(text)
+ EditorUi.prototype.importCsv = function(text, done)
{
try
{
@@ -9289,8 +9657,15 @@
// Delayed after optional layout
var afterInsert = function()
{
- graph.setSelectionCells(select);
- graph.scrollCellToVisible(graph.getSelectionCell());
+ if (done != null)
+ {
+ done(select);
+ }
+ else
+ {
+ graph.setSelectionCells(select);
+ graph.scrollCellToVisible(graph.getSelectionCell());
+ }
};
// Computes unscaled, untranslated graph bounds
@@ -9581,9 +9956,9 @@
var cell = cells[i];
for (var j = 0; j < ignore.length; j++)
- {
+ {
graph.setAttributeForCell(cell, mxUtils.trim(ignore[j]), null);
- }
+ }
}
}
@@ -9616,27 +9991,27 @@
if (layout == 'circle')
{
var circleLayout = new mxCircleLayout(graph);
- circleLayout.resetEdges = false;
-
- var circleLayoutIsVertexIgnored = circleLayout.isVertexIgnored;
-
- // Ignore other cells
- circleLayout.isVertexIgnored = function(vertex)
- {
- return circleLayoutIsVertexIgnored.apply(this, arguments) ||
- mxUtils.indexOf(cells, vertex) < 0;
- };
-
- this.executeLayout(function()
- {
- circleLayout.execute(graph.getDefaultParent());
- postProcess();
- }, true, afterInsert);
+ circleLayout.resetEdges = false;
+
+ var circleLayoutIsVertexIgnored = circleLayout.isVertexIgnored;
- afterInsert = null;
+ // Ignore other cells
+ circleLayout.isVertexIgnored = function(vertex)
+ {
+ return circleLayoutIsVertexIgnored.apply(this, arguments) ||
+ mxUtils.indexOf(cells, vertex) < 0;
+ };
+
+ this.executeLayout(function()
+ {
+ circleLayout.execute(graph.getDefaultParent());
+ postProcess();
+ }, true, afterInsert);
+
+ afterInsert = null;
}
else if (layout == 'horizontaltree' || layout == 'verticaltree' ||
- (layout == 'auto' && select.length == 2 * cells.length - 1 && roots.length == 1))
+ (layout == 'auto' && select.length == 2 * cells.length - 1 && roots.length == 1))
{
// Required for layouts to work with new cells
graph.view.validate();
diff --git a/src/main/webapp/js/diagramly/GitHubClient.js b/src/main/webapp/js/diagramly/GitHubClient.js
index 4bbbac27..c211c63e 100644
--- a/src/main/webapp/js/diagramly/GitHubClient.js
+++ b/src/main/webapp/js/diagramly/GitHubClient.js
@@ -346,7 +346,7 @@ GitHubClient.prototype.getFile = function(path, success, error, asLibrary, check
var binary = /\.png$/i.test(path);
// Handles .vsdx, Gliffy and PNG+XML files by creating a temporary file
- if (!checkExists && (/\.vsdx$/i.test(path) || /\.gliffy$/i.test(path) ||
+ if (!checkExists && (/\.vsdx?$/i.test(path) || /\.gliffy$/i.test(path) ||
(!this.ui.useCanvasForExport && binary)))
{
// Should never be null
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 1e1a0bb7..4863dd92 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -2023,23 +2023,26 @@
var addInsertItem = function(menu, parent, title, method)
{
- menu.addItem(title, null, mxUtils.bind(this, function()
+ if (method != 'plantUml' || EditorUi.enablePlantUml)
{
- if (method == 'fromText' || method == 'formatSql' || method == 'plantUml')
+ menu.addItem(title, null, mxUtils.bind(this, function()
{
- var dlg = new ParseDialog(editorUi, title, method);
- editorUi.showDialog(dlg.container, 620, 420, true, false);
- editorUi.dialog.container.style.overflow = 'auto';
- dlg.init();
- }
- else
- {
- var dlg = new CreateGraphDialog(editorUi, title, method);
- editorUi.showDialog(dlg.container, 620, 420, true, false);
- // Executed after dialog is added to dom
- dlg.init();
- }
- }), parent);
+ if (method == 'fromText' || method == 'formatSql' || method == 'plantUml')
+ {
+ var dlg = new ParseDialog(editorUi, title, method);
+ editorUi.showDialog(dlg.container, 620, 420, true, false);
+ editorUi.dialog.container.style.overflow = 'auto';
+ dlg.init();
+ }
+ else
+ {
+ var dlg = new CreateGraphDialog(editorUi, title, method);
+ editorUi.showDialog(dlg.container, 620, 420, true, false);
+ // Executed after dialog is added to dom
+ dlg.init();
+ }
+ }), parent);
+ }
};
var insertVertex = function(value, w, h, style)
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 38ca51e8..484a5c91 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -330,6 +330,22 @@ EditorUi.initMinimalTheme = function()
EditorUi.prototype.showCsvImport = false;
EditorUi.prototype.footerHeight = 0;
Graph.prototype.editAfterInsert = true;
+
+ /**
+ * Sets the XML node for the current diagram.
+ */
+ Editor.prototype.isChromelessView = function()
+ {
+ return false;
+ };
+
+ /**
+ * Sets the XML node for the current diagram.
+ */
+ Graph.prototype.isLightboxView = function()
+ {
+ return false;
+ };
// Overridden to ignore tabContainer height for diagramContainer
var editorUiRefresh = EditorUi.prototype.refresh;
@@ -347,7 +363,6 @@ EditorUi.initMinimalTheme = function()
};
// Overridden to update save menu state
-
/**
* Updates action states depending on the selection.
*/
@@ -357,30 +372,9 @@ EditorUi.initMinimalTheme = function()
{
editorUiUpdateActionStates.apply(this, arguments);
- var saveMenu = this.menus.get('save');
-
- if (saveMenu != null)
- {
- saveMenu.setEnabled(this.getCurrentFile() != null || urlParams['embed'] == '1');
- }
+ this.menus.get('save').setEnabled(this.getCurrentFile() != null || urlParams['embed'] == '1');
};
- /**
- * Sets the XML node for the current diagram.
- */
- Editor.prototype.isChromelessView = function()
- {
- return false;
- };
-
- /**
- * Sets the XML node for the current diagram.
- */
- Graph.prototype.isLightboxView = function()
- {
- return false;
- };
-
// Hides keyboard shortcuts in menus
var menusAddShortcut = Menus.prototype.addShortcut;
@@ -652,22 +646,15 @@ EditorUi.initMinimalTheme = function()
// Disables centering of graph after iframe resize
EditorUi.prototype.chromelessWindowResize = function() {};
-
- // Initializes the user interface
- var editorUiInit = EditorUi.prototype.init;
- EditorUi.prototype.init = function()
+ // Adds actions and menus
+ var menusInit = Menus.prototype.init;
+ Menus.prototype.init = function()
{
- editorUiInit.apply(this, arguments);
+ menusInit.apply(this, arguments);
- var ui = this;
- var graph = this.editor.graph;
- var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
-
- var div = document.createElement('div');
- div.style.cssText = 'position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;';
- div.style.bottom = (urlParams['embed'] != '1' || urlParams['libraries'] == '1') ? '63px' : '32px';
- this.sidebar = this.createSidebar(div);
+ var ui = this.editorUi;
+ var graph = ui.editor.graph;
ui.actions.get('insertText').label = mxResources.get('text');
ui.actions.get('insertText').label = mxResources.get('text');
@@ -715,12 +702,7 @@ EditorUi.initMinimalTheme = function()
ui.showDialog(dlg.container, 620, 420, true, false);
dlg.init();
}));
- ui.actions.put('plantUml', new Action(mxResources.get('plantUml') + '...', function()
- {
- var dlg = new ParseDialog(ui, 'Insert from Text', 'plantUml');
- ui.showDialog(dlg.container, 620, 420, true, false);
- dlg.init();
- }));
+
ui.actions.put('toggleShapes', new Action(mxResources.get('shapes') + '...', function()
{
toggleShapes(ui);
@@ -729,18 +711,18 @@ EditorUi.initMinimalTheme = function()
{
toggleFormat(ui);
}));
- var addInsertItem = function(menu, parent, title, method)
+
+ if (EditorUi.enablePlantUml)
{
- menu.addItem(title, null, mxUtils.bind(this, function()
- {
- var dlg = new CreateGraphDialog(ui, title, method);
- ui.showDialog(dlg.container, 620, 420, true, false);
- // Executed after dialog is added to dom
- dlg.init();
- }), parent);
- };
+ ui.actions.put('plantUml', new Action(mxResources.get('plantUml') + '...', function()
+ {
+ var dlg = new ParseDialog(ui, 'Insert from Text', 'plantUml');
+ ui.showDialog(dlg.container, 620, 420, true, false);
+ dlg.init();
+ }));
+ }
- ui.menus.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('diagram', new Menu(mxUtils.bind(this, function(menu, parent)
{
ui.menus.addSubmenu('preferences', menu, parent);
menu.addSeparator(parent);
@@ -806,7 +788,7 @@ EditorUi.initMinimalTheme = function()
if (isLocalStorage)
{
- var openFromMenu = ui.menus.get('openFrom');
+ var openFromMenu = this.get('openFrom');
var oldFunct = openFromMenu.funct;
openFromMenu.funct = function(menu, parent)
@@ -818,7 +800,7 @@ EditorUi.initMinimalTheme = function()
};
}
- ui.menus.put('save', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('save', new Menu(mxUtils.bind(this, function(menu, parent)
{
var file = ui.getCurrentFile();
@@ -840,9 +822,9 @@ EditorUi.initMinimalTheme = function()
})));
// Augments the existing export menu
- var exportAsMenu = ui.menus.get('exportAs');
+ var exportAsMenu = this.get('exportAs');
- ui.menus.put('exportAs', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('exportAs', new Menu(mxUtils.bind(this, function(menu, parent)
{
exportAsMenu.funct(menu, parent);
menu.addSeparator(parent);
@@ -852,9 +834,9 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['publishLink'], parent);
})));
- var langMenu = ui.menus.get('language');
+ var langMenu = this.get('language');
- ui.menus.put('preferences', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('preferences', new Menu(mxUtils.bind(this, function(menu, parent)
{
if (urlParams['embed'] != '1')
{
@@ -881,7 +863,7 @@ EditorUi.initMinimalTheme = function()
}
})));
- ui.menus.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('insertAdvanced', new Menu(mxUtils.bind(this, function(menu, parent)
{
ui.menus.addMenuItems(menu, ['importText', 'createShape', 'plantUml', '-', 'importCsv', 'editDiagram', 'formatSql', '-', 'insertPage'], parent);
})));
@@ -889,7 +871,7 @@ EditorUi.initMinimalTheme = function()
mxResources.parse('insertLayout=' + mxResources.get('layout'));
mxResources.parse('insertAdvanced=' + mxResources.get('advanced'));
- ui.menus.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('insert', new Menu(mxUtils.bind(this, function(menu, parent)
{
ui.menus.addMenuItems(menu, ['insertRectangle', 'insertEllipse', 'insertRhombus', '-', 'insertText',
'insertLink', '-', 'insertImage'], parent);
@@ -901,8 +883,19 @@ EditorUi.initMinimalTheme = function()
var methods = ['horizontalFlow', 'verticalFlow', '-', 'horizontalTree', 'verticalTree',
'radialTree', '-', 'organic', 'circle'];
-
- ui.menus.put('insertLayout', new Menu(mxUtils.bind(this, function(menu, parent)
+
+ var addInsertItem = function(menu, parent, title, method)
+ {
+ menu.addItem(title, null, mxUtils.bind(this, function()
+ {
+ var dlg = new CreateGraphDialog(ui, title, method);
+ ui.showDialog(dlg.container, 620, 420, true, false);
+ // Executed after dialog is added to dom
+ dlg.init();
+ }), parent);
+ };
+
+ this.put('insertLayout', new Menu(mxUtils.bind(this, function(menu, parent)
{
for (var i = 0; i < methods.length; i++)
{
@@ -917,14 +910,28 @@ EditorUi.initMinimalTheme = function()
}
})));
- ui.menus.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+ this.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
{
ui.menus.addMenuItems(menu, ['grid', 'guides', '-', 'connectionArrows', 'connectionPoints', '-',
'copyConnect', 'collapseExpand', '-', 'mathematicalTypesetting'], parent);
})));
+ };
+
+ // Initializes the user interface
+ var editorUiInit = EditorUi.prototype.init;
+
+ EditorUi.prototype.init = function()
+ {
+ editorUiInit.apply(this, arguments);
+
+ var div = document.createElement('div');
+ div.style.cssText = 'position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;';
+ div.style.bottom = (urlParams['embed'] != '1' || urlParams['libraries'] == '1') ? '63px' : '32px';
+ this.sidebar = this.createSidebar(div);
// Needed for creating elements in Format panel
- ui.toolbar = ui.createToolbar(ui.createDiv('geToolbar'));
+ var ui = this;
+ ui.toolbar = this.createToolbar(ui.createDiv('geToolbar'));
ui.defaultLibraryName = mxResources.get('untitledLibrary');
var menubar = document.createElement('div');
@@ -1196,7 +1203,9 @@ EditorUi.initMinimalTheme = function()
// Container for the user element
ui.menubarContainer = ui.buttonContainer;
-
+
+ var langMenu = this.menus.get('language');
+
if (langMenu != null && !mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && iw >= 480)
{
var elt = menuObj.addMenu('', langMenu.funct);
diff --git a/src/main/webapp/js/diagramly/OneDriveClient.js b/src/main/webapp/js/diagramly/OneDriveClient.js
index 04f62cb3..edfe5678 100644
--- a/src/main/webapp/js/diagramly/OneDriveClient.js
+++ b/src/main/webapp/js/diagramly/OneDriveClient.js
@@ -320,7 +320,7 @@ OneDriveClient.prototype.getFile = function(id, success, error, denyConvert, asL
var binary = /\.png$/i.test(meta.name);
// Handles .vsdx, Gliffy and PNG+XML files by creating a temporary file
- if (/\.vsdx$/i.test(meta.name) || /\.gliffy$/i.test(meta.name) ||
+ if (/\.vsdx?$/i.test(meta.name) || /\.gliffy$/i.test(meta.name) ||
(!this.ui.useCanvasForExport && binary))
{
var mimeType = (meta.file != null) ? meta.file.mimeType : null;
diff --git a/src/main/webapp/js/diagramly/TrelloClient.js b/src/main/webapp/js/diagramly/TrelloClient.js
index 06fdfd01..3dddfbdf 100644
--- a/src/main/webapp/js/diagramly/TrelloClient.js
+++ b/src/main/webapp/js/diagramly/TrelloClient.js
@@ -123,7 +123,7 @@ TrelloClient.prototype.getFile = function(id, success, error, denyConvert, asLib
// TODO Trello doesn't allow CORS requests to load attachments. Confirm that
// and make sure that only a proxy technique can work!
// Handles .vsdx, Gliffy and PNG+XML files by creating a temporary file
- if (/\.vsdx$/i.test(meta.name) || /\.gliffy$/i.test(meta.name) ||
+ if (/\.vsdx?$/i.test(meta.name) || /\.gliffy$/i.test(meta.name) ||
(!this.ui.useCanvasForExport && binary))
{
this.ui.convertFile(PROXY_URL + '?url=' + encodeURIComponent(meta.url), meta.name, meta.mimeType,
diff --git a/src/main/webapp/js/diagramly/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js
index d81c0e7d..4d4935ec 100644
--- a/src/main/webapp/js/diagramly/vsdx/importer.js
+++ b/src/main/webapp/js/diagramly/vsdx/importer.js
@@ -169,142 +169,151 @@ var com;
if (processedFiles == filesCount)
{
var dateAfter = new Date();
- //console.log(processedFiles + " File extracted in " + (dateAfter - dateBefore) + "ms");
- allDone();
+ //console.log(processedFiles + " File extracted in " + (dateAfter - dateBefore) + "ms");
+ allDone();
}
};
JSZip.loadAsync(file)
.then(function(zip)
{
- var dateAfter = new Date();
- //console.log(" (loaded in " + (dateAfter - dateBefore) + "ms)");
-
- zip.forEach(function (relativePath, zipEntry)
- {
- var filename = zipEntry.name;
- var name = filename.toLowerCase();
- var nameLen = name.length;
- if (name.indexOf('.xml') == nameLen - 4 || name.indexOf('.xml.rels') == nameLen - 9) //xml files
- {
- filesCount++;
- zipEntry.async("string").then(function (str)
- {
- if (!(str.length === 0)) {
- //UTF-8 BOM causes exception while parsing, so remove it
- //TODO is the text encoding will be correct or string must be re-read as UTF-8?
- if ((function (str, searchString, position) {
- if (position === void 0) { position = 0; }
- return str.substr(position, searchString.length) === searchString;
- })(str, "\u00ef\u00bb\u00bf"))
- str = str.substring(3);
- var doc = mxUtils.parseXml(str);
- if (doc == null) { //FIXME TODO find a way to change encoding in javascript
-// var outBytes = out.toByteArray();
-// if (outBytes[1] === 0 && outBytes[3] === 0 && outBytes[5] === 0) {
-// str = out.toString("UTF-16LE");
-// doc = mxUtils.parseXml(str);
-// }
- //TODO add any other non-standard encoding that may be needed
- }
- doc.vsdxFileName = filename;
- /* put */ (docData[filename] = doc);
- }
- processedFiles++;
-
- doneCheck();
- });
- }
- else if (name.indexOf(mxVsdxCodec.vsdxPlaceholder + "/media") === 0)//binary files
- {
- filesCount++;
- if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(name, ".emf")) {
- if (JSZip.support.uint8array)
- {
- zipEntry.async("uint8array").then(function (emfData)
- {
- var imageFound = false;
- var base64Str = "";
- for (var i = 0; i < emfData.length - 8; i++) {
- if (_this.isPng(emfData, i) || _this.isJpg(emfData, i)) {
- base64Str = com.mxgraph.online.mxBase64.encodeToString(emfData, i);
- imageFound = true;
- break;
- }
- }
- ;
- if (imageFound) {
- /* put */ (mediaData[filename] = base64Str);
+ if (Object.keys(zip.files).length == 0)
+ {
+ if (onerror != null)
+ {
+ onerror();
+ }
+ }
+ else
+ {
+ var dateAfter = new Date();
+ //console.log(" (loaded in " + (dateAfter - dateBefore) + "ms)");
+
+ zip.forEach(function (relativePath, zipEntry)
+ {
+ var filename = zipEntry.name;
+ var name = filename.toLowerCase();
+ var nameLen = name.length;
+ if (name.indexOf('.xml') == nameLen - 4 || name.indexOf('.xml.rels') == nameLen - 9) //xml files
+ {
+ filesCount++;
+ zipEntry.async("string").then(function (str)
+ {
+ if (!(str.length === 0)) {
+ //UTF-8 BOM causes exception while parsing, so remove it
+ //TODO is the text encoding will be correct or string must be re-read as UTF-8?
+ if ((function (str, searchString, position) {
+ if (position === void 0) { position = 0; }
+ return str.substr(position, searchString.length) === searchString;
+ })(str, "\u00ef\u00bb\u00bf"))
+ str = str.substring(3);
+ var doc = mxUtils.parseXml(str);
+ if (doc == null) { //FIXME TODO find a way to change encoding in javascript
+ // var outBytes = out.toByteArray();
+ // if (outBytes[1] === 0 && outBytes[3] === 0 && outBytes[5] === 0) {
+ // str = out.toString("UTF-16LE");
+ // doc = mxUtils.parseXml(str);
+ // }
+ //TODO add any other non-standard encoding that may be needed
}
-
+ doc.vsdxFileName = filename;
+ /* put */ (docData[filename] = doc);
+ }
processedFiles++;
-
+
doneCheck();
- });
- }
- }
- else if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(name, ".bmp")) {
- if (JSZip.support.uint8array)
- {
- zipEntry.async("uint8array").then(function (bmpData)
+ });
+ }
+ else if (name.indexOf(mxVsdxCodec.vsdxPlaceholder + "/media") === 0)//binary files
+ {
+ filesCount++;
+ if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(name, ".emf")) {
+ if (JSZip.support.uint8array)
+ {
+ zipEntry.async("uint8array").then(function (emfData)
+ {
+ var imageFound = false;
+ var base64Str = "";
+ for (var i = 0; i < emfData.length - 8; i++) {
+ if (_this.isPng(emfData, i) || _this.isJpg(emfData, i)) {
+ base64Str = com.mxgraph.online.mxBase64.encodeToString(emfData, i);
+ imageFound = true;
+ break;
+ }
+ }
+ ;
+ if (imageFound) {
+ /* put */ (mediaData[filename] = base64Str);
+ }
+
+ processedFiles++;
+
+ doneCheck();
+ });
+ }
+ }
+ else if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(name, ".bmp")) {
+ if (JSZip.support.uint8array)
+ {
+ zipEntry.async("uint8array").then(function (bmpData)
+ {
+ var bitmap = new BmpDecoder(bmpData);
+
+ var c = document.createElement("canvas");
+ c.width = bitmap.width;
+ c.height = bitmap.height;
+ var ctx = c.getContext("2d");
+ ctx.putImageData(bitmap.imageData, 0, 0);
+ var jpgData = c.toDataURL("image/jpeg");
+ /* put */ (mediaData[filename] = jpgData.substr(23)); //23 is the length of "data:image/jpeg;base64,"
+
+ processedFiles++;
+ doneCheck();
+ });
+ }
+ }
+ else
+ {
+ zipEntry.async("base64").then(function (base64Str)
{
- var bitmap = new BmpDecoder(bmpData);
-
- var c = document.createElement("canvas");
- c.width = bitmap.width;
- c.height = bitmap.height;
- var ctx = c.getContext("2d");
- ctx.putImageData(bitmap.imageData, 0, 0);
- var jpgData = c.toDataURL("image/jpeg");
- /* put */ (mediaData[filename] = jpgData.substr(23)); //23 is the length of "data:image/jpeg;base64,"
-
- processedFiles++;
- doneCheck();
+ // if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(name, ".bmp")) {
+ // try
+ // {
+ // //convert BMP files to PNG
+ // var bmpImg = new Image();
+ //
+ // bmpImg.onload = function() {
+ // var c = document.createElement("canvas");
+ // c.width = bmpImg.width;
+ // c.height = bmpImg.height;
+ // var ctx = c.getContext("2d");
+ // ctx.drawImage(bmpImg, 0, 0);
+ // var jpgData = c.toDataURL("image/jpeg");
+ //
+ // /* put */ (mediaData[filename] = jpgData.substr(23)); //23 is the length of "data:image/jpeg;base64,"
+ //
+ // processedFiles++;
+ // doneCheck();
+ // };
+ //
+ // bmpImg.src = "data:image/bmp;base64," + base64Str;
+ // }
+ // catch (e) {} //conversion failed. Nothing can be done!
+ // }
+ // else
+ // {
+ /* put */ (mediaData[filename] = base64Str);
+
+ processedFiles++;
+ doneCheck();
+ // }
});
- }
- }
- else
- {
- zipEntry.async("base64").then(function (base64Str)
- {
-// if ((function (str, searchString) { var pos = str.length - searchString.length; var lastIndex = str.indexOf(searchString, pos); return lastIndex !== -1 && lastIndex === pos; })(name, ".bmp")) {
-// try
-// {
-// //convert BMP files to PNG
-// var bmpImg = new Image();
-//
-// bmpImg.onload = function() {
-// var c = document.createElement("canvas");
-// c.width = bmpImg.width;
-// c.height = bmpImg.height;
-// var ctx = c.getContext("2d");
-// ctx.drawImage(bmpImg, 0, 0);
-// var jpgData = c.toDataURL("image/jpeg");
-//
-// /* put */ (mediaData[filename] = jpgData.substr(23)); //23 is the length of "data:image/jpeg;base64,"
-//
-// processedFiles++;
-// doneCheck();
-// };
-//
-// bmpImg.src = "data:image/bmp;base64," + base64Str;
-// }
-// catch (e) {} //conversion failed. Nothing can be done!
-// }
-// else
-// {
- /* put */ (mediaData[filename] = base64Str);
-
- processedFiles++;
- doneCheck();
-// }
- });
- }
- }
- });
+ }
+ }
+ });
+ }
}, function (e) {
//console.log("Error!" + e.message);
-
if (onerror != null)
{
onerror(e);
diff --git a/src/main/webapp/js/embed-static.min.js b/src/main/webapp/js/embed-static.min.js
index 81cd01e1..0f9434c3 100644
--- a/src/main/webapp/js/embed-static.min.js
+++ b/src/main/webapp/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.6",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.7",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index efb1b083..afbeb7e7 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -551,8 +551,8 @@ BmpDecoder.prototype.bit32=function(){for(var c=this.height-1;0<=c;c--)for(var m
(function(c){(function(m){(function(w){var l=function(){function h(){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.debugPaths=!1;this.vsdxModel=null}h.vsdxPlaceholder_$LI$=function(){null==h.vsdxPlaceholder&&(h.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return h.vsdxPlaceholder};
h.prototype.decodeVsdx=function(f,b,a,d){var g=this,p={},D={},C=function(){for(var a=h.vsdxPlaceholder+"/document.xml",d=p[a]?p[a]:null,f=d.firstChild;null!=f&&1!=f.nodeType;)f=f.nextSibling;if(null!=f&&1==f.nodeType)g.importNodes(d,f,a,p);else return null;g.vsdxModel=new c.mxgraph.io.vsdx.mxVsdxModel(d,p,D);for(var a=g.vsdxModel.getPages(),C=g.RESPONSE_HEADER,y=function(a){null==a.entries&&(a.entries=[]);return a.entries}(a),a=function(a){a=y[a].getValue();if(!a.isBackground()){var b=q.createMxGraph();
b.getModel().beginUpdate();q.importPage(a,b,b.getDefaultParent());var d=a.getBackPage();if(null!=d){b.getModel().setValue(b.getDefaultParent(),a.getPageName());var p=new mxCell(d.getPageName());b.addCell(p,b.getModel().getRoot(),0,null,null);q.importPage(d,b,b.getDefaultParent())}d=a.getPageScale()/a.getDrawingScale();if(1!==d){var p=b.getModel(),c;for(c in p.cells){var f=p.cells[c],D=p.getGeometry(f);if(null!=D&&(q.scaleRect(D,d),q.scaleRect(D.alternateBounds,d),p.isEdge(f)&&(q.scalePoint(D.sourcePoint,
-d),q.scalePoint(D.targetPoint,d),q.scalePoint(D.offset,d),f=D.points,null!=f)))for(D=0;D<f.length;D++)q.scalePoint(f[D],d)}}b.getModel().endUpdate();C=C.concat(g.RESPONSE_DIAGRAM_START);C=C.concat(g.processPage(b,a));C=C.concat(g.RESPONSE_DIAGRAM_END)}},q=g,d=0;d<y.length;d++)a(d);C=C.concat(g.RESPONSE_END);b&&b(C)},y=0,q=0,l=function(){q==y&&C()};JSZip.loadAsync(f).then(function(a){a.forEach(function(a,b){var d=b.name,f=d.toLowerCase(),C=f.length;f.indexOf(".xml")==C-4||f.indexOf(".xml.rels")==C-
-9?(y++,b.async("string").then(function(a){if(0!==a.length){var b=void 0;void 0===b&&(b=0);""===a.substr(b,3)&&(a=a.substring(3));a=mxUtils.parseXml(a);a.vsdxFileName=d;p[d]=a}q++;l()})):0===f.indexOf(h.vsdxPlaceholder+"/media")&&(y++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".emf")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){for(var b=!1,p="",f=0;f<a.length-8;f++)if(g.isPng(a,f)||g.isJpg(a,f)){p=c.mxgraph.online.mxBase64.encodeToString(a,
+d),q.scalePoint(D.targetPoint,d),q.scalePoint(D.offset,d),f=D.points,null!=f)))for(D=0;D<f.length;D++)q.scalePoint(f[D],d)}}b.getModel().endUpdate();C=C.concat(g.RESPONSE_DIAGRAM_START);C=C.concat(g.processPage(b,a));C=C.concat(g.RESPONSE_DIAGRAM_END)}},q=g,d=0;d<y.length;d++)a(d);C=C.concat(g.RESPONSE_END);b&&b(C)},y=0,q=0,l=function(){q==y&&C()};JSZip.loadAsync(f).then(function(a){0==Object.keys(a.files).length?null!=d&&d():a.forEach(function(a,b){var d=b.name,f=d.toLowerCase(),C=f.length;f.indexOf(".xml")==
+C-4||f.indexOf(".xml.rels")==C-9?(y++,b.async("string").then(function(a){if(0!==a.length){var b=void 0;void 0===b&&(b=0);""===a.substr(b,3)&&(a=a.substring(3));a=mxUtils.parseXml(a);a.vsdxFileName=d;p[d]=a}q++;l()})):0===f.indexOf(h.vsdxPlaceholder+"/media")&&(y++,function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".emf")?JSZip.support.uint8array&&b.async("uint8array").then(function(a){for(var b=!1,p="",f=0;f<a.length-8;f++)if(g.isPng(a,f)||g.isJpg(a,f)){p=c.mxgraph.online.mxBase64.encodeToString(a,
f);b=!0;break}b&&(D[d]=p);q++;l()}):function(a,b){var d=a.length-b.length,g=a.indexOf(b,d);return-1!==g&&g===d}(f,".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");D[d]=a.substr(23);q++;l()}):b.async("base64").then(function(a){D[d]=a;q++;l()}))})},function(a){null!=d&&d(a)})};h.prototype.createMxGraph=function(){var c=
new mxGraph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};h.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 g=mxUtils.htmlEntities(b.getPageName()),d=d+('<diagram name="'+g+'">');return d+=Graph.prototype.compress(a)};h.prototype.isJpg=function(c,b){return 255===c[b]&&216===c[b+1]&&255===c[b+
2]};h.prototype.isPng=function(c,b){return 137===c[b]&&80===c[b+1]&&78===c[b+2]&&71===c[b+3]&&13===c[b+4]&&10===c[b+5]&&26===c[b+6]&&10===c[b+7]};h.prototype.scalePoint=function(c,b){null!=c&&(c.x*=b,c.y*=b);return c};h.prototype.scaleRect=function(c,b){null!=c&&(c.x*=b,c.y*=b,c.height*=b,c.width*=b);return c};h.prototype.importNodes=function(c,b,a,d){var g=a.lastIndexOf("/"),p=a,f=a;if(-1!==g&&(p=a.substring(0,g),f=a.substring(g+1,a.length),a=function(a,b){return a[b]?a[b]:null}(d,p+"/_rels/"+f+
diff --git a/src/main/webapp/js/reader.min.js b/src/main/webapp/js/reader.min.js
index b9f02aa3..e5dd00d5 100644
--- a/src/main/webapp/js/reader.min.js
+++ b/src/main/webapp/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.6",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"8.6.7",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 2535d846..31bf76af 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -1982,14 +1982,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))
Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,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){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),q=[],t=0;t<e.length;t++)(k.isVertex(e[t])||k.isEdge(e[t]))&&null!=a.view.getState(e[t])&&
-q.push(e[t]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+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){for(var e=a.getSelectionCellsForChanges(b.getProperty("edit").changes),k=a.getModel(),p=[],v=0;v<e.length;v++)(k.isVertex(e[v])||k.isEdge(e[v]))&&null!=a.view.getState(e[v])&&
+p.push(e[v]);a.setSelectionCells(p)};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,c,k,l,n,q){var t=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(t=80);e+=t;c+=t;var d=e,g=c,f=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),r=Math.max(1,Math.round((f-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,f-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=f+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var h=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=h.x+"px";this.bg.style.top=h.y+"px";p+=h.x;r+=h.y;k&&document.body.appendChild(this.bg);var w=a.createDiv("geDialog");k=this.getPosition(p,r,
-e,c);p=k.x;r=k.y;w.style.width=e+"px";w.style.height=c+"px";w.style.left=p+"px";w.style.top=r+"px";w.style.zIndex=this.zIndex;w.appendChild(b);document.body.appendChild(w);!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=r+14+"px",l.style.left=p+e+38-t+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",
-mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){f=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=f+"px";p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));r=Math.max(1,Math.round((f-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
-Math.min(g,f-64);var h=this.getPosition(p,r,e,c);p=h.x;r=h.y;w.style.left=p+"px";w.style.top=r+"px";w.style.width=e+"px";w.style.height=c+"px";!q&&b.clientHeight>w.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=r+14+"px",this.dialogImg.style.left=p+e+38-t+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=w;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";
+function Dialog(a,b,e,c,k,l,q,p){var v=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(v=80);e+=v;c+=v;var d=e,f=c,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),r=Math.max(1,Math.round((g-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);c=Math.min(c,g-64);0<a.dialogs.length&&(this.zIndex+=2*a.dialogs.length);null==this.bg&&
+(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var h=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=h.x+"px";this.bg.style.top=h.y+"px";n+=h.x;r+=h.y;k&&document.body.appendChild(this.bg);var m=a.createDiv("geDialog");k=this.getPosition(n,r,
+e,c);n=k.x;r=k.y;m.style.width=e+"px";m.style.height=c+"px";m.style.left=n+"px";m.style.top=r+"px";m.style.zIndex=this.zIndex;m.appendChild(b);document.body.appendChild(m);!p&&b.clientHeight>m.clientHeight-64&&(b.style.overflowY="auto");l&&(l=document.createElement("img"),l.setAttribute("src",Dialog.prototype.closeImage),l.setAttribute("title",mxResources.get("close")),l.className="geDialogClose",l.style.top=r+14+"px",l.style.left=n+e+38-v+"px",l.style.zIndex=this.zIndex,mxEvent.addListener(l,"click",
+mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(l),this.dialogImg=l,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(d){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";n=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));r=Math.max(1,Math.round((g-c-a.footerHeight)/3));e=Math.min(d,document.body.scrollWidth-64);c=
+Math.min(f,g-64);var h=this.getPosition(n,r,e,c);n=h.x;r=h.y;m.style.left=n+"px";m.style.top=r+"px";m.style.width=e+"px";m.style.height=c+"px";!p&&b.clientHeight>m.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=r+14+"px",this.dialogImg.style.left=n+e+38-v+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=m;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";
@@ -2000,66 +2000,66 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
"/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
var PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||d.checked,b=parseInt(f.value)/100;isNaN(b)&&(b=1,f.value="100%");var b=.75*b,p=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var r=q.checked?1:parseInt(g.value);isNaN(r)||(m=mxUtils.getScaleForPageCount(r,e,p))}e.getGraphBounds();var k=r=0,p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*b);p.height=Math.ceil(p.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),r-=b.x*p.width,k-=b.y*p.height):
-c=!0;c=PrintDialog.createPrintPreview(e,m,p,0,r,k,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");c=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(q);var t=document.createElement("span");mxUtils.write(t," "+mxResources.get("fitPage"));
-k.appendChild(t);mxEvent.addListener(t,"click",function(a){q.checked=!q.checked;d.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){d.checked=!q.checked});c.appendChild(k);n.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);t=document.createElement("span");mxUtils.write(t," "+mxResources.get("posterPrint")+":");k.appendChild(t);mxEvent.addListener(t,
-"click",function(a){d.checked=!d.checked;q.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(g);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);n.appendChild(c);mxEvent.addListener(d,"change",
-function(){d.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!d.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);n.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");t=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});t.className="geBtn";a.editor.cancelFirst&&k.appendChild(t);if(PrintDialog.previewEnabled){var p=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});p.className="geBtn";k.appendChild(p)}p=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});p.className="geBtn gePrimaryBtn";k.appendChild(p);a.editor.cancelFirst||
-k.appendChild(t);c.appendChild(k);n.appendChild(c);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,e,c,k,l,n){b=new mxPrintPreview(a,b,e,c,k,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+PrintDialog.prototype.create=function(a){function b(a){var c=p.checked||d.checked,b=parseInt(g.value)/100;isNaN(b)&&(b=1,g.value="100%");var b=.75*b,n=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,r=1/e.pageScale;if(c){var t=p.checked?1:parseInt(f.value);isNaN(t)||(r=mxUtils.getScaleForPageCount(t,e,n))}e.getGraphBounds();var x=t=0,n=mxRectangle.fromRectangle(n);n.width=Math.ceil(n.width*b);n.height=Math.ceil(n.height*b);r*=b;!c&&e.pageVisible?(b=e.getPageLayout(),t-=b.x*n.width,x-=b.y*n.height):
+c=!0;c=PrintDialog.createPrintPreview(e,r,n,0,t,x,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,c,k,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var q=document.createElement("tbody");c=document.createElement("tr");var p=document.createElement("input");p.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(p);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage"));
+k.appendChild(v);mxEvent.addListener(v,"click",function(a){p.checked=!p.checked;d.checked=!p.checked;mxEvent.consume(a)});mxEvent.addListener(p,"change",function(){d.checked=!p.checked});c.appendChild(k);q.appendChild(c);c=c.cloneNode(!1);var d=document.createElement("input");d.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v,
+"click",function(a){d.checked=!d.checked;p.checked=!d.checked;mxEvent.consume(a)});c.appendChild(k);var f=document.createElement("input");f.setAttribute("value","1");f.setAttribute("type","number");f.setAttribute("min","1");f.setAttribute("size","4");f.setAttribute("disabled","disabled");f.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(f);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);q.appendChild(c);mxEvent.addListener(d,"change",
+function(){d.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled");p.checked=!d.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var g=document.createElement("input");g.setAttribute("value","100 %");g.setAttribute("size","5");g.style.width="50px";k.appendChild(g);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");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&k.appendChild(v);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";k.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";k.appendChild(n);a.editor.cancelFirst||
+k.appendChild(v);c.appendChild(k);q.appendChild(c);l.appendChild(q);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,e,c,k,l,q){b=new mxPrintPreview(a,b,e,c,k,l);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 p=b.writeHead;b.writeHead=function(a){p.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln(" body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=g,d.style.backgroundImage="")}function e(){null==r?(p.removeAttribute("title"),p.style.fontSize="",p.innerHTML=mxResources.get("change")+"..."):(p.setAttribute("title",r.src),p.style.fontSize="11px",p.innerHTML=r.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,n=document.createElement("table");n.style.width=
-"100%";n.style.height="100%";var q=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var t=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
-mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var g=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(d)});
-l.appendChild(d);mxUtils.write(l,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();l.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
-":");k.appendChild(l);l=document.createElement("td");var p=document.createElement("a");p.style.textDecoration="underline";p.style.cursor="pointer";p.style.color="#a0a0a0";var r=c.backgroundImage;mxEvent.addListener(p,"click",function(d){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(d)});e();l.appendChild(p);k.appendChild(l);q.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var d=new ChangePageSetup(a,g,r,t.get());d.ignoreColor=c.background==g;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=r?r.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
-d.ignoreColor&&d.ignoreImage||c.model.execute(d)});w.className="geBtn gePrimaryBtn";l.appendChild(w);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);q.appendChild(k);n.appendChild(q);this.container=n};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||f!=document.activeElement&&p!=document.activeElement){a=!1;for(d=0;d<h.length;d++)c=h[d],v?"custom"==c.key&&(q.value=c.key,v=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
-e.height==c.format.height?(q.value=c.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(q.value=c.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,a=n.checked=!0));a?(t.style.display="",g.style.display="none"):(f.value=e.width/100,p.value=e.height/100,l.setAttribute("checked","checked"),
-q.value="custom",t.style.display="none",g.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var t=document.createElement("div");t.style.marginLeft="4px";t.style.width="210px";
-t.style.height="24px";l.style.marginRight="6px";t.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));t.appendChild(b);n.style.marginLeft="10px";n.style.marginRight="6px";t.appendChild(n);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));t.appendChild(d);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";g.appendChild(f);mxUtils.write(g," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.style.textAlign="right";g.appendChild(p);mxUtils.write(g," in");t.style.display="none";g.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),w=0;w<h.length;w++){var u=h[w];r[u.key]=u;var m=document.createElement("option");m.setAttribute("value",u.key);mxUtils.write(m,u.title);q.appendChild(m)}var v=!1;k();a.appendChild(q);mxUtils.br(a);
-a.appendChild(t);a.appendChild(g);var D=e,F=function(a,d){var b=r[q.value];null!=b.format?(f.value=b.format.width/100,p.value=b.format.height/100,g.style.display="none",t.style.display=""):(t.style.display="none",g.style.display="");isNaN(parseFloat(f.value))&&(f.value=e.width/100);isNaN(parseFloat(p.value))&&(p.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(p.value)));"custom"!=q.value&&n.checked&&(b=new mxRectangle(0,0,b.height,b.width));
-d&&v||b.width==D.width&&b.height==D.height||(D=b,null!=c&&c(D))};mxEvent.addListener(b,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){n.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",F);mxEvent.addListener(f,"click",F);mxEvent.addListener(p,"blur",F);mxEvent.addListener(p,"click",F);mxEvent.addListener(n,"change",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(q,"change",function(a){v="custom"==q.value;F(a,!0)});F();
-return{set:function(a){e=a;k(null,null,!0)},get:function(){return D},widthInput:f,heightInput:p}};
+var PageSetupDialog=function(a){function b(){null==f||f==mxConstants.NONE?(d.style.backgroundColor="",d.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(d.style.backgroundColor=f,d.style.backgroundImage="")}function e(){null==r?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",r.src),n.style.fontSize="11px",n.innerHTML=r.src.substring(0,42)+"...")}var c=a.editor.graph,k,l,q=document.createElement("table");q.style.width=
+"100%";q.style.height="100%";var p=document.createElement("tbody");k=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");k.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",c.pageFormat);k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");
+mxUtils.write(l,mxResources.get("background")+":");k.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var d=document.createElement("button");d.style.width="18px";d.style.height="18px";d.style.marginRight="20px";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";var f=c.background;b();mxEvent.addListener(d,"click",function(d){a.pickColor(f||"none",function(a){f=a;b()});mxEvent.consume(d)});
+l.appendChild(d);mxUtils.write(l,mxResources.get("gridSize")+":");var g=document.createElement("input");g.setAttribute("type","number");g.setAttribute("min","0");g.style.width="40px";g.style.marginLeft="6px";g.value=c.getGridSize();l.appendChild(g);mxEvent.addListener(g,"change",function(){var a=parseInt(g.value);g.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
+":");k.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var r=c.backgroundImage;mxEvent.addListener(n,"click",function(d){a.showBackgroundImageDialog(function(a){r=a;e()});mxEvent.consume(d)});e();l.appendChild(n);k.appendChild(l);p.appendChild(k);k=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&l.appendChild(h);var m=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==g.value&&c.setGridSize(parseInt(g.value));var d=new ChangePageSetup(a,f,r,v.get());d.ignoreColor=c.background==f;d.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=r?r.src:null);c.pageFormat.width==d.previousFormat.width&&c.pageFormat.height==d.previousFormat.height&&
+d.ignoreColor&&d.ignoreImage||c.model.execute(d)});m.className="geBtn gePrimaryBtn";l.appendChild(m);a.editor.cancelFirst||l.appendChild(h);k.appendChild(l);p.appendChild(k);q.appendChild(p);this.container=q};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,d,c){if(c||g!=document.activeElement&&n!=document.activeElement){a=!1;for(d=0;d<h.length;d++)c=h[d],t?"custom"==c.key&&(p.value=c.key,t=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
+e.height==c.format.height?(p.value=c.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(p.value=c.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(v.style.display="",f.style.display="none"):(g.value=e.width/100,n.value=e.height/100,l.setAttribute("checked","checked"),
+p.value="custom",v.style.display="none",f.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var p=document.createElement("select");p.style.marginBottom="8px";p.style.width="202px";var v=document.createElement("div");v.style.marginLeft="4px";v.style.width="210px";
+v.style.height="24px";l.style.marginRight="6px";v.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));v.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";v.appendChild(q);var d=document.createElement("span");d.style.width="100px";mxUtils.write(d,mxResources.get("landscape"));v.appendChild(d);var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";var g=document.createElement("input");
+g.setAttribute("size","7");g.style.textAlign="right";f.appendChild(g);mxUtils.write(f," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.style.textAlign="right";f.appendChild(n);mxUtils.write(f," in");v.style.display="none";f.style.display="none";for(var r={},h=PageSetupDialog.getFormats(),m=0;m<h.length;m++){var u=h[m];r[u.key]=u;var w=document.createElement("option");w.setAttribute("value",u.key);mxUtils.write(w,u.title);p.appendChild(w)}var t=!1;k();a.appendChild(p);mxUtils.br(a);
+a.appendChild(v);a.appendChild(f);var x=e,F=function(a,d){var b=r[p.value];null!=b.format?(g.value=b.format.width/100,n.value=b.format.height/100,f.style.display="none",v.style.display=""):(v.style.display="none",f.style.display="");isNaN(parseFloat(g.value))&&(g.value=e.width/100);isNaN(parseFloat(n.value))&&(n.value=e.height/100);b=new mxRectangle(0,0,Math.floor(100*parseFloat(g.value)),Math.floor(100*parseFloat(n.value)));"custom"!=p.value&&q.checked&&(b=new mxRectangle(0,0,b.height,b.width));
+d&&t||b.width==x.width&&b.height==x.height||(x=b,null!=c&&c(x))};mxEvent.addListener(b,"click",function(a){l.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(d,"click",function(a){q.checked=!0;F(a);mxEvent.consume(a)});mxEvent.addListener(g,"blur",F);mxEvent.addListener(g,"click",F);mxEvent.addListener(n,"blur",F);mxEvent.addListener(n,"click",F);mxEvent.addListener(q,"change",F);mxEvent.addListener(l,"change",F);mxEvent.addListener(p,"change",function(a){t="custom"==p.value;F(a,!0)});F();
+return{set:function(a){e=a;k(null,null,!0)},get:function(){return x},widthInput:g,heightInput:n}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var d=a.container.firstChild;null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.nextSibling;null!=d&&(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),d.style.position="absolute",a.container.insertBefore(this.backgroundPageShape.node,d),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,d=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",b="none",f="";if(a.isGridEnabled()){f=10;mxClient.IS_SVG?(b=unescape(encodeURIComponent(this.createSvgGrid(d))),b=window.btoa?btoa(b):Base64.encode(b,!0),b="url(data:image/svg+xml;base64,"+b+")",f=a.gridSize*this.scale*this.gridSteps):
-b="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);f=-Math.round(f-mxUtils.mod(this.translate.x*this.scale-d,f))+"px "+-Math.round(f-mxUtils.mod(this.translate.y*this.scale-e,f))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=f,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
-c,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=c,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],f=1;f<this.gridSteps;f++){var e=f*c;b.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+
+null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(){var a=this.graph,c=null==a.background||a.background==mxConstants.NONE?a.defaultPageBackgroundColor:a.background,d=null!=c&&this.gridColor!=c.toLowerCase()?this.gridColor:"#ffffff",b="none",g="";if(a.isGridEnabled()){g=10;mxClient.IS_SVG?(b=unescape(encodeURIComponent(this.createSvgGrid(d))),b=window.btoa?btoa(b):Base64.encode(b,!0),b="url(data:image/svg+xml;base64,"+b+")",g=a.gridSize*this.scale*this.gridSteps):
+b="url("+this.gridImage+")";var e=d=0;null!=a.view.backgroundPageShape&&(e=this.getBackgroundPageBounds(),d=1+e.x,e=1+e.y);g=-Math.round(g-mxUtils.mod(this.translate.x*this.scale-d,g))+"px "+-Math.round(g-mxUtils.mod(this.translate.y*this.scale-e,g))+"px"}d=a.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);null!=a.view.backgroundPageShape?(a.view.backgroundPageShape.node.style.backgroundPosition=g,a.view.backgroundPageShape.node.style.backgroundImage=b,a.view.backgroundPageShape.node.style.backgroundColor=
+c,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=g,d.style.backgroundColor=c,d.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var d=this.gridSteps*c,b=[],g=1;g<this.gridSteps;g++){var e=g*c;b.push("M 0 "+e+" L "+d+" "+e+" M "+e+" 0 L "+e+" "+d)}return'<svg width="'+
d+'" height="'+d+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+d+'" height="'+d+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+d+" 0 L 0 0 0 "+d+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(c,b){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=
-this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps,g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+c,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+b,g))+"px";d.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,f=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();c=h.width;d=h.height;var w=
-new mxRectangle(b*f.x,b*f.y,e.width*r,e.height*r),u=(a=a&&Math.min(w.width,w.height)>this.minPageBreakDist)?Math.ceil(d/w.height)-1:0,m=a?Math.ceil(c/w.width)-1:0,v=h.x+c,k=h.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<m&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:m,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*w.height)),
-new mxPoint(Math.round(v),Math.round(h.y+(c+1)*w.height))]:[new mxPoint(Math.round(h.x+(c+1)*w.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*w.width),Math.round(k))];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,d){for(var g=0;g<c.length;g++)if(this.graph.getModel().isVertex(c[g])){var f=this.graph.getCellGeometry(c[g]);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,d){return this.isConnecting()?
-!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,f=this.graph.pageScale,e=b.width*f,b=b.height*f,f=Math.floor(Math.min(0,c)/e),r=Math.floor(Math.min(0,
-d)/b);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-f)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-r)*b)};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,d,b,f,e){var g=k.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),f=c.getParent(b);
-if(null==d||d!=b&&d!=f)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(f)&&c.isVertex(f)&&!this.graph.isContainer(f);)b=f,f=this.graph.getModel().getParent(b);return b};var n=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=n.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),f=b.getParent(a);null!=f;){if(this.graph.isCellSelected(f)&&b.isVertex(f)){d=!0;break}f=b.getParent(f)}return d};mxGraphHandler.prototype.selectDelayed=
+this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+c,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+b,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,c,d){var b=this.view.scale,g=this.view.translate,e=this.pageFormat,r=b*this.pageScale,h=this.view.getBackgroundPageBounds();c=h.width;d=h.height;var m=
+new mxRectangle(b*g.x,b*g.y,e.width*r,e.height*r),u=(a=a&&Math.min(m.width,m.height)>this.minPageBreakDist)?Math.ceil(d/m.height)-1:0,w=a?Math.ceil(c/m.width)-1:0,t=h.x+c,x=h.y+d;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?u:w,c=0;c<=d;c++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*m.height)),
+new mxPoint(Math.round(t),Math.round(h.y+(c+1)*m.height))]:[new mxPoint(Math.round(h.x+(c+1)*m.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*m.width),Math.round(x))];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,d){for(var f=0;f<c.length;f++)if(this.graph.getModel().isVertex(c[f])){var g=this.graph.getCellGeometry(c[f]);if(null!=g&&g.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,d){return this.isConnecting()?
+!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,d=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,g=this.graph.pageScale,e=b.width*g,b=b.height*g,g=Math.floor(Math.min(0,c)/e),r=Math.floor(Math.min(0,
+d)/b);return new mxRectangle(this.scale*(this.translate.x+g*e),this.scale*(this.translate.y+r*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-g)*e,this.scale*(Math.ceil(Math.max(1,d+a.height/this.scale)/b)-r)*b)};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,d,b,g,e){var f=k.apply(this,arguments);null==e||e||mxEvent.addListener(f,"mousedown",function(a){mxEvent.consume(a)});return f};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),d=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),g=c.getParent(b);
+if(null==d||d!=b&&d!=g)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(g)&&c.isVertex(g)&&!this.graph.isContainer(g);)b=g,g=this.graph.getModel().getParent(b);return b};var q=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var d=q.apply(this,arguments);if(!d)for(var b=this.graph.getModel(),g=b.getParent(a);null!=g;){if(this.graph.isCellSelected(g)&&b.isVertex(g)){d=!0;break}g=b.getParent(g)}return d};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();null==c&&(c=this.cell);var d=this.graph.view.getState(c);if(null==d||!a.isSource(d.control))for(var d=this.graph.getModel(),b=d.getParent(c);!this.graph.isCellSelected(b)&&d.isVertex(b);)c=b,b=d.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),d=c.getParent(a);c.isVertex(d)&&!this.graph.isContainer(d);)this.graph.isCellSelected(d)&&
(a=d),d=c.getParent(d);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;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();this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||c.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=
k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=k));!this.editor.chromeless||this.editor.editable?(b=function(a){var 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 l=!1,n=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||n.apply(this,arguments)};this.keydownHandler=
-mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var q=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
-function(a){return q.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var t=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return t.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 d=!1,g=null,f=null,p=null,r=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 h=0;h<p.length;h++)this.toolbar.container.appendChild(p[h]);this.toolbar.fontMenu=g;this.toolbar.sizeMenu=
-f}d=c.cellEditor.isContentEditing();g=a;f=e;p=b}}),h=this,w=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){w.apply(this,arguments);r();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!=h.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
+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 l=!1,q=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,d){return l||q.apply(this,arguments)};this.keydownHandler=
+mxUtils.bind(this,function(a){32==a.which?(l=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";l=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var p=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=
+function(a){return p.apply(this,arguments)||l||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var v=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return v.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 d=!1,f=null,g=null,n=null,r=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==n)this.toolbar.createTextToolbar();else{for(var h=0;h<n.length;h++)this.toolbar.container.appendChild(n[h]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=
+g}d=c.cellEditor.isContentEditing();f=a;g=e;n=b}}),h=this,m=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){m.apply(this,arguments);r();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!=h.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=
b.substring(0,b.length-1));h.toolbar.setFontName(b);h.toolbar.setFontSize(parseInt(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 u=c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){u.apply(this,arguments);r()};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";
-if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(B){}var m=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();m.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 v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),D="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],g=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),g.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],h=0;h<e.length;h++){var m=e[h],
-p=m.indexOf("=");0<=p&&(f=m.substring(0,p),m=m.substring(p+1),null!=a[f]&&"none"==m&&(b.push(m),g.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=
-["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),H=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<H.length;a++)for(b=0;b<H[a].length;b++)v.push(H[a][b]);for(a=0;a<D.length;a++)0>mxUtils.indexOf(v,D[a])&&v.push(D[a]);var y=function(a,d){var b=c.getModel();
-b.beginUpdate();try{if(d)for(var f=b.isEdge(m),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var h=g[f[e]];null!=h&&c.setCellStyles(f[e],h,a)}else for(h=0;h<a.length;h++){for(var m=a[h],p=b.getStyle(m),r=null!=p?p.split(";"):[],O=v.slice(),e=0;e<r.length;e++){var u=r[e],w=u.indexOf("=");if(0<=w){var k=u.substring(0,w),G=mxUtils.indexOf(O,k);0<=G&&O.splice(G,1);for(var q=0;q<H.length;q++){var l=H[q];if(0<=mxUtils.indexOf(l,k))for(var n=0;n<
-l.length;n++){var F=mxUtils.indexOf(O,l[n]);0<=F&&O.splice(F,1)}}}}for(var g=(f=b.isEdge(m))?c.currentEdgeStyle:c.currentVertexStyle,t=b.getStyle(m),e=0;e<O.length;e++){var k=O[e],B=g[k];null==B||"shape"==k&&!f||f&&!(0>mxUtils.indexOf(D,k))||(t=mxUtils.setStyle(t,k,B))}b.setStyle(m,t)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){y(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){y(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,
-function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));y(b)});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"),h=d.getProperty("values"),e=0;e<b.length;e++){var m=0<=mxUtils.indexOf(F,b[e]);if("strokeColor"!=b[e]||null!=h[e]&&"none"!=
-h[e])if(0<=mxUtils.indexOf(D,b[e]))g||0<=mxUtils.indexOf(G,b[e])?null==h[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=h[e]:f&&0<=mxUtils.indexOf(v,b[e])&&(null==h[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=h[e]);else if(0<=mxUtils.indexOf(v,b[e])){if(f||m)null==h[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=h[e];if(g||m||0<=mxUtils.indexOf(G,b[e]))null==h[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=h[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||
+if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(y){}var w=c.fireMouseEvent;c.fireMouseEvent=function(a,d,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.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 t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var d=c.view.getState(a);if(null!=d){a=a.clone();a.style="";a=c.getCellStyle(a);var b=[],g=[],f;for(f in d.style)a[f]!=d.style[f]&&(b.push(d.style[f]),g.push(f));f=c.getModel().getStyle(d.cell);for(var e=null!=f?f.split(";"):[],n=0;n<e.length;n++){var h=e[n],
+m=h.indexOf("=");0<=m&&(f=h.substring(0,m),h=h.substring(m+1),null!=a[f]&&"none"==h&&(b.push(h),g.push(f)))}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",b,"cells",[d.cell]))}};this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=
+["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),G=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<G.length;a++)for(b=0;b<G[a].length;b++)t.push(G[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(t,x[a])&&t.push(x[a]);var B=function(a,d){var b=c.getModel();
+b.beginUpdate();try{if(d)for(var f=b.isEdge(h),g=f?c.currentEdgeStyle:c.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;e<f.length;e++){var n=g[f[e]];null!=n&&c.setCellStyles(f[e],n,a)}else for(n=0;n<a.length;n++){for(var h=a[n],m=b.getStyle(h),u=null!=m?m.split(";"):[],r=t.slice(),e=0;e<u.length;e++){var w=u[e],k=w.indexOf("=");if(0<=k){var D=w.substring(0,k),p=mxUtils.indexOf(r,D);0<=p&&r.splice(p,1);for(var F=0;F<G.length;F++){var l=G[F];if(0<=mxUtils.indexOf(l,D))for(var q=0;q<
+l.length;q++){var y=mxUtils.indexOf(r,l[q]);0<=y&&r.splice(y,1)}}}}for(var g=(f=b.isEdge(h))?c.currentEdgeStyle:c.currentVertexStyle,v=b.getStyle(h),e=0;e<r.length;e++){var D=r[e],B=g[D];null==B||"shape"==D&&!f||f&&!(0>mxUtils.indexOf(x,D))||(v=mxUtils.setStyle(v,D,B))}b.setStyle(h,v)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){B(d.getProperty("cells"))});c.addListener("textInserted",function(a,d){B(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,
+function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));B(b)});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"),n=d.getProperty("values"),e=0;e<b.length;e++){var h=0<=mxUtils.indexOf(F,b[e]);if("strokeColor"!=b[e]||null!=n[e]&&"none"!=
+n[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(D,b[e])?null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null==n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||h)null==n[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=n[e];if(g||h||0<=mxUtils.indexOf(D,b[e]))null==n[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=n[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=
@@ -2081,25 +2081,25 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=
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()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var c=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
!1,null):e=c.apply(this,arguments);a.updatePasteActionStates();return e};var k=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){k.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
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){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),h=a.view.translate,m=a.view.scale,p=mxRectangle.fromRectangle(g);
-p.x=p.x/m-h.x;p.y=p.y/m-h.y;p.width/=m;p.height/=m;var h=a.container.scrollTop,r=a.container.scrollLeft,u=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)u+=3;var v=a.container.offsetWidth-u,u=a.container.offsetHeight-u;d=d?Math.max(.3,Math.min(b||1,v/p.width)):m;b=(v-d*p.width)/2/d;var w=0==this.lightboxVerticalDivider?0:(u-d*p.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),w=Math.max(w,0));if(e||g.width<v||g.height<u)a.view.scaleAndTranslate(d,
-Math.floor(b-p.x),Math.floor(w-p.y)),a.container.scrollTop=h*d/m,a.container.scrollLeft=r*d/m;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/m),Math.floor(g.y+f/m))}});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",
+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){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),n=a.view.translate,h=a.view.scale,m=mxRectangle.fromRectangle(g);
+m.x=m.x/h-n.x;m.y=m.y/h-n.y;m.width/=h;m.height/=h;var n=a.container.scrollTop,u=a.container.scrollLeft,r=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)r+=3;var t=a.container.offsetWidth-r,r=a.container.offsetHeight-r;d=d?Math.max(.3,Math.min(b||1,t/m.width)):h;b=(t-d*m.width)/2/d;var w=0==this.lightboxVerticalDivider?0:(r-d*m.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),w=Math.max(w,0));if(e||g.width<t||g.height<r)a.view.scaleAndTranslate(d,
+Math.floor(b-m.x),Math.floor(w-m.y)),a.container.scrollTop=n*d/h,a.container.scrollLeft=u*d/h;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/h),Math.floor(g.y+f/h))}});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){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace=
"nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var k=mxUtils.bind(this,function(){var d=mxUtils.getCurrentStyle(a.container);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",k);k();var l=0,k=mxUtils.bind(this,function(a,d,b){l++;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}),n=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),q=document.createElement("div");q.style.display="inline-block";q.style.verticalAlign="top";q.style.fontFamily="Helvetica,Arial";q.style.marginTop="8px";q.style.color="#ffffff";this.chromelessToolbar.appendChild(q);var t=k(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&&(q.innerHTML="",mxUtils.write(q,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";t.style.paddingLeft="4px";t.style.paddingRight="0px";var g=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(t.style.display="",n.style.display="",q.style.display="inline-block"):(t.style.display="none",n.style.display=
-"none",q.style.display="none");d()});this.editor.addListener("resetGraphView",g);this.editor.addListener("pageSelected",d);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(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 f=null,p=null,r=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);f=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=
-null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=f&&(window.clearTimeout(f),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 w=k(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=w.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(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){w.style.display=1<u.getChildCount(u.root)?
+return c}),q=k(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.fontFamily="Helvetica,Arial";p.style.marginTop="8px";p.style.color="#ffffff";this.chromelessToolbar.appendChild(p);var v=k(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&&(p.innerHTML="",mxUtils.write(p,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});q.style.paddingLeft="0px";q.style.paddingRight="4px";v.style.paddingLeft="4px";v.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(v.style.display="",q.style.display="",p.style.display="inline-block"):(v.style.display="none",q.style.display=
+"none",p.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);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(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,n=null,r=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n=
+null}),600)}),a||200)}),h=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var m=k(mxUtils.bind(this,function(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=m.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),u=a.getModel();u.addListener(mxEvent.CHANGE,function(){m.style.display=1<u.getChildCount(u.root)?
"":"none"})}this.addChromelessToolbarItems(k);null!=this.editor.editButtonLink&&k(mxUtils.bind(this,function(d){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||k(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||h(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
-mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var m=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)<m&&Math.abs(this.scrollTop-a.container.scrollTop)<m&&Math.abs(this.startX-b.getGraphX())<m&&Math.abs(this.startY-b.getGraphY())<m&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=
-a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}v.apply(this,arguments)};var D=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?D.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),
+mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():h(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||h(30)}));var w=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)<w&&Math.abs(this.scrollTop-a.container.scrollTop)<w&&Math.abs(this.startX-b.getGraphX())<w&&Math.abs(this.startY-b.getGraphY())<w&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?r():h(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var t=
+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}t.apply(this,arguments)};var x=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?x.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)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var F=null;a.lazyZoom=function(d){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);d?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=
(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var d=mxUtils.getOffset(a.container),c=0,f=0;null!=F&&(c=a.container.offsetWidth/2-F.x+d.x,f=a.container.offsetHeight/2-F.y+d.y);d=this.view.scale;
this.zoom(this.cumulativeZoomFactor);this.view.scale!=d&&(null!=b&&e.chromelessResize(!1,null,c*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==c&&0==f||(a.container.scrollLeft-=c*(this.cumulativeZoomFactor-1),a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b){if((null==this.dialogs||0==this.dialogs.length)&&a.isZoomWheelEvent(d))for(var c=
@@ -2128,18 +2128,18 @@ EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this
EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),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 l=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(a,b){l.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 l=0;l<k.length;l++){var n=k[l];a.getModel().isEdge(n)&&(c=!0);a.getModel().isVertex(n)&&(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 dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,c=!1,k=a.getSelectionCells();if(null!=k)for(var l=0;l<k.length;l++){var q=k[l];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 dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
0;l<k.length;l++)this.actions.get(k[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("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.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 l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&!mxClient.IS_QUIRKS&&(n+=1);var q=0;if(null!=this.sidebarFooterContainer){var t=
-this.footerHeight+k,q=Math.max(0,Math.min(c-n-t,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=t+"px"}t=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=t+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=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 p=0;if(null!=this.sidebarFooterContainer){var v=
+this.footerHeight+k,p=Math.max(0,Math.min(c-q-v,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=p+"px";this.sidebarFooterContainer.style.bottom=v+"px"}v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=q+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=q+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
-b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-t)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=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",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=t+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+k+"px",this.formatContainer.style.bottom=
+b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-p+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-v)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,p=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",p-=this.tabContainer.clientHeight),this.diagramContainer.style.height=p+"px",this.hsplit.style.height=p+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=v+"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+p+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=
@@ -2149,8 +2149,8 @@ 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,c){function k(a){if(null!=n){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,q+(b?f.x-n.x:n.y-f.y)-e));mxEvent.consume(a);q!=g()&&(t=!0,d=null)}}function l(a){k(a);n=q=null}var n=null,q=null,t=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=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){n=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=g();t=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!t){var b=null!=d?d-e:0;d=g();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,n){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,n);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=q){var g=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,p+(b?g.x-q.x:q.y-g.y)-e));mxEvent.consume(a);p!=f()&&(v=!0,d=null)}}function l(a){k(a);q=p=null}var q=null,p=null,v=!0,d=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var f=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));p=f();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!v){var b=null!=d?d-e:0;d=f();c(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,k,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,l)})};EditorUi.prototype.showDialog=function(a,b,e,c,k,l,q){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,l,q);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),mxUtils.clearSelection(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(k.container,230,430,!0,!1);k.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})};
@@ -2160,17 +2160,17 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
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&&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(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var n=new Image;n.onload=function(){e(l,n.width,n.height)};n.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};n.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.showImageDialog=function(a,b,e,c){c=this.editor.graph.cellEditor;var k=c.saveSelection(),l=mxUtils.prompt(a,b);c.restoreSelection(k);if(null!=l&&0<l.length){var q=new Image;q.onload=function(){e(l,q.width,q.height)};q.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};q.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.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.createKeyHandler=function(a){function b(a,d,b){n.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 f=
-c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-n.length){c.getModel().beginUpdate();try{for(var a=0;a<n.length;a++)n[a]();n=[]}finally{c.getModel().endUpdate()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var n=[],q=null,t={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,g={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),
-76:this.actions.get("editLink"),80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var f=g[a.keyCode];if(null!=f)return f.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=t[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
-c.connectVertex(c.getSelectionCell(),t[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 d.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 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.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,
+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 f=
+c.getSelectionCell(),g=c.model.getParent(f),e=null,1==c.getSelectionCount()&&c.model.isVertex(f)&&null!=c.layoutManager&&!c.isCellLocked(f)&&(e=c.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?c.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||c.model.add(g,f,Math.min(c.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(c.getMovableCells(c.getSelectionCells()),f,g))});null!=p&&window.clearTimeout(p);p=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()}c.scrollCellToVisible(c.getSelectionCell())}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),l=k.isEventIgnored;k.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&l.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var q=[],p=null,v={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},d=k.getFunction,f={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),
+76:this.actions.get("editLink"),80:this.actions.get("connectionPoints"),84:this.actions.get("editTooltip")};mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var g=f[a.keyCode];if(null!=g)return g.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=v[a.keyCode]&&!c.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=
+c.connectVertex(c.getSelectionCell(),v[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 d.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 g=k.escape;k.escape=function(a){g.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(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);k.bindAction(112,!1,"about");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(){c.isEnabled()&&c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,
"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),k.bindAction(82,!0,"clearDefaultStyle",!0),k.bindAction(83,!0,"save"),k.bindAction(83,!0,"saveAs",!0),k.bindAction(65,!0,"selectAll"),k.bindAction(65,!0,"selectNone",!0),k.bindAction(73,!0,"selectVertices",!0),k.bindAction(69,!0,"selectEdges",!0),k.bindAction(69,!0,
"editStyle"),k.bindAction(66,!0,"bold"),k.bindAction(66,!0,"toBack",!0),k.bindAction(70,!0,"toFront",!0),k.bindAction(68,!0,"duplicate"),k.bindAction(68,!0,"setAsDefaultStyle",!0),k.bindAction(90,!0,"undo"),k.bindAction(89,!0,"autosize",!0),k.bindAction(88,!0,"cut"),k.bindAction(67,!0,"copy"),k.bindAction(86,!0,"paste"),k.bindAction(71,!0,"group"),k.bindAction(77,!0,"editData"),k.bindAction(71,!0,"grid",!0),k.bindAction(73,!0,"italic"),k.bindAction(76,!0,"lockUnlock"),k.bindAction(76,!0,"layers",
@@ -2181,32 +2181,32 @@ EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),
(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
Graph=function(a,b,e,c,k){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var d=this.view.getState(a);a=null!=d?d.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,n=null,q=null,t=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)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),q=f,n=c,null!=
-f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?t=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(t=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!=l&&null!=q&&null!=n){if(c=q,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(n),h=this.view.getEdgeStyle(c);f=h==mxEdgeStyle.EntityRelation;d||t!=mxEvent.LABEL_HANDLE||(e=t);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
-null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=t,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
-e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),t=l=n=q=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,q=null,p=null,v=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)&&(l=new mxPoint(c.getGraphX(),c.getGraphY()),d=this.isCellSelected(f.cell),p=f,q=c,null!=
+f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?v=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(v=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!=l&&null!=p&&null!=q){if(c=p,Math.abs(l.x-b.getGraphX())>f||Math.abs(l.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var g=this.selectionCellsHandler.getHandler(c.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(q),h=this.view.getEdgeStyle(c);f=h==mxEdgeStyle.EntityRelation;d||v!=mxEvent.LABEL_HANDLE||(e=v);if(f&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!f||
+null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=c.visibleSourceState||e==g.bends.length-1||null!=c.visibleTargetState)f||e==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==h&&null==e||h==mxEdgeStyle.OrthConnector)&&(e=v,null==e&&(e=new mxRectangle(l.x,l.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,f[0].x,f[0].y)?e=0:mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y)?
+e=g.bends.length-1:null!=h&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?e=2:(e=mxUtils.findNearestSegment(c,l.x,l.y),e=null==h?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),v=l=q=p=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){g=null;f=c.absolutePoints;if(null!=f)if(e=new mxRectangle(b.getGraphX(),
b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,f[0].x,f[0].y)||mxUtils.contains(e,f[f.length-1].x,f[f.length-1].y))g="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)h=this.view.getEdgeStyle(c),g="crosshair",h!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&(h=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),
-h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){t=l=n=q=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 g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,f=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),m=0;m<h.width;m++)d.push(new mxRectangle(((h.x+m)*f+c.x)*e,(h.y*b+c.y)*e,f*e,b*e));for(m=0;m<h.height;m++)d.push(new mxRectangle((h.x*f+c.x)*e,((h.y+m)*b+c.y)*e,f*e,b*e));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+h<f.length-1&&0<=h&&(g=0==Math.round(f[h].x-f[h+1].x)?"col-resize":"row-resize"));null!=g&&c.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){v=l=q=p=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,g=b.width*c,b=b.height*c,c=this.graph.view.translate,e=this.graph.view.scale,h=this.graph.getPageLayout(),n=0;n<h.width;n++)d.push(new mxRectangle(((h.x+n)*g+c.x)*e,(h.y*b+c.y)*e,g*e,b*e));for(n=0;n<h.height;n++)d.push(new mxRectangle((h.x*g+c.x)*e,((h.y+n)*b+c.y)*e,g*e,b*e));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)};this.graphHandler.getCells=function(a){for(var d=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),f=null!=f?f.style:this.graph.getCellStyle(d[c]);
-"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this);
-this.getRubberband=function(){return f};var p=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),r=0):r=(new Date).getTime()-p};var w=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&w.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var m=f.isForceRubberbandEvent;f.isForceRubberbandEvent=function(a){return m.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var D=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 D.apply(this,
+"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);
+this.getRubberband=function(){return g};var n=(new Date).getTime(),r=0,h=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;h.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),r=0):r=(new Date).getTime()-n};var m=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&m.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var t=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(t=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=t)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var x=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 x.apply(this,
arguments);d=d?a.sourceState.cell:a.getCell();if(null!=d){var b=this.getLinkForCell(d);null!=b&&(this.isPageLink(b)?this.pageLinkClicked(d,b):this.openLink(b))}};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 F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||
-this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.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,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),h=a+b,m=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var p=e.getChildCount(f),O=0;O<p;O++){var r=e.getChildAt(f,O),
-u=this.view.getState(r);if(null!=u&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(u.style,"locked","0")){var v=mxUtils.getValue(u.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(u=mxUtils.getBoundingBox(u,v));(e.isEdge(r)||e.isVertex(r))&&u.x>=a&&u.y+u.height<=m&&u.y>=d&&u.x+u.width<=h&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var G=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:G.apply(this,
-arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var H=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();H=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,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)),f.start(b.x,b.y)):null!=H?this.addSelectionCells(H):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);H=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 y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
+this.isCellLocked(a)){if(null!=this.getLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.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,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),h=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var m=e.getChildCount(f),u=0;u<m;u++){var r=e.getChildAt(f,u),
+t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var w=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=w&&(t=mxUtils.getBoundingBox(t,w));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=n&&t.y>=d&&t.x+t.width<=h&&g.push(r);this.getAllCells(a,d,b,c,r,g)}}}return g};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:D.apply(this,
+arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var G=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();G=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,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)),g.start(b.x,b.y)):null!=G?this.addSelectionCells(G):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);G=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 B=this.updateMouseEvent;this.updateMouseEvent=function(a){a=B.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=
null);return a}}};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,e){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};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.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);
Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,n=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),t=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,n,q,t);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,l=null,q=mxUtils.bind(this,function(a){k=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),p=mxUtils.bind(this,function(a){k=k&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),v=mxUtils.bind(this,function(d){if(k)for(var b=mxEvent.getSource(d);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,d);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,q,p,v);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isLightboxView=function(){return this.lightbox};
Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(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){var e=window;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 c=a.split("#")[1];window.location.hash=="#"+c&&(window.location.hash="");window.location.hash=c}else e=window.open(a,b);return e};Graph.prototype.isPageLink=function(a){return!1};
Graph.prototype.pageLinkClicked=function(a,b){this.fireEvent(new mxEventObject("pageLinkClicked","cell",a,"href",b))};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)};
@@ -2222,29 +2222,29 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,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 c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,n=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 q=e?"getUTC":"get",t=a[q+"Date"](),d=a[q+"Day"](),g=a[q+"Month"](),f=a[q+"FullYear"](),p=a[q+"Hours"](),r=a[q+"Minutes"](),h=a[q+"Seconds"](),q=a[q+"Milliseconds"](),w=e?0:a.getTimezoneOffset(),u={d:t,dd:n(t),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:g+1,mm:n(g+1),mmm:c.i18n.monthNames[g],mmmm:c.i18n.monthNames[g+
-12],yy:String(f).slice(2),yyyy:f,h:p%12||12,hh:n(p%12||12),H:p,HH:n(p),M:r,MM:n(r),s:h,ss:n(h),l:n(q,3),L:n(99<q?Math.round(q/10):q),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<w?"-":"+")+n(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][3<t%10?0:(10!=t%100-t%10)*t%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[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,l=/[^-+\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 p=e?"getUTC":"get",v=a[p+"Date"](),d=a[p+"Day"](),f=a[p+"Month"](),g=a[p+"FullYear"](),n=a[p+"Hours"](),r=a[p+"Minutes"](),h=a[p+"Seconds"](),p=a[p+"Milliseconds"](),m=e?0:a.getTimezoneOffset(),u={d:v,dd:q(v),ddd:c.i18n.dayNames[d],dddd:c.i18n.dayNames[d+7],m:f+1,mm:q(f+1),mmm:c.i18n.monthNames[f],mmmm:c.i18n.monthNames[f+
+12],yy:String(g).slice(2),yyyy:g,h:n%12||12,hh:q(n%12||12),H:n,HH:q(n),M:r,MM:q(r),s:h,ss:q(h),l:q(p,3),L:q(99<p?Math.round(p/10):p),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(l,""),o:(0<m?"-":"+")+q(100*Math.floor(Math.abs(m)/60)+Math.abs(m)%60,4),S:["th","st","nd","rd"][3<v%10?0:(10!=v%100-v%10)*v%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[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),c=0;c<e;c++)(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 q=c.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(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 l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var n=k.substring(1,k.length-1);if(0>n.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(n)?null!=q.getAttribute(n)?q.getAttribute(n):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(c,
+!0);e.appendChild(k);var p=c.value||mxResources.get("background")||"Background";e.setAttribute("title",p);mxUtils.write(e,p);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 l=null;if(match.index>c&&"%"==b.charAt(match.index-1))l=k.substring(1);else{var q=k.substring(1,k.length-1);if(0>q.indexOf("{"))for(var p=a;null==l&&null!=p;)null!=p.value&&"object"==typeof p.value&&(l=p.hasAttribute(q)?null!=p.getAttribute(q)?p.getAttribute(q):"":null),p=this.model.getParent(p);null==l&&(l=this.getGlobalVariable(q))}e.push(b.substring(c,
match.index)+(null!=l?l:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!1;var n=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?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,t=this.view.translate,d=t.x*q,t=t.y*q;this.model.isVertex(e.cell)&&(d=e.x,t=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+n.x*q,t+n.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
-null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&k){for(var d=a,g=this.getCellGeometry(a);null!=
-g&&g.relative;)d=this.getModel().getParent(d),g=this.getCellGeometry(d);var f=this.view.getState(d),p=null!=f?f.style:this.getCellStyle(d);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(d);this.model.isVertex(r)&&(d=r)}q=this.duplicateCells([d],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=n.x-g.width/2,g.y=n.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=g&&g.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var w=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(w=c.parent.getIndex(c),this.model.add(c.parent,h,w))}null==l&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(w=a.parent.getIndex(a),this.model.add(a.parent,
-q,w));null!=h&&e.push(h);null==l&&null!=q&&e.push(q);null==q&&null!=h&&h.geometry.setTerminalPoint(n,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.connectVertex=function(a,b,e,c,k,l){l=l?l:!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 p=this.view.scale,v=this.view.translate,d=v.x*p,v=v.y*p;this.model.isVertex(e.cell)&&(d=e.x,v=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(q.x+=a.parent.geometry.x,q.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(d+q.x*p,v+q.y*p);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),p=this.view.getState(l),null!=e&&null!=p&&mxUtils.intersects(e,p)&&(l=
+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==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{p=l;if(null==p&&k){for(var d=a,f=this.getCellGeometry(a);null!=
+f&&f.relative;)d=this.getModel().getParent(d),f=this.getCellGeometry(d);var g=this.view.getState(d),n=null!=g?g.style:this.getCellStyle(d);if(mxUtils.getValue(n,"part",!1)){var r=this.model.getParent(d);this.model.isVertex(r)&&(d=r)}p=this.duplicateCells([d],!1)[0];f=this.getCellGeometry(p);null!=f&&(f.x=q.x-f.width/2,f.y=q.y-f.height/2)}f=null;null!=this.layoutManager&&(f=this.layoutManager.getLayout(this.model.getParent(a)));var h=mxEvent.isControlDown(c)&&k||null==l&&null!=f&&f.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,p,this.createCurrentEdgeStyle());if(null!=h&&this.connectionHandler.insertBeforeSource){var m=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=h.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==h.parent&&(m=c.parent.getIndex(c),this.model.add(c.parent,h,m))}null==l&&null!=p&&null!=f&&null!=a.parent&&f.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(m=a.parent.getIndex(a),this.model.add(a.parent,
+p,m));null!=h&&e.push(h);null==l&&null!=p&&e.push(p);null==p&&null!=h&&h.geometry.setTerminalPoint(q,!1);null!=h&&this.fireEvent(new mxEventObject("cellsInserted","cells",[h]))}finally{this.model.endUpdate()}return e};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,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){if(null!=a.value&&"object"==typeof a.value){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 a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var 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){return mxEvent.isShiftDown(a)};
-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 l=0;l<e.length;l++){var n=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=n&&null!=q){var t=Math.round(q.width-n.width/this.view.scale),d=Math.round(q.height-n.height/this.view.scale);if(0!=d||0!=t){var g=this.model.getParent(e[l]),f=this.layoutManager.getLayout(g);
-null==f?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(n,g,t,d):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(g,f,t,d)}}}}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 l=this.view.getState(k[b]),n=this.getCellGeometry(k[b]);null!=l&&null!=n&&(n=n.clone(),n.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(k[b],n))}}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 l=this.getCellGeometry(a),n=this.view.getState(a);null!=n&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,n.width/this.view.scale-l.width):l.height+=c+Math.min(0,n.height/this.view.scale-l.height),this.model.setGeometry(a,
+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 l=0;l<e.length;l++){var q=this.view.getState(e[l]),p=this.getCellGeometry(e[l]);if(null!=q&&null!=p){var v=Math.round(p.width-q.width/this.view.scale),d=Math.round(p.height-q.height/this.view.scale);if(0!=d||0!=v){var f=this.model.getParent(e[l]),g=this.layoutManager.getLayout(f);
+null==g?null!=k&&this.isMoveCellsEvent(k)&&this.moveSiblings(q,f,v,d):null!=k&&mxEvent.isAltDown(k)||g.constructor!=mxStackLayout||g.resizeLast||this.resizeParentStacks(f,g,v,d)}}}}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 l=this.view.getState(k[b]),q=this.getCellGeometry(k[b]);null!=l&&null!=q&&(q=q.clone(),q.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(l.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 l=this.getCellGeometry(a),q=this.view.getState(a);null!=q&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,q.width/this.view.scale-l.width):l.height+=c+Math.min(0,q.height/this.view.scale-l.height),this.model.setGeometry(a,
l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
@@ -2287,23 +2287,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activa
this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,d){var c=this.getState(a);null!=c&&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&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,d){return e.apply(this,arguments)||null!=a.routedPoints&&null!=d.routedPoints&&!mxUtils.equalPoints(d.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 d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&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},r=.5*this.scale,b=!1,c=[],h=0;h<d.length-1;h++){for(var w=d[h+1],u=d[h],m=[],v=d[h+2];h<
-d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,v.x,v.y,w.x,w.y)<1*this.scale*this.scale;)w=v,h++,v=d[h+2];for(var b=e(0,u.x,u.y)||b,k=0;k<this.validEdges.length;k++){var q=this.validEdges[k],l=q.absolutePoints;if(null!=l&&mxUtils.intersects(a,q)&&"1"!=q.style.noJump)for(q=0;q<l.length-1;q++){for(var n=l[q+1],t=l[q],v=l[q+2];q<l.length-2&&mxUtils.ptSegDistSq(t.x,t.y,v.x,v.y,n.x,n.y)<1*this.scale*this.scale;)n=v,q++,v=l[q+2];v=mxUtils.intersection(u.x,u.y,w.x,w.y,t.x,t.y,n.x,n.y);if(null!=v&&(Math.abs(v.x-
-t.x)>r||Math.abs(v.y-t.y)>r)&&(Math.abs(v.x-n.x)>r||Math.abs(v.y-n.y)>r)){n=v.x-u.x;t=v.y-u.y;v={distSq:n*n+t*t,x:v.x,y:v.y};for(n=0;n<m.length;n++)if(m[n].distSq>v.distSq){m.splice(n,0,v);v=null;break}null==v||0!=m.length&&m[m.length-1].x===v.x&&m[m.length-1].y===v.y||m.push(v)}}}for(q=0;q<m.length;q++)b=e(1,m[q].x,m[q].y)||b}v=d[d.length-1];b=e(0,v.x,v.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
-null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var 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,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,w=!0,u=null,m=null;h=[];var v=null;a.begin();for(var q=0;q<this.state.routedPoints.length;q++){var l=
-this.state.routedPoints[q],n=new mxPoint(l.x/this.scale,l.y/this.scale);0==q?n=d[0]:q==this.state.routedPoints.length-1&&(n=d[d.length-1]);var t=!1;if(null!=u&&1==l.type){var y=this.state.routedPoints[q+1],l=y.x/this.scale-n.x,y=y.y/this.scale-n.y,l=l*l+y*y;null==v&&(v=new mxPoint(n.x-u.x,n.y-u.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*e/m,v.y=v.y*e/m);l>e*e&&0<m&&(l=u.x-n.x,y=u.y-n.y,l=l*l+y*y,l>e*e&&(t=new mxPoint(n.x-v.x,n.y-v.y),l=new mxPoint(n.x+v.x,n.y+v.y),h.push(t),this.addPoints(a,h,b,c,!1,
-null,w),h=0>Math.round(v.x)||0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,w=!1,"sharp"==g?(a.lineTo(t.x-v.y*h,t.y+v.x*h),a.lineTo(l.x-v.y*h,l.y+v.x*h),a.lineTo(l.x,l.y)):"arc"==g?(h*=1.3,a.curveTo(t.x-v.y*h,t.y+v.x*h,l.x-v.y*h,l.y+v.x*h,l.x,l.y)):(a.moveTo(l.x,l.y),w=!0),h=[l],t=!0))}else v=null;t||(h.push(n),u=n)}this.addPoints(a,h,b,c,!1,null,w);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
-a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),e=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),w=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=g)var u=Math.cos(-g),m=Math.sin(-g),f=mxUtils.getRotatedPoint(f,u,m,w);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);f=this.getPerimeterPoint(d,f,0==g&&e,u);0!=g&&(u=Math.cos(g),m=Math.sin(g),f=mxUtils.getRotatedPoint(f,u,m,w));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var p=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||p<c)b=g,c=p}}null!=b&&(e=b)}return e};var n=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=n.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
-return new mxShape(new mxStencil(c.documentElement))}catch(p){null!=window.console&&console.log("Error in shape: "+p)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var d=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,c=null;if(null!=d&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(d,b,f){var g=new mxPoint(b,f);g.type=d;c.push(g);g=null!=a.routedPoints?a.routedPoints[c.length-1]:null;return null==g||g.type!=d||g.x!=b||g.y!=f},r=.5*this.scale,b=!1,c=[],h=0;h<d.length-1;h++){for(var m=d[h+1],u=d[h],w=[],t=d[h+2];h<
+d.length-2&&mxUtils.ptSegDistSq(u.x,u.y,t.x,t.y,m.x,m.y)<1*this.scale*this.scale;)m=t,h++,t=d[h+2];for(var b=e(0,u.x,u.y)||b,x=0;x<this.validEdges.length;x++){var k=this.validEdges[x],p=k.absolutePoints;if(null!=p&&mxUtils.intersects(a,k)&&"1"!=k.style.noJump)for(k=0;k<p.length-1;k++){for(var l=p[k+1],q=p[k],t=p[k+2];k<p.length-2&&mxUtils.ptSegDistSq(q.x,q.y,t.x,t.y,l.x,l.y)<1*this.scale*this.scale;)l=t,k++,t=p[k+2];t=mxUtils.intersection(u.x,u.y,m.x,m.y,q.x,q.y,l.x,l.y);if(null!=t&&(Math.abs(t.x-
+q.x)>r||Math.abs(t.y-q.y)>r)&&(Math.abs(t.x-l.x)>r||Math.abs(t.y-l.y)>r)){l=t.x-u.x;q=t.y-u.y;t={distSq:l*l+q*q,x:t.x,y:t.y};for(l=0;l<w.length;l++)if(w[l].distSq>t.distSq){w.splice(l,0,t);t=null;break}null==t||0!=w.length&&w[w.length-1].x===t.x&&w[w.length-1].y===t.y||w.push(t)}}}for(k=0;k<w.length;k++)b=e(1,w[k].x,w[k].y)||b}t=d[d.length-1];b=e(0,t.x,t.y)||b}a.routedPoints=c;return b}return!1};var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,d,b){this.routedPoints=
+null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,"jumpStyle","none"),h,m=!0,u=null,w=null;h=[];var t=null;a.begin();for(var x=0;x<this.state.routedPoints.length;x++){var p=
+this.state.routedPoints[x],l=new mxPoint(p.x/this.scale,p.y/this.scale);0==x?l=d[0]:x==this.state.routedPoints.length-1&&(l=d[d.length-1]);var q=!1;if(null!=u&&1==p.type){var v=this.state.routedPoints[x+1],p=v.x/this.scale-l.x,v=v.y/this.scale-l.y,p=p*p+v*v;null==t&&(t=new mxPoint(l.x-u.x,l.y-u.y),w=Math.sqrt(t.x*t.x+t.y*t.y),t.x=t.x*f/w,t.y=t.y*f/w);p>f*f&&0<w&&(p=u.x-l.x,v=u.y-l.y,p=p*p+v*v,p>f*f&&(q=new mxPoint(l.x-t.x,l.y-t.y),p=new mxPoint(l.x+t.x,l.y+t.y),h.push(q),this.addPoints(a,h,b,c,!1,
+null,m),h=0>Math.round(t.x)||0==Math.round(t.x)&&0>=Math.round(t.y)?1:-1,m=!1,"sharp"==e?(a.lineTo(q.x-t.y*h,q.y+t.x*h),a.lineTo(p.x-t.y*h,p.y+t.x*h),a.lineTo(p.x,p.y)):"arc"==e?(h*=1.3,a.curveTo(q.x-t.y*h,q.y+t.x*h,p.x-t.y*h,p.y+t.x*h,p.x,p.y)):(a.moveTo(p.x,p.y),m=!0),h=[p],q=!0))}else t=null;q||(h.push(l),u=l)}this.addPoints(a,h,b,c,!1,null,m);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,d,b,c){if(null==d||null==
+a||"1"!=d.style.snapToPoint&&"1"!=a.style.snapToPoint)l.apply(this,arguments);else{d=this.getTerminalPort(a,d,c);var f=this.getNextPoint(a,b,c),g=this.graph.isOrthogonal(a),e=mxUtils.toRadians(Number(d.style[mxConstants.STYLE_ROTATION]||"0")),m=new mxPoint(d.getCenterX(),d.getCenterY());if(0!=e)var u=Math.cos(-e),w=Math.sin(-e),f=mxUtils.getRotatedPoint(f,u,w,m);u=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);u+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);f=this.getPerimeterPoint(d,f,0==e&&g,u);0!=e&&(u=Math.cos(e),w=Math.sin(e),f=mxUtils.getRotatedPoint(f,u,w,m));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,d,b,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,d,b,c,e){if(null!=d&&null!=a){a=this.graph.getAllConnectionConstraints(d);c=b=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(d,a[f]);if(null!=g){var m=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||m<c)b=g,c=m}}null!=b&&(e=b)}return e};var q=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,d,b){var c=q.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=b.state&&(c=b.state.view.graph.replacePlaceholders(b.state.cell,c));return c};var p=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var d=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=d&&"stencil("==d.substring(0,8))try{var b=d.substring(8,d.length-1),c=mxUtils.parseXml(a.view.graph.decompress(b));
+return new mxShape(new mxStencil(c.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return p.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 l=
-mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}}catch(n){null!=window.console&&console.log("error in getStencil:",k,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxUtils.load(k);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.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&&(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,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(n){null!=window.console&&console.log("error in loadStencilSet:",a,n)}null!=k&&null!=
+mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var l=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,l=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,l))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",a,q)}null!=k&&null!=
k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,l)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var 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(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var n=c.getAttribute("w"),
-q=c.getAttribute("h"),n=null==n?80:parseInt(n,10),q=null==q?80:parseInt(q,10);b(k,l,a,n,q)}}c=c.nextSibling}}};
+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(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+l.toLowerCase(),new mxStencil(c));if(null!=b){var q=c.getAttribute("w"),
+p=c.getAttribute("h"),q=null==q?80:parseInt(q,10),p=null==p?80:parseInt(p,10);b(k,l,a,q,p)}}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}mxConstants.HANDLE_FILLCOLOR="#99ccff";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=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||
b.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));
@@ -2311,14 +2311,14 @@ for(var d in this.graph.currentEdgeStyle)a.style[d]=this.graph.currentEdgeStyle[
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+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+
";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?
-d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var m=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))m=this.importCells([m],0,0,this.model.getRoot(),null,g)[0],p=this.model.getChildren(m),this.moveCells(p,d,b),f=f.concat(p);else var p=e.getChildren(m),f=f.concat(this.importCells(p,d,b,this.getDefaultParent(),
-null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,d-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};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))}}catch(X){}return c}if(null!=
+d:0;b=null!=b?b:0;var f=[],e=new mxGraphModel;(new mxCodec(a.ownerDocument)).decode(a,e);a=e.getChildCount(e.getRoot());this.model.getChildCount(this.model.getRoot());this.model.beginUpdate();try{for(var g={},h=0;h<a;h++){var m=e.getChildAt(e.getRoot(),h);if(1!=a||this.isCellLocked(this.getDefaultParent()))m=this.importCells([m],0,0,this.model.getRoot(),null,g)[0],n=this.model.getChildren(m),this.moveCells(n,d,b),f=f.concat(n);else var n=e.getChildren(m),f=f.concat(this.importCells(n,d,b,this.getDefaultParent(),
+null,g))}if(c){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var u=this.getBoundingBoxFromGeometry(f,!0);null!=u&&this.moveCells(f,d-u.x,b-u.y)}}finally{this.model.endUpdate()}return f};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))}}catch(O){}return c}if(null!=
a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(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.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(d,"dropTarget",
"1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var 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){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var h=d.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var m=h.getTerminalPoint(!0),p=h.getTerminalPoint(!1);
-h.setTerminalPoint(m,!1);h.setTerminalPoint(p,!0);d.setGeometry(f,h);var u=this.view.getState(f),r=this.view.getState(e),v=this.view.getState(g);if(null!=u){var O=null!=r?this.getConnectionConstraint(u,r,!0):null,w=null!=v?this.getConnectionConstraint(u,v,!1):null;this.setConnectionConstraint(f,e,!0,w);this.setConnectionConstraint(f,g,!1,O)}b.push(f)}}else if(d.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var k=h.width;h.width=h.height;
-h.height=k;d.setGeometry(f,h);var q=this.view.getState(f);if(null!=q){var x=q.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
+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){var d=this.getModel(),b=[];d.beginUpdate();try{for(var c=0;c<a.length;c++){var f=a[c];if(d.isEdge(f)){var e=d.getTerminal(f,!0),g=d.getTerminal(f,!1);d.setTerminal(f,g,!0);d.setTerminal(f,e,!1);var h=d.getGeometry(f);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var m=h.getTerminalPoint(!0),n=h.getTerminalPoint(!1);
+h.setTerminalPoint(m,!1);h.setTerminalPoint(n,!0);d.setGeometry(f,h);var u=this.view.getState(f),r=this.view.getState(e),t=this.view.getState(g);if(null!=u){var w=null!=r?this.getConnectionConstraint(u,r,!0):null,Q=null!=t?this.getConnectionConstraint(u,t,!1):null;this.setConnectionConstraint(f,e,!0,Q);this.setConnectionConstraint(f,g,!1,w)}b.push(f)}}else if(d.isVertex(f)&&(h=this.getCellGeometry(f),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var x=h.width;h.width=h.height;
+h.height=x;d.setGeometry(f,h);var k=this.view.getState(f);if(null!=k){var p=k.style[mxConstants.STYLE_DIRECTION]||"east";"east"==p?p="south":"south"==p?p="west":"west"==p?p="north":"north"==p&&(p="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,p,[f])}b.push(f)}}}finally{d.endUpdate()}return b};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);
if(0<d.length)for(var b=0;b<d.length;b++)this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!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.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:"*"),h=0;h<g.length;h++)d(g[h]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=this.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||
@@ -2337,18 +2337,18 @@ g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrent
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(),h=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(h)||mxEvent.isMiddleMouseButton(h))&&!mxEvent.isPopupTrigger(h)||
mxEvent.isTouchEvent(h))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==d||d(h,this.currentLink),mxEvent.isConsumed(h)||(h=mxEvent.isMiddleMouseButton(h)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,h),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(h);mxEvent.addListener(document,"mouseleave",
-function(a){h.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),g=0;g<a.length;g++){var h=b.getParent(a[g]),m=this.moveCells([e[g]],c,c,!1)[0];f.push(m);if(d)b.add(h,e[g]);else{var p=h.getIndex(a[g]);b.add(h,e[g],p+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){for(var c=
+function(a){h.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 g=this.cloneCells(a,!1),e=0;e<a.length;e++){var h=b.getParent(a[e]),m=this.moveCells([g[e]],c,c,!1)[0];f.push(m);if(d)b.add(h,g[e]);else{var n=h.getIndex(a[e]);b.add(h,g[e],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a){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){0==a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=
mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return 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 h=a?g.getCenterX():g.getCenterY(),c=
-null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;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;h=this.view.scale;f=f/h-(a?g.x:g.y);c=c/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var p=this.view.getState(this.model.getParent(b[e].cell)),u=this.getCellGeometry(b[e].cell),c=c+m;null!=u&&null!=p&&(u=u.clone(),a?u.x=Math.round(c-u.width/2)-p.origin.x:u.y=Math.round(c-u.height/2)-p.origin.y,this.getModel().setGeometry(b[e].cell,
+null!=c?Math.max(c,h):h,f=null!=f?Math.min(f,h):h;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;h=this.view.scale;f=f/h-(a?g.x:g.y);c=c/h-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var m=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),u=this.getCellGeometry(b[e].cell),c=c+m;null!=u&&null!=n&&(u=u.clone(),a?u.x=Math.round(c-u.width/2)-n.origin.x:u.y=Math.round(c-u.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,
u))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var d=this.cloneCells(a),b=new mxDictionary,c=0;c<a.length;c++)b.put(a[c],!0);for(c=0;c<d.length;c++){var f=this.view.getState(a[c]);if(null!=f){var e=this.getCellGeometry(d[c]);null==e||!e.relative||this.model.isEdge(a[c])||b.get(this.model.getParent(a[c]))||(e.relative=!1,e.x=f.x/f.view.scale-
f.view.translate.x,e.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;e=f.getChildAt(f.getRoot(),0);for(c=0;c<a.length;c++)f.add(e,d[c]);return b.encode(f)};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,h){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;c=e||c?this.getGraphBounds():
-this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,p=mxUtils.createXmlDocument(),u=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+a));null==p.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/",
-"xmlns:xlink",mxConstants.NS_XLINK);a=d/m;u.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");u.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");u.setAttribute("version","1.1");var r=u;f&&(r=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"g"):p.createElement("g"),r.setAttribute("transform","translate(0.5,0.5)"),u.appendChild(r));p.appendChild(u);p=this.createSvgCanvas(r);p.foOffset=f?-.5:0;p.textOffset=f?-.5:0;p.imageOffset=f?-.5:0;p.translate(Math.floor((b/
-d-c.x)/m),Math.floor((b/d-c.y)/m));var v=document.createElement("textarea"),w=p.createAlternateContent;p.createAlternateContent=function(a,d,b,c,f,e,g,h,m,p,u,r,k){var q=this.state;if(null!=this.foAltText&&(0==c||0!=q.fontSize&&e.length<5*c/q.fontSize)){var x=this.createElement("text");x.setAttribute("x",Math.round(c/2));x.setAttribute("y",Math.round((f+q.fontSize)/2));x.setAttribute("fill",q.fontColor||"black");x.setAttribute("text-anchor","middle");x.setAttribute("font-size",Math.round(q.fontSize)+
-"px");x.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&x.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&x.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&x.setAttribute("text-decoration","underline");try{return v.innerHTML=e,x.textContent=v.value,x}catch(Ba){return w.apply(this,arguments)}}else return w.apply(this,arguments)};b=this.backgroundImage;
-null!=b&&(f=m/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&p.image(d.x,d.y,b.width,b.height,b.src,!0));p.scale(a);p.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var k=h.drawCellState;h.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)&&k.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),
-p);return u};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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.selectNode=
+this.getBoundingBox(this.getSelectionCells());if(null==c)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,n=mxUtils.createXmlDocument(),u=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=u.style?u.style.backgroundColor=a:u.setAttribute("style","background-color:"+a));null==n.createElementNS?(u.setAttribute("xmlns",mxConstants.NS_SVG),u.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):u.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:xlink",mxConstants.NS_XLINK);a=d/m;u.setAttribute("width",Math.max(1,Math.ceil(c.width*a)+2*b)+"px");u.setAttribute("height",Math.max(1,Math.ceil(c.height*a)+2*b)+"px");u.setAttribute("version","1.1");var r=u;f&&(r=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),r.setAttribute("transform","translate(0.5,0.5)"),u.appendChild(r));n.appendChild(u);n=this.createSvgCanvas(r);n.foOffset=f?-.5:0;n.textOffset=f?-.5:0;n.imageOffset=f?-.5:0;n.translate(Math.floor((b/
+d-c.x)/m),Math.floor((b/d-c.y)/m));var t=document.createElement("textarea"),w=n.createAlternateContent;n.createAlternateContent=function(a,d,b,c,f,e,g,h,n,m,u,r,x){var k=this.state;if(null!=this.foAltText&&(0==c||0!=k.fontSize&&e.length<5*c/k.fontSize)){var p=this.createElement("text");p.setAttribute("x",Math.round(c/2));p.setAttribute("y",Math.round((f+k.fontSize)/2));p.setAttribute("fill",k.fontColor||"black");p.setAttribute("text-anchor","middle");p.setAttribute("font-size",Math.round(k.fontSize)+
+"px");p.setAttribute("font-family",k.fontFamily);(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&p.setAttribute("font-weight","bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&p.setAttribute("font-style","italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.setAttribute("text-decoration","underline");try{return t.innerHTML=e,p.textContent=t.value,p}catch(Ba){return w.apply(this,arguments)}}else return w.apply(this,arguments)};b=this.backgroundImage;
+null!=b&&(f=m/d,d=this.view.translate,f=new mxRectangle(d.x*f,d.y*f,b.width*f,b.height*f),mxUtils.intersects(c,f)&&n.image(d.x,d.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=g;h=null!=h?h:this.createSvgImageExport();var x=h.drawCellState;h.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)&&x.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),
+n);return u};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(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.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.insertRow=function(a,d){for(var b=a.tBodies[0],c=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(d),f=0;f<c;f++)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){d=null!=d?d:a;var b=document.createElement("a");
@@ -2356,28 +2356,28 @@ b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=th
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.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(R){}};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,d){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 n=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){n.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
+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(H){}};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,d){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 q=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){q.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":
-"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function 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)}q.apply(this,arguments);
+"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var p=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)}p.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(){b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){h=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
0<h.length&&"\n"==h.charAt(h.length-1)&&(h=h.substring(0,h.length-1));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"<br/>"):h,!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,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=a?"underline":"";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!=h&&(this.textarea.innerHTML=h,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");
var h=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(h=mxUtils.replaceTrailingNewlines(h,"<div><br></div>"));h=this.graph.sanitizeHtml(d?h.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):h,!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!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var t=mxCellEditor.prototype.resize;
+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=h&&(this.textarea.innerHTML=h);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var v=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=
-"",t.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=
+"",v.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 d=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();d.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=
-function(){try{this.graph.container.focus()}catch(O){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],
-!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,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 f=mxGraphHandler.prototype.moveCells;
-mxGraphHandler.prototype.moveCells=function(a,d,b,c,e,g){mxEvent.isAltDown(g)&&(e=null);f.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-
+function(){try{this.graph.container.focus()}catch(Q){}};var f=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,d){this.graph.getModel().beginUpdate();try{if(f.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==d&&b==mxConstants.NONE&&c==mxConstants.NONE&&this.graph.removeCells([a.cell],
+!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var d=null;if(this.graph.getModel().isEdge(a.cell)||this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))d=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,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 g=mxGraphHandler.prototype.moveCells;
+mxGraphHandler.prototype.moveCells=function(a,d,b,c,f,e){mxEvent.isAltDown(e)&&(f=null);g.apply(this,arguments)};mxGraphHandler.prototype.updateHint=function(d){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,c=this.graph.view.scale;d=this.roundLength((this.bounds.x+this.currentDx)/c-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/c-b.y);this.hint.innerHTML=d+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-
this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,d){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(d.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==
-mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,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 p=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=
-new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&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=p.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+
+mxUtils.getValue(a.style,"childLayout",null)};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 n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=
+new mxPoint(0,0),d=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&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=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(d){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+
"&deg;":(d=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/d)+" x "+this.roundLength(this.bounds.height/d)),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+12+"px",null!=this.linkHint&&(this.linkHint.style.display="none"))};mxVertexHandler.prototype.removeHint=
function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(d,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var c=this.graph.view.translate,f=this.graph.view.scale,e=this.roundLength(b.x/f-c.x),c=this.roundLength(b.y/f-c.y);this.hint.innerHTML=e+", "+c;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&
null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(d.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(d.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;
@@ -2392,126 +2392,126 @@ if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigat
a.getState()&&!mxEvent.isMouseEvent(d)||mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var r=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){r.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.mouseUp=function(a,d){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),h=
-this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var m=this.graph.view.getState(h[b]),p=this.graph.getCellGeometry(h[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(e,g),this.graph.model.setGeometry(h[b],p))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
+this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(h)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(h=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<h.length;b++)if(this.graph.isCellMovable(h[b])){var n=this.graph.view.getState(h[b]),m=this.graph.getCellGeometry(h[b]);null!=n&&null!=m&&(m=m.clone(),m.translate(e,g),this.graph.model.setGeometry(h[b],m))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,
this.width,this.height),this.graph.selectRegion(e,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 h=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);h.apply(this,
-arguments)};var w=(new Date).getTime(),u=0,m=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){m.apply(this,arguments);b!=this.currentTerminalState?(w=(new Date).getTime(),u=0):u=(new Date).getTime()-w;this.currentTerminalState=b};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||
-"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,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 D=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 D.apply(this,arguments)};var F=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 F.apply(this,
-arguments)};var G=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))):G.apply(this,arguments)};var H=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)&&H.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
-this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
-function(a,d){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
+arguments)};var m=(new Date).getTime(),u=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){w.apply(this,arguments);b!=this.currentTerminalState?(m=(new Date).getTime(),u=0):u=(new Date).getTime()-m;this.currentTerminalState=b};var t=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||
+"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&t.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,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 x=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 x.apply(this,arguments)};var F=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 F.apply(this,
+arguments)};var D=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))):D.apply(this,arguments)};var G=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)&&G.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||
+this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};var B=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,d){B.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var y=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
+function(a,d){y.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var C=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){C.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var d=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){d()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));
d()});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){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.fontSize="90%",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",IMAGE_PATH+"/edit.gif");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)}));c=document.createElement("img");c.setAttribute("src",Dialog.prototype.clearImage);
c.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));c.setAttribute("width","13");c.setAttribute("height","10");c.style.marginLeft="4px";c.style.marginBottom="-1px";c.style.cursor="pointer";this.linkHint.appendChild(c);mxEvent.addListener(c,"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 f=document.createElement("div");f.style.marginTop=null!=d||0<c?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[c].getAttribute("href"),
-mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var K=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){K.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=
+mxUtils.getTextContent(b[c])));this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var I=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=
this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(d,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);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.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 x=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){x.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this);
+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 z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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+6+this.state.view.graph.tolerance)+"px"}};var z=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){z.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(){J.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var V=mxEdgeHandler.prototype.redrawHandles;
-mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(V.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
-function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function t(){mxActor.call(this)}function d(){mxActor.call(this)}function g(){mxActor.call(this)}function f(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,d){this.canvas=
+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+6+this.state.view.graph.tolerance)+"px"}};var E=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){E.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var J=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(){J.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var R=mxEdgeHandler.prototype.redrawHandles;
+mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(R.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Y=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
+function(){Y.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var aa=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){aa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function l(){mxActor.call(this)}function q(){mxCylinder.call(this)}function p(){mxActor.call(this)}function v(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function n(){mxActor.call(this)}function r(){mxActor.call(this)}function h(a,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,h.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,h.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,h.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,h.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function w(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function m(){mxActor.call(this)}function v(){mxActor.call(this)}function D(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxCylinder.call(this)}function y(){mxShape.call(this)}function B(){mxShape.call(this)}
-function C(){mxEllipse.call(this)}function K(){mxShape.call(this)}function x(){mxShape.call(this)}function E(){mxRectangleShape.call(this)}function z(){mxShape.call(this)}function J(){mxShape.call(this)}function V(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function U(){mxDoubleEllipse.call(this)}function O(){mxDoubleEllipse.call(this)}function M(){mxArrowConnector.call(this);this.spacing=0}function I(){mxArrowConnector.call(this);this.spacing=0}function R(){mxActor.call(this)}function L(){mxRectangleShape.call(this)}
-function P(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function W(){mxActor.call(this)}function N(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function qa(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function ha(){mxEllipse.call(this)}function ia(){mxEllipse.call(this)}function ca(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function oa(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,h,m,p){g+=m;var la=c.clone();c.x-=f*(2*g+m);c.y-=e*(2*g+m);f*=g+m;e*=g+m;return function(){a.ellipse(la.x-f-g,la.y-e-g,2*g,2*g);p?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
+this.canvas.curveTo=mxUtils.bind(this,h.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,h.prototype.arcTo)}function m(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function F(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function G(){mxCylinder.call(this)}function B(){mxShape.call(this)}function y(){mxShape.call(this)}
+function C(){mxEllipse.call(this)}function I(){mxShape.call(this)}function z(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function J(){mxShape.call(this)}function R(){mxShape.call(this)}function Y(){mxCylinder.call(this)}function aa(){mxDoubleEllipse.call(this)}function Q(){mxDoubleEllipse.call(this)}function S(){mxArrowConnector.call(this);this.spacing=0}function K(){mxArrowConnector.call(this);this.spacing=0}function H(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}
+function L(){mxActor.call(this)}function O(){mxActor.call(this)}function X(){mxActor.call(this)}function A(){mxActor.call(this)}function W(){mxActor.call(this)}function P(){mxActor.call(this)}function da(){mxActor.call(this)}function T(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function na(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function ia(){mxRhombus.call(this)}function qa(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}
+function ra(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxActor.call(this)}function ba(){mxActor.call(this)}function ka(){mxActor.call(this)}function ga(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,h,m,n){g+=m;var la=c.clone();c.x-=f*(2*g+m);c.y-=e*(2*g+m);f*=g+m;e*=g+m;return function(){a.ellipse(la.x-f-g,la.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,
Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(d,f),a.lineTo(d,d),a.lineTo(0,0),a.moveTo(d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(d,f),a.lineTo(0,f-d),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",
a);var xa=Math.tan(mxUtils.toRadians(30)),pa=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/xa);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+xa));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)*this.scale,0,0)};mxCellRenderer.registerShape("datastore",
c);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c-d,0),a.lineTo(c-d,d),a.lineTo(c,d)):(a.moveTo(0,0),a.lineTo(c-d,0),a.lineTo(c,d),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.registerShape("note",k);mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,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",l);mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.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",n);mxUtils.extend(q,mxActor);q.prototype.size=30;q.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",q);mxUtils.extend(t,mxActor);t.prototype.size=.4;t.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()};t.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",
-t);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.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};d.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",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(g,mxActor);g.prototype.size=.2;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(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",g);mxUtils.extend(f,mxActor);f.prototype.size=.2;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(p,mxActor);p.prototype.size=.5;p.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",p);mxUtils.extend(r,mxActor);r.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",r);h.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};h.prototype.close=function(){null!=this.firstX&&
+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",l);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(p,mxActor);p.prototype.size=30;p.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",p);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.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()};v.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",
+v);mxUtils.extend(d,mxActor);d.prototype.size=.3;d.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};d.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",d);mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(f,mxActor);f.prototype.size=.2;f.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",f);mxUtils.extend(g,mxActor);g.prototype.size=.2;g.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",g);mxUtils.extend(n,mxActor);n.prototype.size=.5;n.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",n);mxUtils.extend(r,mxActor);r.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",r);h.prototype.moveTo=function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};h.prototype.close=function(){null!=this.firstX&&
null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};h.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};h.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=e};h.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=
-g};h.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),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var la=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 m=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,
-la*e+this.lastX-m*f,b*e+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
+g};h.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),la=this.defaultVariation;5>g&&(g=5,la/=3);for(var h=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 m=(Math.random()-.5)*la;this.originalLineTo.call(this.canvas,
+h*e+this.lastX-m*f,b*e+this.lastY-m*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};h.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=
function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new h(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};
var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)Ga.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 Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(w,mxRectangleShape);w.prototype.size=.1;w.prototype.isHtmlAllowed=function(){return!1};w.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var 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};w.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",w);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground=
-function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);mxUtils.extend(m,mxHexagon);m.prototype.size=30;m.prototype.position=.5;m.prototype.position2=.5;m.prototype.base=20;m.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};m.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,
+b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(m,mxRectangleShape);m.prototype.size=.1;m.prototype.isHtmlAllowed=function(){return!1};m.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var 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};m.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",m);mxUtils.extend(u,mxRectangleShape);u.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};u.prototype.paintForeground=
+function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",u);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.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)))),h=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+h),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",
-m);mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.fixedSize=20;v.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",v);mxUtils.extend(D,mxHexagon);D.prototype.size=.25;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(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",D);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.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",F);var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=
+w);mxUtils.extend(t,mxActor);t.prototype.size=.2;t.prototype.fixedSize=20;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(x,mxHexagon);x.prototype.size=.25;x.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",x);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.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",F);var Ca=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){Ca.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),Ca.apply(this,[a,d,
-b,c,f]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.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};G.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 h=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],la=this.style["symbol"+e+"Width"],p=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||u,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(c+this.strokewidth,
-f+this.strokewidth),u+=v,r+=v);var v=d,w=b,v=h==mxConstants.ALIGN_CENTER?v+(c-la)/2:h==mxConstants.ALIGN_RIGHT?v+(c-la-u):v+u,w=m==mxConstants.ALIGN_MIDDLE?w+(f-p)/2:m==mxConstants.ALIGN_BOTTOM?w+(f-p-r):w+r;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,v,w,la,p);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",G);mxUtils.extend(H,mxCylinder);H.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",H);mxUtils.extend(y,mxShape);y.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",y);mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.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",B);mxUtils.extend(C,mxEllipse);C.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",C);mxUtils.extend(K,mxShape);K.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",K);mxUtils.extend(x,mxShape);x.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
-a.height/8,a.width,7*a.height/8)};x.prototype.paintBackground=function(a,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()};x.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",x);mxUtils.extend(E,mxRectangleShape);E.prototype.size=40;E.prototype.isHtmlAllowed=function(){return!1};E.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)};E.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!=E&&(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())};E.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",E);mxUtils.extend(z,mxShape);z.prototype.width=60;z.prototype.height=30;z.prototype.corner=
-10;z.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))};z.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)))),h=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
+b,c,f]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.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};D.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 h=this.style["symbol"+e+"Align"],la=this.style["symbol"+e+"VerticalAlign"],m=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],u=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||u,t=this.style["symbol"+e+"ArcSpacing"];null!=t&&(t*=this.getArcSize(c+this.strokewidth,
+f+this.strokewidth),u+=t,r+=t);var t=d,w=b,t=h==mxConstants.ALIGN_CENTER?t+(c-m)/2:h==mxConstants.ALIGN_RIGHT?t+(c-m-u):t+u,w=la==mxConstants.ALIGN_MIDDLE?w+(f-n)/2:la==mxConstants.ALIGN_BOTTOM?w+(f-n-r):w+r;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,t,w,m,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",D);mxUtils.extend(G,mxCylinder);G.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",G);mxUtils.extend(B,mxShape);B.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",B);mxUtils.extend(y,mxShape);y.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};y.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",y);mxUtils.extend(C,mxEllipse);C.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",C);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(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,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()};z.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",z);mxUtils.extend(N,mxRectangleShape);N.prototype.size=40;N.prototype.isHtmlAllowed=function(){return!1};N.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)};N.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!=N&&(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())};N.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",N);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=
+10;E.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))};E.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)))),h=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),m=mxUtils.getValue(this.style,
mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);m!=mxConstants.NONE&&(a.setFillColor(m),a.rect(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,h-1.5*e));a.lineTo(d+Math.max(0,g-e),b+h);a.lineTo(d,b+h);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+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",z);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=E.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);
+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+h);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=N.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",m.prototype.size))*
-d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,m=a.width,p=a.height;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=p*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+
-m,h+f),new mxPoint(e+m,h+p),new mxPoint(e,h+p-f),new mxPoint(e,h)]):(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+m,h),new mxPoint(e+m-f,h+p),new mxPoint(e,h+p),new mxPoint(e+f,h)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};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,h=a.y,m=a.width,p=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+m-e,h),new mxPoint(g+m,h+p),new mxPoint(g,h+p),new mxPoint(g+e,h)]):d==mxConstants.DIRECTION_WEST?(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m,h),new mxPoint(g+m-e,h+p),new mxPoint(g+e,h+p),new mxPoint(g,
-h)]):d==mxConstants.DIRECTION_NORTH?(e=p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+e),new mxPoint(g+m,h),new mxPoint(g+m,h+p),new mxPoint(g,h+p-e),new mxPoint(g,h+e)]):(e=p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m,h+e),new mxPoint(g+m,h+p-e),new mxPoint(g,h+p),new mxPoint(g,h)]);p=a.getCenterX();a=a.getCenterY();a=new mxPoint(p,a);c&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,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?v.prototype.fixedSize:v.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,m=a.width,p=a.height,u=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(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m-
-f,h),new mxPoint(g+m,a),new mxPoint(g+m-f,h+p),new mxPoint(g,h+p),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+m,h),new mxPoint(g+m-f,a),new mxPoint(g+m,h+p),new mxPoint(g+f,h+p),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(u,h),new mxPoint(g+m,h+f),new mxPoint(g+m,
-h+p),new mxPoint(u,h+p-f),new mxPoint(g,h+p),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(p,e)):p*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(u,h+f),new mxPoint(g+m,h),new mxPoint(g+m,h+p-f),new mxPoint(u,h+p),new mxPoint(g,h+p-f),new mxPoint(g,h)]);u=new mxPoint(u,a);c&&(b.x<g||b.x>g+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(h,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=D.prototype.size;null!=
-d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,m=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_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(p,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+m-f),new mxPoint(p,g+m),new mxPoint(e,g+m-f),new mxPoint(e,g+f),new mxPoint(p,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+
-f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+m),new mxPoint(e+f,g+m),new mxPoint(e,a),new mxPoint(e+f,g)]);p=new mxPoint(p,a);c&&(b.x<e||b.x>e+h?p.y=b.y:p.x=b.x);return mxUtils.getPerimeterPoint(g,p,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.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",J);mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.inset=2;V.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",V);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.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,h=.3*f-d/2,m=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,m),
-a.lineTo(g,m),a.lineTo(g,m+d),a.lineTo(b,m+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,m+d),a.lineTo(0,m+d),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(U,mxDoubleEllipse);U.prototype.outerStroke=!0;U.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",U);mxUtils.extend(O,U);O.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",O);mxUtils.extend(M,mxArrowConnector);M.prototype.defaultWidth=4;M.prototype.isOpenEnded=function(){return!0};M.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};M.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
-M);mxUtils.extend(I,mxArrowConnector);I.prototype.defaultWidth=10;I.prototype.defaultArrowWidth=20;I.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};I.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};I.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
-I);mxUtils.extend(R,mxActor);R.prototype.size=30;R.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",R);mxUtils.extend(L,mxRectangleShape);L.prototype.dx=20;L.prototype.dy=20;L.prototype.isHtmlAllowed=
-function(){return!1};L.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",L);mxUtils.extend(P,mxActor);P.prototype.dx=20;P.prototype.dy=20;P.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",P);mxUtils.extend(X,mxActor);X.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",X);mxUtils.extend(A,mxActor);A.prototype.dx=20;A.prototype.dy=
-20;A.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",A);mxUtils.extend(W,mxActor);W.prototype.arrowWidth=.3;W.prototype.arrowSize=.2;W.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",W);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",W.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",W.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",N);mxUtils.extend(Z,mxActor);Z.prototype.size=.1;Z.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",Z);mxUtils.extend(aa,mxActor);aa.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",aa);mxUtils.extend(S,mxActor);S.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",S);mxUtils.extend(T,mxActor);T.prototype.size=20;T.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",
-T);mxUtils.extend(da,mxActor);da.prototype.size=.375;da.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",da);mxUtils.extend(na,mxEllipse);na.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",na);mxUtils.extend(ba,mxEllipse);ba.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",
-ba);mxUtils.extend(ea,mxEllipse);ea.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",ea);mxUtils.extend(qa,mxRhombus);qa.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",qa);mxUtils.extend(ga,mxEllipse);ga.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",ga);mxUtils.extend(ra,mxEllipse);ra.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",ra);mxUtils.extend(ha,mxEllipse);ha.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-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ha);mxUtils.extend(ia,
-mxEllipse);ia.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",ia);mxUtils.extend(ca,mxActor);ca.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",ca);mxUtils.extend(ja,mxActor);ja.prototype.size=.2;ja.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",
-ja);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.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",ka);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.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;oa.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),oa.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",oa);"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,h,m,p){var u=f*(g+m+1),r=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,h,m,
-p){var u=f*(g+m+1),r=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-r/2,c.y-r/2+u/2);a.lineTo(c.x+r/2-3*u/2,c.y-3*r/2-u/2);a.moveTo(c.x-u/2+r/2,c.y-r/2-u/2);a.lineTo(c.x-r/2-3*u/2,c.y-3*r/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,h,m,p){var u=c.clone(),r=Aa.apply(this,arguments),v=f*(g+2*m),w=e*(g+2*m);return function(){r.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*v+f*m,u.y-2*w+e*m);a.moveTo(u.x-
-v-w+e*m,u.y-w+v-f*m);a.lineTo(u.x+w-v-e*m,u.y-w-v+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,h,m,p){d=f*m*1.118;b=e*m*1.118;f*=g+m;e*=g+m;var u=c.clone();u.x-=d;u.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);h?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();p?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,h,m,p,u){e*=h+p;g*=h+p;var r=
-f.clone();return function(){d.begin();d.moveTo(r.x,r.y);m?d.lineTo(r.x-e-g/a,r.y-g+e/a):d.lineTo(r.x+g/a-e,r.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,d,b){return sa(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,h){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return Q(a,d,
-function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,m=f.y-h.y,p=Math.sqrt(e*e+m*m),h=c.call(this,p,e/p,m/p,h,f);return new mxPoint(h.x/g-d.x,h.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,h=g.length-1;d=a.view.translate;var m=a.view.scale,p=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-p.x,u=g.y-p.y,r=Math.sqrt(h*h+u*u);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;f.call(this,r,h/r,u/r,p,g,c,e)})},ma=function(a){return function(d){return[Q(d,["arrowWidth",
-"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",W.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",W.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))})]}},ya=function(a,d,b){return function(c){var f=
-[Q(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(fa(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[Q(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(fa(e));return g}},Ea=function(a){return function(d){var b=
-[Q(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(fa(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(fa(a));return d}},fa=function(a,d){return Q(a,
+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",w.prototype.size))*
+d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,h=a.y,m=a.width,n=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+
+m,h+e),new mxPoint(g+m,h+n),new mxPoint(g,h+n-e),new mxPoint(g,h)]):(e=m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+e,h),new mxPoint(g+m,h),new mxPoint(g+m-e,h+n),new mxPoint(g,h+n),new mxPoint(g+e,h)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);c&&(b.x<g||b.x>g+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var f=g.prototype.size;null!=d&&(f=
+mxUtils.getValue(d.style,"size",f));var e=a.x,h=a.y,m=a.width,n=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e+f,h),new mxPoint(e+m-f,h),new mxPoint(e+m,h+n),new mxPoint(e,h+n),new mxPoint(e+f,h)]):d==mxConstants.DIRECTION_WEST?(f=m*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+m,h),new mxPoint(e+m-f,h+n),new mxPoint(e+f,h+n),new mxPoint(e,
+h)]):d==mxConstants.DIRECTION_NORTH?(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h+f),new mxPoint(e+m,h),new mxPoint(e+m,h+n),new mxPoint(e,h+n-f),new mxPoint(e,h+f)]):(f=n*Math.max(0,Math.min(1,f)),h=[new mxPoint(e,h),new mxPoint(e+m,h+f),new mxPoint(e+m,h+n-f),new mxPoint(e,h+n),new mxPoint(e,h)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);c&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,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,h=a.y,m=a.width,n=a.height,u=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(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(g+m-
+f,h),new mxPoint(g+m,a),new mxPoint(g+m-f,h+n),new mxPoint(g,h+n),new mxPoint(g+f,a),new mxPoint(g,h)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(m,e)):m*Math.max(0,Math.min(1,e)),h=[new mxPoint(g+f,h),new mxPoint(g+m,h),new mxPoint(g+m-f,a),new mxPoint(g+m,h+n),new mxPoint(g+f,h+n),new mxPoint(g,a),new mxPoint(g+f,h)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h+f),new mxPoint(u,h),new mxPoint(g+m,h+f),new mxPoint(g+m,
+h+n),new mxPoint(u,h+n-f),new mxPoint(g,h+n),new mxPoint(g,h+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),h=[new mxPoint(g,h),new mxPoint(u,h+f),new mxPoint(g+m,h),new mxPoint(g+m,h+n-f),new mxPoint(u,h+n),new mxPoint(g,h+n-f),new mxPoint(g,h)]);u=new mxPoint(u,a);c&&(b.x<g||b.x>g+m?u.y=b.y:u.x=b.x);return mxUtils.getPerimeterPoint(h,u,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=x.prototype.size;null!=
+d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,h=a.width,m=a.height,n=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=m*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+h,g+f),new mxPoint(e+h,g+m-f),new mxPoint(n,g+m),new mxPoint(e,g+m-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=h*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+
+f,g),new mxPoint(e+h-f,g),new mxPoint(e+h,a),new mxPoint(e+h-f,g+m),new mxPoint(e+f,g+m),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);c&&(b.x<e||b.x>e+h?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(g,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(J,mxShape);J.prototype.size=10;J.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",J);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.inset=2;R.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",R);mxUtils.extend(Y,mxCylinder);Y.prototype.jettyWidth=32;Y.prototype.jettyHeight=12;Y.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,h=.3*f-d/2,m=.7*f-d/2;e?(a.moveTo(b,h),a.lineTo(g,h),a.lineTo(g,h+d),a.lineTo(b,h+d),a.moveTo(b,m),
+a.lineTo(g,m),a.lineTo(g,m+d),a.lineTo(b,m+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,m+d),a.lineTo(0,m+d),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,h+d),a.lineTo(0,h+d),a.lineTo(0,h),a.lineTo(b,h),a.close());a.end()};mxCellRenderer.registerShape("component",Y);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.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",aa);mxUtils.extend(Q,aa);Q.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Q);mxUtils.extend(S,mxArrowConnector);S.prototype.defaultWidth=4;S.prototype.isOpenEnded=function(){return!0};S.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};S.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+S);mxUtils.extend(K,mxArrowConnector);K.prototype.defaultWidth=10;K.prototype.defaultArrowWidth=20;K.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};K.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};K.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",
+K);mxUtils.extend(H,mxActor);H.prototype.size=30;H.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",H);mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=
+function(){return!1};V.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",V);mxUtils.extend(L,mxActor);L.prototype.dx=20;L.prototype.dy=20;L.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",L);mxUtils.extend(O,mxActor);O.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",O);mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=
+20;X.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",X);mxUtils.extend(A,mxActor);A.prototype.arrowWidth=.3;A.prototype.arrowSize=.2;A.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",A);mxUtils.extend(W,mxActor);W.prototype.redrawPath=function(a,d,b,c,f){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",A.prototype.arrowWidth))));d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",A.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",W);mxUtils.extend(P,mxActor);P.prototype.size=.1;P.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",P);mxUtils.extend(da,mxActor);da.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",da);mxUtils.extend(T,mxActor);T.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",T);mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.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",
+Z);mxUtils.extend(U,mxActor);U.prototype.size=.375;U.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",U);mxUtils.extend(na,mxEllipse);na.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",na);mxUtils.extend(oa,mxEllipse);oa.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",
+oa);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(ia,mxRhombus);ia.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",ia);mxUtils.extend(qa,mxEllipse);qa.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",qa);mxUtils.extend(ea,mxEllipse);ea.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",ea);mxUtils.extend(ra,mxEllipse);ra.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-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.registerShape("partialRectangle",ra);mxUtils.extend(fa,
+mxEllipse);fa.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",fa);mxUtils.extend(ja,mxActor);ja.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",ja);mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.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",
+ba);mxUtils.extend(ka,mxActor);ka.prototype.size=.25;ka.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",ka);mxUtils.extend(ga,mxConnector);ga.prototype.origPaintEdgeShape=ga.prototype.paintEdgeShape;ga.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;ga.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),ga.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",ga);"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,h,m,n){var u=f*(g+m+1),t=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-t/2,c.y-t/2+u/2);a.lineTo(c.x+t/2-3*u/2,c.y-3*t/2-u/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,h,m,
+n){var u=f*(g+m+1),t=e*(g+m+1);return function(){a.begin();a.moveTo(c.x-u/2-t/2,c.y-t/2+u/2);a.lineTo(c.x+t/2-3*u/2,c.y-3*t/2-u/2);a.moveTo(c.x-u/2+t/2,c.y-t/2-u/2);a.lineTo(c.x-t/2-3*u/2,c.y-3*t/2+u/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,h,m,n){var u=c.clone(),t=Aa.apply(this,arguments),r=f*(g+2*m),w=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(u.x-f*m,u.y-e*m);a.lineTo(u.x-2*r+f*m,u.y-2*w+e*m);a.moveTo(u.x-
+r-w+e*m,u.y-w+r-f*m);a.lineTo(u.x+w-r-e*m,u.y-w-r+f*m);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,h,m,n){d=f*m*1.118;b=e*m*1.118;f*=g+m;e*=g+m;var u=c.clone();u.x-=d;u.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(u.x,u.y);h?a.lineTo(u.x-f-e/2,u.y-e+f/2):a.lineTo(u.x+e/2-f,u.y-e-f/2);a.lineTo(u.x-f,u.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,h,m,n,u){e*=h+n;g*=h+n;var t=
+f.clone();return function(){d.begin();d.moveTo(t.x,t.y);m?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 Da=function(a,d,b){return sa(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,h){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*d)/a.view.scale-b})},sa=function(a,d,b,c,f){return M(a,d,
+function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,h=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-h.x,m=f.y-h.y,n=Math.sqrt(e*e+m*m),h=c.call(this,n,e/n,m/n,h,f);return new mxPoint(h.x/g-d.x,h.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,h=g.length-1;d=a.view.translate;var m=a.view.scale,n=b?g[0]:g[h],g=b?g[1]:g[h-1],h=g.x-n.x,u=g.y-n.y,t=Math.sqrt(h*h+u*u);c.x=(c.x+d.x)*m;c.y=(c.y+d.y)*m;f.call(this,t,h/t,u/t,n,g,c,e)})},ma=function(a){return function(d){return[M(d,["arrowWidth",
+"arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",A.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",A.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))})]}},ya=function(a,d,b){return function(c){var f=
+[M(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(ha(c));return f}},ua=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[M(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(ha(e));return g}},Ea=function(a){return function(d){var b=
+[M(d,["size"],function(d){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",g.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(ha(d));return b}},ta=function(){return function(a){var d=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ha(a));return d}},ha=function(a,d){return M(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))))})},Q=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])};
+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))))})},M=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 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[Da(a,!0,10),Da(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(sa(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,h,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.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(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(sa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
@@ -2521,65 +2521,65 @@ a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxCon
e,g,h,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.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(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(sa(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,h,m){b=
Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,h.x,h.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,h.x,h.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(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<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=[Q(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(fa(a,b/2))}return d},
-label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",E.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[Q(a,["width","height"],function(a){var d=Math.max(z.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
-"width",z.prototype.width))),b=Math.max(1.5*z.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",z.prototype.height)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(z.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*z.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[Q(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
-"size",w.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(fa(a));return d},cross:function(a){return[Q(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",ja.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[Q(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=
-[Q(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",R.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(fa(a));return d},dataStorage:function(a){return[Q(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.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=[Q(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",m.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",m.prototype.position)));mxUtils.getValue(this.state.style,"base",m.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){mxUtils.getValue(this.state.style,
-"base",m.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}),Q(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",m.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}),Q(a,["base"],function(a){var d=
-Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",m.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",m.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",m.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",m.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(fa(a));return d},internalStorage:function(a){var d=[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.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(fa(a));return d},corner:function(a){return[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",P.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+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[Q(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",A.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",A.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:ma(1),doubleArrow:ma(.5),
-folder:function(a){return[Q(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.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",n.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[Q(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*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[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",t.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[Q(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",da.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:ua(v.prototype.size,!0,null,!0,v.prototype.fixedSize),hexagon:ua(D.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=Q;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
+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=[M(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(ha(a,b/2))}return d},
+label:ta(),ext:ta(),rectangle:ta(),triangle:ta(),rhombus:ta(),umlLifeline:function(a){return[M(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.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[M(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",E.prototype.width))),b=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+d,a.y+b)},function(a,d){this.state.style.width=Math.round(Math.max(E.prototype.corner,Math.min(a.width,d.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,d.y-a.y)))},!1)]},process:function(a){var d=[M(a,["size"],function(a){var d=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",m.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(ha(a));return d},cross:function(a){return[M(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",ba.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[M(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=
+[M(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",H.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(ha(a));return d},dataStorage:function(a){return[M(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.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=[M(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-d)},function(a,d){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-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.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}),M(a,["base"],function(a){var d=
+Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
+d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ha(a));return d},internalStorage:function(a){var d=[M(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.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(ha(a));return d},corner:function(a){return[M(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",L.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",L.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[M(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.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:ma(1),doubleArrow:ma(.5),
+folder:function(a){return[M(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[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",d.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*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[M(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.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[M(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",U.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:ua(t.prototype.size,!0,null,!0,t.prototype.fixedSize),hexagon:ua(x.prototype.size,!0,.5,!0),curlyBracket:ua(n.prototype.size,!1),display:ua(ka.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,p.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=M;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==
this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ma=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,Math.cos(ma),Math.sin(ma)),ma=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ma),Math.sin(ma));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,h=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,
-c));null==h&&null!=d&&(h=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,p=va.y,u=wa.x,r=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,d,b){a-=w.x;var c=d-w.y;d=(r*a-u*c)/(m*r-p*u);a=(p*a-m*c)/(p*u-m*r);v?(b&&(w=new mxPoint(w.x+m*d,w.y+p*d),f.push(w)),w=new mxPoint(w.x+u*a,w.y+r*a)):(b&&(w=new mxPoint(w.x+u*a,w.y+r*a),f.push(w)),w=new mxPoint(w.x+m*d,w.y+p*d));f.push(w)};
-var w=h;null==c&&(c=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];m.prototype.constraints=[];mxRectangleShape.prototype.constraints=
+c));null==h&&null!=d&&(h=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,n=va.y,u=wa.x,t=wa.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,d,b){a-=w.x;var c=d-w.y;d=(t*a-u*c)/(m*t-n*u);a=(n*a-m*c)/(n*u-m*t);r?(b&&(w=new mxPoint(w.x+m*d,w.y+n*d),f.push(w)),w=new mxPoint(w.x+u*a,w.y+t*a)):(b&&(w=new mxPoint(w.x+u*a,w.y+t*a),f.push(w)),w=new mxPoint(w.x+m*d,w.y+n*d));f.push(w)};
+var w=h;null==c&&(c=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=
-mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=
-mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;
-T.prototype.constraints=mxRectangleShape.prototype.constraints;da.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)];y.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,
+mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=
+mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;H.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;
+Z.prototype.constraints=mxRectangleShape.prototype.constraints;U.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)];B.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)];Y.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)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
-0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];v.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)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),
!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,
-.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
-.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;A.prototype.constraints=null;P.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
-new mxConnectionConstraint(new mxPoint(1,.5),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];E.prototype.constraints=null;aa.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)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];f.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;d.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,
+.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;X.prototype.constraints=null;L.prototype.constraints=null;O.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)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),
+new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];N.prototype.constraints=null;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];T.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)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableCells(c.getSelectionCells());if(null!=b&&0<b.length){var d=c.model.getParents(b);c.removeCells(b,a);if(null!=d){a=[];for(b=0;b<d.length;b++)c.model.contains(d[b])&&(c.model.isVertex(d[b])||c.model.isEdge(d[b]))&&a.push(d[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 d=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(d.documentElement))}catch(g){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+g.message)}}));b.showDialog((new OpenDialog(this)).container,
+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(f){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+f.message)}}));b.showDialog((new OpenDialog(this)).container,
320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,420,!0,!1);a.init()});this.addAction("pageSetup...",
function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(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(){mxClipboard.copy(c)},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 d=0;d<b.length&&
-a;d++)a=a&&c.model.isEdge(b[d]);var e=c.view.translate,f=c.view.scale,p=e.x,r=e.y,e=null;if(1==b.length&&a){var h=c.getCellGeometry(b[0]);null!=h&&(e=h.getTerminalPoint(!0))}e=null!=e?e:c.getBoundingBoxFromGeometry(b,a);if(null!=e){var w=Math.round(c.snap(c.popupMenuHandler.triggerX/f-p)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/f-r));c.cellsMoved(b,w-e.x,u-e.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");
+a;d++)a=a&&c.model.isEdge(b[d]);var f=c.view.translate,e=c.view.scale,n=f.x,r=f.y,f=null;if(1==b.length&&a){var h=c.getCellGeometry(b[0]);null!=h&&(f=h.getTerminalPoint(!0))}f=null!=f?f:c.getBoundingBoxFromGeometry(b,a);if(null!=f){var m=Math.round(c.snap(c.popupMenuHandler.triggerX/e-n)),u=Math.round(c.snap(c.popupMenuHandler.triggerY/e-r));c.cellsMoved(b,m-f.x,u-f.y)}}}finally{c.getModel().endUpdate()}}});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(){c.setSelectionCells(c.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){c.turnShapes(c.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices()},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,"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();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container,
-340,340,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var e=c.value.getAttribute("tooltip");null!=e&&(d=e)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var a=
+340,340,!0,!1,null,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var f=c.value.getAttribute("tooltip");null!=f&&(d=f)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(d){a.setTooltipForCell(c,d)});b.showDialog(d.container,320,200,!0,!0);d.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(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(d){d=mxUtils.trim(d);a.setLinkForCell(c,0<d.length?d:null)})}},null,null,"Alt+Shift+L");this.addAction("insertLink...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),
-function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,g=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var f=a.indexOf(",");0<f&&(g=b.getPageById(a.substring(f+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,g=e[0].name||e[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));f=c.getFreeInsertPoint();d=new mxCell(g,new mxGeometry(f.x,f.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
+function(a,e){a=mxUtils.trim(a);if(0<a.length){var d=null,f=a.substring(a.lastIndexOf("/")+1);if(c.isPageLink(a)){var g=a.indexOf(",");0<g&&(f=b.getPageById(a.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}null!=e&&0<e.length&&(d=e[0].iconUrl,f=e[0].name||e[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));g=c.getFreeInsertPoint();d=new mxCell(f,new mxGeometry(g.x,g.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+
(null!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));d.vertex=!0;c.setLinkForCell(d,a);c.cellSizeUpdated(d,!0);c.getModel().beginUpdate();try{d=c.addCell(d),c.fireEvent(new mxEventObject("cellsInserted","cells",[d]))}finally{c.getModel().endUpdate()}c.setSelectionCell(d);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.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var e=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(e);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 d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d],20);else{var e=c.view.getState(d),f=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=e&&null!=e.text&&null!=f&&c.isWrapping(d)?(f=f.clone(),f.height=e.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,f)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=
-a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=d;d=mxUtils.extractTextWithWhitespace(g.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
+a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var f=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),mxUtils.bind(this,function(d){a.cellEditor.restoreSelection(f);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 d=a[b];if(c.getModel().getChildCount(d))c.updateGroupBounds([d],20);else{var f=c.view.getState(d),e=c.getCellGeometry(d);c.getModel().isVertex(d)&&null!=f&&null!=f.text&&null!=e&&c.isWrapping(d)?(e=e.clone(),e.height=f.text.boundingBox.height/c.view.scale,c.getModel().setGeometry(d,e)):c.updateCellSize(d)}}}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=c.getView().getState(c.getSelectionCell());if(null!=
+a){var e="1";c.stopEditing();c.getModel().beginUpdate();try{if("1"==a.style.html){var e=null,d=c.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var f=document.createElement("div");f.innerHTML=d;d=mxUtils.extractTextWithWhitespace(f.childNodes);c.cellLabelChanged(a.cell,d)}else d=mxUtils.htmlEntities(c.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(d=d.replace(/\n/g,"<br/>")),c.cellLabelChanged(a.cell,
c.sanitizeHtml(d));c.setCellStyles("html",e);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=e?e:"0"],"cells",c.getSelectionCells()))}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,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){c.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");
this.addAction("zoomOut",function(a){c.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){c.fit()},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=
@@ -2591,23 +2591,23 @@ l=this.addAction("guides",function(){c.graphHandler.guidesEnabled=!c.graphHandle
new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!c.foldingEnabled;c.model.execute(a)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.foldingEnabled});l.isEnabled=k;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!c.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return c.pageVisible});
l=this.addAction("connectionArrows",function(){c.connectionArrowsEnabled=!c.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionArrowsEnabled});l=this.addAction("connectionPoints",function(){c.setConnectable(!c.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isEnabled()});
l=this.addAction("copyConnect",function(){c.connectionHandler.setCreateTarget(!c.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.connectionHandler.isCreateTarget()});l.isEnabled=k;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=k;l.visible=!1;this.addAction("help",function(){var a=
-"";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);c.openLink(RESOURCES_PATH+"/help"+a+".html")});var n=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){n||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){n=!1}),n=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,e){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+"";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)},null,null,"F1"));l=mxUtils.bind(this,function(a,b,d,f){return this.addAction(a,function(){if(null!=d&&c.cellEditor.isContentEditing())d();else{c.stopEditing(!1);c.getModel().beginUpdate();try{c.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
b),(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)})}finally{c.getModel().endUpdate()}}},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
+c.replaceElement(a)})}finally{c.getModel().endUpdate()}}},null,null,f)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});
this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});
this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){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.view.getState(a[0]),
-d=null!=e?e.style:c.getCellStyle(a[0]),g="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,g);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"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,
+d=null!=e?e.style:c.getCellStyle(a[0]),f="1"==mxUtils.getValue(d,mxConstants.STYLE_ROUNDED,"0")?"0":"1";c.setCellStyles(mxConstants.STYLE_ROUNDED,f);c.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[f,"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(d){null!=d&&c.setCellStyle(mxUtils.trim(d),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 d=c.view.translate,g=c.view.scale,f=d.x,d=d.y,a=c.getModel().getParent(a),p=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=p;)f+=p.x,d+=p.y,a=c.getModel().getParent(a),p=
-c.getCellGeometry(a);f=Math.round(c.snap(c.popupMenuHandler.triggerX/g-f));g=Math.round(c.snap(c.popupMenuHandler.triggerY/g-d));b.addPointAt(b.state,f,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var e=
-c.getCellGeometry(d);null!=e&&(e=e.clone(),e.points=null,c.getModel().setGeometry(d,e))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");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()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var g=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(g),c.insertImage(a,d,b);else{var f=c.getSelectionCells();if(null!=a&&(0<a.length||0<f.length)){var e=null;c.getModel().beginUpdate();
-try{if(0==f.length){var p=c.getFreeInsertPoint(),e=f=[c.insertVertex(c.getDefaultParent(),null,"",p.x,p.y,d,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",e))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var m=c.view.getState(f[0]),r=null!=m?m.style:c.getCellStyle(f[0]);"image"!=r[mxConstants.STYLE_SHAPE]&&"label"!=r[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!=d&&null!=b){var k=f[0],l=c.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=d,l.height=b,c.getModel().setGeometry(k,l))}}finally{c.getModel().endUpdate()}null!=e&&(c.setSelectionCells(e),c.scrollCellToVisible(e[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
+"+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 d=c.view.translate,f=c.view.scale,g=d.x,d=d.y,a=c.getModel().getParent(a),n=c.getCellGeometry(a);c.getModel().isVertex(a)&&null!=n;)g+=n.x,d+=n.y,a=c.getModel().getParent(a),n=
+c.getCellGeometry(a);g=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g));f=Math.round(c.snap(c.popupMenuHandler.triggerY/f-d));b.addPointAt(b.state,g,f)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var d=a[b];if(c.getModel().isEdge(d)){var f=
+c.getCellGeometry(d);null!=f&&(f=f.clone(),f.points=null,c.getModel().setGeometry(d,f))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");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()),d="";null!=e&&(d=e.style[mxConstants.STYLE_IMAGE]||d);var f=c.cellEditor.saveSelection();b.showImageDialog(a,d,function(a,d,b){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(f),c.insertImage(a,d,b);else{var e=c.getSelectionCells();if(null!=a&&(0<a.length||0<e.length)){var g=null;c.getModel().beginUpdate();
+try{if(0==e.length){var n=c.getFreeInsertPoint(),g=e=[c.insertVertex(c.getDefaultParent(),null,"",n.x,n.y,d,b,"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,e);var r=c.view.getState(e[0]),t=null!=r?r.style:c.getCellStyle(e[0]);"image"!=t[mxConstants.STYLE_SHAPE]&&"label"!=t[mxConstants.STYLE_SHAPE]?c.setCellStyles(mxConstants.STYLE_SHAPE,"image",
+e):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,e);if(1==c.getSelectionCount()&&null!=d&&null!=b){var k=e[0],l=c.getModel().getGeometry(k);null!=l&&(l=l.clone(),l.width=d,l.height=b,c.getModel().setGeometry(k,l))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;this.addAction("insertImage...",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&
(c.clearSelection(),b.actions.get("image").funct())}).isEnabled=k;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):
this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));l=this.addAction("outline",
mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,
@@ -2643,7 +2643,7 @@ null;if(null!=d){var b=d.getElementsByTagName("parsererror");if(null!=b&&0<b.len
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?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==d.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var 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");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(D){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
+null!=d&&0<d.length)){var b=mxUtils.parseXml(d).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,d){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),c=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){c.push(b[f]);break}0<c.length&&(b=c[0].getAttribute("data-mxgraph"),null!=b?(c=JSON.parse(b),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),
a=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0]),b=this.graph.decompress(b),0<b.length&&(c=mxUtils.parseXml(b),a=c.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};
null==a||d||(c=null,"diagram"==a.nodeName?c=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(c=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=c&&(b=this.graph.decompress(mxUtils.getTextContent(c)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};var e=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,d){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
@@ -2651,15 +2651,15 @@ Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){window.setTimeout(func
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&&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};if(window.ColorDialog){var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};
-var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
-q.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var t=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=t.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"),
+var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}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 p=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?
+p.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var v=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=v.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 d=DiagramFormatPanel.prototype.addOptions;
DiagramFormatPanel.prototype.addOptions=function(a){a=d.apply(this,arguments);var b=this.editorUi,c=b.editor.graph;if(c.isEnabled()){var f=b.getCurrentFile();null!=f&&f.isAutosaveOptional()&&(f=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(f))}if(this.isMathOptionVisible()&&
c.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return c.mathEnabled},function(a){b.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(c.mathEnabled)};b.addListener("mathEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});f.style.paddingTop="0px";a.appendChild(f);var e=b.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
e.style.position="relative";e.style.top="4px";f.appendChild(e)}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",
-gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var g=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments)};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)};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=
+gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[null,{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];var f=StyleFormatPanel.prototype.init;
+StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments)};var g=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 g.apply(this,arguments)};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]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,
"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));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";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%)":d.style.backgroundColor=a.fill,d.style.border="1px solid "+a.stroke):(d.style.backgroundColor="#ffffff",d.style.border="1px solid #000000");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=
@@ -2669,7 +2669,7 @@ mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.editorUi.current
(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 p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}p.apply(this,arguments);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;
+"3";Graph.prototype.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){d=a;if(mxClient.IS_QUIRKS||7==document.documentMode||8==document.documentMode)d=mxUtils.clone(a)}n.apply(this,arguments);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.view.getState(a),d=null!=d?d.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==d.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,d){d.height=Math.max(d.height,20);if(1<d.height/20){var b=d.height%20;d.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,
d)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=d.marginLeft||0;b.marginRight=d.marginRight||0;b.marginTop=d.marginTop||0;b.marginBottom=d.marginBottom||0;b.resizeParent=!1;return b}return c.apply(this,arguments)}};var r=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){r.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.highlightCell=function(a,
d,b){d=null!=d?d:mxConstants.DEFAULT_VALID_COLOR;b=null!=b?b:1E3;a=this.view.getState(a);if(null!=a){var c=Math.max(5,mxUtils.getValue(a.style,mxConstants.STYLE_STROKEWIDTH,1)+4),f=new mxCellHighlight(this,d,c,!1);f.highlight(a);window.setTimeout(function(){null!=f.shape&&(mxUtils.setPrefixedStyle(f.shape.node.style,"transition","all 1200ms ease-in-out"),f.shape.node.style.opacity=0);window.setTimeout(function(){f.destroy()},1200)},b)}};Graph.prototype.addSvgShadow=function(a,d,b){b=null!=b?b:!1;
@@ -2684,25 +2684,25 @@ mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegist
"/mockup/mxMockupForms.js"];mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=
[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",
-STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var 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 h=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,p,r,w){if(null!=b&&null==mxMarker.markers[b]){var m=this.getPackageForType(b);
-null!=m&&mxStencilRegistry.getStencil(m)}return h.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){k.value=Math.max(1,Math.min(h,Math.max(parseInt(k.value),parseInt(u.value))));u.value=Math.max(1,Math.min(h,Math.min(parseInt(k.value),parseInt(u.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,h=0,m=aa.get(),p=1/d.pageScale,r=t.checked;if(r)var p=parseInt(N.value),u=parseInt(Z.value),p=Math.min(m.height*u/(e.height/d.view.scale),m.width*p/(e.width/
-d.view.scale));else p=parseInt(q.value)/(100*d.pageScale),isNaN(p)&&(c=1/d.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*c);m.height=Math.ceil(m.height*c);p*=c;!r&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*m.width,h-=e.y*m.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(d,p,m,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var w=b.writeHead;b.writeHead=function(d){w.apply(this,arguments);null!=a.editor.fontCss&&
-(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=r;b.appendGraph(d,p,g,h,f,!0)}return b}var c=parseInt(S.value)/100;isNaN(c)&&(c=1,S.value=
-"100 %");var c=.75*c,e=u.value,g=k.value,h=!r.checked,m=null;h&&(h=e==p&&g==p);if(!h&&null!=a.pages&&a.pages.length){var w=0,h=a.pages.length-1;r.checked||(w=parseInt(e)-1,h=parseInt(g)-1);for(var v=w;v<=h;v++){var x=a.pages[v],e=x==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,w=!1,l=null,n=null;null==x.viewState&&null==x.mapping&&null==x.root&&a.updatePageRoot(x);null!=x.viewState?(g=x.viewState.pageVisible,w=x.viewState.mathEnabled,l=x.viewState.background,
-n=x.viewState.backgroundImage):null!=x.mapping&&null!=x.mapping.diagramMap&&(w="0"!=x.mapping.diagramMap.get("mathEnabled"),l=x.mapping.diagramMap.get("background"),n=x.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null);e.background=l;e.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;e.pageVisible=g;e.mathEnabled=w;var D=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?v+1:D.apply(this,arguments)};document.body.appendChild(e.container);
-a.updatePageRoot(x);e.model.setRoot(x.root)}m=b(e,m,v!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else m=b(f);m.mathEnabled&&(h=m.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
-h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&d&&PrintDialog.printPreview(m)}
-var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var h=1,p=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");
-r.setAttribute("name","pages-printdialog");m.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));m.appendChild(g);mxUtils.br(m);var w=r.cloneNode(!0);r.setAttribute("checked","checked");w.setAttribute("value","range");m.appendChild(w);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");m.appendChild(g);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type",
-"number");u.setAttribute("min","1");u.style.width="50px";m.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));m.appendChild(g);var k=u.cloneNode(!0);m.appendChild(k);mxEvent.addListener(u,"focus",function(){w.checked=!0});mxEvent.addListener(k,"focus",function(){w.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(k,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){p=g+
-1;u.value=p;k.value=p;break}u.setAttribute("max",h);k.setAttribute("max",h);1<h&&e.appendChild(m);var l=document.createElement("div");l.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");l.appendChild(n);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));l.appendChild(g);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";
-q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});e.appendChild(l);var m=m.cloneNode(!1),t=n.cloneNode(!0);t.setAttribute("value","fit");n.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(t);m.appendChild(g);l=document.createElement("table");l.style.display="inline-block";var O=document.createElement("tbody"),
-M=document.createElement("tr"),I=M.cloneNode(!0),R=document.createElement("td"),L=R.cloneNode(!0),P=R.cloneNode(!0),X=R.cloneNode(!0),A=R.cloneNode(!0),W=R.cloneNode(!0);R.style.textAlign="right";X.style.textAlign="right";mxUtils.write(R,mxResources.get("fitTo"));var N=document.createElement("input");N.style.cssText="margin:0 8px 0 8px;";N.setAttribute("value","1");N.setAttribute("min","1");N.setAttribute("type","number");N.style.width="40px";L.appendChild(N);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));P.appendChild(g);mxUtils.write(X,mxResources.get("fitToBy"));var Z=N.cloneNode(!0);A.appendChild(Z);mxEvent.addListener(N,"focus",function(){t.checked=!0});mxEvent.addListener(Z,"focus",function(){t.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));W.appendChild(g);M.appendChild(R);M.appendChild(L);M.appendChild(P);I.appendChild(X);I.appendChild(A);I.appendChild(W);O.appendChild(M);O.appendChild(I);l.appendChild(O);
-m.appendChild(l);e.appendChild(m);m=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));m.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var aa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);m.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));m.appendChild(g);
-var S=document.createElement("input");S.style.cssText="margin:0 8px 0 8px;";S.setAttribute("value","100 %");S.style.width="60px";m.appendChild(S);e.appendChild(m);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&g.appendChild(m);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
-l.className="geBtn",g.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),l.className="geBtn",g.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";g.appendChild(l);a.editor.cancelFirst||g.appendChild(m);e.appendChild(g);this.container=e};var w=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
-this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(w.apply(this,arguments),null!=this.mathEnabled&&
+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 h=mxMarker.createMarker;mxMarker.createMarker=function(a,d,b,c,f,e,g,m,n,r){if(null!=b&&null==mxMarker.markers[b]){var u=this.getPackageForType(b);
+null!=u&&mxStencilRegistry.getStencil(u)}return h.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){w.value=Math.max(1,Math.min(h,Math.max(parseInt(w.value),parseInt(k.value))));k.value=Math.max(1,Math.min(h,Math.min(parseInt(w.value),parseInt(k.value))))}function c(d){function b(d,b,f){var e=d.getGraphBounds(),g=0,h=0,m=da.get(),n=1/d.pageScale,r=v.checked;if(r)var n=parseInt(W.value),t=parseInt(P.value),n=Math.min(m.height*t/(e.height/d.view.scale),m.width*n/(e.width/
+d.view.scale));else n=parseInt(p.value)/(100*d.pageScale),isNaN(n)&&(c=1/d.pageScale,p.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*c);m.height=Math.ceil(m.height*c);n*=c;!r&&d.pageVisible?(e=d.getPageLayout(),g-=e.x*m.width,h-=e.y*m.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(d,n,m,0,g,h,r);b.pageSelector=!1;b.mathEnabled=!1;d=a.getCurrentFile();null!=d&&(b.title=d.getTitle());var u=b.writeHead;b.writeHead=function(d){u.apply(this,arguments);null!=a.editor.fontCss&&
+(d.writeln('<style type="text/css">'),d.writeln(a.editor.fontCss),d.writeln("</style>"))};if("undefined"!==typeof MathJax){var k=b.renderPage;b.renderPage=function(a,d,b,c,f,e){var g=k.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:g.className="geDisableMathJax";return g}}b.open(null,null,f,!0)}else{m=d.background;if(null==m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=r;b.appendGraph(d,n,g,h,f,!0)}return b}var c=parseInt(T.value)/100;isNaN(c)&&(c=1,T.value=
+"100 %");var c=.75*c,e=k.value,g=w.value,h=!r.checked,n=null;h&&(h=e==m&&g==m);if(!h&&null!=a.pages&&a.pages.length){var t=0,h=a.pages.length-1;r.checked||(t=parseInt(e)-1,h=parseInt(g)-1);for(var u=t;u<=h;u++){var l=a.pages[u],e=l==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,t=!1,z=null,x=null;null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(g=l.viewState.pageVisible,t=l.viewState.mathEnabled,z=l.viewState.background,
+x=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(t="0"!=l.mapping.diagramMap.get("mathEnabled"),z=l.mapping.diagramMap.get("background"),x=l.mapping.diagramMap.get("backgroundImage"),x=null!=x&&0<x.length?JSON.parse(x):null);e.background=z;e.backgroundImage=null!=x?new mxImage(x.src,x.width,x.height):null;e.pageVisible=g;e.mathEnabled=t;var q=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?u+1:q.apply(this,arguments)};document.body.appendChild(e.container);
+a.updatePageRoot(l);e.model.setRoot(l.root)}n=b(e,n,u!=h);e!=f&&e.container.parentNode.removeChild(e.container)}}else n=b(f);n.mathEnabled&&(h=n.wnd.document,h.writeln('<script type="text/x-mathjax-config">'),h.writeln("MathJax.Hub.Config({"),h.writeln('messageStyle: "none",'),h.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),h.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),h.writeln("TeX: {"),h.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),
+h.writeln("},"),h.writeln("tex2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("},"),h.writeln("asciimath2jax: {"),h.writeln('\tignoreClass: "geDisableMathJax"'),h.writeln("}"),h.writeln("});"),d&&(h.writeln("MathJax.Hub.Queue(function () {"),h.writeln("window.print();"),h.writeln("});")),h.writeln("\x3c/script>"),h.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&d&&PrintDialog.printPreview(n)}
+var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var h=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");
+r.setAttribute("name","pages-printdialog");n.appendChild(r);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));n.appendChild(g);mxUtils.br(n);var u=r.cloneNode(!0);r.setAttribute("checked","checked");u.setAttribute("value","range");n.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");n.appendChild(g);var k=document.createElement("input");k.style.cssText="margin:0 8px 0 8px;";k.setAttribute("value","1");k.setAttribute("type",
+"number");k.setAttribute("min","1");k.style.width="50px";n.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));n.appendChild(g);var w=k.cloneNode(!0);n.appendChild(w);mxEvent.addListener(k,"focus",function(){u.checked=!0});mxEvent.addListener(w,"focus",function(){u.checked=!0});mxEvent.addListener(k,"change",b);mxEvent.addListener(w,"change",b);if(null!=a.pages&&(h=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==a.pages[g]){m=g+
+1;k.value=m;w.value=m;break}k.setAttribute("max",h);w.setAttribute("max",h);1<h&&e.appendChild(n);var l=document.createElement("div");l.style.marginBottom="10px";var q=document.createElement("input");q.style.marginRight="8px";q.setAttribute("value","adjust");q.setAttribute("type","radio");q.setAttribute("name","printZoom");l.appendChild(q);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));l.appendChild(g);var p=document.createElement("input");p.style.cssText="margin:0 8px 0 8px;";
+p.setAttribute("value","100 %");p.style.width="50px";l.appendChild(p);mxEvent.addListener(p,"focus",function(){q.checked=!0});e.appendChild(l);var n=n.cloneNode(!1),v=q.cloneNode(!0);v.setAttribute("value","fit");q.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(v);n.appendChild(g);l=document.createElement("table");l.style.display="inline-block";var Q=document.createElement("tbody"),
+S=document.createElement("tr"),K=S.cloneNode(!0),H=document.createElement("td"),V=H.cloneNode(!0),L=H.cloneNode(!0),O=H.cloneNode(!0),X=H.cloneNode(!0),A=H.cloneNode(!0);H.style.textAlign="right";O.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";V.appendChild(W);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));L.appendChild(g);mxUtils.write(O,mxResources.get("fitToBy"));var P=W.cloneNode(!0);X.appendChild(P);mxEvent.addListener(W,"focus",function(){v.checked=!0});mxEvent.addListener(P,"focus",function(){v.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));A.appendChild(g);S.appendChild(H);S.appendChild(V);S.appendChild(L);K.appendChild(O);K.appendChild(X);K.appendChild(A);Q.appendChild(S);Q.appendChild(K);l.appendChild(Q);
+n.appendChild(l);e.appendChild(n);n=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));n.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var da=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);n.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));n.appendChild(g);
+var T=document.createElement("input");T.style.cssText="margin:0 8px 0 8px;";T.setAttribute("value","100 %");T.style.width="60px";n.appendChild(T);e.appendChild(n);g=document.createElement("div");g.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&g.appendChild(n);a.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
+l.className="geBtn",g.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),l.className="geBtn",g.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});l.className="geBtn gePrimaryBtn";g.appendChild(l);a.editor.cancelFirst||g.appendChild(n);e.appendChild(g);this.container=e};var m=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)):(m.apply(this,arguments),null!=this.mathEnabled&&
this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))}})();
(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,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;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
@@ -2715,15 +2715,15 @@ function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.r
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),g.innerHTML=e+"...",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&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
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.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};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 r=mxUtils.parseXml(d),h=this.editor.extractGraphModel(r.documentElement,
-null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(w){}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))}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;
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(n){}return!1};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 r=mxUtils.parseXml(d),h=this.editor.extractGraphModel(r.documentElement,
+null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(m){}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))}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 h=this.updatePageRoot(new DiagramPage(c[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),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,r,h,w,u,m,k){b=null!=b?b:this.editor.graph;r=null!=r?r:!1;m=null!=m?m:!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()){var p=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(p);if(b.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}k?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
-g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(w||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(h||!r&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
-App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,m,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var g=
-this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=g&&g.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(g.graphModel),g.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[e].node,c),g.needsUpdate=!1);d.appendChild(this.pages[e].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,r,h,w,u,m){r=null!=r?r:!0;w=null!=w?w:this.getXmlFileData(r,null!=h?h:!1);m=null!=m?m:this.getCurrentFile();
-h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=m&&/(\.svg)$/i.test(m.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var d=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(w,h,m,window.location.href,a,b,c,e,r,u);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
+function(a,b,c,e,r,h,m,u,k,t){b=null!=b?b:this.editor.graph;r=null!=r?r:!1;k=null!=k?k:!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()){var n=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(n);if(b.decompress(g)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(n)}t?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!r&&(m||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(h||!r&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,u,k,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d)));mxUtils.setTextContent(this.currentPage.node,c);d=this.fileNode.cloneNode(!1);if(b)d.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=
+this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[f].node,c),e.needsUpdate=!1);d.appendChild(this.pages[f].node)}}return d};EditorUi.prototype.getFileData=function(a,b,c,e,r,h,m,u,k){r=null!=r?r:!0;m=null!=m?m:this.getXmlFileData(r,null!=h?h:!1);k=null!=k?k:this.getCurrentFile();
+h=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=k&&/(\.svg)$/i.test(k.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var d=h.getGlobalVariable,f=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?f.getName():"pagenumber"==a?1:d.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(f.root)}a=this.createFileData(m,h,k,window.location.href,a,b,c,e,r,u);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
return a};EditorUi.prototype.getHtml=function(a,b,c,e,r,h){h=null!=h?h:!0;var d=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var d=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==r&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=r&&(r=r.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=r?' xmlns="http://www.w3.org/1999/xhtml">':
">")+"\n<head>\n"+(null==r?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=r?'<meta http-equiv="refresh" content="0;URL=\''+r+"'\"/>\n":"")+"</head>\n<body"+(null==r&&null!=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==r?'<script type="text/javascript" src="'+f+'">\x3c/script>':
@@ -2732,244 +2732,251 @@ this.currentPage));return(null==r?'\x3c!--[if IE]><meta http-equiv="X-UA-Compati
mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==r?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+r+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var d=null!=a&&0<a.length?
mxUtils.parseXml(a).documentElement:null;a=null!=d?this.editor.extractGraphModel(d,!0):null;null!=a&&(d=a);if(null!=d&&"mxfile"==d.nodeName&&(a=d.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=d;this.pages=[];for(d=0;d<a.length;d++){var b=new DiagramPage(a[d]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[d+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
0))];d=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=d&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(d);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,r,h,w){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,r));this.saveData(f,a,g,"text/xml")}else if("html"==
-a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,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!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(d,a,e,b,w);this.editor.graph.pageVisible=c;return f}catch(x){this.handleError(x)}}));else{var p=null,
-k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var l=this.editor.graph.background;if(w||l==mxConstants.NONE)l=null;var n=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
-k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,r){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a)||/(\.png)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,e,r,h,m){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,r));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,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!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(d,a,e,b,m);this.editor.graph.pageVisible=c;return f}catch(z){this.handleError(z)}}));else{var n=null,
+k=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(n)}))});if("svg"==a){var l=this.editor.graph.background;if(m||l==mxConstants.NONE)l=null;var q=this.editor.graph.getSvg(l,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(q);this.convertImages(q,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();
+k('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",n=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();k(a)}),e)}}catch(B){this.handleError(B)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,r){var d=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(d.width*d.height>MAX_AREA||c.length>
MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};d="0";if("xmlpng"==b&&(d="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}g=this.editor.graph.background;"png"==b&&r&&(g=mxConstants.NONE);return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&bg="+(null!=g?g:mxConstants.NONE)+"&base64="+e+"&embedXml="+d+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=
-function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);null!=
-window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();
-this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=window.console&&console.log("error in fileLoaded:",a,
-r);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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(f){}};
-EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,r,h,w){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(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){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=
-JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:
-null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g=this.convertDataUri(g),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
-"fixed"==e.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=
-this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:
-a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var m=k.parentNode.previousSibling;c=m.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&m.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var v=document.createElement("div");v.style.position="absolute";v.style.right="0px";v.style.top="0px";v.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(v.style.backgroundColor="inherit");m.style.position=
-"relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("valign","absmiddle");l.setAttribute("border","0");l.style.margin="0 3px";var n=null;if(".scratchpad"!=a.title||this.closableScratchpad)v.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=n?this.confirm(mxResources.get("allChangesLost"),
-null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var q=this.editor.graph,t=null,y=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),B=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=l.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",
-t.style.marginRight="2px",t.style.marginTop="-2px",v.insertBefore(t,v.firstChild),m.style.paddingRight=18*v.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),m.style.paddingRight=18*v.childNodes.length+"px")})):null==n&&(n=l.cloneNode(!1),n.setAttribute("src",IMAGE_PATH+"/download.png"),n.setAttribute("title",mxResources.get("save")),v.insertBefore(n,v.firstChild),mxEvent.addListener(n,"click",mxUtils.bind(this,
-function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==n||a.isModified()||(m.style.paddingRight=18*v.childNodes.length+"px",n.parentNode.removeChild(n),n=null)});mxEvent.consume(d)})),m.style.paddingRight=18*v.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,d,c,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var h=q.getCellGeometry(a[g]);null!=h&&h.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,
-d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);B(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),K=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=
-q.getSelectionCells(),b=q.view.getBounds(d),c=q.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=q.view.translate.x;b.y-=q.view.translate.y;C(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",
-k.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),k.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),
-q.isMouseDown=!1,q.autoScroll=!0,K(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
-(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
-0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,h,m,p,r,w,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,m,p),d)],d[0].vertex=!0,C(d,new mxRectangle(0,0,m,p),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var v=!1,l=mxUtils.bind(this,function(d,
-c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);B(a);this.spinner.stop();v=!0}catch(S){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),p=this.stringToCells(this.editor.graph.decompress(h)),r=this.editor.graph.getBoundingBoxFromGeometry(p);C(p,new mxRectangle(0,
-0,r.width,r.height),a)}v=!0}catch(S){null!=window.console&&console.log("error in drop handler:",S)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=r&&(/(\.vsdx)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r)||/(\.vsd)($|\?)/i.test(r))?this.importVisio(u,function(a){l(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,r)&&
-null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?l(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):l(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",k.style.cursor="");a.stopPropagation();
-a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));v.insertBefore(l,v.firstChild);mxEvent.addListener(l,"click",y);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&y(a)});c=l.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));v.insertBefore(c,v.firstChild);mxEvent.addListener(c,"click",K);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||
-(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),v.insertBefore(c,v.firstChild))}m.appendChild(v);m.style.paddingRight=18*v.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=4:("1"==urlParams.savesidebar&&
-(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat=
-"right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=
-3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultGraphBackground=
-null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxClient.IS_SVG&&(Editor.helpImage=
-"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
+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,h=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()),m()):this.handleError({message:mxResources.get("error")+" "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),
+m=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(h,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){m();h()}));m();h()}null!=b&&b()});if(null!=a.url){var e=a.url;/^https?:\/\//.test(e)&&!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(a.url));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&c(a)}))}else f(a.data)};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||
+c.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){editorUi.alert(a.tooltip)});return d}var b=null;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var c=this.editor.graph,e=c.getModel();e.beginUpdate();var h=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var m=e.getCell(a.getAttribute("id"));if(null!=m){try{var k=a.getAttribute("value");if(null!=k){var l=mxUtils.parseXml(k).documentElement;
+if(null!=l)if("1"==l.getAttribute("replace-value"))e.setValue(m,l);else for(var t=l.attributes,x=0;x<t.length;x++)c.setAttributeForCell(m,t[x].nodeName,0<t[x].nodeValue.length?t[x].nodeValue:null)}}catch(z){null!=window.console&&console.log("Error in value for "+m.id+": "+z)}try{var q=a.getAttribute("style");null!=q&&c.model.setStyle(m,q)}catch(z){null!=window.console&&console.log("Error in style for "+m.id+": "+z)}try{var p=a.getAttribute("icon");if(null!=p){var v=0<p.length?JSON.parse(p):null;null!=
+v&&v.append||c.removeCellOverlays(m);null!=v&&c.addCellOverlay(m,d(v))}}catch(z){null!=window.console&&console.log("Error in icon for "+m.id+": "+z)}try{var B=a.getAttribute("geometry");if(null!=B){var B=JSON.parse(B),y=c.getCellGeometry(m);if(null!=y){y=y.clone();for(key in B){var C=parseFloat(B[key]);"dx"==key?y.x+=C:"dy"==key?y.y+=C:"dw"==key?y.width+=C:"dh"==key?y.height+=C:y[key]=parseFloat(B[key])}c.model.setGeometry(m,y)}}}catch(z){null!=window.console&&console.log("Error in icon for "+m.id+
+": "+z)}}}else if("model"==a.nodeName){for(var I=a.firstChild;null!=I&&I.nodeType!=mxConstants.NODETYPE_ELEMENT;)I=I.nextSibling;null!=I&&(new mxCodec(a.firstChild)).decode(I,e)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(c.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))c.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==a.nodeName&&(h=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):
+1);a=a.nextSibling}}finally{e.endUpdate()}null!=h&&this.chromelessResize&&this.chromelessResize(!0,h)}return b};EditorUi.prototype.fileLoaded=function(a){var d=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var c=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();
+this.editor.undoManager.clear();this.setBackgroundImage(null);null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();
+this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):
+this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));d=!0;this.isOffline()||null==a.getMode()||this.logEvent({category:"File",action:"open",label:a.getMode()});if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(r){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(r){}}catch(r){null!=
+window.console&&console.log("error in fileLoaded:",a,r);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=r&&null!=r.message?":err:"+encodeURIComponent(r.message):"")+(null!=r&&null!=r.stack?"&stack="+encodeURIComponent(r.stack):"")}catch(h){}this.handleError(r,mxResources.get("errorLoadingFile"),mxUtils.bind(this,
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):c()}))}else c();return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.logEvent=function(a){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.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(a,b,c,e,r,h,m){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,
+a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var 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){var d=mxUtils.parseXml(a.getData());if("mxlibrary"==d.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(d.documentElement));this.libraryLoaded(a,b,d.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&
+(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(d,b){if(0==d.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var c=
+0;c<d.length;c++){var e=d[c],g=e.data;if(null!=g){var g=this.convertDataUri(g),h="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(h+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(h+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!0))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!0)))}});if(null!=this.sidebar&&null!=
+b)for(var g=0;g<b.length;g++)mxUtils.bind(this,function(a){var d=a.data;null!=d&&null!=a.title?this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){d=this.convertDataUri(d);var b="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(b+="aspect=fixed;");return this.sidebar.createVertexTemplate(b+"image="+d,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&null!=a.title&&this.sidebar.addEntry(a.title,mxUtils.bind(this,function(){var d=this.stringToCells(this.editor.graph.decompress(a.xml));
+return this.sidebar.createVertexTemplateFromCells(d,a.w,a.h,a.title||"",!0,!1,!0)}))})(b[g]);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(d);var l=k.parentNode.previousSibling;c=l.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&l.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right="0px";t.style.top=
+"0px";t.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(t.style.backgroundColor="inherit");l.style.position="relative";var x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.setAttribute("valign","absmiddle");x.setAttribute("border","0");x.style.margin="0 3px";var q=null;if(".scratchpad"!=a.title||this.closableScratchpad)t.appendChild(x),mxEvent.addListener(x,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=q?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var p=this.editor.graph,v=null,B=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),y=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=v&&null!=v.parentNode&&v.parentNode.removeChild(v),v=x.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",t.insertBefore(v,t.firstChild),l.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=v&&null!=v.parentNode&&(v.parentNode.removeChild(v),l.style.paddingRight=18*t.childNodes.length+"px")})):null==q&&(q=x.cloneNode(!1),q.setAttribute("src",IMAGE_PATH+"/download.png"),q.setAttribute("title",
+mxResources.get("save")),t.insertBefore(q,t.firstChild),mxEvent.addListener(q,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==q||a.isModified()||(l.style.paddingRight=18*t.childNodes.length+"px",q.parentNode.removeChild(q),q=null)});mxEvent.consume(d)})),l.style.paddingRight=18*t.childNodes.length+"px")}),C=mxUtils.bind(this,function(a,d,c,e){a=p.cloneCells(mxUtils.sortCells(p.model.getTopmostCells(a)));for(var g=
+0;g<a.length;g++){var h=p.getCellGeometry(a[g]);null!=h&&h.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&(a.title=e);b.push(a);y(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),I=mxUtils.bind(this,function(a){if(p.isSelectionEmpty())p.getRubberband().isActive()?(p.getRubberband().execute(a),
+p.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=p.getSelectionCells(),b=p.view.getBounds(d),c=p.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=p.view.translate.x;b.y-=p.view.translate.y;C(d,b)}mxEvent.consume(a)});k.style.border="3px solid transparent";mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility=
+"hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)",k.style.cursor="copy",p.panningManager.stop(),p.autoScroll=!1,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!1),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.panningManager&&null!=p.graphHandler&&(k.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),
+k.style.cursor="default",this.sidebar.showTooltips=!0,p.panningManager.stop(),p.graphHandler.reset(),p.isMouseDown=!1,p.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){p.isMouseDown&&null!=p.graphHandler.shape&&(p.graphHandler.shape.node.style.visibility="visible",k.style.border="3px solid transparent",k.style.cursor="",p.autoScroll=!0,null!=p.graphHandler.guide&&p.graphHandler.guide.setVisible(!0),null!=p.graphHandler.hint&&(p.graphHandler.hint.style.visibility=
+"visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":k.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.border="3px solid transparent";k.style.cursor="";null!=f&&(f.style.border=
+"3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,g,h,m,n,r,t,u){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,m,n),d)],d[0].vertex=!0,C(d,new mxRectangle(0,0,m,n),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&
+0<b.length&&(f.parentNode.removeChild(f),f=null);else{var l=!1,q=mxUtils.bind(this,function(d,c){if(null!=d&&"text/xml"==c){var g=mxUtils.parseXml(d);if("mxlibrary"==g.documentElement.nodeName)try{var h=JSON.parse(mxUtils.getTextContent(g.documentElement));e(h,k);b=b.concat(h);y(a);this.spinner.stop();l=!0}catch(T){}else if("mxfile"==g.documentElement.nodeName)try{for(var m=g.documentElement.getElementsByTagName("diagram"),g=0;g<m.length;g++){var h=mxUtils.getTextContent(m[g]),n=this.stringToCells(this.editor.graph.decompress(h)),
+r=this.editor.graph.getBoundingBoxFromGeometry(n);C(n,new mxRectangle(0,0,r.width,r.height),a)}l=!0}catch(T){null!=window.console&&console.log("error in drop handler:",T)}}l||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=r&&(/(\.vsdx?)($|\?)/i.test(r)||/(\.vssx)($|\?)/i.test(r))?this.importVisio(u,function(a){q(a,"text/xml")},null,r):!this.isOffline()&&(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,r)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(k.style.border="3px solid transparent",
+k.style.cursor="");a.stopPropagation();a.preventDefault()}));x=x.cloneNode(!1);x.setAttribute("src",IMAGE_PATH+"/edit.gif");x.setAttribute("title",mxResources.get("edit"));t.insertBefore(x,t.firstChild);mxEvent.addListener(x,"click",B);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==k&&B(a)});c=x.cloneNode(!1);c.setAttribute("src",Editor.plusImage);c.setAttribute("title",mxResources.get("add"));t.insertBefore(c,t.firstChild);mxEvent.addListener(c,"click",I);this.isOffline()||".scratchpad"!=
+a.title||null==EditorUi.scratchpadHelpLink||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(a)})),t.insertBefore(c,t.firstChild))}l.appendChild(t);l.style.paddingRight=18*t.childNodes.length+"px"}};"1"==urlParams.offline||EditorUi.isElectronApp?EditorUi.prototype.footerHeight=
+4:("1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position=
+"relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),
+Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",
+Graph.prototype.defaultGraphBackground=null,Graph.prototype.defaultPageBorderColor="#505759",Graph.prototype.svgShadowColor="#e0e0e0",Graph.prototype.svgShadowOpacity="0.6",Graph.prototype.svgShadowSize="0.8",Graph.prototype.svgShadowBlur="1.4",Format.prototype.inactiveTabBackgroundColor="black",BaseFormatPanel.prototype.buttonBackgroundColor="#2a2a2a",Sidebar.prototype.dragPreviewBorder="1px dashed #cccccc",mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor=
+"#cccccc",mxClient.IS_SVG&&(Editor.helpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=",Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg=="))};
EditorUi.initTheme();EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showFooter=function(a){var d=document.getElementById("geFooter");null!=d&&(this.footerHeight=a,d.style.display="inline",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,e,r){a=new ImageDialog(this,a,b,c,e,r);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,
!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var 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,r){a=new LibraryDialog(this,a,b,c,e,r);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==
this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,
function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){d();f.retry()}),"undefined"!=
typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),
a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,c,g)}else null!=c&&c()};EditorUi.prototype.showError=
-function(a,b,c,e,r,h,k,u,m,v,l,n){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,r,h,k,n,u,m);this.showDialog(a.container,v||340,l||150,!0,!1);a.init()};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,r){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=
+function(a,b,c,e,r,h,m,k,l,t,q,p){a=new ErrorDialog(this,a,b,c||mxResources.get("ok"),e,r,h,m,p,k,l);this.showDialog(a.container,t||340,q||150,!0,!1);a.init()};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,r){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){d();null!=
b&&b()},function(){d();null!=c&&c()},e,r)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,
b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,f=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(f,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&
(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,r){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)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var d=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],
-10):!1)?!1:f;if(f||this.isOffline()){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(m){}}else this.createEchoRequest(a,b,c,e,r).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,r,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
-c?"&mime="+c:"")+(null!=r?"&format="+r:"")+(null!=h?"&base64="+h:"")+(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),g=Array(e),k=0;k<e;++k){for(var u=1024*k,m=Math.min(u+1024,c),v=Array(m-u),l=0;u<m;++l,++u)v[l]=d[u].charCodeAt(0);g[k]=new Uint8Array(v)}return new Blob(g,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,r,h,k){h=null!=h?h:!1;k=null!=k?k:"vsdx"!=r&&
-(!mxClient.IS_IOS||!navigator.standalone);r=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);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(F){this.handleError(F)}}))}catch(D){this.handleError(D)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,k,null,1<r,4<r&&(!h||6>r)?3:4,a,c,e);this.showDialog(b.container,420,r==(mxClient.IS_IOS?0:1)?160:4<r?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
+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(w){}}else this.createEchoRequest(a,b,c,e,r).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,r,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+c?"&mime="+c:"")+(null!=r?"&format="+r:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),m=0;m<f;++m){for(var k=1024*m,l=Math.min(k+1024,c),t=Array(l-k),q=0;k<l;++q,++k)t[q]=d[k].charCodeAt(0);e[m]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,k,h,m){h=null!=h?h:!1;m=null!=m?m:"vsdx"!=k&&
+(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,e);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(F){this.handleError(F)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,m,null,1<k,4<k&&(!h||6>k)?3:4,a,c,e);this.showDialog(b.container,420,k==(mxClient.IS_IOS?0:1)?160:4<k?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
window.open("about:blank");null==d?mxUtils.popup(a,!0):("image/svg+xml"==b?d.document.write("<html>"+a+"</html>"):d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=
null;var 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";
+this.exportDialog.style.zIndex=c.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";
a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",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"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,r){this.isLocalFileSave()?this.saveLocalFile(c,a,e,r,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,r,b,d)}),c,r,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,r,h,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);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){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,d,c)}catch(G){this.handleError(G)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&
-299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(G){this.handleError(G)}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,4<d?3:4,e,h,r);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
-EditorUi.prototype.exportFile=function(a,b,c,e,r,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,r,h,k,l,m){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,k,l,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",
-p=mxUtils.bind(this,function(a){this.spinner.stop();r&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,m));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,r,h){h=null!=h?h:!0;var d=
-document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),r||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(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 g=document.createElement("select");g.style.width="120px";g.style.marginLeft="8px";g.style.marginRight="10px";g.className="geBtn";c=document.createElement("option");c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));g.appendChild(c);c=document.createElement("option");
-c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");g.appendChild(c);a.appendChild(g);mxEvent.addListener(g,"change",mxUtils.bind(this,function(){if("custom"==g.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:g.value="blank"},mxResources.get("url"),null,null,null,null,function(){g.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||
-b.checked)?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===g.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return g}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=g&&g!=mxConstants.NONE?"border:1px solid black;background-color:"+g:"background-position:center center;background-repeat:no-repeat;background-image:url('"+
+Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,k){this.isLocalFileSave()?this.saveLocalFile(c,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,k,b,d)}),c,k,e)};EditorUi.prototype.saveRequest=function(a,b,c,e,k,h,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);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){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,d,c)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&
+299>=f.getStatus())try{this.exportFile(f.getText(),a,h,!0,d,c)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,m,null,1<d,4<d?3:4,e,h,k);this.showDialog(a.container,380,d==(mxClient.IS_IOS?0:1)?160:4<d?390:270,!0,!0);a.init()};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};
+EditorUi.prototype.exportFile=function(a,b,c,e,k,h){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,k,h,m,l,q){if(this.spinner.spin(document.body,mxResources.get("export"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;d=b?null:this.editor.graph.background;d==mxConstants.NONE&&(d=null);null==d&&0==b&&(d="#ffffff");var f=this.editor.graph.getSvg(d,a,m,l,null,c);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",
+n=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,q));if(null!=this.editor.fontCss){var d=a.ownerDocument,d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"style"):d.createElement("style");d.setAttribute("type","text/css");mxUtils.setTextContent(d,this.editor.fontCss);a.getElementsByTagName("defs")[0].appendChild(d)}var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,n,this.thumbImageCache)):n(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,e,k,h){h=null!=h?h:!0;var d=
+document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type","checkbox");c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");h&&(a.appendChild(d),c=document.createElement("span"),mxUtils.write(c,b),a.appendChild(c),k||mxUtils.br(a),mxEvent.addListener(c,"click",mxUtils.bind(this,function(a){"disabled"!=d.getAttribute("disabled")&&(d.checked=!d.checked,mxEvent.consume(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(){m.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 g="#0000ff",k=null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(g||"none",function(a){g=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 g},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,k,h,l,u){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!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?c="#U"+encodeURIComponent(l):(d=this.getCurrentFile(),u||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?
+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",m=null,m=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(a)}));d();m.style.padding=
+mxClient.IS_FF?"4px 2px 4px 2px":"4px";m.style.marginLeft="4px";m.style.height="22px";m.style.width="22px";m.style.position="relative";m.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";m.className="geColorBtn";a.appendChild(m);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,e,k,h,m,l){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!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=m?c="#U"+encodeURIComponent(m):(d=this.getCurrentFile(),l||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?
this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+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)?"https://www.draw.io/":"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,
-b,c,e,k,h,l,u,m,v,n){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==e&&(d.target=e);m||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];l&&(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);u&&c.push("layers");0<c.length&&(m&&c.push("lightbox"),d.toolbar=c.join(" "));null!=v&&0<v.length&&(d.edit=v);null!=
-a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";n(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
-'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,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 p=document.createElement("input");p.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","type-embedhtmldialog");f=p.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(m);mxUtils.br(g);g.appendChild(p);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));g.appendChild(m);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(m=
-document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),g.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));f.setAttribute("checked","checked");null==c&&p.setAttribute("disabled","disabled");d.appendChild(g);var l=this.addLinkSection(d),n=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,
-":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";d.appendChild(q);var t=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,y=y=this.addCheckbox(d,mxResources.get("allPages"),g,!g),B=this.addCheckbox(d,mxResources.get("layers"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),K=this.addEditButton(d,C),x=K.getEditInput();
-x.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled");x.checked&&C.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(p.checked?c:null,n.checked,q.value,l.getTarget(),l.getColor(),t.checked,y.checked,B.checked,C.checked,K.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};
+b,c,e,k,h,m,l,q,t,x){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==e&&(d.target=e);q||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];m&&(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);l&&c.push("layers");0<c.length&&(q&&c.push("lightbox"),d.toolbar=c.join(" "));null!=t&&0<t.length&&(d.edit=t);null!=
+a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,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 n=document.createElement("input");n.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","type-embedhtmldialog");f=n.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var k=document.createElement("span");mxUtils.write(k,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(k);mxUtils.br(g);g.appendChild(n);k=document.createElement("span");mxUtils.write(k,mxResources.get("publicDiagramUrl"));g.appendChild(k);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==window.DriveFile&&(k=
+document.createElement("a"),k.style.paddingLeft="12px",k.style.color="gray",k.setAttribute("href","javascript:void(0);"),mxUtils.write(k,mxResources.get("share")),g.appendChild(k),mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));f.setAttribute("checked","checked");null==c&&n.setAttribute("disabled","disabled");d.appendChild(g);var l=this.addLinkSection(d),q=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,
+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value="100%";d.appendChild(p);var v=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(d,mxResources.get("allPages"),g,!g),y=this.addCheckbox(d,mxResources.get("layers"),!0),C=this.addCheckbox(d,mxResources.get("lightbox"),!0),I=this.addEditButton(d,C),z=I.getEditInput();
+z.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&C.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(n.checked?c:null,q.checked,p.value,l.getTarget(),l.getColor(),v.checked,B.checked,y.checked,C.checked,I.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};
EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,k,h){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",
-p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));p.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";p.appendChild(r);d.appendChild(p);r=document.createElement("a");
-r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));p.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
-this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,n=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,mxResources.get("height")+":"),n=document.createElement("input"),n.setAttribute("type","text"),n.style.width="50px",
-n.style.marginLeft="6px",n.style.marginBottom="10px",n.value=e+"px",d.appendChild(n),mxUtils.br(d);var q=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var B=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,B),K=C.getEditInput(),x=this.addCheckbox(d,mxResources.get("layers"),!0);x.style.marginLeft=K.style.marginLeft;x.style.marginBottom="16px";
-x.style.marginTop="8px";mxEvent.addListener(B,"change",function(){B.checked?(x.removeAttribute("disabled"),K.removeAttribute("disabled")):(x.setAttribute("disabled","disabled"),K.setAttribute("disabled","disabled"));K.checked&&B.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){k(q.getTarget(),q.getColor(),null==t?!0:t.checked,B.checked,C.getLink(),x.checked,null!=l?l.value:null,null!=
-n?n.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){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:4px";
-d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),p=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,m=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=m&&(m.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=p?p.checked:!1,null!=m?m.checked:!1)}),null,a,b);this.showDialog(a.container,
-300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,h,l,u){l=null!=l?l:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==u?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 r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width=
-"60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value=this.lastExportZoom||"100%";d.appendChild(r);mxUtils.write(d,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";d.appendChild(n);mxUtils.br(d);var w=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=
-u),q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),t=document.createElement("input");t.style.marginTop="16px";t.style.marginRight="8px";t.style.marginLeft="24px";t.setAttribute("disabled","disabled");t.setAttribute("type","checkbox");h&&(d.appendChild(t),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(q,"change",function(){q.checked?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(t.setAttribute("checked",
-"checked"),t.defaultChecked=!0);var K=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),x=document.createElement("input");x.style.marginTop="16px";x.style.marginRight="8px";x.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||x.setAttribute("disabled","disabled");b&&(d.appendChild(x),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=26);var E=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),l,null,null,"jpeg"!=u),z=null!=this.pages&&1<this.pages.length,
-J=this.addCheckbox(d,z?mxResources.get("allPages"):"",z,!z,null,"jpeg"!=u);J.style.marginLeft="24px";J.style.marginBottom="16px";z||(J.style.visibility="hidden");mxEvent.addListener(E,"change",function(){E.checked&&z?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});l&&z||J.setAttribute("disabled","disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=n.value;this.lastExportZoom=r.value;k(r.value,w.checked,!q.checked,K.checked,E.checked,x.checked,
-n.value,t.checked,!J.checked)}),null,c,e);this.showDialog(a.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){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 m=this.addCheckbox(d,mxResources.get("fit"),!0),p=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),r=this.addCheckbox(d,c),l=this.addCheckbox(d,mxResources.get("lightbox"),!0),n=this.addEditButton(d,l),q=n.getEditInput(),t=1<f.model.getChildCount(f.model.getRoot()),B=this.addCheckbox(d,mxResources.get("layers"),t,!t);B.style.marginLeft=q.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(l,"change",function(){l.checked?
-(t&&B.removeAttribute("disabled"),q.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&l.checked?n.getEditSelect().removeAttribute("disabled"):n.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(m.checked,p.checked,r.checked,l.checked,n.getLink(),B.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
-function(a,b,c,e,k,h,l,n){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('https://www.draw.io/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
-a&&(g+="max-width:100%;");var m="";c&&(m=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+d+'"'+m+(""!=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){n({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()):n({message:mxResources.get("unknownError")})}))}else n({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
-b,c,e,k,h,l){var d=this.editor.graph.getSvg(),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 r=" ",n="";e&&(r="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",n+="cursor:pointer;");a&&(n+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=n?' style="'+n+'"':"")+r+"/>")}))}else n="",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('https://www.draw.io/?client=1&lightbox=1"+
-(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),n+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),n+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=n&&d.setAttribute("style",n),l(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+
+n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var r=document.createElement("div");r.style.whiteSpace="normal";mxUtils.write(r,mxResources.get("linkAccountRequired"));n.appendChild(r);r=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));r.style.marginTop="12px";r.className="geBtn";n.appendChild(r);d.appendChild(n);r=document.createElement("a");
+r.style.paddingLeft="12px";r.style.color="gray";r.style.fontSize="11px";r.setAttribute("href","javascript:void(0);");mxUtils.write(r,mxResources.get("check"));n.appendChild(r);mxEvent.addListener(r,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));
+this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var l=null,q=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),l=document.createElement("input"),l.setAttribute("type","text"),l.style.marginRight="16px",l.style.width="50px",l.style.marginLeft="6px",l.style.marginRight="16px",l.style.marginBottom="10px",l.value="100%",d.appendChild(l),mxUtils.write(d,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",d.appendChild(q),mxUtils.br(d);var p=this.addLinkSection(d,h);c=null!=this.pages&&1<this.pages.length;var v=null;if(null==g||g.constructor!=window.DriveFile||b)v=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var y=this.addCheckbox(d,mxResources.get("lightbox"),!0),C=this.addEditButton(d,y),I=C.getEditInput(),z=this.addCheckbox(d,mxResources.get("layers"),!0);z.style.marginLeft=I.style.marginLeft;z.style.marginBottom="16px";
+z.style.marginTop="8px";mxEvent.addListener(y,"change",function(){y.checked?(z.removeAttribute("disabled"),I.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"));I.checked&&y.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){k(p.getTarget(),p.getColor(),null==v?!0:v.checked,y.checked,C.getLink(),z.checked,null!=l?l.value:null,null!=
+q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=l?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):p.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e){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:4px";
+d.appendChild(f);var g=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),n=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,k=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!g.checked,null!=n?n.checked:!1,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,
+300,e?100:186,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,h,m,l){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==l?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width=
+"60px";r.style.marginLeft="4px";r.style.marginRight="12px";r.value=this.lastExportZoom||"100%";d.appendChild(r);mxUtils.write(d,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";d.appendChild(u);mxUtils.br(d);var q=this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=
+l),p=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft="24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");h&&(d.appendChild(v),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(p,"change",function(){p.checked?v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(v.setAttribute("checked",
+"checked"),v.defaultChecked=!0);var I=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(d.appendChild(z),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=26);var N=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=l),E=null!=this.pages&&1<this.pages.length,
+J=this.addCheckbox(d,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=l);J.style.marginLeft="24px";J.style.marginBottom="16px";E||(J.style.visibility="hidden");mxEvent.addListener(N,"change",function(){N.checked&&E?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")});m&&E||J.setAttribute("disabled","disabled");a=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=u.value;this.lastExportZoom=r.value;k(r.value,q.checked,!p.checked,I.checked,N.checked,z.checked,
+u.value,v.checked,!J.checked)}),null,c,e);this.showDialog(a.container,340,g,!0,!0);r.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?r.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){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 n=this.addCheckbox(d,mxResources.get("fit"),!0),r=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(d,c),q=this.addCheckbox(d,mxResources.get("lightbox"),!0),p=this.addEditButton(d,q),v=p.getEditInput(),B=1<f.model.getChildCount(f.model.getRoot()),y=this.addCheckbox(d,mxResources.get("layers"),B,!B);y.style.marginLeft=v.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(q,"change",function(){q.checked?
+(B&&y.removeAttribute("disabled"),v.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"));v.checked&&q.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,r.checked,l.checked,q.checked,p.getLink(),y.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(a,b,c,e,k,h,m,l){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('https://www.draw.io/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");
+a&&(g+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+d+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,mxUtils.bind(this,function(a){l({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),
+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 n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):l({message:mxResources.get("unknownError")})}))}else l({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(a,
+b,c,e,k,h,m){var d=this.editor.graph.getSvg(),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var r=" ",l="";e&&(r="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=l?' style="'+l+'"':"")+r+"/>")}))}else l="",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('https://www.draw.io/?client=1&lightbox=1"+
+(k?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),l+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","0 0 "+a+" "+b),l+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=l&&d.setAttribute("style",l),m(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.convertMath=function(a,b,c,e){e()};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&&(c=b.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(h){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),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));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(v){null!=b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,c,e,k,h,l){l=b.background;l==mxConstants.NONE&&(l=null);b=b.getSvg(l,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,h,l,n,m){m=null!=m?m:"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,k?this.getFileData(!0,null,null,null,c,n):null,m)}catch(F){"Invalid image"==F.message?this.downloadFile(m):this.handleError(F)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,l)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},h=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var h=
-b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var k=1;k<b.length;k++){var l=b[k].indexOf(")"),m=null,n=b[k].indexOf("format(",l);0<n&&(m=d(b[k].substring(n+7,b[k].indexOf(")",n))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==m||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==m||"embedded-opentype"==m||/(\.otf)($|\?)/i.test(a))d=
-"application/x-font-opentype";else if("woff"==m||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==m||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==m||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==m||/(\.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){e[a]=d;c--;h()}),mxUtils.bind(this,
-function(a){c--;h()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[k].substring(0,l)),m)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,h,l,n,m,v,q,t,G,H){h=null!=h?h:!0;t=null!=t?t:this.editor.graph;G=null!=G?G:0;var d=m?null:t.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==m&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(t.getSvg(d,null,null,H,null,null!=l?l:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
-function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));n=null!=n?n:1;null!=b&&(n=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(n*g)+2*G;m=Math.ceil(n*m)+2*G;f.setAttribute("width",g);f.setAttribute("height",m);var p=f.getContext("2d");null!=d&&(p.beginPath(),p.rect(0,0,g,m),p.fillStyle=d,p.fill());p.scale(n,n);mxClient.IS_SF?window.setTimeout(function(){p.drawImage(e,G/n,G/n);a(f)},0):(p.drawImage(e,G/n,G/n),a(f))}catch(V){null!=
-k&&k(V)}});e.onerror=function(a){null!=k&&k(a)};try{v&&this.editor.graph.addSvgShadow(c);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(t,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(x){null!=k&&k(x)}}),c,q)};EditorUi.prototype.createImageUrlConverter=
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,c,e,k,h,m){m=b.background;m==mxConstants.NONE&&(m=null);b=b.getSvg(m,null,null,null,null,h);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=k)this.convertImages(b,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,e,k,h,m,l,q){q=null!=q?q:"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,k?this.getFileData(!0,null,null,null,c,l):null,q)}catch(F){"Invalid image"==F.message?this.downloadFile(q):this.handleError(F)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,h,m)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var d=function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")},b=this.editor.fontCss.split("url("),c=0,e={},h=mxUtils.bind(this,function(){if(0==c){for(var f=[b[0]],g=1;g<b.length;g++){var h=
+b[g].indexOf(")");f.push('url("');f.push(e[d(b[g].substring(0,h))]);f.push('"'+b[g].substring(h))}this.editor.resolvedFontCss=f.join("");a()}});if(0<b.length)for(var m=1;m<b.length;m++){var k=b[m].indexOf(")"),l=null,t=b[m].indexOf("format(",k);0<t&&(l=d(b[m].substring(t+7,b[m].indexOf(")",t))));mxUtils.bind(this,function(a){if(null==e[a]){e[a]=a;c++;var d="application/x-font-ttf";if("svg"==l||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==l||"embedded-opentype"==l||/(\.otf)($|\?)/i.test(a))d=
+"application/x-font-opentype";else if("woff"==l||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==l||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==l||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==l||/(\.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){e[a]=d;c--;h()}),mxUtils.bind(this,
+function(a){c--;h()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[m].substring(0,k)),l)}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,h,m,l,q,t,p,v,D,G){h=null!=h?h:!0;v=null!=v?v:this.editor.graph;D=null!=D?D:0;var d=q?null:v.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==q&&(d=this.editor.graph.defaultPageBackgroundColor);this.convertImages(v.getSvg(d,null,null,G,null,null!=m?m:!0),mxUtils.bind(this,function(c){var e=new Image;e.onload=mxUtils.bind(this,
+function(){try{var f=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));l=null!=l?l:1;null!=b&&(l=h?Math.min(1,Math.min(3*b/(4*m),b/g)):b/g);g=Math.ceil(l*g)+2*D;m=Math.ceil(l*m)+2*D;f.setAttribute("width",g);f.setAttribute("height",m);var n=f.getContext("2d");null!=d&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=d,n.fill());n.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){n.drawImage(e,D/l,D/l);a(f)},0):(n.drawImage(e,D/l,D/l),a(f))}catch(R){null!=
+k&&k(R)}});e.onerror=function(a){null!=k&&k(a)};try{t&&this.editor.graph.addSvgShadow(c);var f=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,c,!0,mxUtils.bind(this,function(){e.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(f)}catch(z){null!=k&&k(z)}}),c,p)};EditorUi.prototype.createImageUrlConverter=
function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.isCorsEnabledForUrl(d)?"chrome-extension://"!=d.substring(0,19)&&(d=b.apply(this,arguments)):d=PROXY_URL+"?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==
-e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),k=0;k<h.length;k++)mxUtils.bind(this,function(c){var h=e.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=f[h];null==m?(d++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=h&&c.setAttribute(g,h)})(h[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=
+e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var h=a.getElementsByTagName(c),m=0;m<h.length;m++)mxUtils.bind(this,function(c){var h=e.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var m=f[h];null==m?(d++,this.convertImageToDataUri(h,function(e){null!=e&&(f[h]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,m)}else null!=h&&c.setAttribute(g,h)})(h[m])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=
function(a,b,c,e,k,h){try{var d=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(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("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(m){null!=c&&c(m)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
+String.fromCharCode(a[f]);e=e.join("")}h=null!=h?h:"data:image/png;base64,";e=h+this.base64Encode(e)}b(e)}}else null!=c&&c({code:App.ERROR_UNKNOWN},a)}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},d,this.timeout,function(){k&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(w){null!=c&&c(w)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(a)||
"https://raw.githubusercontent.com/"===a.substring(0,34)||"https://cdn.rawgit.com/"===a.substring(0,23)||"https://rawgit.com/"===a.substring(0,19)||/^https?:\/\/[^\/]*\.iconfinder.com\//.test(a)||/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(a)||/^https?:\/\/[^\/]*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b(this.svgBrokenImage.src)});else{var d=new Image,
-c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(w){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),m=this.editor.extractGraphModel(g.documentElement,
-null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var p=m.getElementsByTagName("diagram");if(1==p.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(p[0]))).documentElement;else if(1<p.length){f.model.beginUpdate();try{for(a=0;a<p.length;a++){var l=this.updatePageRoot(new DiagramPage(p[a])),r=this.pages.length;null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[r+1]));f.model.execute(new ChangePage(this,l,l,r))}}finally{f.model.endUpdate()}}}null!=m&&"mxGraphModel"===
-m.nodeName&&(d=f.importGraphModel(m,b,c,e))}}catch(G){throw k||this.handleError(G,mxResources.get("invalidOrMissingFile")),G;}return d};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)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType=
-"blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,b,c)}catch(u){c(u)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(u){c(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(g){this.handleError(g)}});
-"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(w){this.handleError(w)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
+c=this;this.crossOriginImages&&(d.crossOrigin="anonymous");d.onload=function(){var a=document.createElement("canvas"),e=a.getContext("2d");a.height=d.height;a.width=d.width;e.drawImage(d,0,0);try{b(a.toDataURL())}catch(m){b(c.svgBrokenImage.src)}};d.onerror=function(){b(c.svgBrokenImage.src)};d.src=a}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),n=this.editor.extractGraphModel(g.documentElement,
+null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var l=n.getElementsByTagName("diagram");if(1==l.length)n=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(l[0]))).documentElement;else if(1<l.length){f.model.beginUpdate();try{for(a=0;a<l.length;a++){var r=this.updatePageRoot(new DiagramPage(l[a])),q=this.pages.length;null==r.getName()&&r.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,r,r,q))}}finally{f.model.endUpdate()}}}null!=n&&"mxGraphModel"===
+n.nodeName&&(d=f.importGraphModel(n,b,c,e))}}catch(D){throw k||this.handleError(D,mxResources.get("invalidOrMissingFile")),D;}return d};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)if(/(\.vsd)($|\?)/i.test(e)&&null!=VSD_CONVERT_URL){var d=new FormData;d.append("file1",a,e);var f=new XMLHttpRequest;f.open("POST",VSD_CONVERT_URL);f.responseType=
+"blob";f.onreadystatechange=mxUtils.bind(this,function(){if(4==f.readyState)if(200<=f.status&&299>=f.status)try{this.doImportVisio(f.response,b,c)}catch(u){c(u)}else c({})});f.send(d)}else try{this.doImportVisio(a,b,c)}catch(u){c(u)}});this.doImportVisio||this.loadingExtensions||this.isOffline()?d():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",d))};EditorUi.prototype.exportVisio=function(){var a=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams()}catch(f){this.handleError(f)}});
+"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline()?a():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",a))};EditorUi.prototype.importLucidChart=function(a,b,c,e,k){var d=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,e,k)}catch(m){this.handleError(m)}finally{null!=k&&k()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(d,0):(this.loadingExtensions=!0,"1"==urlParams.dev?
mxscript("js/diagramly/Extensions.js",d):mxscript("js/extensions.min.js",d))};EditorUi.prototype.insertLucidChart=function(a,b,c,e,k){k=JSON.parse(a);a=[];if(null!=k.state){k=JSON.parse(k.state);for(var d in k.Pages)a.push(k.Pages[d]);a.sort(function(a,d){return a.Properties.Order<d.Properties.Order?-1:a.Properties.Order>d.Properties.Order?1:0})}else a.push(k);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,e),null!=this.pages){var f=this.currentPage;
-for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,h,l){h=null!=h?h:!0;l=null!=l?l:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
+for(b=1;b<a.length;b++)this.insertPage(),this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,e,k,h,m){h=null!=h?h:!0;m=null!=m?m:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(k||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var d=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,c,h,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),g=this.importXml(f,b,c,h,!0),0<g.length)return g}catch(D){}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)+";"))}),l,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/
+1)),g=this.importXml(f,b,c,h,!0),0<g.length)return g}catch(x){}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)+";"))}),m,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/e.width,this.maxImageSize/
e.height)),g=Math.round(e.width*f);e=Math.round(e.height*f);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=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,h);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,h);else{d=this.editor.graph;k=null;d.getModel().beginUpdate();try{k=d.insertVertex(d.getDefaultParent(),null,"",d.snap(b),d.snap(c),1,1,"text;"+(e?"html=1;":"")),d.fireEvent(new mxEventObject("textInserted","cells",[k])),k.value=
a,d.updateCellSize(k),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(k.value)&&d.setLinkForCell(k,k.value),k.geometry.width+=d.gridSize,k.geometry.height+=d.gridSize}finally{d.getModel().endUpdate()}return[k]}}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.importFile=function(a,b,c,e,k,h,l,n,m,v,q){v=null!=v?v:!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,l)):d=this.importXml(a,c,e,v);null!=n&&n(d)});"image"==b.substring(0,5)?(m=!1,"image/png"==b.substring(0,9)&&(b=q?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,v),m=!0)),m||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,v);null!=n&&n(a)})):null!=m&&null!=l&&(/(\.vsdx)($|\?)/i.test(l)||/(\.vssx)($|\?)/i.test(l)||/(\.vsd)($|\?)/i.test(l))?(d=!0,this.importVisio(m,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,l)?(d=!0,this.parseFile(null!=m?m:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&
-(200<=a.status&&299>=a.status?g(a.responseText):null!=n&&n(null))}),l)):/(\.vsd)($|\?)/i.test(l)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,v));d||null==n||n(f);return f};EditorUi.prototype.base64Encode=function(a){for(var d="",b=0,c=a.length,e,h,k;b<c;){e=a.charCodeAt(b++)&255;if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);d+="==";break}h=a.charCodeAt(b++);
-if(b==c){d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);d+="=";break}k=a.charCodeAt(b++);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&
-15)<<2|(k&192)>>6);d+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return d};EditorUi.prototype.importFiles=function(a,b,c,e,k,h,l,n,m,v,q,t){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=q||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>p){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph,
-m=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,h,m,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,e,f,g,h,m,k,d,t)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,r=p,u=[],w=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--r){this.spinner.stop();if(null!=n)n(u);else{var d=[];g.getModel().beginUpdate();
-try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}h(d)}}),D=0;D<p;D++)mxUtils.bind(this,function(d){var h=a[d],p=new FileReader;p.onload=mxUtils.bind(this,function(a){if(null==l||l(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var p=a.target.result,n=p.indexOf(","),r=decodeURIComponent(escape(atob(p.substring(n+1)))),x=mxUtils.parseXml(r),r=x.getElementsByTagName("svg");if(0<r.length){var r=r[0],u=t?null:r.getAttribute("content");
-null!=u&&"<"!=u.charAt(0)&&"%"!=u.charAt(0)&&(u=unescape(window.atob?atob(u):Base64.decode(u,!0)));null!=u&&"%"==u.charAt(0)&&(u=decodeURIComponent(u));null==u||"<mxfile "!==u.substring(0,8)&&"<mxGraphModel "!==u.substring(0,14)?w(d,mxUtils.bind(this,function(){try{if(p.substring(0,n+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var l=a[0],r=parseFloat(l.getAttribute("width")),q=parseFloat(l.getAttribute("height")),v=l.getAttribute("viewBox");if(null==v||0==v.length)l.setAttribute("viewBox",
-"0 0 "+r+" "+q);else if(isNaN(r)||isNaN(q)){var u=v.split(" ");3<u.length&&(r=parseFloat(u[2]),q=parseFloat(u[3]))}p=this.createSvgDataUri(mxUtils.getXml(l));var w=Math.min(1,Math.min(e/Math.max(1,r)),e/Math.max(1,q)),t=k(p,h.type,b+d*m,c+d*m,Math.max(1,Math.round(r*w)),Math.max(1,Math.round(q*w)),h.name,f);if(isNaN(r)||isNaN(q)){var z=new Image;z.onload=mxUtils.bind(this,function(){r=Math.max(1,z.width);q=Math.max(1,z.height);t[0].geometry.width=r;t[0].geometry.height=q;l.setAttribute("viewBox",
-"0 0 "+r+" "+q);p=this.createSvgDataUri(mxUtils.getXml(l));var a=p.indexOf(";");0<a&&(p=p.substring(0,a)+p.substring(p.indexOf(",",a+1)));g.setCellStyles("image",p,[t[0]])});z.src=this.createSvgDataUri(mxUtils.getXml(l))}return t}}}catch(ra){}return null})):w(d,mxUtils.bind(this,function(){return k(u,"text/xml",b+d*m,c+d*m,0,0,h.name)}))}}else{r=!1;if("image/png"==h.type){var z=t?null:this.extractGraphModelFromPng(a.target.result);if(null!=z&&0<z.length){var D=new Image;D.src=a.target.result;w(d,
-mxUtils.bind(this,function(){return k(z,"text/xml",b+d*m,c+d*m,D.width,D.height,h.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,
-l,p){w(d,mxUtils.bind(this,function(){if(null!=g&&g.length<v){var n=f&&this.isResampleImage(a.target.result,q)?Math.min(1,Math.min(e/l,e/p)):1;return k(g,h.type,b+d*m,c+d*m,Math.round(l*n),Math.round(p*n),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,q)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,function(){return a})})});/(\.vsdx)($|\?)/i.test(h.name)||
-/(\.vssx)($|\?)/i.test(h.name)||/(\.vsd)($|\?)/i.test(h.name)?k(null,h.type,b+d*m,c+d*m,240,160,h.name,function(a){w(d,function(){return a})},h):"image"==h.type.substring(0,5)?p.readAsDataURL(h):p.readAsText(h)})(D)});g?this.confirmImageResize(function(a){f=a;u()},m):u()};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)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,h){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,
-h))try{var g=Math.max(d/k,f/k);if(1<g){var l=Math.round(d/g),p=Math.round(f/g),n=document.createElement("canvas");n.width=l;n.height=p;n.getContext("2d").drawImage(a,0,0,l,p);var r=n.toDataURL();if(r.length<b.length){var q=document.createElement("canvas");q.width=l;q.height=p;var t=q.toDataURL();r!==t&&(b=r,d=l,f=p)}}}catch(B){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=
-function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=m;m+=b;return a.substring(d,m)}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 m=0;if(d(a,8)!=String.fromCharCode(137)+
-"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,m);do{var l=f(a);if("IDAT"==d(a,4)){k=a.substring(0,m-8);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);k+=g(c.length)+b+c+g(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+l);d(a,l);d(a,4)}while(l);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,
-!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&
-"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(r){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&
-(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;c.addListener("pageLinkClicked",function(b,d){a(d.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<
-d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&
-this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var n=
-c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=n.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||
-null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var m=this.actions.get("print");m.setEnabled(!mxClient.IS_IOS||!navigator.standalone);m.visible=m.isEnabled();if(!this.editor.chromeless||this.editor.editable){var v=function(){window.setTimeout(function(){t.innerHTML="&nbsp;";t.focus();document.execCommand("selectAll",!1,
-null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=
-a.clipboardData||a.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 g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],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]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],
-h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(O){}}),!1);var t=document.createElement("div");t.style.position="absolute";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.display="block";t.contentEditable=!0;mxUtils.setOpacity(t,0);t.style.width="1px";t.style.height="1px";t.innerHTML="&nbsp;";var F=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,
-function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||F||(t.style.left=c.container.scrollLeft+10+"px",t.style.top=c.container.scrollTop+10+"px",c.container.appendChild(t),F=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){t.focus();document.execCommand("selectAll",!1,null)},0):(t.focus(),document.execCommand("selectAll",
-!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!F||224!=b&&17!=b&&91!=b||(F=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),t.parentNode.removeChild(t))}),0)}));mxEvent.addListener(t,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(t),v())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(t,!0),
-v())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,t);t.innerHTML="&nbsp;"}),0))}),!0);var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==t?!0:G.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||
-0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,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()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){m=document.createElement("div");m.style.position="absolute";m.style.top="95px";m.style.left="250px";m.style.width="2000px";m.style.height="30px";m.style.background="whiteSmoke";document.body.appendChild(m);var H=document.createElement("div");H.style.position="absolute";H.style.top="125px";H.style.left="220px";H.style.width=
-"30px";H.style.height="1000px";H.style.background="whiteSmoke";document.body.appendChild(H);var y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="220px";y.style.width="30px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);this.vRuler=new mxRuler(this.editor.graph,H,!0);this.hRuler=new mxRuler(this.editor.graph,m,!1)}if("1"==urlParams.test){m=document.getElementById("geFooter");null!=m&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),m.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var 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 B=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:B.apply(this,arguments)}}m=document.getElementById("geInfo");null!=m&&m.parentNode.removeChild(m);if(Graph.fileSupport&&
-(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,
-"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var m=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(k=b[0].getAttribute("href")));var l=!0,p=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,l))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){l=a;p()},mxEvent.isControlDown(a)):p()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,
-null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
-EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
-mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
-mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;
-if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.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){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===
-d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),g=!1;try{var k=e.lastIndexOf("%3E");0<=k&&k<e.length-3&&(e=e.substring(0,k+3))}catch(m){}try{var d=b.getElementsByTagName("span"),l=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);
-this.isCompatibleString(l)&&(g=!0,e=l)}catch(m){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(g||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,d,d)):(g=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,g.x+d,g.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&
-this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(m){}}}}};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?"https://www.draw.io/":"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 h=document.documentElement;c=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,
-e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=d+"px";h.style.width=Math.max(0,c-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
-var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var 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){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)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,
-e,b)});if(/(\.vsdx)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e)||/(\.vsd)($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(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('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));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(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(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))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),
-this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function 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),g=0;g<e;g++)this.addBasenamesForCell(c.model.getChildAt(a,g),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&
-(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
-this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
-function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=
-JSON.parse(h)}catch(z){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",
-value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,
-function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(z){k.postMessage(JSON.stringify({event:"draft",
-error:z.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var l=1==h.enableRecent,n=1==h.enableSearch,l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=h.callback?k.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,l?mxUtils.bind(this,function(a){this.recentReadyCallback=
-a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,n?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")});this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==
-h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==
-h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var r=this.editor.graph,u=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==
-a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));r!=this.editor.graph&&r.container.parentNode.removeChild(r.container);u(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var r=this.createTemporaryGraph(r.getStylesheet()),w=r.getGlobalVariable,x=this.pages[0];r.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?1:w.apply(this,arguments)};document.body.appendChild(r.container);
-r.model.setRoot(x.root)}this.exportToCanvas(mxUtils.bind(this,function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){t(null)}),null,null,null,null,null,null,r)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?u("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=
-h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),p.xml=mxUtils.getXml(l),p.data=this.getFileData(null,null,!0,null,null,null,l),p.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),p.data=this.getHtml(q,this.editor.graph),p.xml=mxUtils.getXml(q),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;
-l==mxConstants.NONE&&(l=null);p.xml=this.getFileData(!0);p.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(l),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(p),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));p.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(p),"*")}return}if("load"==h.action)c=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=
-h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(l),this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}}h=g(h);d=!0;try{a(h,f)}catch(z){this.handleError(z)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var E=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&
-1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=E();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=E();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||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):
-urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize=
-"12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
-a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),d=[];if(0<b.length){var c={},e=null,h=null,k="",l="auto",m="auto",n=null,q=null,t=40,G=40,H=0,y=this.editor.graph;
-y.getGraphBounds();for(var B=function(){y.setSelectionCells(S);y.scrollCellToVisible(y.getSelectionCell())},C=y.getFreeInsertPoint(),K=C.x,x=C.y,C=x,E=null,z="auto",J=[],V=null,Y=null,U=0;U<b.length&&"#"==b[U].charAt(0);){a=b[U];for(U++;U<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[U].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[U].substring(1)),U++;if("#"!=a.charAt(1)){var O=a.indexOf(":");if(0<O){var M=mxUtils.trim(a.substring(1,O)),I=mxUtils.trim(a.substring(O+1));"label"==M?E=y.sanitizeHtml(I):
-"style"==M?e=I:"identity"==M&&0<I.length&&"-"!=I?h=I:"namespace"==M&&0<I.length&&"-"!=I?k=I:"width"==M?l=I:"height"==M?m=I:"left"==M&&0<I.length?n=I:"top"==M&&0<I.length?q=I:"ignore"==M?Y=I.split(","):"connect"==M?J.push(JSON.parse(I)):"link"==M?V=I:"padding"==M?H=parseFloat(I):"edgespacing"==M?t=parseFloat(I):"nodespacing"==M?G=parseFloat(I):"layout"==M&&(z=I)}}}var R=this.editor.csvToArray(b[U]);a=null;if(null!=h)for(var L=0;L<R.length;L++)if(h==R[L]){a=L;break}null==E&&(E="%"+R[0]+"%");if(null!=
-J)for(var P=0;P<J.length;P++)null==c[J[P].to]&&(c[J[P].to]={});y.model.beginUpdate();try{for(L=U+1;L<b.length;L++){var X=this.editor.csvToArray(b[L]);if(X.length==R.length){var A=null,W=null!=a?k+X[a]:null;null!=W&&(A=y.model.getCell(W));null==A&&(A=new mxCell(E,new mxGeometry(K,C,0,0),e||"whiteSpace=wrap;html=1;"),A.vertex=!0,A.id=W);for(var N=0;N<X.length;N++)y.setAttributeForCell(A,R[N],X[N]);y.setAttributeForCell(A,"placeholders","1");A.style=y.replacePlaceholders(A,A.style);for(P=0;P<J.length;P++)c[J[P].to][A.getAttribute(J[P].to)]=
-A;null!=V&&"link"!=V&&(y.setLinkForCell(A,A.getAttribute(V)),y.setAttributeForCell(A,V,null));y.fireEvent(new mxEventObject("cellsInserted","cells",[A]));var Z=this.editor.graph.getPreferredSizeForCell(A);A.vertex&&(null!=n&&null!=A.getAttribute(n)&&(A.geometry.x=K+parseFloat(A.getAttribute(n))),null!=q&&null!=A.getAttribute(q)&&(A.geometry.y=x+parseFloat(A.getAttribute(q))),"@"==l.charAt(0)&&null!=A.getAttribute(l.substring(1))?A.geometry.width=parseFloat(A.getAttribute(l.substring(1))):A.geometry.width=
-"auto"==l?Z.width+H:parseFloat(l),"@"==m.charAt(0)&&null!=A.getAttribute(m.substring(1))?A.geometry.height=parseFloat(A.getAttribute(m.substring(1))):A.geometry.height="auto"==m?Z.height+H:parseFloat(m),C+=A.geometry.height+G);d.push(y.addCell(A))}}for(var aa=d.slice(),S=d.slice(),P=0;P<J.length;P++)for(var T=J[P],L=0;L<d.length;L++){var A=d[L],da=A.getAttribute(T.from);if(null!=da){y.setAttributeForCell(A,T.from,null);for(var na=da.split(","),N=0;N<na.length;N++){var ba=c[T.to][na[N]];null!=ba&&
-(E=T.label,null!=T.fromlabel&&(E=(A.getAttribute(T.fromlabel)||"")+(E||"")),null!=T.tolabel&&(E=(E||"")+(ba.getAttribute(T.tolabel)||"")),S.push(y.insertEdge(null,null,E||"",T.invert?ba:A,T.invert?A:ba,T.style||y.createCurrentEdgeStyle())),mxUtils.remove(T.invert?A:ba,aa))}}}if(null!=Y)for(L=0;L<d.length;L++)for(A=d[L],N=0;N<Y.length;N++)y.setAttributeForCell(A,mxUtils.trim(Y[N]),null);var ea=new mxParallelEdgeLayout(y);ea.spacing=t;var qa=function(){ea.execute(y.getDefaultParent());for(var a=0;a<
-d.length;a++){var b=y.getCellGeometry(d[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==l&&(b.width=Math.round(y.snap(b.width)));"auto"==m&&(b.height=Math.round(y.snap(b.height)))}};if("circle"==z){var ga=new mxCircleLayout(y);ga.resetEdges=!1;var ra=ga.isVertexIgnored;ga.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(d,a)};this.executeLayout(function(){ga.execute(y.getDefaultParent());qa()},!0,B);B=null}else if("horizontaltree"==z||"verticaltree"==
-z||"auto"==z&&S.length==2*d.length-1&&1==aa.length){y.view.validate();var ha=new mxCompactTreeLayout(y,"horizontaltree"==z);ha.levelDistance=G;ha.edgeRouting=!1;ha.resetEdges=!1;this.executeLayout(function(){ha.execute(y.getDefaultParent(),0<aa.length?aa[0]:null)},!0,B);B=null}else if("horizontalflow"==z||"verticalflow"==z||"auto"==z&&1==aa.length){y.view.validate();var ia=new mxHierarchicalLayout(y,"horizontalflow"==z?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ia.intraCellSpacing=G;
-ia.disableEdgeStyle=!1;this.executeLayout(function(){ia.execute(y.getDefaultParent(),S);y.moveCells(S,K,x)},!0,B);B=null}else if("organic"==z||"auto"==z&&S.length>d.length){y.view.validate();var ca=new mxFastOrganicLayout(y);ca.forceConstant=3*G;ca.resetEdges=!1;var ja=ca.isVertexIgnored;ca.isVertexIgnored=function(a){return ja.apply(this,arguments)||0>mxUtils.indexOf(d,a)};ea=new mxParallelEdgeLayout(y);ea.spacing=t;this.executeLayout(function(){ca.execute(y.getDefaultParent());qa()},!0,B);B=null}this.hideDialog()}finally{y.model.endUpdate()}null!=
-B&&B()}}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,440,130,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.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 h=b.init;b.init=function(){h.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 h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.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=0;null==this.drive&&"function"!==typeof window.DriveClient||
+" 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.importFile=function(a,b,c,e,k,h,m,l,q,t,p){t=null!=t?t:!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,m)):d=this.importXml(a,c,e,t);null!=l&&l(d)});"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=p?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,t),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(c=f.snap(c),e=f.snap(e)),f=[f.insertVertex(null,null,"",c,e,k,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+a+";")])):/(\.*<graphml )/.test(a)&&"undefined"!==typeof window.mxGraphMlCodec?(new mxGraphMlCodec).decode(a,mxUtils.bind(this,function(a){a=this.importXml(a,c,e,t);null!=l&&l(a)})):null!=q&&null!=m&&(/(\.vsdx?)($|\?)/i.test(m)||/(\.vssx)($|\?)/i.test(m))?(d=!0,this.importVisio(q,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&
+299>=a.status?g(a.responseText):null!=l&&l(null))}),m)):/(\.vsd)($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,t));d||null==l||l(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,h,m;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}h=a.charCodeAt(d++);if(d==c){b+=
+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);b+="=";break}m=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&
+15)<<2|(m&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(m&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,h,m,l,q,t,p,v){b=null!=b?b:0;c=null!=c?c:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var d=null!=b&&null!=c,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=p||this.resampleThreshold,r=0;r<a.length;r++)if("image/"==a[r].type.substring(0,6)&&a[r].size>n){g=!0;break}var u=mxUtils.bind(this,function(){var g=this.editor.graph,
+n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,h,m,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,e,f,g,h,m,k,d,v)});h=null!=h?h:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,r=q,u=[],x=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--r){this.spinner.stop();if(null!=l)l(u);else{var d=[];g.getModel().beginUpdate();
+try{for(var c=0;c<u.length;c++){var e=u[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}h(d)}}),w=0;w<q;w++)mxUtils.bind(this,function(d){var h=a[d],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==m||m(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=a.target.result,q=l.indexOf(","),r=decodeURIComponent(escape(atob(l.substring(q+1)))),u=mxUtils.parseXml(r),r=u.getElementsByTagName("svg");if(0<r.length){var r=r[0],z=v?null:r.getAttribute("content");
+null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(z,!0)));null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z));null==z||"<mxfile "!==z.substring(0,8)&&"<mxGraphModel "!==z.substring(0,14)?x(d,mxUtils.bind(this,function(){try{if(l.substring(0,q+1),null!=u){var a=u.getElementsByTagName("svg");if(0<a.length){var m=a[0],t=parseFloat(m.getAttribute("width")),r=parseFloat(m.getAttribute("height")),p=m.getAttribute("viewBox");if(null==p||0==p.length)m.setAttribute("viewBox",
+"0 0 "+t+" "+r);else if(isNaN(t)||isNaN(r)){var z=p.split(" ");3<z.length&&(t=parseFloat(z[2]),r=parseFloat(z[3]))}l=this.createSvgDataUri(mxUtils.getXml(m));var x=Math.min(1,Math.min(e/Math.max(1,t)),e/Math.max(1,r)),v=k(l,h.type,b+d*n,c+d*n,Math.max(1,Math.round(t*x)),Math.max(1,Math.round(r*x)),h.name,f);if(isNaN(t)||isNaN(r)){var E=new Image;E.onload=mxUtils.bind(this,function(){t=Math.max(1,E.width);r=Math.max(1,E.height);v[0].geometry.width=t;v[0].geometry.height=r;m.setAttribute("viewBox",
+"0 0 "+t+" "+r);l=this.createSvgDataUri(mxUtils.getXml(m));var a=l.indexOf(";");0<a&&(l=l.substring(0,a)+l.substring(l.indexOf(",",a+1)));g.setCellStyles("image",l,[v[0]])});E.src=this.createSvgDataUri(mxUtils.getXml(m))}return v}}}catch(ea){}return null})):x(d,mxUtils.bind(this,function(){return k(z,"text/xml",b+d*n,c+d*n,0,0,h.name)}))}}else{r=!1;if("image/png"==h.type){var E=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=E&&0<E.length){var w=new Image;w.src=a.target.result;x(d,
+mxUtils.bind(this,function(){return k(E,"text/xml",b+d*n,c+d*n,w.width,w.height,h.name)}));r=!0}}r||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,
+m,l){x(d,mxUtils.bind(this,function(){if(null!=g&&g.length<t){var q=f&&this.isResampleImage(a.target.result,p)?Math.min(1,Math.min(e/m,e/l)):1;return k(g,h.type,b+d*n,c+d*n,Math.round(m*q),Math.round(l*q),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,p)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else k(a.target.result,h.type,b+d*n,c+d*n,240,160,h.name,function(a){x(d,function(){return a})})});/(\.vsdx?)($|\?)/i.test(h.name)||
+/(\.vssx)($|\?)/i.test(h.name)?k(null,h.type,b+d*n,c+d*n,240,160,h.name,function(a){x(d,function(){return a})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(w)});g?this.confirmImageResize(function(a){f=a;u()},q):u()};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)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,h){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,h))try{var g=Math.max(d/k,f/k);if(1<g){var l=Math.round(d/
+g),n=Math.round(f/g),q=document.createElement("canvas");q.width=l;q.height=n;q.getContext("2d").drawImage(a,0,0,l,n);var r=q.toDataURL();if(r.length<b.length){var p=document.createElement("canvas");p.width=l;p.height=n;var v=p.toDataURL();r!==v&&(b=r,d=l,f=n)}}}catch(y){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var c=e,k=0;8>k;k++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[e]=c;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^
+b[c+d])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=l;l+=b;return a.substring(d,l)}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 l=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,
+4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,l);do{var n=f(a);if("IDAT"==d(a,4)){k=a.substring(0,l-8);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);k+=g(c.length)+b+c+g(e^4294967295);k+=a.substring(l-8,a.length);break}k+=a.substring(l-8,l-4+n);d(a,n);d(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
+null;try{var d=a.substring(a.indexOf(",")+1),c=window.atob&&!mxClient.IS_SF?atob(d):Base64.decode(d,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,d,e){a=c.substring(a+8,a+8+e);"zTXt"==d?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==d&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==d)return!0}))}catch(r){}null!=
+b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=c);d.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var d=a.indexOf(",");0<d&&(a=b.getPageById(a.substring(d+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,c=this.editor.graph;
+c.addListener("pageLinkClicked",function(b,d){a(d.getProperty("href"))});this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var d=0;d<b.pages.length;d++)if(b.pages[d]==b.currentPage){0<d&&(a+=(0<a.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(a+=(0<a.length?
+"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var k=c.addClickHandler;c.addClickHandler=function(b,d,e){var f=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=f&&f(b,d)};k.call(this,b,d,e)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=
+function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:h.apply(this,arguments)};var m=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");
+0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=m.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked=function(b,d,e){var f=d.getAttribute("href");if(null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e))q.apply(this,arguments);else{if(!c.isEnabled()||null!=b&&c.isCellLocked(b.cell))a(f),c.getRubberband().reset();mxEvent.consume(e)}};this.editor.getOrCreateFilename=
+function(){var a=b.defaultFilename,d=b.getCurrentFile();null!=d&&(a=null!=d.getTitle()?d.getTitle():a);return a};var p=this.actions.get("print");p.setEnabled(!mxClient.IS_IOS||!navigator.standalone);p.visible=p.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=function(){window.setTimeout(function(){x.innerHTML="&nbsp;";x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,
+!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var d=a.clipboardData||a.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 g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],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]()});else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(Q){}}),!1);var x=document.createElement("div");x.style.position="absolute";
+x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==
+b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||v||(x.style.left=c.container.scrollLeft+10+"px",x.style.top=c.container.scrollTop+10+"px",c.container.appendChild(x),v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){!v||224!=b&&17!=b&&91!=b||(v=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(x),t())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,function(a){c.isEnabled()&&(this.copyCells(x,!0),t())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(x.innerHTML=
+"&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
+this.editor.graph,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()})))}));if("1"==urlParams.ruler&&"undefined"!==
+typeof mxRuler){p=document.createElement("div");p.style.position="absolute";p.style.top="95px";p.style.left="250px";p.style.width="2000px";p.style.height="30px";p.style.background="whiteSmoke";document.body.appendChild(p);var G=document.createElement("div");G.style.position="absolute";G.style.top="125px";G.style.left="220px";G.style.width="30px";G.style.height="1000px";G.style.background="whiteSmoke";document.body.appendChild(G);var B=document.createElement("div");B.style.position="absolute";B.style.top=
+"95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,G,!0);this.hRuler=new mxRuler(this.editor.graph,p,!1)}if("1"==urlParams.test){p=document.getElementById("geFooter");null!=p&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width=
+"98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),p.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var 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)}}p=document.getElementById("geInfo");null!=p&&p.parentNode.removeChild(p);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var C=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=C&&(C.parentNode.removeChild(C),
+C=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,"drop",mxUtils.bind(this,function(a){null!=C&&(C.parentNode.removeChild(C),C=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
+d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/html")){var m=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=m;var k=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(m=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&(m=b[0].getAttribute("href")));var l=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(m,f,g,!0,k,null,l))});k&&m.length>this.resampleThreshold?this.confirmImageResize(function(a){l=
+a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,
+f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=
+mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",
+mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||
+8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.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){if(!mxEvent.isConsumed(a)){var d=b.getElementsByTagName("span");if(null!=d&&0<d.length&&"application/vnd.lucid.chart.objects"===d[0].getAttribute("data-lucid-type")){var c=d[0].getAttribute("data-lucid-content");null!=c&&0<c.length&&(this.importLucidChart(c,0,0),mxEvent.consume(a))}else{var c=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||
+8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var m=e.lastIndexOf("%3E");0<=m&&m<e.length-3&&(e=e.substring(0,m+3))}catch(w){}try{var d=b.getElementsByTagName("span"),k=null!=d&&0<d.length?mxUtils.trim(decodeURIComponent(d[0].textContent)):decodeURIComponent(e);this.isCompatibleString(k)&&(f=!0,e=k)}catch(w){}c.lastPasteXml==e?c.pasteCounter++:(c.lastPasteXml=e,c.pasteCounter=0);d=c.pasteCounter*c.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?c.setSelectionCells(this.importXml(e,
+d,d)):(f=c.getInsertPoint(),c.isMouseInsertPoint()&&(d=0,c.lastPasteXml==e&&0<c.pasteCounter&&c.pasteCounter--),c.setSelectionCells(this.insertTextAt(e,f.x+d,f.y+d,!0))),!c.isSelectionEmpty())){c.scrollCellToVisible(c.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(c.view.getState(c.getSelectionCell()));try{mxEvent.consume(a)}catch(w){}}}}};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?"https://www.draw.io/":"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 h=document.documentElement;c=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=d+"px";h.style.width=
+Math.max(0,c-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var 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){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)+".xml");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.vsdx?)($|\?)/i.test(e)||/(\.vssx)($|\?)/i.test(e))this.importVisio(a,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('{"state":"{\\"Properties\\":'==c.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(c,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));
+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(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(c=this.extractGraphModelFromPng(c)),this.spinner.stop(),this.openLocalFile(c,e,b)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();
+this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?d.readAsDataURL(a):d.readAsText(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))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),
+null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function 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.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),
+null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
+this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,h=mxUtils.bind(this,function(a,
+b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&
+(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(J){}return a}if(f.source==(window.opener||window.parent)){var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(E){h=null}if(null==h)return;if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&
+(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var m=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?mxResources.get(h.titleKey):h.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==h.action){m=null;m="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);
+this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();
+k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(E){k.postMessage(JSON.stringify({event:"draft",error:E.toString(),message:h}),"*")}return}if("template"==h.action){this.spinner.stop();var m=1==h.enableRecent,l=1==h.enableSearch,m=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=h.callback?
+k.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,m?mxUtils.bind(this,function(a){this.recentReadyCallback=a;k.postMessage(JSON.stringify({event:"recentDocs"}),"*")}):null,l?mxUtils.bind(this,function(a,b){this.searchReadyCallback=b;k.postMessage(JSON.stringify({event:"searchDocs",searchStr:a}),"*")}):null,function(a,b,d){k.postMessage(JSON.stringify({event:"template",
+docUrl:a,info:b,name:d}),"*")});this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("searchDocsList"==h.action)this.searchReadyCallback(h.list,h.errorMsg);else if("recentDocsList"==h.action)this.recentReadyCallback(h.list,h.errorMsg);else{if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));
+null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var n=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,n):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var q=null!=h.xml?h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,
+r=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(q);k.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(q))));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container);r(a)});if(this.isExportToCanvas()){if(null!=
+this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),v=p.getGlobalVariable,z=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?z.getName():"pagenumber"==a?1:v.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(z.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){u(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+
+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(q)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?r("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);n=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))m=this.getXmlFileData(),n.xml=mxUtils.getXml(m),n.data=
+this.getFileData(null,null,!0,null,null,null,m),n.format=h.format;else if("html"==h.format)q=this.editor.getGraphXml(),n.data=this.getHtml(q,this.editor.graph),n.xml=mxUtils.getXml(q),n.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;m=this.editor.graph.background;m==mxConstants.NONE&&(m=null);n.xml=this.getFileData(!0);n.format="svg";if(h.embedImages||null==h.embedImages){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),
+"xmlsvg"==h.format?this.getEmbeddedSvg(n.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(n),"*")})):this.convertImages(this.editor.graph.getSvg(m),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();n.data=this.createSvgDataUri(mxUtils.getXml(a));k.postMessage(JSON.stringify(n),"*")}));return}m="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),
+this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(m));n.data=this.createSvgDataUri(m)}k.postMessage(JSON.stringify(n),"*")}return}if("load"==h.action)c=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(m=document.createElement("span"),mxUtils.write(m,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight=
+"12px",this.buttonContainer.style.paddingTop="12px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),this.embedFilenameSpan=m),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",
+data:JSON.stringify(h)}),"*");return}}}h=g(h);d=!0;try{a(h,f)}catch(E){this.handleError(E)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var N=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=N();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=N();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||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?
+"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
+mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight=
+"20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),
+null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[];if(0<d.length){var e={},f=null,k=null,l="",q="auto",p="auto",v=null,F=null,D=40,G=40,B=0,y=this.editor.graph;y.getGraphBounds();for(var C=function(){null!=b?b(Z):(y.setSelectionCells(Z),y.scrollCellToVisible(y.getSelectionCell()))},I=y.getFreeInsertPoint(),z=I.x,N=I.y,I=N,E=null,J=
+"auto",R=[],Y=null,aa=null,Q=0;Q<d.length&&"#"==d[Q].charAt(0);){a=d[Q];for(Q++;Q<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[Q].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[Q].substring(1)),Q++;if("#"!=a.charAt(1)){var S=a.indexOf(":");if(0<S){var K=mxUtils.trim(a.substring(1,S)),H=mxUtils.trim(a.substring(S+1));"label"==K?E=y.sanitizeHtml(H):"style"==K?f=H:"identity"==K&&0<H.length&&"-"!=H?k=H:"namespace"==K&&0<H.length&&"-"!=H?l=H:"width"==K?q=H:"height"==K?p=H:"left"==K&&0<H.length?
+v=H:"top"==K&&0<H.length?F=H:"ignore"==K?aa=H.split(","):"connect"==K?R.push(JSON.parse(H)):"link"==K?Y=H:"padding"==K?B=parseFloat(H):"edgespacing"==K?D=parseFloat(H):"nodespacing"==K?G=parseFloat(H):"layout"==K&&(J=H)}}}var V=this.editor.csvToArray(d[Q]),S=null;if(null!=k)for(var L=0;L<V.length;L++)if(k==V[L]){S=L;break}null==E&&(E="%"+V[0]+"%");if(null!=R)for(var O=0;O<R.length;O++)null==e[R[O].to]&&(e[R[O].to]={});y.model.beginUpdate();try{for(L=Q+1;L<d.length;L++){var X=this.editor.csvToArray(d[L]);
+if(X.length==V.length){var A=null,W=null!=S?l+X[S]:null;null!=W&&(A=y.model.getCell(W));null==A&&(A=new mxCell(E,new mxGeometry(z,I,0,0),f||"whiteSpace=wrap;html=1;"),A.vertex=!0,A.id=W);for(var P=0;P<X.length;P++)y.setAttributeForCell(A,V[P],X[P]);y.setAttributeForCell(A,"placeholders","1");A.style=y.replacePlaceholders(A,A.style);for(O=0;O<R.length;O++)e[R[O].to][A.getAttribute(R[O].to)]=A;null!=Y&&"link"!=Y&&(y.setLinkForCell(A,A.getAttribute(Y)),y.setAttributeForCell(A,Y,null));y.fireEvent(new mxEventObject("cellsInserted",
+"cells",[A]));var da=this.editor.graph.getPreferredSizeForCell(A);A.vertex&&(null!=v&&null!=A.getAttribute(v)&&(A.geometry.x=z+parseFloat(A.getAttribute(v))),null!=F&&null!=A.getAttribute(F)&&(A.geometry.y=N+parseFloat(A.getAttribute(F))),"@"==q.charAt(0)&&null!=A.getAttribute(q.substring(1))?A.geometry.width=parseFloat(A.getAttribute(q.substring(1))):A.geometry.width="auto"==q?da.width+B:parseFloat(q),"@"==p.charAt(0)&&null!=A.getAttribute(p.substring(1))?A.geometry.height=parseFloat(A.getAttribute(p.substring(1))):
+A.geometry.height="auto"==p?da.height+B:parseFloat(p),I+=A.geometry.height+G);c.push(y.addCell(A))}}for(var T=c.slice(),Z=c.slice(),O=0;O<R.length;O++)for(var U=R[O],L=0;L<c.length;L++){var A=c[L],na=A.getAttribute(U.from);if(null!=na){y.setAttributeForCell(A,U.from,null);for(var oa=na.split(","),P=0;P<oa.length;P++){var ca=e[U.to][oa[P]];null!=ca&&(E=U.label,null!=U.fromlabel&&(E=(A.getAttribute(U.fromlabel)||"")+(E||"")),null!=U.tolabel&&(E=(E||"")+(ca.getAttribute(U.tolabel)||"")),Z.push(y.insertEdge(null,
+null,E||"",U.invert?ca:A,U.invert?A:ca,U.style||y.createCurrentEdgeStyle())),mxUtils.remove(U.invert?A:ca,T))}}}if(null!=aa)for(L=0;L<c.length;L++)for(A=c[L],P=0;P<aa.length;P++)y.setAttributeForCell(A,mxUtils.trim(aa[P]),null);var ia=new mxParallelEdgeLayout(y);ia.spacing=D;var qa=function(){ia.execute(y.getDefaultParent());for(var a=0;a<c.length;a++){var b=y.getCellGeometry(c[a]);b.x=Math.round(y.snap(b.x));b.y=Math.round(y.snap(b.y));"auto"==q&&(b.width=Math.round(y.snap(b.width)));"auto"==p&&
+(b.height=Math.round(y.snap(b.height)))}};if("circle"==J){var ea=new mxCircleLayout(y);ea.resetEdges=!1;var ra=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return ra.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ea.execute(y.getDefaultParent());qa()},!0,C);C=null}else if("horizontaltree"==J||"verticaltree"==J||"auto"==J&&Z.length==2*c.length-1&&1==T.length){y.view.validate();var fa=new mxCompactTreeLayout(y,"horizontaltree"==J);fa.levelDistance=G;fa.edgeRouting=
+!1;fa.resetEdges=!1;this.executeLayout(function(){fa.execute(y.getDefaultParent(),0<T.length?T[0]:null)},!0,C);C=null}else if("horizontalflow"==J||"verticalflow"==J||"auto"==J&&1==T.length){y.view.validate();var ja=new mxHierarchicalLayout(y,"horizontalflow"==J?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=G;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(y.getDefaultParent(),Z);y.moveCells(Z,z,N)},!0,C);C=null}else if("organic"==J||"auto"==J&&Z.length>
+c.length){y.view.validate();var ba=new mxFastOrganicLayout(y);ba.forceConstant=3*G;ba.resetEdges=!1;var ka=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return ka.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ia=new mxParallelEdgeLayout(y);ia.spacing=D;this.executeLayout(function(){ba.execute(y.getDefaultParent());qa()},!0,C);C=null}this.hideDialog()}finally{y.model.endUpdate()}null!=C&&C()}}catch(ga){this.handleError(ga)}};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,440,130,!0,!0);a.init()};var q=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=q.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 h=b.init;b.init=function(){h.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=0;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.trello&&"function"!==typeof window.TrelloClient||d++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&d++;mxClient.IS_IOS||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("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").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.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!=
@@ -2977,12 +2984,12 @@ this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.is
"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,k=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
"min"==uiTheme?"":'<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
IMAGE_PATH+'/clear.gif"/>'}a!=k&&(this.offlineStatus.innerHTML=b,k=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
-EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());
+EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());
this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);
this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("find").setEnabled(e);this.actions.get("layers").setEnabled(e);this.actions.get("outline").setEnabled(e);
-this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,
-arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,h){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,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale),n=Math.floor(g.height*k/d.view.scale);
-f.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+n+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+this.actions.get("rename").setEnabled(null!=c&&c.isRenamable());this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,
+arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,h){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,k,h)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),l=Math.floor(g.width*k/d.view.scale),q=Math.floor(g.height*k/d.view.scale);
+f.length<=MAX_REQUEST_SIZE&&l*q<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+l+"&h="+q+"&border="+h+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,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.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
@@ -2994,8 +3001,8 @@ EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mx
null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";c!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,c=null,k=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=c&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):
(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),c=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||null==this.editor||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=
!0}))):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var c=b.getProperty("edit").changes,e=0;e<c.length;e++)if(c[e]instanceof SelectPage||c[e]instanceof RenamePage||c[e]instanceof MovePage||c[e]instanceof mxRootChange){k();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),c=a.getAttribute("pageWidth"),k=a.getAttribute("pageHeight"),l=a.getAttribute("background"),q=a.getAttribute("backgroundImage"),q=null!=q&&0<q.length?JSON.parse(q):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=q?new mxImage(q.src,q.width,q.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=c&&null!=k?new mxRectangle(0,0,parseFloat(c),parseFloat(k)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=
a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
@@ -3011,11 +3018,11 @@ EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,c=null;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.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(d,c){this.pages[d]==this.currentPage?(c.className="geActivePage",c.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",c.style.fontWeight="bold",c.style.borderTopStyle="none"):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/>"),k=d):mxEvent.consume(b)}));mxEvent.addListener(c,
-"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=k&&d!=k&&this.movePage(k,d);a.stopPropagation();a.preventDefault()}));b.appendChild(c)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
-c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var t=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=t+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,t-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+e)/this.pages.length)+1),k=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,e){this.pages[c]==this.currentPage?(e.className="geActivePage",e.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#eeeeee",e.style.fontWeight="bold",e.style.borderTopStyle="none"):e.className="geInactivePage";e.setAttribute("draggable","true");mxEvent.addListener(e,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(e,
+"dragend",mxUtils.bind(this,function(a){k=null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(e)})(l,this.createTabForPage(this.pages[l],c,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);
+c=this.createPageMenuTab();this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-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 p=this.createControlTab(4,
+"&nbsp;&#10095;");p.style.position="absolute";p.style.right=this.editor.chromeless?"0px":"29px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var v=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=v+"px";mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,v-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(p,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(q,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(p,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,v-20);mxUtils.setOpacity(q,0<b.scrollLeft?100:50);mxUtils.setOpacity(p,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;
b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
@@ -3025,62 +3032,62 @@ null,mxUtils.bind(this,function(){this.renamePage(e,e.getName())}),b),a.addSepar
mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var c=a.getName();e.setAttribute("title",c);mxUtils.write(e,c);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(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&k||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!c){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var q=mxEvent.getClientX(l),t=mxEvent.getClientY(l);n.popup(q,t,null,l);this.setCurrentMenu(n,b)}mxEvent.consume(l)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!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 p=mxEvent.getClientX(l),v=mxEvent.getClientY(l);q.popup(p,v,null,l);this.setCurrentMenu(q,b)}mxEvent.consume(l)}}))};
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);e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(b){a.apply(this,arguments);this.updateTabContainer()}})();(function(){var a=new mxObjectCodec(new MovePage,["ui"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new RenamePage,["ui","page","previous"]);a.afterEncode=function(a,e,c){c.setAttribute("page",e.page.getId());return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.page=a.ui.getPageById(e.getAttribute("page"));c.previous=c.name;return c};mxCodecRegistry.register(a)})();
(function(){var a=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","neverShown"]);a.afterEncode=function(a,e,c){c.setAttribute("relatedPage",e.relatedPage.getId());null==e.index&&(c.setAttribute("name",e.relatedPage.getName()),null!=e.relatedPage.root&&a.encodeCell(e.relatedPage.root,c));return c};a.beforeDecode=function(a,e,c){c.ui=a.ui;c.relatedPage=c.ui.getPageById(e.getAttribute("relatedPage"));if(null==c.relatedPage){var b=document.createElement("diagram");b.setAttribute("id",e.getAttribute("relatedPage"));
b.setAttribute("name",e.getAttribute("name"));c.relatedPage=new DiagramPage(b);e=e.cloneNode(!0);b=e.firstChild;if(null!=b)for(c.relatedPage.root=a.decodeCell(b,!1),c=b.nextSibling,b.parentNode.removeChild(b),b=c;null!=b;){c=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){var l=b.getAttribute("id");null==a.lookup(l)&&a.decodeCell(b)}b.parentNode.removeChild(b);b=c}}return e};a.afterDecode=function(a,e,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;
-Graph.prototype.foldCells=function(a,c,e,q,t){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),g=[],f=0;f<e.length;f++){var k=this.view.getState(e[f]),l=null!=k?k.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[f]&&g.push(a);return a==e[f]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[f],
-a))}for(f=0;f<g.length;f++)this.model.setVisible(g[f],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=b?b.style:h.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=w.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function q(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function t(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),m=h.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var n=h.getOutgoingEdges(h.model.getTerminal(d[0],
-!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<n.length;r++){var t=h.model.getTerminal(n[r],!1);if(f==q(t)){var u=h.view.getState(t);t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/m),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/m))}}p?g=0:d=0;for(r=0;r<n.length;r++)if(t=h.model.getTerminal(n[r],
-!1),f==q(t)&&(u=h.view.getState(t),t!=a&&null!=u&&(p&&b!=u.getCenterX()<k.getCenterX()||!p&&b!=u.getCenterY()<k.getCenterY()))){var x=[];h.traverse(u.cell,!0,function(a,b){null!=b&&x.push(b);x.push(a);return!0});h.moveCells(x,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function d(a){h.model.beginUpdate();try{var b=q(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);
-var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function g(a){h.model.beginUpdate();try{var b=
-h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=q(a),n=h.view.translate,p=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/p-n.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function f(a,
-b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=f(h.model.getTerminal(c[0],!0),d,a),c=h.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&h.setSelectionCell(d[c].cell)))))}var r=this,h=r.editor.graph,w=h.getModel();mxResources.parse("selectChildren=Select Children");
+Graph.prototype.foldCells=function(a,c,e,p,v){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var d=e.slice(),f=[],g=0;g<e.length;g++){var k=this.view.getState(e[g]),l=null!=k?k.style:this.getCellStyle(e[g]);"1"==mxUtils.getValue(l,"treeFolding","0")&&(this.traverse(e[g],!0,mxUtils.bind(this,function(a,b){null!=b&&f.push(b);a!=e[g]&&f.push(a);return a==e[g]||!this.model.isCollapsed(a)})),this.model.setCollapsed(e[g],
+a))}for(g=0;g<f.length;g++)this.model.setVisible(f[g],!a);e=d;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return m.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b="tree"==(null!=b?b.style:h.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=m.getParent(a),b=h.view.getState(a),h.view.getState(a),b=null!=(null!=b?b.style:h.getCellStyle(a)).childLayout);return b}function p(a){a=h.view.getState(a);if(null!=a){var b=h.getIncomingEdges(a.cell);if(0<b.length&&(b=h.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function v(a,b){b=null!=b?b:!0;h.model.beginUpdate();try{var c=h.model.getParent(a),d=h.getIncomingEdges(a),e=h.cloneCells([d[0],a]);h.model.setTerminal(e[0],h.model.getTerminal(d[0],!0),!0);var f=p(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);h.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=h.view.getState(a),m=h.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var q=h.getOutgoingEdges(h.model.getTerminal(d[0],
+!0));if(null!=q){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<q.length;r++){var t=h.model.getTerminal(q[r],!1);if(f==p(t)){var u=h.view.getState(t);t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/m),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/m))}}n?g=0:d=0;for(r=0;r<q.length;r++)if(t=h.model.getTerminal(q[r],
+!1),f==p(t)&&(u=h.view.getState(t),t!=a&&null!=u&&(n&&b!=u.getCenterX()<k.getCenterX()||!n&&b!=u.getCenterY()<k.getCenterY()))){var v=[];h.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});h.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return h.addCells(e,c)}finally{h.model.endUpdate()}}function d(a){h.model.beginUpdate();try{var b=p(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(c[0],d[1],!1);h.model.setTerminal(d[0],d[1],!0);h.model.setTerminal(d[0],a,!1);
+var e=h.model.getParent(a),f=e.geometry,g=[];h.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);h.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-40):b==mxConstants.DIRECTION_WEST?(k=-40,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);h.moveCells(g,k,m);return h.addCells(d,e)}finally{h.model.endUpdate()}}function f(a){h.model.beginUpdate();try{var b=
+h.model.getParent(a),c=h.getIncomingEdges(a),d=h.cloneCells([c[0],a]);h.model.setTerminal(d[0],a,!0);var c=h.getOutgoingEdges(a),e=b.geometry,f=[];h.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=h.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var m=h.view.getBounds(f),l=p(a),q=h.view.translate,n=h.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-q.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(m.x+m.width)/n-q.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(m.y+m.height)/n-q.y+-e.y+10);return h.addCells(d,b)}finally{h.model.endUpdate()}}function g(a,
+b,c){a=h.getOutgoingEdges(a);c=h.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=h.view.getState(h.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=p(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=h.getOutgoingEdges(a),null!=d&&0<d.length&&h.setSelectionCell(h.model.getTerminal(d[0],!1))):(c=h.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(h.model.getTerminal(c[0],!0),d,a),c=h.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&h.setSelectionCell(d[c].cell)))))}var r=this,h=r.editor.graph,m=h.getModel();mxResources.parse("selectChildren=Select Children");
mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectDescendants=Select Descendants");mxResources.parse("selectParent=Select Parent");var u=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){u.apply(this,arguments);if(1==h.getSelectionCount()){c=h.getSelectionCell();var e=h.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(h.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(h.getSelectionCell())&&
(a.addSeparator(),0<h.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};r.actions.addAction("selectChildren",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),
a=h.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=h.getOutgoingEdges(h.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(h.model.getTerminal(a[c],!1));h.setSelectionCells(b)}}},null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),a=h.getIncomingEdges(a);null!=a&&0<a.length&&h.setSelectionCell(h.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectDescendants",
-function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+T");var m=h.removeCells;h.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(h.traverse(g,!0,
-function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return m.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var v=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
-a)}this.model.beginUpdate();try{var k=v.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var D=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,n=this.view.getState(f),p=null!=n?n.style:this.getCellStyle(f);
-if(null!=a&&b(f)&&"1"==mxUtils.getValue(p,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||h.model.isEdge(a[q])&&null==h.model.getTerminal(a[q],!0)){f=h.model.getParent(a[q]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var r=h.getIncomingEdges(a[0]);if(0<r.length){var t=h.view.getState(h.model.getTerminal(r[0],!0));if(null!=t){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-t.getCenterX())/h.view.scale,d=(u.getCenterY()-t.getCenterY())/h.view.scale)}}}}m=D.apply(this,arguments);
-if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],l,!0);else if(b(a[q])&&(r=h.getIncomingEdges(a[q]),0<r.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],l,!0);else if(0==h.getIncomingEdges(m[q]).length){n=l;if(null==n||n==h.model.getParent(a[q]))n=h.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,
-h.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var F=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var G={88:r.actions.get("selectChildren"),
-84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},H=r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var c=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(h.getSelectionCell()):g(h.getSelectionCell()):13==a.which&&(c=t(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&h.model.isEdge(c[0])?h.setSelectionCell(h.model.getTerminal(c[0],
-!1)):h.setSelectionCell(c[c.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=G[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(h.getSelectionCell(),
-mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||H.apply(this,arguments)};var y=h.connectVertex;h.connectVertex=function(a,c,e,f,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=q(a),f=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?g(a):f==k?d(a):t(a,c!=mxConstants.DIRECTION_NORTH&&
-c!=mxConstants.DIRECTION_WEST)):y.call(this,a,c,e,f,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var B=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){B.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
+function(){if(h.isEnabled()&&1==h.getSelectionCount()){var a=h.getSelectionCell(),b=[];h.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});h.setSelectionCells(b)}},null,null,"Alt+Shift+T");var w=h.removeCells;h.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];m.isEdge(g)&&c(g)&&(e.push(g),g=m.getTerminal(g,!1));b(g)?(h.traverse(g,!0,
+function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=h.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return w.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var t=h.duplicateCells;h.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=h.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=h.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],
+a)}this.model.beginUpdate();try{var k=t.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var m=h.getIncomingEdges(k[e]),g=h.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var l=this.cloneCells([g[0]])[0];this.addEdge(l,h.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var x=h.moveCells;h.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var l=f,q=this.view.getState(f),n=null!=q?q.style:this.getCellStyle(f);
+if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||h.model.isEdge(a[p])&&null==h.model.getTerminal(a[p],!0)){f=h.model.getParent(a[p]);break}if(null!=l&&f!=l&&null!=this.view.getState(a[0])){var r=h.getIncomingEdges(a[0]);if(0<r.length){var t=h.view.getState(h.model.getTerminal(r[0],!0));if(null!=t){var u=h.view.getState(l);null!=u&&(c=(u.getCenterX()-t.getCenterX())/h.view.scale,d=(u.getCenterY()-t.getCenterY())/h.view.scale)}}}}m=x.apply(this,arguments);
+if(null!=m&&null!=a&&m.length==a.length)for(p=0;p<m.length;p++)if(this.model.isEdge(m[p]))b(l)&&0>mxUtils.indexOf(m,this.model.getTerminal(m[p],!0))&&this.model.setTerminal(m[p],l,!0);else if(b(a[p])&&(r=h.getIncomingEdges(a[p]),0<r.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],l,!0);else if(0==h.getIncomingEdges(m[p]).length){q=l;if(null==q||q==h.model.getParent(a[p]))q=h.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,
+h.getDefaultParent(),q,m[p])}}finally{this.model.endUpdate()}return m};if(null!=r.sidebar){var F=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=h.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=h.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var D={88:r.actions.get("selectChildren"),
+84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},G=r.onKeyDown;r.onKeyDown=function(a){try{if(h.isEnabled()&&!h.isEditing()&&b(h.getSelectionCell())&&1==h.getSelectionCount()){var c=null;0<h.getIncomingEdges(h.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(h.getSelectionCell()):f(h.getSelectionCell()):13==a.which&&(c=v(h.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&h.model.isEdge(c[0])?h.setSelectionCell(h.model.getTerminal(c[0],
+!1)):h.setSelectionCell(c[c.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(h.view.getState(h.getSelectionCell())),h.startEditingAtCell(h.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=D[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(h.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(h.getSelectionCell(),
+mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(h.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(J){console.log("error",J)}mxEvent.isConsumed(a)||G.apply(this,arguments)};var B=h.connectVertex;h.connectVertex=function(a,c,e,g,k,m){var l=h.getIncomingEdges(a);return b(a)&&0<l.length?(e=p(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):v(a,c!=mxConstants.DIRECTION_NORTH&&
+c!=mxConstants.DIRECTION_WEST)):B.call(this,a,c,e,g,k,m)};h.getSubtree=function(a){var c=[a];b(a)&&!e(a)&&h.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};var y=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){y.apply(this,arguments);b(this.state.cell)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),this.moveHandle.setAttribute("title","Move Subtree"),
this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));this.graph.graphHandler.cells=this.graph.getSubtree(this.state.cell);this.graph.graphHandler.bounds=this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds=this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;mxEvent.consume(a)})))};var C=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){C.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var K=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){K.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){I.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree container",
function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");
b.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;b.insertEdge(f,!0);e.insertEdge(f,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");h.vertex=!0;var w=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-w.geometry.relative=!0;w.edge=!0;b.insertEdge(w,!0);h.insertEdge(w,!1);a.insert(d);a.insert(f);a.insert(l);a.insert(w);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(h);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;b.insertEdge(l,!0);k.insertEdge(l,!1);var h=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");h.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+m.geometry.relative=!0;m.edge=!0;b.insertEdge(m,!0);h.insertEdge(m,!1);a.insert(d);a.insert(g);a.insert(l);a.insert(m);a.insert(b);a.insert(c);a.insert(e);a.insert(k);a.insert(h);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(c,"treeRoot","1");c.vertex=!0;var e=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");e.vertex=!0;var 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);e.insertEdge(d,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;c.insertEdge(f,!0);g.insertEdge(f,!1);a.insert(d);a.insert(f);a.insert(c);a.insert(e);a.insert(g);return sb.createVertexTemplateFromCells([a],
+c.insertEdge(d,!0);e.insertEdge(d,!1);var f=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;c.insertEdge(g,!0);f.insertEdge(g,!1);a.insert(d);a.insert(g);a.insert(c);a.insert(e);a.insert(f);return sb.createVertexTemplateFromCells([a],
a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,"treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree division",function(){var a=new mxCell("Division",new mxGeometry(20,40,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");b.geometry.setTerminalPoint(new mxPoint(0,0),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");
a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();EditorUi.initMinimalTheme=function(){function a(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();null==a.formatWindow?(a.formatWindow=new k(a,mxResources.get("format"),Math.max(20,a.diagramContainer.clientWidth-240-12),56,240,Math.min(546,b.container.clientHeight-10),function(b){b=a.createFormat(b);b.init();return b}),a.formatWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("format"))}),a.formatWindow.window.addListener("format",function(){a.fireEvent(new mxEventObject("format"))}),
a.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80),a.formatWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("sidebar"))):a.formatWindow.window.setVisible(!a.formatWindow.window.isVisible());a.formatWindow.window.isVisible()&&a.formatWindow.window.fit()}function b(a){var b=a.editor.graph;b.popupMenuHandler.hideMenu();new mxRectangle;if(null==a.sidebarWindow){var c=Math.min(b.container.clientWidth-10,266);a.sidebarWindow=new k(a,mxResources.get("shapes"),10,56,c-6,Math.min(650,
-b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),h=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));h.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";h.className="geTitle";b.appendChild(h);return h}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
+b.container.clientHeight-30),function(b){function c(c,d){var f=a.menus.get(c),g=e.addMenu(d,mxUtils.bind(this,function(){f.funct.apply(this,arguments)}));g.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;";g.className="geTitle";b.appendChild(g);return g}var d=document.createElement("div");d.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";
d.className="geTitle";mxUtils.write(d,mxResources.get("moreShapes"));b.appendChild(d);mxEvent.addListener(d,"click",function(){a.actions.get("shapes").funct()});var e=new Menubar(a,b);if("1"!=urlParams.embed||"1"==urlParams.libraries)if(null!=a.actions.get("newLibrary")){d=document.createElement("div");d.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;";d.className="geTitle";var f=document.createElement("span");
f.style.cssText="position:relative;top:6px;";mxUtils.write(f,mxResources.get("newLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("newLibrary").funct);d=document.createElement("div");d.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;";d.className="geTitle";f=document.createElement("span");f.style.cssText="position:relative;top:6px;";
mxUtils.write(f,mxResources.get("openLibrary"));d.appendChild(f);b.appendChild(d);mxEvent.addListener(d,"click",a.actions.get("openLibrary").funct)}else d=c("newLibrary",mxResources.get("newLibrary")),d.style.left="0",d=c("openLibraryFrom",mxResources.get("openLibraryFrom")),d.style.borderLeft="1px solid lightgray",d.style.left="50%";else d.style.bottom="0";b.appendChild(a.sidebar.container);b.style.overflow="hidden";return b});a.sidebarWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("sidebar"))});
a.sidebarWindow.window.addListener("sidebar",function(){a.fireEvent(new mxEventObject("sidebar"))});a.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);a.sidebarWindow.window.setVisible(!0);a.fireEvent(new mxEventObject("sidebar"));a.getLocalData("sidebar",function(b){a.sidebar.showEntries(b,null,!0)});a.restoreLibraries()}else a.sidebarWindow.window.setVisible(!a.sidebarWindow.window.isVisible());a.sidebarWindow.window.isVisible()&&a.sidebarWindow.window.fit()}if("1"!=urlParams.lightbox&&
"0"!=urlParams.chrome){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;try{var c=document.createElement("style");c.type="text/css";c.innerHTML="* { -webkit-font-smoothing: antialiased; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0;}html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700;border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }.geDialog input, .geToolbarContainer input, .mxWindow input {padding:2px !important;display:inline-block !important; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: #fff !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }.mxWindow .geColorBtn, .geDialog .geColorBtn { background: none !important; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: #353535 !important; border-color: rgb(216, 216, 216); }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.geBtn:hover, .mxWindow button.geBtn:hover, .geDialog button.geBtn:hover { box-shadow: none; border-color: rgb(216, 216, 216); }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:2px; padding: 0 2px 4px 2px; } .geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px 0 2px 0; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }a.geMenuItem:active { opacity: 0.4; }.geToolbarContainer { background:#fff !important; }div.mxWindow .geSidebarContainer .geTitle { background-color:#fdfdfd; }div.mxWindow .geSidebarContainer .geTitle:hover { background-color:#fafafa; }div.geSidebar { background-color: #fff !important;}div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:#fff !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow * { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); }html div.geInactivePage { background: rgb(249, 249, 249) !important; color:lightgray !important; } html div.geActivePage { background: white !important;color: #353535 !important; } html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.5) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: #353535; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: #29b6f2; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: #fff !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }";
-document.getElementsByTagName("head")[0].appendChild(c)}catch(h){}var k=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+document.getElementsByTagName("head")[0].appendChild(c)}catch(m){}var k=function(a,b,c,d,e,f,g){a=document.createElement("div");a.className="geSidebarContainer";a.style.position="absolute";a.style.width="100%";a.style.height="100%";a.style.border="1px solid whiteSmoke";a.style.overflowX="hidden";a.style.overflowY="auto";g(a);this.window=new mxWindow(b,a,c,d,e,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)}};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').src;mxVertexHandler.prototype.handleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/>');
mxEdgeHandler.prototype.handleImage=mxVertexHandler.prototype.handleImage;mxEdgeHandler.prototype.terminalHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><circle cx="8" cy="8" r="3" stroke="#ffffff" fill="#29b6f2"/>');mxEdgeHandler.prototype.fixedHandleImage=Graph.createSvgImage(16,16,'<circle cx="8" cy="8" r="5" stroke="#ffffff" fill="#29b6f2"/><path d="m 6 6 L 10 10 M 6 10 L 10 6" stroke="#ffffff"/>');mxConstraintHandler.prototype.pointImage=
@@ -3088,52 +3095,51 @@ Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>')
HoverIcons.prototype.triangleLeft=Graph.createSvgImage(38,18,'<path d="m 1 9 L 12 1 L 12 6 L 36 6 L 36 12 L 12 12 L 12 18 z" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.roundDrop=Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="#29b6f2"/>');HoverIcons.prototype.arrowSpacing=0;mxOutline.prototype.sizerImage=null;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,
Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=
5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.HIGHLIGHT_SIZE=5;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.prototype.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=
-25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;var l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){l.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);
-var a=this.menus.get("save");null!=a&&a.setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var q=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):q.apply(this,arguments)};var t=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){t.apply(this,
-arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";
-a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
-a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
+25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.showCsvImport=!1;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!0;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(a){l.apply(this,arguments);this.diagramContainer.style.top="47px";null!=this.tabContainer&&(this.tabContainer.style.right="70px")};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 p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):p.apply(this,arguments)};var v=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){v.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;
+a.style.cssText="display:inline-block;position:relative;margin-right:4px;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+)";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+"no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("changeUser"))}};var d=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){d.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";a.className="";a.innerHTML="";a.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==)";
a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";mxUtils.setOpacity(a,30);a.setAttribute("title",mxResources.get("share"))}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));
b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="1"==urlParams.saveAndExit?"geMenuItem":"geMenuItem gePrimaryBtn";b.style.fontSize="14px";b.style.padding="6px";b.style.borderRadius="3px";b.style.marginLeft="8px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",
mxResources.get("saveAndExit")),b.className="geMenuItem gePrimaryBtn",b.style.fontSize="14px",b.style.marginLeft="6px",b.style.padding="6px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geMenuItem";b.style.fontSize="14px";b.style.marginLeft="6px";b.style.padding="6px";
-b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var g=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;g.apply(this,arguments);
+b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.buttonContainer.appendChild(a);this.buttonContainer.style.top="6px"}};Sidebar.prototype.getTooltipOffset=function(){var a=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);a.y+=40;return a};var f=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(a,b,c){var d=this.editorUi.editor.graph;a.smartSeparators=!0;f.apply(this,arguments);
mxUtils.bind(this,function(a,b){var c=new FilenameDialog(this.editorUi,a,mxResources.get("apply"),function(a){b(parseFloat(a))},mxResources.get("spacing"));this.editorUi.showDialog(c.container,300,80,!0,!0);c.init()});1==d.getSelectionCount()?(this.addMenuItems(a,["editTooltip","-"],null,c),d.isCellFoldable(d.getSelectionCell())&&this.addMenuItems(a,d.isCellCollapsed(b)?["expand"]:["collapse"],null,c),this.addMenuItems(a,["lockUnlock","enterGroup"],null,c),a.addSeparator(),this.addSubmenu("layout",
-a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var f=
+a)):d.isSelectionEmpty()&&d.isEnabled()?(a.addSeparator(),this.addSubmenu("insert",a),this.addSubmenu("layout",a),a.addSeparator(),this.addSubmenu("options",a),this.addMenuItems(a,["-","exitGroup"],null,c)):d.isEnabled()&&this.addMenuItems(a,["-","lockUnlock"],null,c)};EditorUi.prototype.toggleFormatPanel=function(a){null!=this.formatWindow&&this.formatWindow.window.setVisible(a?!1:!this.formatWindow.window.isVisible())};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!0};var g=
EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
-(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);f.apply(this,arguments)};var p=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
-function(a){p.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var r=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(a,b,c,d){var e=g.menus.get(a),f=K.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));f.className="geMenuItem";f.style.display="inline-block";f.style.boxSizing=
-"border-box";f.style.top="6px";f.style.marginRight="6px";f.style.height="30px";f.style.paddingTop="6px";f.style.paddingBottom="6px";f.setAttribute("title",mxResources.get(a));g.menus.menuCreated(e,f,"geMenuItem");null!=c?(f.style.backgroundImage="url("+c+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.width="34px",f.innerHTML="",mxUtils.setOpacity(f,d||40)):b||(f.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")",f.style.backgroundPosition="right 6px center",f.style.backgroundRepeat="no-repeat",f.style.paddingRight="22px");return f}function d(a,b,c,d,e,f){var g=document.createElement("a");g.setAttribute("href","javascript:void(0)");g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";C.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition=
-"center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);mxUtils.setOpacity(g,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),mxUtils.setOpacity(g,null!=f?40:100),g.style.cursor=""):(g.setAttribute("disabled","disabled"),
-mxUtils.setOpacity(g,null!=f?10:20),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function f(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));C.appendChild(b);return b}
-r.apply(this,arguments);var g=this,k=this.editor.graph;mxUtils.bind(k,k.isEnabled);var l=document.createElement("div");l.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";l.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(l);g.actions.get("insertText").label=mxResources.get("text");g.actions.get("insertText").label=mxResources.get("text");g.actions.get("editDiagram").label=mxResources.get("formatXml")+
-"...";g.actions.get("insertRectangle").label=mxResources.get("rectangle");g.actions.get("insertEllipse").label=mxResources.get("ellipse");g.actions.get("insertRhombus").label=mxResources.get("rhombus");g.actions.get("insertImage").label=mxResources.get("image")+"...";g.actions.get("insertLink").label=mxResources.get("link")+"...";g.actions.get("createShape").label=mxResources.get("shape")+"...";g.actions.get("outline").label=mxResources.get("outline")+"...";g.actions.get("layers").label=mxResources.get("layers")+
-"...";g.actions.put("importFile",new Action("File...",function(){k.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&g.importFiles(a.files,null,null,g.maxImageSize)});a.click()}));g.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){k.popupMenuHandler.hideMenu();g.showImportCsvDialog()}));g.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
-new ParseDialog(g,"Insert from Text");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(g,"Insert from Text","formatSql");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(g,"Insert from Text","plantUml");g.showDialog(a.container,620,420,!0,!1);a.init()}));g.actions.put("toggleShapes",new Action(mxResources.get("shapes")+
-"...",function(){b(g)}));g.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(g)}));var n=function(a,b,c,d){a.addItem(c,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(g,c,d);g.showDialog(a.container,620,420,!0,!1);a.init()}),b)};g.menus.put("diagram",new Menu(mxUtils.bind(this,function(a,b){g.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?g.menus.addMenuItems(a,"new open - save saveAs -".split(" "),
-b):"1"==urlParams.embed?(g.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&g.menus.addMenuItems(a,["saveAndExit"],b),a.addSeparator(b)):(g.menus.addMenuItems(a,["new"],b),g.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),g.menus.addSubmenu("save",a,b));g.menus.addSubmenu("exportAs",a,b);var c=g.getCurrentFile();null!=c&&c.constructor==DriveFile&&(g.menus.addMenuItems(a,["-","share"],b),null!=c.realtime&&g.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));g.menus.addMenuItems(a,
-"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||g.menus.addMenuItems(a,["-","print","-"],b);g.menus.addSubmenu("help",a,b);"1"==urlParams.embed?g.menus.addMenuItems(a,["-","exit"],b):g.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var l=g.menus.get("openFrom"),p=l.funct;l.funct=function(a,b){p.apply(this,arguments);a.addSeparator(b);g.menus.addSubmenu("openRecent",a,b)}}g.menus.put("save",new Menu(mxUtils.bind(this,function(a,b){var c=g.getCurrentFile();
-null!=c&&c.constructor==DriveFile?g.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],b):g.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==c||c.constructor!=DriveFile&&c.constructor!=DropboxFile||g.menus.addMenuItems(a,["-","revisionHistory"],b);g.menus.addMenuItems(a,["-","autosave"],b)})));var q=g.menus.get("exportAs");g.menus.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){q.funct(a,b);a.addSeparator(b);g.menus.addSubmenu("embed",a,b);
-g.menus.addMenuItems(a,["publishLink"],b)})));var t=g.menus.get("language");g.menus.put("preferences",new Menu(mxUtils.bind(this,function(a,b){"1"!=urlParams.embed&&g.menus.addSubmenu("theme",a,b);null!=t&&g.menus.addSubmenu("language",a,b);a.addSeparator(b);g.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&g.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);g.isOfflineApp()||"1"==urlParams.embed||g.menus.addMenuItems(a,["-",
-"plugins"],b)})));g.menus.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));g.menus.put("insert",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),
-b);g.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);g.menus.addSubmenu("insertLayout",a,b);g.menus.addSubmenu("insertAdvanced",a,b)})));var B="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" ");g.menus.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<B.length;c++)"-"==B[c]?a.addSeparator(b):n(a,b,mxResources.get(B[c])+"...",B[c])})));g.menus.put("options",new Menu(mxUtils.bind(this,function(a,b){g.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
-b)})));g.toolbar=g.createToolbar(g.createDiv("geToolbar"));g.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.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 K=new Menubar(g,C);(l=900>e)||c("diagram");f([l?c("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,d(mxResources.get("shapes"),g.actions.get("toggleShapes").funct,
-null,mxResources.get("shapes"),g.actions.get("image"),l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),d(mxResources.get("format"),g.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+g.actions.get("formatPanel").shortcut+")",g.actions.get("image"),
-l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
-null)]);var x=c("insert",!0,l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);f([x,d(mxResources.get("delete"),g.actions.get("delete").funct,null,mxResources.get("delete"),g.actions.get("delete"),l?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
-null)]);if(480<=e){var E=g.actions.get("undo"),l=g.actions.get("redo"),E=d("",E.funct,null,mxResources.get("undo")+" ("+E.shortcut+")",E,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),l=d("",l.funct,
-null,mxResources.get("redo")+" ("+l.shortcut+")",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");f([E,l]);if(560<=e){var l=g.actions.get("zoomIn"),E=g.actions.get("zoomOut"),z=g.actions.get("resetView");
-f([d("",function(){k.popupMenuHandler.hideMenu();var a=k.view.scale,b=k.view.translate.x,c=k.view.translate.y;g.actions.get("resetView").funct();1E-5>Math.abs(a-k.view.scale)&&b==k.view.translate.x&&c==k.view.translate.y&&g.actions.get(k.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",z,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
-640<=e?d("",l.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",l,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
-null,640<=e?d("",E.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",E,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null])}}g.statusContainer=g.createStatusContainer();g.statusContainer.style.position="relative";g.statusContainer.style.maxWidth="";g.statusContainer.style.marginTop="7px";g.statusContainer.style.marginLeft="6px";g.statusContainer.style.color="gray";g.statusContainer.style.cursor="default";g.editor.addListener("statusChanged",mxUtils.bind(this,function(){g.setStatusText(g.editor.getStatus())}));var J=g.descriptorChanged;g.descriptorChanged=function(){J.apply(this,arguments);var a=g.getCurrentFile();
-if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);C.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else C.removeAttribute("title")};g.setStatusText(g.editor.getStatus());C.appendChild(g.statusContainer);g.buttonContainer=document.createElement("div");g.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";C.appendChild(g.buttonContainer);g.menubarContainer=
-g.buttonContainer;null!=t&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=e&&(x=K.addMenu("",t.funct),x.setAttribute("title",mxResources.get("language")),x.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
-x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="24px 24px",x.style.position="absolute",x.style.height="24px",x.style.width="24px",x.style.zIndex="1",x.style.top="11px",x.style.right="14px",mxUtils.setOpacity(x,30),C.appendChild(x));g.tabContainer=document.createElement("div");g.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
-l=g.diagramContainer.parentNode;E=document.createElement("div");E.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";g.diagramContainer.style.top="47px";g.diagramContainer.style.bottom="30px";z=g.menus.get("viewZoom");if(null!=z){this.tabContainer.style.right="70px";x=K.addMenu("100%",z.funct);x.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");x.style.whiteSpace="nowrap";x.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";x.style.backgroundPosition=
-"right 6px center";x.style.backgroundRepeat="no-repeat";x.style.paddingRight="10px";x.style.display="block";x.style.position="absolute";x.style.textDecoration="none";x.style.textDecoration="none";x.style.right="0px";x.style.bottom="0px";x.style.overflow="hidden";x.style.textAlign="center";x.style.color="#000";x.style.fontSize="12px";x.style.color="#707070";x.style.width="59px";x.style.borderTop="1px solid lightgray";x.style.borderLeft="1px solid lightgray";x.style.height=parseInt(g.tabContainer.style.height)-
-1+"px";x.style.lineHeight=parseInt(g.tabContainer.style.height)+1+"px";E.appendChild(x);z=mxUtils.bind(this,function(){x.innerHTML=Math.round(100*g.editor.graph.view.scale)+"%"});g.editor.graph.view.addListener(mxEvent.EVENT_SCALE,z);g.editor.addListener("resetGraphView",z);g.editor.addListener("pageSelected",z);var V=g.setGraphEnabled;g.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(x.style.visibility=this.tabContainer.style.visibility)}}E.appendChild(g.tabContainer);
-E.appendChild(C);E.appendChild(g.diagramContainer);l.appendChild(E);g.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=g.sidebarWindow&&g.sidebarWindow.window.fit();null!=g.formatWindow&&g.formatWindow.window.fit();null!=g.actions.outlineWindow&&g.actions.outlineWindow.window.fit();null!=g.actions.layersWindow&&g.actions.layersWindow.window.fit();null!=g.menus.tagsWindow&&g.menus.tagsWindow.window.fit();null!=g.menus.findWindow&&g.menus.findWindow.window.fit()})}}};
+(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.window.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);g.apply(this,arguments)};var n=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=
+function(a){n.apply(this,arguments);a||(null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1))};EditorUi.prototype.chromelessWindowResize=function(){};var r=Menus.prototype.init;Menus.prototype.init=function(){r.apply(this,arguments);var c=this.editorUi,d=c.editor.graph;c.actions.get("insertText").label=mxResources.get("text");c.actions.get("insertText").label=mxResources.get("text");c.actions.get("editDiagram").label=mxResources.get("formatXml")+
+"...";c.actions.get("insertRectangle").label=mxResources.get("rectangle");c.actions.get("insertEllipse").label=mxResources.get("ellipse");c.actions.get("insertRhombus").label=mxResources.get("rhombus");c.actions.get("insertImage").label=mxResources.get("image")+"...";c.actions.get("insertLink").label=mxResources.get("link")+"...";c.actions.get("createShape").label=mxResources.get("shape")+"...";c.actions.get("outline").label=mxResources.get("outline")+"...";c.actions.get("layers").label=mxResources.get("layers")+
+"...";c.actions.put("importFile",new Action("File...",function(){d.popupMenuHandler.hideMenu();var a=document.createElement("input");a.setAttribute("type","file");mxEvent.addListener(a,"change",function(){null!=a.files&&c.importFiles(a.files,null,null,c.maxImageSize)});a.click()}));c.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){d.popupMenuHandler.hideMenu();c.showImportCsvDialog()}));c.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var a=
+new ParseDialog(c,"Insert from Text");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var a=new ParseDialog(c,"Insert from Text","formatSql");c.showDialog(a.container,620,420,!0,!1);a.init()}));c.actions.put("toggleShapes",new Action(mxResources.get("shapes")+"...",function(){b(c)}));c.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){a(c)}));EditorUi.enablePlantUml&&c.actions.put("plantUml",
+new Action(mxResources.get("plantUml")+"...",function(){var a=new ParseDialog(c,"Insert from Text","plantUml");c.showDialog(a.container,620,420,!0,!1);a.init()}));this.put("diagram",new Menu(mxUtils.bind(this,function(a,b){c.menus.addSubmenu("preferences",a,b);a.addSeparator(b);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.menus.addMenuItems(a,"new open - save saveAs -".split(" "),b):"1"==urlParams.embed?(c.menus.addMenuItems(a,["-","save"],b),"1"==urlParams.saveAndExit&&c.menus.addMenuItems(a,
+["saveAndExit"],b),a.addSeparator(b)):(c.menus.addMenuItems(a,["new"],b),c.menus.addSubmenu("openFrom",a,b),a.addSeparator(b),c.menus.addSubmenu("save",a,b));c.menus.addSubmenu("exportAs",a,b);var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile&&(c.menus.addMenuItems(a,["-","share"],b),null!=d.realtime&&c.menus.addMenuItems(a,["chatWindowTitle"],b),a.addSeparator(b));c.menus.addMenuItems(a,"- outline layers - find tags -".split(" "),b);mxClient.IS_IOS&&navigator.standalone||c.menus.addMenuItems(a,
+["-","print","-"],b);c.menus.addSubmenu("help",a,b);"1"==urlParams.embed?c.menus.addMenuItems(a,["-","exit"],b):c.menus.addMenuItems(a,["-","close"])})));if(isLocalStorage){var e=this.get("openFrom"),f=e.funct;e.funct=function(a,b){f.apply(this,arguments);a.addSeparator(b);c.menus.addSubmenu("openRecent",a,b)}}this.put("save",new Menu(mxUtils.bind(this,function(a,b){var d=c.getCurrentFile();null!=d&&d.constructor==DriveFile?c.menus.addMenuItems(a,["createRevision","makeCopy","-","rename","moveToFolder"],
+b):c.menus.addMenuItems(a,["save","saveAs","-","rename","makeCopy"],b);null==d||d.constructor!=DriveFile&&d.constructor!=DropboxFile||c.menus.addMenuItems(a,["-","revisionHistory"],b);c.menus.addMenuItems(a,["-","autosave"],b)})));var g=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(a,b){g.funct(a,b);a.addSeparator(b);c.menus.addSubmenu("embed",a,b);c.menus.addMenuItems(a,["publishLink"],b)})));var h=this.get("language");this.put("preferences",new Menu(mxUtils.bind(this,
+function(a,b){"1"!=urlParams.embed&&c.menus.addSubmenu("theme",a,b);null!=h&&c.menus.addSubmenu("language",a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","pageScale"],b);"1"!=urlParams.embed&&isLocalStorage&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);c.isOfflineApp()||"1"==urlParams.embed||c.menus.addMenuItems(a,["-","plugins"],b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText createShape plantUml - importCsv editDiagram formatSql - insertPage".split(" "),
+b)})));mxResources.parse("insertLayout="+mxResources.get("layout"));mxResources.parse("insertAdvanced="+mxResources.get("advanced"));this.put("insert",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"insertRectangle insertEllipse insertRhombus - insertText insertLink - insertImage".split(" "),b);c.menus.addSubmenu("importFrom",a,b);a.addSeparator(b);c.menus.addSubmenu("insertLayout",a,b);c.menus.addSubmenu("insertAdvanced",a,b)})));var k="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+l=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,b){for(var c=0;c<k.length;c++)"-"==k[c]?a.addSeparator(b):l(a,b,mxResources.get(k[c])+"...",k[c])})));this.put("options",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides - connectionArrows connectionPoints - copyConnect collapseExpand - mathematicalTypesetting".split(" "),
+b)})))};var h=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c,d){var e=f.menus.get(a),g=k.addMenu(mxResources.get(a),mxUtils.bind(this,function(){e.funct.apply(this,arguments)}));g.className="geMenuItem";g.style.display="inline-block";g.style.boxSizing="border-box";g.style.top="6px";g.style.marginRight="6px";g.style.height="30px";g.style.paddingTop="6px";g.style.paddingBottom="6px";g.setAttribute("title",mxResources.get(a));f.menus.menuCreated(e,g,"geMenuItem");null!=c?
+(g.style.backgroundImage="url("+c+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px",g.innerHTML="",mxUtils.setOpacity(g,d||40)):b||(g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.style.backgroundPosition="right 6px center",g.style.backgroundRepeat="no-repeat",g.style.paddingRight="22px");return g}function b(a,b,c,d,e,f){var h=document.createElement("a");h.setAttribute("href","javascript:void(0)");
+h.className="geMenuItem";h.style.display="inline-block";h.style.boxSizing="border-box";h.style.height="30px";h.style.padding="6px";h.style.position="relative";h.style.verticalAlign="top";h.style.top="0px";g.appendChild(h);null!=f?(h.style.backgroundImage="url("+f+")",h.style.backgroundPosition="center center",h.style.backgroundRepeat="no-repeat",h.style.backgroundSize="24px 24px",h.style.width="34px"):mxUtils.write(h,a);mxEvent.addListener(h,"click",function(a){"disabled"!=h.getAttribute("disabled")&&
+b(a);mxEvent.consume(a)});null==c&&(h.style.marginRight="4px");null!=d&&h.setAttribute("title",d);mxUtils.setOpacity(h,null!=f?40:100);null!=e&&(a=function(){e.isEnabled()?(h.removeAttribute("disabled"),mxUtils.setOpacity(h,null!=f?40:100),h.style.cursor=""):(h.setAttribute("disabled","disabled"),mxUtils.setOpacity(h,null!=f?10:20),h.style.cursor="default")},e.addListener("stateChanged",a),a());return h}function c(a){var b=document.createElement("div");b.className="geMenuItem";b.style.display="inline-block";
+b.style.verticalAlign="top";b.style.marginRight="6px";b.style.padding="0 4px 0 4px";b.style.height="30px";b.style.position="relative";b.style.top="0px";for(var c=0;c<a.length;c++)null!=a[c]&&(a[c].style.margin="0px",a[c].style.boxShadow="none",b.appendChild(a[c]));g.appendChild(b);return b}h.apply(this,arguments);var d=document.createElement("div");d.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";d.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?
+"63px":"32px";this.sidebar=this.createSidebar(d);var f=this;f.toolbar=this.createToolbar(f.createDiv("geToolbar"));f.defaultLibraryName=mxResources.get("untitledLibrary");var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var k=new Menubar(f,g);(d=900>e)||a("diagram");c([d?a("diagram",null,IMAGE_PATH+"/drawlogo-gray.svg",100):null,b(mxResources.get("shapes"),
+f.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),f.actions.get("image"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTMgMTN2OGg4di04aC04ek0zIDIxaDh2LThIM3Y4ek0zIDN2OGg4VjNIM3ptMTMuNjYtMS4zMUwxMSA3LjM0IDE2LjY2IDEzbDUuNjYtNS42Ni01LjY2LTUuNjV6Ii8+PC9zdmc+":null),b(mxResources.get("format"),f.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+f.actions.get("formatPanel").shortcut+
+")",f.actions.get("image"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgM2MtNC45NyAwLTkgNC4wMy05IDlzNC4wMyA5IDkgOWMuODMgMCAxLjUtLjY3IDEuNS0xLjUgMC0uMzktLjE1LS43NC0uMzktMS4wMS0uMjMtLjI2LS4zOC0uNjEtLjM4LS45OSAwLS44My42Ny0xLjUgMS41LTEuNUgxNmMyLjc2IDAgNS0yLjI0IDUtNSAwLTQuNDItNC4wMy04LTktOHptLTUuNSA5Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTNS42NyA5IDYuNSA5IDggOS42NyA4IDEwLjUgNy4zMyAxMiA2LjUgMTJ6bTMtNEM4LjY3IDggOCA3LjMzIDggNi41UzguNjcgNSA5LjUgNXMxLjUuNjcgMS41IDEuNVMxMC4zMyA4IDkuNSA4em01IDBjLS44MyAwLTEuNS0uNjctMS41LTEuNVMxMy42NyA1IDE0LjUgNXMxLjUuNjcgMS41IDEuNVMxNS4zMyA4IDE0LjUgOHptMyA0Yy0uODMgMC0xLjUtLjY3LTEuNS0xLjVTMTYuNjcgOSAxNy41IDlzMS41LjY3IDEuNSAxLjUtLjY3IDEuNS0xLjUgMS41eiIvPjwvc3ZnPg==":
+null)]);var l=a("insert",!0,d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgMTNoLTZ2NmgtMnYtNkg1di0yaDZWNWgydjZoNnYyeiIvPjwvc3ZnPg==":null,40);c([l,b(mxResources.get("delete"),f.actions.get("delete").funct,null,mxResources.get("delete"),f.actions.get("delete"),d?"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==":
+null)]);if(480<=e){var n=f.actions.get("undo"),d=f.actions.get("redo"),n=b("",n.funct,null,mxResources.get("undo")+" ("+n.shortcut+")",n,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+"),d=b("",d.funct,
+null,mxResources.get("redo")+" ("+d.shortcut+")",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==");c([n,d]);if(560<=e){var d=f.actions.get("zoomIn"),n=f.actions.get("zoomOut"),p=f.actions.get("resetView");
+c([b("",function(){graph.popupMenuHandler.hideMenu();var a=graph.view.scale,b=graph.view.translate.x,c=graph.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(a-graph.view.scale)&&b==graph.view.translate.x&&c==graph.view.translate.y&&f.actions.get(graph.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",p,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
+640<=e?b("",d.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",d,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
+null,640<=e?b("",n.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",n,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
+null])}}f.statusContainer=f.createStatusContainer();f.statusContainer.style.position="relative";f.statusContainer.style.maxWidth="";f.statusContainer.style.marginTop="7px";f.statusContainer.style.marginLeft="6px";f.statusContainer.style.color="gray";f.statusContainer.style.cursor="default";f.editor.addListener("statusChanged",mxUtils.bind(this,function(){f.setStatusText(f.editor.getStatus())}));var q=f.descriptorChanged;f.descriptorChanged=function(){q.apply(this,arguments);var a=f.getCurrentFile();
+if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);g.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else g.removeAttribute("title")};f.setStatusText(f.editor.getStatus());g.appendChild(f.statusContainer);f.buttonContainer=document.createElement("div");f.buttonContainer.style.cssText="position:absolute;right:40px;top:12px;white-space:nowrap;";g.appendChild(f.buttonContainer);f.menubarContainer=
+f.buttonContainer;d=this.menus.get("language");null!=d&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&480<=e&&(l=k.addMenu("",d.funct),l.setAttribute("title",mxResources.get("language")),l.style.backgroundImage="url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==)",
+l.style.backgroundPosition="center center",l.style.backgroundRepeat="no-repeat",l.style.backgroundSize="24px 24px",l.style.position="absolute",l.style.height="24px",l.style.width="24px",l.style.zIndex="1",l.style.top="11px",l.style.right="14px",mxUtils.setOpacity(l,30),g.appendChild(l));f.tabContainer=document.createElement("div");f.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;";
+d=f.diagramContainer.parentNode;n=document.createElement("div");n.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";f.diagramContainer.style.top="47px";f.diagramContainer.style.bottom="30px";p=f.menus.get("viewZoom");if(null!=p){this.tabContainer.style.right="70px";l=k.addMenu("100%",p.funct);l.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");l.style.whiteSpace="nowrap";l.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";l.style.backgroundPosition=
+"right 6px center";l.style.backgroundRepeat="no-repeat";l.style.paddingRight="10px";l.style.display="block";l.style.position="absolute";l.style.textDecoration="none";l.style.textDecoration="none";l.style.right="0px";l.style.bottom="0px";l.style.overflow="hidden";l.style.textAlign="center";l.style.color="#000";l.style.fontSize="12px";l.style.color="#707070";l.style.width="59px";l.style.borderTop="1px solid lightgray";l.style.borderLeft="1px solid lightgray";l.style.height=parseInt(f.tabContainer.style.height)-
+1+"px";l.style.lineHeight=parseInt(f.tabContainer.style.height)+1+"px";n.appendChild(l);p=mxUtils.bind(this,function(){l.innerHTML=Math.round(100*f.editor.graph.view.scale)+"%"});f.editor.graph.view.addListener(mxEvent.EVENT_SCALE,p);f.editor.addListener("resetGraphView",p);f.editor.addListener("pageSelected",p);var r=f.setGraphEnabled;f.setGraphEnabled=function(){r.apply(this,arguments);null!=this.tabContainer&&(l.style.visibility=this.tabContainer.style.visibility)}}n.appendChild(f.tabContainer);
+n.appendChild(g);n.appendChild(f.diagramContainer);d.appendChild(n);f.updateTabContainer();mxEvent.addListener(window,"resize",function(){null!=f.sidebarWindow&&f.sidebarWindow.window.fit();null!=f.formatWindow&&f.formatWindow.window.fit();null!=f.actions.outlineWindow&&f.actions.outlineWindow.window.fit();null!=f.actions.layersWindow&&f.actions.layersWindow.window.fit();null!=f.menus.tagsWindow&&f.menus.tagsWindow.window.fit();null!=f.menus.findWindow&&f.menus.findWindow.window.fit()})}}};
(function(){var a=!1;"min"!=uiTheme||a||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),a=!0);var b=EditorUi.initTheme;EditorUi.initTheme=function(){b.apply(this,arguments);"min"!=uiTheme||a||(this.initMinimalTheme(),a=!0)}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndark=Dark\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\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\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 by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 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\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#2a2a2a"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#f0f0f0"/><add as="fontColor" value="#f0f0f0"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="#2a2a2a"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#2a2a2a"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!0;GraphViewer.prototype.allowZoomIn=!1;
GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
@@ -3141,8 +3147,8 @@ GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.au
0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
null!=a)){var c=mxUtils.bind(this,function(){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var c=this;this.graph.getImageFromBundles=function(a){return c.getImageUrl(a)};
mxClient.IS_SVG&&this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<e.length){var k=this.graph.getGlobalVariable,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:k.apply(this,arguments)}}}this.diagrams=[];var d=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);
-this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var g=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",
-g);g();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.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};var f=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",
+f);f();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);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};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",
this.graphConfig.title);this.fireEvent(new mxEventObject("render"))});e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof e){var k=this.getObservableParent(a),l=new e(mxUtils.bind(this,function(b){0<a.offsetWidth&&(l.disconnect(),c())}));l.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};
@@ -3151,26 +3157,26 @@ GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view
GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var c=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,
top:-c.y},b={left:b.left-c.left,top:b.top-c.top,bottom:b.bottom-c.top,right:b.right-c.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),k=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==k||l||(l=!0,this.graph.maxFitScale=
null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},k=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",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,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var n=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(n);l||(n=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%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
-null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;q()}};
+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,100,1),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var q=k=null,c=mxUtils.bind(this,function(){window.clearTimeout(q);l||(q=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 p=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
+null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),k=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;p()}};
GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),n=0;n<l;n++)k.setVisible(k.getChildAt(k.root,n),null!=b?c.isVisible(c.getChildAt(c.root,n)):!1);if(null==c)for(n=0;n<e.length;n++)k.setVisible(k.getChildAt(k.root,parseInt(e[n])),!0)}finally{k.endUpdate()}}};
-GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;return f}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";
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var c=null!=b?b.getModel():null,k=a.getModel();k.beginUpdate();try{for(var l=k.getChildCount(k.root),q=0;q<l;q++)k.setVisible(k.getChildAt(k.root,q),null!=b?c.isVisible(c.getChildAt(c.root,q)):!1);if(null==c)for(q=0;q<e.length;q++)k.setVisible(k.getChildAt(k.root,parseInt(e[q])),!0)}finally{k.endUpdate()}}};
+GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
+function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);f++;return g}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var c=null,k=null,l=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)}),n=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)||(n(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){n(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){n(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||n(30)}));var q=this.graph,t=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<t&&Math.abs(this.scrollTop-q.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(e.style.opacity||0)?l():n(30))}})}for(var d=this.toolbarItems,g=0,f=null,p=null,r=0;r<d.length;r++){var h=d[r];if("pages"==h){p=b.ownerDocument.createElement("div");
-p.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(p,70);var w=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");w.style.borderRightStyle="none";w.style.paddingLeft="0px";w.style.paddingRight="0px";e.appendChild(p);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";h=mxUtils.bind(this,function(){p.innerHTML="";mxUtils.write(p,this.currentPage+1+" / "+this.diagrams.length);p.style.display=1<this.diagrams.length?"inline-block":"none";w.style.display=p.style.display;u.style.display=p.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==h){if(this.layersEnabled){var m=this.graph.getModel(),v=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=v.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");m.addListener(mxEvent.CHANGE,function(){v.style.display=1<m.getChildCount(m.root)?"inline-block":"none"});v.style.display=1<m.getChildCount(m.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
-null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
-70),e.appendChild(d));this.minToolbarWidth=34*g;var D=b.style.border,d=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==D&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=f&&(f.parentNode.removeChild(f),
-f=null),b.style.border=D)});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()})});mxEvent.addListener(b,"mouseenter",d)};
+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),l())}));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 p=this.graph,v=p.getTolerance();p.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+p.container.scrollLeft;this.scrollTop=p.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-p.container.scrollLeft)<v&&Math.abs(this.scrollTop-p.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.style.opacity||0)?l():q(30))}})}for(var d=this.toolbarItems,f=0,g=null,n=null,r=0;r<d.length;r++){var h=d[r];if("pages"==h){n=b.ownerDocument.createElement("div");
+n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var m=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");m.style.borderRightStyle="none";m.style.paddingLeft="0px";m.style.paddingRight="0px";e.appendChild(n);var u=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");u.style.paddingLeft="0px";u.style.paddingRight="0px";h=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";m.style.display=n.style.display;u.style.display=n.style.display});this.addListener("graphChanged",h);h()}else if("zoom"==h)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==h){if(this.layersEnabled){var w=this.graph.getModel(),t=a(mxUtils.bind(this,function(a){if(null!=g)g.parentNode.removeChild(g),
+g=null;else{g=this.graph.createLayersDialog();mxEvent.addListener(g,"mouseleave",function(){g.parentNode.removeChild(g);g=null});a=t.getBoundingClientRect();g.style.width="140px";g.style.padding="2px 0px 2px 0px";g.style.border="1px solid #d0d0d0";g.style.backgroundColor="#eee";g.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";g.style.fontSize="11px";g.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(g,80);var b=mxUtils.getDocumentScrollOrigin(document);g.style.left=b.x+a.left+
+"px";g.style.top=b.y+a.bottom+"px";document.body.appendChild(g)}}),Editor.layersImage,mxResources.get("layers")||"Layers");w.addListener(mxEvent.CHANGE,function(){t.style.display=1<w.getChildCount(w.root)?"inline-block":"none"});t.style.display=1<w.getChildCount(w.root)?"inline-block":"none"}}else"lightbox"==h?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(h=this.graphConfig["toolbar-buttons"][h],
+null!=h&&a(null==h.enabled||h.enabled?h.handler:function(){},h.image,h.title,h.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*f);null!=this.graphConfig.title&&(d=b.ownerDocument.createElement("div"),d.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;",d.setAttribute("title",this.graphConfig.title),mxUtils.write(d,this.graphConfig.title),mxUtils.setOpacity(d,
+70),e.appendChild(d));this.minToolbarWidth=34*f;var x=b.style.border,d=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==x&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=g&&(g.parentNode.removeChild(g),
+g=null),b.style.border=x)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==g)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",d)};
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.isExternalProtocol(c)||a.isBlankLink(c)||window.setTimeout(function(){b.destroy()},0):null==c||!a.isPageLink(c)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(k=c.indexOf(","),0<k&&(k=c.substring(k+
1),this.selectPageById(k),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&&
@@ -3179,18 +3185,18 @@ GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.l
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){c.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||
10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var c=new EditorUi(new Editor(!0),document.createElement("div"),!0);c.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";c.refresh=function(){};var k=mxUtils.bind(this,function(a){27==a.keyCode&&
-c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var n=c.editor.graph,q=n.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");
-var t=this;n.getImageFromBundles=function(a){return t.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return t.getImageUrl(a)};return a};this.graphConfig.move&&(n.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
-(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(n,c);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
-this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute",c.chromelessToolbar.style.bottom="",
-c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(n,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};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;}})};
+c.destroy()}),l=c.destroy;c.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",k);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var q=c.editor.graph,p=q.container;p.style.overflow="hidden";this.lightboxChrome?(p.style.border="1px solid #c0c0c0",p.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",k)):(b.style.display="none",e.style.display="none");
+var v=this;q.getImageFromBundles=function(a){return v.getImageUrl(a)};var d=c.createTemporaryGraph;c.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return v.getImageUrl(a)};return a};this.graphConfig.move&&(q.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(p.style,"border-radius","4px"),p.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||
+(mxUtils.setPrefixedStyle(p.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(p.style,"transition","all .25s ease-in-out"));this.addClickHandler(q,c);window.setTimeout(mxUtils.bind(this,function(){p.style.outline="none";p.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(p);document.body.appendChild(e);c.setFileData(this.xml);mxUtils.setPrefixedStyle(p.style,"transform","rotateY(0deg)");c.chromelessToolbar.style.bottom="60px";c.chromelessToolbar.style.zIndex=
+this.lightboxZIndex;document.body.appendChild(c.chromelessToolbar);c.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(p.style.position="absolute",p.style.display="block",p.style.left=a.x+"px",p.style.top=a.y+"px",p.style.width=document.body.clientWidth-80+"px",p.style.height=document.body.clientHeight-80+"px",p.style.backgroundColor="white",c.chromelessToolbar.style.display="block",c.chromelessToolbar.style.position="absolute",c.chromelessToolbar.style.bottom="",
+c.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");c.lightboxFit();c.chromelessResize();this.showLayers(q,this.graph);mxEvent.addListener(b,"click",function(){c.destroy()})}),0);return c};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 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 c=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 l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function n(b,c){if(!b.resizedAttached)b.resizedAttached=
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(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 l(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"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,t,H,y=function(){if((t=b.offsetWidth)!=p||(H=b.offsetHeight)!=q)m=!0,p=t,q=H;g()},B=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};B(d,"scroll",y);B(f,"scroll",y)}var q=function(){GraphViewer.resizeSensorEnabled&&c()},t=Object.prototype.toString.call(e),d="[object Array]"===t||"[object NodeList]"===t||"[object HTMLCollection]"===t||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var t=0,g=e.length;t<g;t++)n(e[t],q);else n(e,q);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var n=!1,p=function(){b.resizedAttached&&(n&&(b.resizedAttached.call(),n=!1),a(p))};a(p);var q,v,D,G,B=function(){if((D=b.offsetWidth)!=q||(G=b.offsetHeight)!=v)n=!0,q=D,v=G;g()},y=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};y(d,"scroll",B);y(f,"scroll",B)}var p=function(){GraphViewer.resizeSensorEnabled&&c()},v=Object.prototype.toString.call(e),d="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(d)for(var v=0,f=e.length;v<f;v++)q(e[v],p);else q(e,p);this.detach=function(){if(d)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
(function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/plugins/update.js b/src/main/webapp/plugins/update.js
index 5628e4d5..78423c9f 100644
--- a/src/main/webapp/plugins/update.js
+++ b/src/main/webapp/plugins/update.js
@@ -103,217 +103,19 @@ Draw.loadPlugin(function(editorUi)
function parseResponse(xml)
{
- if (xml != null && xml.length > 0)
+ var doc = editorUi.updateDiagram(xml);
+ var node = (doc != null) ? doc.documentElement : null;
+
+ if (node != null && node.nodeName == 'updates')
{
- var doc = mxUtils.parseXml(xml);
- var node = (doc != null) ? doc.documentElement : null;
+ if (node.hasAttribute('url'))
+ {
+ updateUrl = node.getAttribute('url');
+ }
- if (node != null && node.nodeName == 'updates')
+ if (node.hasAttribute('interval'))
{
- if (node.hasAttribute('url'))
- {
- updateUrl = node.getAttribute('url');
- }
-
- if (node.hasAttribute('interval'))
- {
- updateInterval = node.getAttribute('interval');
- }
-
- var model = graph.getModel();
- model.beginUpdate();
- var fit = null;
-
- try
- {
- node = node.firstChild;
-
- while (node != null)
- {
- if (node.nodeName == 'update')
- {
- // Resolves the cell ID
- var cell = model.getCell(node.getAttribute('id'));
-
- if (cell != null)
- {
- // Changes the value
- try
- {
- var value = node.getAttribute('value');
-
- if (value != null)
- {
- var valueNode = mxUtils.parseXml(value).documentElement;
-
- if (valueNode != null)
- {
- if (valueNode.getAttribute('replace-value') == '1')
- {
- model.setValue(cell, valueNode);
- }
- else
- {
- var attrs = valueNode.attributes;
-
- for (var j = 0; j < attrs.length; j++)
- {
- graph.setAttributeForCell(cell, attrs[j].nodeName,
- (attrs[j].nodeValue.length > 0) ? attrs[j].nodeValue : null);
- }
- }
- }
- }
- }
- catch (e)
- {
- console.log('Error in value for ' + cell.id + ': ' + e);
- }
-
- // Changes the style
- try
- {
- var style = node.getAttribute('style');
-
- if (style != null)
- {
- graph.model.setStyle(cell, style);
- }
- }
- catch (e)
- {
- console.log('Error in style for ' + cell.id + ': ' + e);
- }
-
- // Adds or removes an overlay icon
- try
- {
- var icon = node.getAttribute('icon');
-
- if (icon != null)
- {
- var desc = (icon.length > 0) ? JSON.parse(icon) : null;
-
- if (desc == null || !desc.append)
- {
- graph.removeCellOverlays(cell);
- }
-
- if (desc != null)
- {
- graph.addCellOverlay(cell, createOverlay(desc));
- }
- }
- }
- catch (e)
- {
- console.log('Error in icon for ' + cell.id + ': ' + e);
- }
-
- // Replaces the geometry
- try
- {
- var geo = node.getAttribute('geometry');
-
- if (geo != null)
- {
- geo = JSON.parse(geo);
- var curr = graph.getCellGeometry(cell);
-
- if (curr != null)
- {
- curr = curr.clone();
-
- // Partially overwrites geometry
- for (key in geo)
- {
- var val = parseFloat(geo[key]);
-
- if (key == 'dx')
- {
- curr.x += val;
- }
- else if (key == 'dy')
- {
- curr.y += val;
- }
- else if (key == 'dw')
- {
- curr.width += val;
- }
- else if (key == 'dh')
- {
- curr.height += val;
- }
- else
- {
- curr[key] = parseFloat(geo[key]);
- }
- }
-
- graph.model.setGeometry(cell, curr);
- }
- }
- }
- catch (e)
- {
- console.log('Error in icon for ' + cell.id + ': ' + e);
- }
- } // if cell != null
- } // if node.nodeName == 'update
- else if (node.nodeName == 'model')
- {
- // Finds first child element
- var dataNode = node.firstChild;
-
- while (dataNode != null && dataNode.nodeType != mxConstants.NODETYPE_ELEMENT)
- {
- dataNode = dataNode.nextSibling;
- }
-
- if (dataNode != null)
- {
- var dec = new mxCodec(node.firstChild);
- dec.decode(dataNode, model);
- }
- }
- else if (node.nodeName == 'view')
- {
- if (node.hasAttribute('scale'))
- {
- graph.view.scale = parseFloat(node.getAttribute('scale'));
- }
-
- if (node.hasAttribute('dx') || node.hasAttribute('dy'))
- {
- graph.view.translate = new mxPoint(parseFloat(node.getAttribute('dx') || 0),
- parseFloat(node.getAttribute('dy') || 0));
- }
- }
- else if (node.nodeName == 'fit')
- {
- if (node.hasAttribute('max-scale'))
- {
- fit = parseFloat(node.getAttribute('max-scale'));
- }
- else
- {
- fit = 1;
- }
- }
-
- node = node.nextSibling;
- } // end of while
- }
- finally
- {
- model.endUpdate();
- }
-
- if (fit != null && editorUi.chromelessResize)
- {
- editorUi.chromelessResize(true, fit);
- }
+ updateInterval = node.getAttribute('interval');
}
}
};
diff --git a/src/main/webapp/templates/business/accd.png b/src/main/webapp/templates/business/accd.png
index ecb2e6c7..2a14f8e7 100644
--- a/src/main/webapp/templates/business/accd.png
+++ b/src/main/webapp/templates/business/accd.png
Binary files differ
diff --git a/src/main/webapp/templates/business/archimate.png b/src/main/webapp/templates/business/archimate.png
index 77d6f188..112fcaf9 100644
--- a/src/main/webapp/templates/business/archimate.png
+++ b/src/main/webapp/templates/business/archimate.png
Binary files differ
diff --git a/src/main/webapp/templates/business/bpmn.png b/src/main/webapp/templates/business/bpmn.png
index c0164a39..42258102 100644
--- a/src/main/webapp/templates/business/bpmn.png
+++ b/src/main/webapp/templates/business/bpmn.png
Binary files differ
diff --git a/src/main/webapp/templates/business/business_model_1.png b/src/main/webapp/templates/business/business_model_1.png
index f67e315e..4622cc9f 100644
--- a/src/main/webapp/templates/business/business_model_1.png
+++ b/src/main/webapp/templates/business/business_model_1.png
Binary files differ
diff --git a/src/main/webapp/templates/business/business_model_2.png b/src/main/webapp/templates/business/business_model_2.png
index 49a9a317..dbc9733c 100644
--- a/src/main/webapp/templates/business/business_model_2.png
+++ b/src/main/webapp/templates/business/business_model_2.png
Binary files differ
diff --git a/src/main/webapp/templates/business/business_model_canvas_1.png b/src/main/webapp/templates/business/business_model_canvas_1.png
new file mode 100644
index 00000000..b9120230
--- /dev/null
+++ b/src/main/webapp/templates/business/business_model_canvas_1.png
Binary files differ
diff --git a/src/main/webapp/templates/business/business_model_canvas_1.xml b/src/main/webapp/templates/business/business_model_canvas_1.xml
new file mode 100644
index 00000000..939bf71e
--- /dev/null
+++ b/src/main/webapp/templates/business/business_model_canvas_1.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="07fea595-8f29-1299-0266-81d95cde20df" name="Page-1">7R3ZcuK49muo6vsA5YUlPCYQZube6Z6upKe77lOXMAJUsS2PJEOYr5+jxRs2hMWEOJNUdQOyLensi47kljsKnn9hKFp+pjPstxxr9txyxy3HGVhDGz5ky0a3OK490C0LRma6zc4aHsnf2DRapjUmM8wLNwpKfUGiYqNHwxB7otCGGKPr4m1z6hdHjdAClxoePeSXW3+QmViaVrs/zC78isliaYa+cQx8U+Q9LRiNQzNey3Hn6k9fDlDSlwGUL9GMrnNN7n3LHTFKhf4WPI+wL5GboE0/N9lxNZ03w6E45IH+8EY/skJ+jJM5q5mJTYINBQ+WT1gt9269JAI/RsiTV9fAANC2FIEPv2z4mkIk7/XRFPt3KU5G1KcMLoU0xPJWwegTrmxMsO5Cy5z4fnIT4BPf4Nlcdj6noTCs009+5+5zJr27wQjakU8WIbT5eA44uTPwYibw806s2SktgMkxDbBgG7jFPNB2nKEhoOFw12BtnXGL4/TMPcscp9i9BOPI8Ogi7T6jE3wxpNpFtmEF2fq+hG9GVgXy9f+KJTcp9LS5wtct3OD0o+fsInxbmE8/ufn0XkYxFwAUgxsesI8EoSFfStk1vQN4eoDioNCsJl9srWiasqMf/bFEEiCxiTB8UJBHi+WmJpUVBY3jWBh5y+QOGksQMmgOHOsRLwLgJNXbcyT1k2PFXOkw2cQFmvqEy1EQ6AmpFUgo4J/iHyHbxRIHLXdyBHREzzpUMCzRSkK5xvnhpAAf3uOvIMNSl2I9G8n8MEm8YEjgWWGiCpNcFHE2jTmBucjJBMo8HD20R7nwN8U5HNHJSazyMr/bVh1Ss7+XadJw/4yCyMd5sZlWQHOkKF0XyK+YcRoiXylAToA5QzAkDQVmjGfEMwKRA+y28YA9Yn/efsRsRZoLw20MWtsQx4ByhgG6LiwjGgRxSARpMghtj2FlcI8E4SreaN7RLLqkvVbJJTUufsEltZ3WwS6pdEZBkfi3pllQCQYHqEi4kF6wlSLiPL912Cu6rWkckvNbu06F29pNHjzHax1Y1k6vtYoRznNC/6eclq+IiRBU8ws8V+kmnDMn29lr4tn5fZw3kx9LmvpW2mXbwlfma50z2fIwT2oYHkeRT+ocRzvAGogHzGEwpe/N2MoVRl6MGGFSphxrzmighadOeA9gswt1/QZUfApl0vCZCrLSMZbEOGU5hG/Fg413bP+IBAnI38bAmcgOezSkwaapMD3gWewZgHTITPhTClwMDi6TcatoLIC33l8x4SQPouRP4sU+YjqwzRSJAhoBPlaXd8Qubj0+nKyLOVlZGvtYL2to1eJl2a/uZd0eKhUXNICXGq6cRCzDbM1o6uB8V2gHT4rRiGrdwpUqAVUDvsgROaw/VH9jAqJBprFRUqMlCkPs82M62pmPPaKPB7zCoQIMpoNRcNTDeXocoiYv6eNUTStFFBJ4QRl5Mee2H1wgfWo4D39k6mPpkT5Sf6Vc1EOfBIKCawWPTr5gsabs6UXc1kWsD6NRm9GwB8PrhubO/gWl+m1GLki79qpQOWq8kj636tXUj5fX1G/AiS9p8W+bSBHRrPKV2azxwebX5YZLtdTU+f8WCtA/2BOxWjD5NGU6uorA/qqFU1BYlkejDZN6zvyeIYH+01SIf40DdGzi+81MfkJCFHrkaH778A8u5x/0B6/rH7hvueCk2kZf261YmVkpZ0JloGfYJytl3VUpiK6e8BKbf1rBR6tQeJF2du+0bqzWcCgNYaSDi610+BL7kc6Fq8lwiDuOcmcMlFMQSD+zt5GOfbKMGU/XXvOD0/kcs9zopuwm5/+YKppTsOJlvYQYz7aG5uBW8flGCei/yzECX5MhTwDiOWitd+URfcFrXW/UzOl/xUzG8E2uGdGim66ANBOIRG2OfsFCGPWklPR/6VTGblLfmlvGTYVxjLl0Vho6+zsdKkweBRJxc+WdNbiyakRVuWdudbCZcDzo1czGw3HrgXvFyZT4pLlLsSMarnBIsLKAkz85ujY4H+nv1wxv3cF110y7r5f+Lsc414xVJ6oqZ71U1VC5KEkXayoPyCDlmDhsu+or0CaDBBFlAinsJUHae09Pf0ZqG8RnxJ6waKp2/gKBNW48FEbcZEl4MwEYy+wRJ3PSXBA+x74gcNdM75pIF68/EsvXsbw997qGt/eKhjdZar2etf22BD5bLJXF1bnKbFL5Ref9PsL+Mdbavqq06lRvz0PeGdv/1mkfaUJE+gqhFKLTejQwZpDnthaevutRl74AyOBqnN6LnqHxV+QmxDaez4lHjkxFlxCYgFjAodlFmctXA3sIuXPynTtF6ZS3ZFPqriXi72u13u7Apdu11MkNTlHDJwqkEQqnPFK/rYomzffZihdDhKu9Fxn4FpoCk6dqwKNBhMLN9oLVjkWkglg0Cn+O5IJ7aeeanSE/iQ3kWmMh5nMsrFGR2QPKFihM1g/y3FCxuttgPnAlH3yNmSf1XFOBOI0LkO/rvf05NlBuSpSiw+IR9iDA8d6pFuhK6o91GUBjc7WnUT8rfkA7hNpww47MUKNQ1FM2fy4UvBz5zd24fRqxQXZXEOPLb9KHzgl4ztmVu0ApE1cl80ea/4r7z1+7iK3/lovYzLLqo2Bg9GJ2hm9wdprClHalR++0qjP40KSj9yVWLCC/tuo4Auil7dxmMvJ0pZCTY8vW8n0XdnGd3/lJOL+6fi+G4r9JVGwqiFhgycZH5UbcxgxILLn2k49RiNO0j+o4lURZf65910hXbqTFnVHef5G3BeiZBLFaTdMn0KRX8LMwHCVlRCimBgXb2Jr2xIXLUNiSu/zBwKvcvnLoEjRlZ7+MFNJwQBSOKtDYWHzsFf5mQpI0PKqTyCQd328J6YQ8K74dGbP2Cdx2pPeCSp5l2c6UWMjaFLjSWFb9DoChqaaoBreZcNyrAzZIVn7O1SGu7wcaGh0LzUe4crmTHGy7YnXUtqoOenXdWiKWwVuOWMo7Ta8XsiR1TIWdN/nlxnzSESbrq8NF18CZuV0oETrqkNHCmDOzo2ejxmKSydQQR/ZZcfDqVm9HblzRHa5p7M+yLsEBm2f7kE6aYhCrMKp4bO42Ryj7Eur9zjgZjoJUIsXnTN++b7XzQ53VV2Rp96+tzm5K6uybyi7cZXFmcpz8CIUrxKs0whZLAEZEke4Mg+ZS7o0mfUSJ9N3g7t5dqzeWJIDQjBtSHUmRb/LHuN0tEnzvCeQXskVl2g1uKkg3qIVyVQeObxEiR4EEg79LofuaLtqNp1SAEt4tjXlx2kGFvEzPkD7XelwW1K6+N5JzC54X8kUFHUL5oBMQ7nW8JfaeqsQ+pdkuIYeeZrIYZEt/nCj7tYh1d/u8qZ5T4oyqpKrdr4ExkrH3McY2HeT+I94RDK2w3wFTxBWoeQnewn6KvspXBrzIbNWclJDCkyWh7DhzcSi5a6GvZW3R1+2V6OvaFUnzOgTfrjpN7CqCX3oxRCUz7OSc3XqjSksQcFt4Z4kRE9eV7t6w2xnm/gZFVuiWRb1bwQpuLaLunBuMHJhtGm9CFJgSAOIVD8OqSjPVHc1/wQsqiMpXypTmFLEFIuFWqrbuQf9PsPLQP6MQLbDa+n65wR4gAGoLEuB2qaJ/n/f9Jlwt+9Ku1o3V6/SKvpZz0y87ylU2tZZ1SvvswzYOFLQk5XkdMfudqGWW7b2wdQ9jTuOD63OM9HKONcMRhjjyojKWq+Hm5iyL1xn4O/Xj4CAo/5XiPbzpHiTeVWFwvxbxfmGzYd0Hob2qUN9yjlVKsZiHr3uYP7l8hZsU6UuO8hhPucdIZKrTJriAztr1IQir0sKTB+Bl/e13jPhhp4GeroU9uSp90THupKPOUopdEom3M6Vz9gH0r9R6tr210ata6blVeYJadnrZVTu9yomCHUFaPqtbFfb5W/FmGtSfmBzYDgoD7iHc8XwazzryIMKfc+QJCijYHXEenkF45bcX2t3uVhnesJxKrLJ+9Ti3VUV4hyaMQq7KzyQNO7I65+lnv9XYxNFesvNIv9h0rlz0unIJL9O9ezG6Vy1l7qA7CdQLWu8qEktFUtSRblKD3Sb4tqqQb+YzXgohz+K9lVA7E28WdlWiaE7Ay2YdT56hMJHaAT5UAgk+8Yr4bfWjHXPM2nIfIJsjdcpJHxzBiSooa4M27kRyuafITIcuS1W8JzVlpQMy1q+tgID1irbI7lZooJsKTrypgxPLq1AlTtxpfLY0E1pzV68m+BDN/lSVg0eT4gLvzL0ecR3L3Q6vbNfulFPW/UHSWFit6tVB4QNWq073NfYa/Bp9EBoLn4QwevKS66psNZW7k8EzoaGHI8E78MTTuVbIUn8Xkv2bgV3gjjRfnWeNihR2+n7vcxjDOWC1SmIs2gmqeeW4iQ5a6cLaWRLidCvEY3ghQ+wcsKJzgnAA30zU35UlQVpZrv6/lG++SzyKatg5VGAGuTe/V/GLW5SXdplVuv1LsUrVis8Hq7w9VqmfGeAnozKzkl77RaJOV+e49/8A</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/business/ishikawa_1.png b/src/main/webapp/templates/business/ishikawa_1.png
index 628e5f72..e7f4d203 100644
--- a/src/main/webapp/templates/business/ishikawa_1.png
+++ b/src/main/webapp/templates/business/ishikawa_1.png
Binary files differ
diff --git a/src/main/webapp/templates/business/ishikawa_2.png b/src/main/webapp/templates/business/ishikawa_2.png
index 3c6231ed..221a972a 100644
--- a/src/main/webapp/templates/business/ishikawa_2.png
+++ b/src/main/webapp/templates/business/ishikawa_2.png
Binary files differ
diff --git a/src/main/webapp/templates/business/pert_1.png b/src/main/webapp/templates/business/pert_1.png
index 709d79f0..37ba58dc 100644
--- a/src/main/webapp/templates/business/pert_1.png
+++ b/src/main/webapp/templates/business/pert_1.png
Binary files differ
diff --git a/src/main/webapp/templates/business/pert_2.png b/src/main/webapp/templates/business/pert_2.png
index 68bd9af3..ea6a1ec9 100644
--- a/src/main/webapp/templates/business/pert_2.png
+++ b/src/main/webapp/templates/business/pert_2.png
Binary files differ
diff --git a/src/main/webapp/templates/business/swimlane.xml b/src/main/webapp/templates/business/swimlane.xml
new file mode 100644
index 00000000..be7b7def
--- /dev/null
+++ b/src/main/webapp/templates/business/swimlane.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="07fea595-8f29-1299-0266-81d95cde20df" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/business/timeline_1.png b/src/main/webapp/templates/business/timeline_1.png
index 6a85b34f..4c5cd6e7 100644
--- a/src/main/webapp/templates/business/timeline_1.png
+++ b/src/main/webapp/templates/business/timeline_1.png
Binary files differ
diff --git a/src/main/webapp/templates/business/timeline_2.png b/src/main/webapp/templates/business/timeline_2.png
index 1470b9ca..c0128939 100644
--- a/src/main/webapp/templates/business/timeline_2.png
+++ b/src/main/webapp/templates/business/timeline_2.png
Binary files differ
diff --git a/src/main/webapp/templates/business/timeline_2.xml b/src/main/webapp/templates/business/timeline_2.xml
index 51ff1878..3d6dac73 100644
--- a/src/main/webapp/templates/business/timeline_2.xml
+++ b/src/main/webapp/templates/business/timeline_2.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="3222393b-c21b-8f07-03c3-2e2134d57594">7VtLc5swEP41PrYDiJeOdZ6H9pTO9KyAjDURiIKok/76rrCwAZHXxKk8NhxstJK1aL/v28XCXqCL/PGmIuX6h0gpX3hO+rhAlwvPc33kw5uyPG0tPsZbQ1axVA/aG+7YX6qNjrY2LKX1YKAUgktWDo2JKAqayIGNVJXYDIetBB96LUlGDcNdQrhp/cVSud5a48DZ228py9adZ9fRPfckecgq0RTa38JDq/bYduekm0uPr9ckFZueCV0t0EUlhNye5Y8XlKvYdmHbfu76md7ddVe0kG/5gEecFUb3QRIhuopp9EXP8IfwhnZLaC9UPnXB4ayAs2UtK/GwC48PlpRVAAYTBbRr0Sj7ci1zDk0XTleM8wvBRQXtQrRzrEQhNfou0u1uCITOaQ+wE84yNWsCy6LVznlv6PU1ggN6zAh0S6KVpI89k47IDRU5ldUTDNG9KNToaPZGurnZU6Ej6rrHAoy1kWj2ZbuZ9wjAiQbhjYB4rwPS8o2mOsybNZP0riSJ6t2APocoDCOncRhiOQZLhTdY+vHV64hdt8cUYllFUkZHgzFuMev6LnsEoqSGuC4VagyE+U3PJ0V5GJDdaAiyiwID5Z1M+zDHwSegjAyUXQNmWJh8A5YTMjPAGEc1Z2mq3EySpwc5cl6A/BCgxCNQwtgAxZ/AxPsM5flHobwwXHpteA+pPMeJtoNtKA/5Q5C9wMyv/095gYGyCfMZKA8FI1BiZE954VEo7/Rr3u5Gx4ryIgNldI7KG9c8hC0qLz4K5Z1+zfMjm3eb2EDZP0fljWte4Fi82+y+Uc5F75OLXoBtFj3X3GAJzlF746oXeharnnscmyynX/Yix2bZc81dlvActTeuexGyWfeOY5vl9OtejKzWPXOfJTpH7Y3rXhzarHvHsdFy+nUP+1brnrnTEp+j9sZ1D0c2697UVkvIWwxgGWGmzm4pcLfIug5wsu/rjGVn+C4qmiuXZd2o97SNIoDMpLp4uOSFB9epHprXoAQqG9ULDkpWs6R141DO9KgaNK/mUEbW1LlQTUnzsp2TFQlLWdoUaupGvXByD/7VaNn5Vq2cZAVRbjj73ZCvvZWU+4W8TkXgjLpAdBnsWz+VWi+/eM4zzBLAjBVvn66vgYG0eFuC8qdZ/lKK6XEYvydtHYDTO3LuHmNig9NuOEHqKPoMUps7SzOpZ1K/l9S+MyS1F/gWSe1N7czNpJ5J/bFMjUKrpJ76oddM6pnU77ylxkNS+5HN24/u6+tM6pnUB8zUAbaaqc1d65nUM6k/mqkjx2qmntr1n0k9k/pjmTpGVjO1+YxjJvVM6o9majzx++hDkRqa+z8btX29f3Shq38=</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="fbcf5db9-b524-4cd4-e4f3-379dc89c3999">7VtNc5swEP01PqYDCBAca8dJDu0pnelZARlrIhAFUSf99ZWw+BRpkrETeQocbLSStWjfe7tY2CuwSZ9uC5Tvv7MY05VjxU8rcL1yHNuHgXiTluejJbCVISlIrAZ1hnvyByujpawViXE5GMgZo5zkQ2PEsgxHfGBDRcEOw2E7Rodec5RgzXAfIapbf5KY79UqPKuz32GS7BvPtqV6HlD0mBSsypS/lQN29XHsTlEzlxpf7lHMDj0T2K7ApmCMH8/Spw2mMrZN2I6fu3mht73uAmf8LR9wkLULwYMXQYB3AYZXaobfiFa4WUJ9ofy5CQ4lmThbl7xgj214BHJgHZNCoEFYJgwlq2THes9TKvvF6Y5QumGUFaKdsXqSHcu4gt8Gqt0MEbGz6kPYESWJnDUS68JF67039OvWtYGI31oPQbMmXHD81DOpkNxilmJePIshqhf4Ch5FX6iah44LDVP3PRqEoTIiRb+knbmDQJwoFN6IiPM6IjXhcKzCfNgTju9zFMnegxDoEIVh5BQOIzBHYInw3jghsLevI3ZTH1OIJQWKCe4GK8+N+brHHYxKEdK1BIwIUX5VU3Eml9JKxj4P2DYcgm0DT0O71Wsf7sD7ALSBhratwS0Wxt+A6YTcNFDGIU5JHEs3kyTqQQ+sf0B/DlCCESh+oIHiTmDifIQC3YtQoG1BEP6XCgTuEGzH0/Pt5ynQ09DW4Z6BAoE3AiUA5hToX4QC51MD2xsgIwqEGtpgjgoc10AQGlRgcBEKnE8NdKHJu9BQQ9udowLHNdCzDN6FNt84lyL4SUXQC00WQVvfifHmqMFxFfQdg1XQvozNmPmUQWiZLIO2vhvjz1GD4zoIgck6eBnbMfOpgwEwWgf1/Rg4Rw2O62Dgm6yDl7EhM586GLpG66C+IxPMUYPjOhhCk3VwakvGpzUGYhl+Is/usCByljQdwknX1xjzxvCNFTiVLvOyku9xHUUBMuHy4sUlrxxxnfKpeylkgXkle4WDnJQkqt1YmBI1qhTal3NII6nKlMkmx2lez0myiMQkrjI5dSVfKHoQ/uVo3viWrRQlGZJuKPlVoS+9leTdQl6nouCMvEBw7XWtH1K611eO9QKzmGDGjtay3gsG4uxticqdZvk41dSPt+GRmz0Oh+9JX2fgdEvO9vFnqHHa9idIDeFHkFrfeVpIvZD6vaR2rSGpHc81SGpnauduIfVC6tMyNfCNknrql2ILqRdSv/OWOhyS2oUmbz+ar7ELqRdSnzFTe6HRTK3vYi+kXkh9aqaGltFMPfUUYCH1QurTMnUAjGZq/VnHQuqF1Kdm6nDi99TnIrVodv9Wqvt6fwkD278=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/business/timeline_3.png b/src/main/webapp/templates/business/timeline_3.png
new file mode 100644
index 00000000..af631ef5
--- /dev/null
+++ b/src/main/webapp/templates/business/timeline_3.png
Binary files differ
diff --git a/src/main/webapp/templates/business/timeline_3.xml b/src/main/webapp/templates/business/timeline_3.xml
new file mode 100644
index 00000000..fe6ac4d0
--- /dev/null
+++ b/src/main/webapp/templates/business/timeline_3.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="82e54ff1-d628-8f03-85c4-9753963a91cd">7VnbjpswEP2aPG4FmOvj5rK7D61UKVX7TMABaw2mYJqkX9+xYycQQEmkRE27ECnYM4PHnnNsxmaCZtn2tQyL9AuLMZ1YRrydoPnEskzbcuEmJLu9xA2cvSApSayMjoIl+Y2V0FDSmsS4ahlyxignRVsYsTzHEW/JwrJkm7bZmtG21yJMcEewjELalf4gMU+V1DSMo+INkyRVrn1HKVZh9J6UrM6Vv4mF1vLaq7NQt6XsqzSM2aYhQosJmpWM8X0p284wFbHVYds/9zKgPfS7xDm/5AEbR4G3igPsxJZhWv6TauFXSGushyA7ync6OJTkUJpWvGTvh/BAz6cpzygUTSiuCaUzRlkJ9ZxJ+zXLuULa8lVdm0CYDMOeB8Gh3T5Nd3C6t7jkeNsQqcG+YpZhXu7ARGltFfedrqr6poGyoYVpA2HNzFAxKzk0fYwuFFSALwy20wn2kgtmgrYTdWBKIYpsvf4KNrM980WMppuUcLwswkjoNzAjh7GQ4fSchd8GxHS6gLzISwCytzE+OUaAPMdQl3xGRJ7AvHmmJMnBiLOiA6HC/wbomVYbPmT3wOf2oGffAz23Z6q4lIvxF2EO5USUNaJIK8FPUz8C3QO046EHAtq7CmjrHwLaNj3f8eB9Lf9t+QwlxXfl5xT0FeOcZUO4w2AjkidTZTS3b8MFZHvtNdtyLuMCcu7ABf8qLtgjF27KBd8wHogLwflcCVqAnBVfDaNrTp8lPNdlTTobQ/fOo8zg5E0cdIGwenCw7rE+69zsIwIBs/aBgLhg9/C/AuHa6IGAQB8XCN97pKXJHswXUlNnA284jOFl2cgVjjotLLTgMytxJlwWVS3usYwiIEu46Dx0eWLN9kcjFaQQmNdCCw4KUpFIujEwJcqqwrFsQwhJXWVMVDnOCtkmySMSk7jORdO1+KPhCvwLa659Y3mukeShcEPJzzr81BhJMZjyAJy8TTSVNEDNOda+iY3G/AnQ6ScqA2asqTxDSUkc43wwJenQ8ITYC1f8TlIn1EdscYE8VKlQBGTFIlWTBz84VsO5AZeD9ppio+42yDKdLpfN+5B5eMc7knkk89mNnBm02Gw5f5fNw9v6kc0jm88eUdnOQ63NwwcTI5tHNp9js3dy4HrXtRmqxy9cUtf4jIgWfwA=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/business/timeline_4.png b/src/main/webapp/templates/business/timeline_4.png
new file mode 100644
index 00000000..1487b89e
--- /dev/null
+++ b/src/main/webapp/templates/business/timeline_4.png
Binary files differ
diff --git a/src/main/webapp/templates/business/timeline_4.xml b/src/main/webapp/templates/business/timeline_4.xml
new file mode 100644
index 00000000..78d6d6a5
--- /dev/null
+++ b/src/main/webapp/templates/business/timeline_4.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="54c02804-9d69-ba3f-8aca-1021b27b8050">7ZpNc6M4EIZ/DcdxIYnPo+Mkk8Ns1VRla+YsgwyqEYgFETvz61cNwgbL2eUQT5wqONhSS+4W/T58NNghm+LwtaZV/pdMmXCwmx4ccu9gjF0S6i+wvPaWOCa9Iat52pvQyfDMfzNjdI215SlrJhOVlELxampMZFmyRE1stK7lfjptJ8U0akUzZhmeEyps60+eqtxYkeueBp4Yz3ITOvLNwJYmv7JatqWJ52Cy67Z+uKCDLzO/yWkq9yMTeXDIppZS9a3isGECcjukrf/d4xujx3XXrFRzfhAmhAYojFCY+MmO+F9Q0Lt4oaJlwz50K1WvQ3ZyVQjdQg65O67f1Z2UNjlLTYcKnpW6neiVsFobXlituE7x2gwUPE3BI/iowHNxyICmVS8g7r/BLUDkrgJoAmFeF4vXWnguwVMpa0jrXSlVkpvwjarlr6N4Oq93Oy7ERgpZdztBNt0GdlkqQyDyTH80z+22o8dhpJQlrN3Ot5EA9pYdRiaT/69MFkzVr3qKGQ3NoWEOFT/2+/5+BF5gcMlHzA02aljPjp5PeuuGkXym/J6lPnZRaBEwaPmNbpn4LhtulNhKpWRxQWwlK22dgjMRnZc72bV4sgKoWLppt5Bh3sh1mXWBkW/LiNyQxA9vyQNaPtKCC0juExMvDFY1FR27/yG6RbHN1TsgEE8R8LwLCOALCCB0DQbCSwxEN8zAo04g+uwMWBCguRB414AgugRBfMMQrB88RPAnh8A7g4AEcyGIrwFBfAGC453LLUKAiT533n9yCIIzCHDoreLxNg8JHF0DieGKM2UC3TATCK/Xd/4nZyI6YwJFUyaiYB4UJLwKFMiCwsGBUCCoHgoyaD0xmvIyGwZ0kNPYYKwGwzdZswJCVk0L32mXeU0YV7B4vWQHb/oCsNF1AFMtjOoAFW940oVxmeBmVqOrEvABRt42hYSuYkXV+eRlwlOetiW4buFD0K2OD7PVEJt11VtWUggj+D8tXY32pDrtyNlxoPVVZ1xXtFsgufdPvb+B/vsvHWn7nCv2rO3gYq+J1zapUdmJrtLKdd3Eyv8tcQzf+ohJOTuhO8J+TtFj0f0OLA/3kgblwLevcTj8Yzc6CC/sLuzOvksf7sqHa7P7sfCSBd4F3tnVxVDA3ciZ137YtMC7wPvWHfCNwesv8C7wzi7p0dlD/o9l1364Z4m4vON5z3c8XuhN9f/QlzzIfq636H9V/aOb0h/bz/AW/d/Wfyd49cPk4j1KyHBaQpLhHP8xLFx6dLew8IdYCM5e/qMrnhd09/S/km5s9Ocd8vAv</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/charts/bar_chart_1.png b/src/main/webapp/templates/charts/bar_chart_1.png
new file mode 100644
index 00000000..b4245acf
--- /dev/null
+++ b/src/main/webapp/templates/charts/bar_chart_1.png
Binary files differ
diff --git a/src/main/webapp/templates/charts/bar_chart_1.xml b/src/main/webapp/templates/charts/bar_chart_1.xml
new file mode 100644
index 00000000..71035250
--- /dev/null
+++ b/src/main/webapp/templates/charts/bar_chart_1.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="07fea595-8f29-1299-0266-81d95cde20df" name="Page-1">7Zvfd5owFMf/Gh/rIb8QHmvbbS87p+e05+w5kxRzhsbFWHF//QIEAZNWukVrx3xRbkISvp9ccm/AEbpZ5J8lXc2/ioRlIxgk+QjdjiC8QgHQX4VlV1lAGFaGVPLEmBrDA//FjDEw1g1P2LpTUQmRKb7qGmdiuWQz1bFRKcW2W+1JZN1eVzRlluFhRjPb+o0nam6sIIybgi+Mp3PTdQQnVcF3OvuRSrFZmv5GED2Vn6p4Qeu2zIWu5zQR25YJ3Y3QjRRCVb8W+Q3LCm1r2arzPr1Quh+3ZEvV54QJRNUpzzTbsHrM5cjUrlZjO+eKPazorDjeauIjNH3iWXYjMiHLKgjA6+sp0fZU0oTrzuuypViylvmWS82Li6UuYnStxzhdKyl+sIP6c7XI9BEoehJNa7oniDAmevRT+1LN1T8zqVjeMplL/8zEgim501VMKcTxZEyqs+qZikM8JkHzMXJsW9OghjdvzQCAjJGaqZfue2vk1z8MgZdo4CHTCG0aBOPadIwACcZBmxvywYMMmUfk8I64Nw8QePGIcMAEUOAgAPsTmHghMDlOgCV6+TSHRxWq/HOvbL3AIkvrdt0X1Sy6flXLtkrBa/NUsowq/twNAVzSmT7uBddjaS0myL59Ne5SN7QWGzlj5tz2ytyjOQCs5hSVKVNWcyXVvQg9QUdeXO1TEE2CD+dqrlAAofcMBWIvNO4iEmL4L9CAQZdG35ugFxp1I8P0DUdghiI8xnHziXrSIPE4bp/mI0pDwAucD+oqLjikd4zgxzvgkL3DESaXK0dPjwi9EPCTxn9QF3AQAP1dAEReCPRI3f+Hyd7DZIRIn+Y8hsnI3hO4p5LqJpgsx3VIXc/i0kG05/Fl+ii0391eEZu92QYFUX1smgiOzo0Dr/PgUgiFtqwRdLhU5Jgr0ItD2Zl/DvqLSzOeFrenmRZBg0HT4uL5jGbXpmDBk6RoxdL6CJZzYnDFwSQOz7u42/l/bt/a/nEOrq3Jc3Ow0/McDY2DY6U/Owc/ifkH3ZGE1nIbO7eEEensxgOAXTi6O/b1TuNf4cFDztRLPO20/AAV6Sbt8QVhG3IO7/Iq4Mmr9nX+Do+d4T/uVkxb3hCS9ch12gsM8SWutWbEIO5sJQJL6JNFtdhO1I2Qb4ipLkdI8n5C2vm2EfINQdHlCBm/n5Cv57O7P1bzT/JZD+pCZMeIQUTOmbpiO3XdXWrq6kNxHJBDxY+/RoNcm0yw+3hg4iW0sBPY3aUmsCei4d6PPh8BO3XdXWrqeiIC5dPLdyTgSlrDTBkhOiDCnxtRF1ytS8mui2U1WOWlPnW5/pUW37ec6rB6oasornQbpl09pqrpqtbJcFdMUXCAH/Rb3r3gtna0I+fThwg4cGPiAS8ZdNLreEsKTd7w3qAPAINOXx0AYNj/+RvwQsDOUHN8oWvMyZ7aOECcdntUHzYvq1dP05p/BKC73w==</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/charts/coc.png b/src/main/webapp/templates/charts/coc.png
index 719fbcdb..5378b932 100644
--- a/src/main/webapp/templates/charts/coc.png
+++ b/src/main/webapp/templates/charts/coc.png
Binary files differ
diff --git a/src/main/webapp/templates/charts/org_chart_1.png b/src/main/webapp/templates/charts/org_chart_1.png
index 56744c91..90dadeb9 100644
--- a/src/main/webapp/templates/charts/org_chart_1.png
+++ b/src/main/webapp/templates/charts/org_chart_1.png
Binary files differ
diff --git a/src/main/webapp/templates/charts/org_chart_1.xml b/src/main/webapp/templates/charts/org_chart_1.xml
index c2211b0f..e4ac94a0 100644
--- a/src/main/webapp/templates/charts/org_chart_1.xml
+++ b/src/main/webapp/templates/charts/org_chart_1.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="97a40813-6b03-0c74-37c1-0168de264b11">7ZxBc6IwGIZ/jcedAYKKx2rb3cuenNk9p5AC00CcNFa7v36DJCjS0OjU8onYQ+ELJPA9yTt5MThCi2z7k+NV8ptFhI48J9qO0P3I81wf+fJfEXkvI/5sVgZinkbqoH1gmf4jKuio6DqNyGvtQMEYFemqHgxZnpNQ1GKYc7apH/bMaL3VFY5JI7AMMW1G/6aRSFTUdZx9wS+SxolqOhirgiccvsScrXPV3shDz7tPWZxhXZc6/jXBEdschNDDCC04Y6LcyrYLQovc6rSV5z0aSqvr5iQXNidMvPGURJgEYYBI5OMf47KGN0zXRN/C7kLFu05OcX+rZkOq7TfCBdl+RAk/6Rr2dyp7EGEZEfxdHqfP0r1HdR4UqIva7FF4mkRyQEFDwIp+XFW9z4DcUEmwTMjk84RsklSQ5QqHxf5GjogRmicik03cu3Jz1x1IpPYq4sVOyLI0lNtOUSA4e6m6m8zP/DmldMEo47tmdEeScZaLR5yltEjQH8IjnGMZxjSNcxkJJRIiz5k3GRlxH0Nrwukk+dPPky/zuSo2cSiKRM2tYTiHMJxWGG4TxmL3OQFGWaOuIWc5+WpClfrWRo+W1EN+fhMfugS+oHsx8acOIDGZ9VpMAgM0IGKiR8Itq4k9Inhq4rqf8yvl5KOMX1BjAgeSxrher0XGNWGDojJoUJkTGAGUGb/7WQsaT2v5qGYx3XRpC1N4zYriG7BBURQLC9p7RbFnBFBRLGysnri0DBRDjouUpCGmdyrXWRpFRa1HuZa0nN3npGF2QY2bBHWNG086nTVZeNXzNO7kQXURjZsasEHROAtn3HuNs2cET+M8C3N96VnTOHABzZo8C7t6xbOmCjhQRdHZvmVFOYERQEWxMNKXVpTjJzsdK4qFM71mRUEGbFAUxcIG915R7BkBVBQLI317PsyfTmqEuvVhnoVXvmIfVnVBqBpnYYN7r3H2jABqnIWRvj2NO15S1K3GafB91biZARsQjUMWxrz3GmfPCJ7GIQtr/92LFLt1hsjCK1+xM6yAQ1UUC2Ped0U5gRFARRk3eJEoJku1y7hIWMxyTB/20aMRc8CO4idC59VK8KNckjy6K5aoy8gTZeFLGXpMqT7dQKoIq5XyrvfhSGxMwvz74q9tavXK1jwkhqzolfeYx8SEXc2Vi2y1MueEYpG+kVrrX8twMjA8j+EMDsPpwPA8hnrVHwSIwQDROMhaIeqKIECcDRDPg6hXywGA6DsDRPMoa6cYwKHoDhTPpKi/TYBAsWkJB4rVtKWdog+HIhooGk1gK0T9iAoCRH+AaAbUTtGBQxHAq+qNt0udLp8C93vBoQ/8XXWLLyX6/gz4BETf/QxY7u5/VWNXdvDTJejhPw==</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="97916047-d0de-89f5-080d-49f4d83e522f">7Z1dU6M8FMc/TW93SnhpudS26l7srKPO7HUKKc1ISSeA2ufTPwGS0pDUthbQAbxw7SGEJP9fknMOcR2Zs83HPYXb9R/io3AExv7HyJyPAABTG7B/MsuusBimOy4sAcU+t5WGZ/wf4kZRLMU+iqWCCSFhgrey0SNRhLxEskFKybtcbEVC+albGCDF8OzBUFh/2aX9H/aTNbcbjlteeEA4WPOHT8GkuLCE3mtASRrxJ46Aucq/issbKOriXY3X0CfvByZzMTJnlJCk+GnzMUNhNrxi4Ir77o5c3feHoig55wYu1RsMU9752eIvb1qyEwOSdwhltxgj83aFw3BGQkLzi6Yxnpguq/w2Tih5ReJKRCKUGUUHszsDCn3MWlYpsyJR8syfZvDPBw+4y79EuYIWw2Kf1c7y/r8hmqCPAxPv/D0iG5TQHSvCrzoTPgKcVTC2hfjvpfBgzOVaH2jucBvktAX7ysvxZj/wIdcPv6kM/xxt0yRr4BxTxjYbgx6J4chimJZWDNCQGJYixt/VCnuI2Qibv+wJTj7CrLP/CH3dhjC/9kzCNMEkinuklDmWlbLsVqeNfUKpx3QZYo/98IRC2DdtbOtbtXHUHYUNdZz7CHP8hmMmR4/UmE6+VY2JRg2yRTSfFT2SwQDfq8NU0eEmguEuxrG8sfRwhjDnWVLGAa0q457YS+5DsoTZDc/pdkto0mNlJu06xyIcPMchu2VxV0LZN2YuZ1Z/lXLbVcpQlGJxDKTJJuuSqtYDSimOk9xFG6bVdNquWGrML0+r31HC7sABinLbgW6DVu6kXa3UBMHvl367C7YtK+IY7SqiZgnmMIFLGGdz5cbf4IitbL3zr6uqtO0qnMoIvCBvHbGhCHbyivaEYgSpt+6zVC37CmqCQJKqXNvYtMr8A0Tf2NU+eXNVhdp2ENRg9Q+MYIC4N/dICRuzzRC5TiuZtra3olOh6x2OYOThPHo9UOpQzN5q1fIGBU7Fsg/pBrK5M2YbEklpv9Y7RZt2dySgRq+yNtLq12NdWt6HwKlA9YVC5m1HQT+9hKo6LYemmnfXTyhIQ5gQWnGyYeQzwyJaEbaw8WnUQ3fBGLvf6i+cfMEt6fdIQuzt+ixP2y7CJzHsjGy2IYZ5Qq7HgrTsF5yIVA+XOGlx669CbXsI6uttfS6hurj1L5GtSNW2u6AGq8roIz9AYnhQuCTvi9JwmxvYhazL2GMxrdBBHNDMBgpF/k12AJR9XIbEey1Mdzhr1n7EDxWQpWQaANOy7PlnY17EZ7xXhSmBNEC8FHeLsr6cowuQVTEcnSqGTpW9UScLf94jwbm3pX8YKB8m6ig6x28r1VVqMo63W1RVDIpSVQ7KfhzOOyWpBs8dYMdU2bEHdmpnRw3uu8mONbBTOztqAqKb7DgDO7Wzo6ZHfgI7PozXe/+2fudnMoD0KUhMLLg7KLbNCsTH22yMK78SAfYhcIlmUemXQVWzQj8B1PoXuenAZq1sVt9S23btaKrhfTfRHILGmtl0J42zqR6S6ACbU5VN9zI0nTbRrG6OV6B5vN0N+IadzIW5KjviBP9X4dGmKJuCZ1IfPGpV9cFjdTIZJkiR6DGuo0f7LqIpeqb10aNWVSM9nUyHCVIkesB19GjfNTZFj1sfPWpVNdIDOkmPxiMXx/wHt6dGen5mSuxaeiwNPRe+yBn8njPo6WSeSpAi0XNhOn7we86gRz3L0wV6NPG6cWHAXsmUNLtzVf+3pSt2ruPtboCeTiYiDU3EDi6M2KsqNLpzVem5Yuc63u4G6OlkqhBoInZwYcReVaHRnatKzxU71/F2N0BPJ5OFQBOxi459lZ5GI/YqPVdE7MfbXT89diezhdp3aBdG7IPfcwY9ncwWAk3EfunRy8HvOYMe0El6NBH7pQfoBr/nDHo6mS0UpEj0XHhqbvB7zqCnk9lC3YuK4ehQvUeHnMaPtdnqL3p2lM3hyGXNx9qsmtlkH8u/NVAUL/+mg7n4Hw==</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/charts/org_chart_2.png b/src/main/webapp/templates/charts/org_chart_2.png
index 19493b2e..bdcdd0b7 100644
--- a/src/main/webapp/templates/charts/org_chart_2.png
+++ b/src/main/webapp/templates/charts/org_chart_2.png
Binary files differ
diff --git a/src/main/webapp/templates/charts/work_breakdown_structure.png b/src/main/webapp/templates/charts/work_breakdown_structure.png
new file mode 100644
index 00000000..54457b7f
--- /dev/null
+++ b/src/main/webapp/templates/charts/work_breakdown_structure.png
Binary files differ
diff --git a/src/main/webapp/templates/charts/work_breakdown_structure.xml b/src/main/webapp/templates/charts/work_breakdown_structure.xml
new file mode 100644
index 00000000..2c862f94
--- /dev/null
+++ b/src/main/webapp/templates/charts/work_breakdown_structure.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="64c3da0e-402f-94eb-ee01-a36477274f13">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/engineering/cabinet.png b/src/main/webapp/templates/engineering/cabinet.png
index 871b789c..8b2a23ee 100644
--- a/src/main/webapp/templates/engineering/cabinet.png
+++ b/src/main/webapp/templates/engineering/cabinet.png
Binary files differ
diff --git a/src/main/webapp/templates/engineering/cabinet.xml b/src/main/webapp/templates/engineering/cabinet.xml
index 02b91c70..90abb9e5 100644
--- a/src/main/webapp/templates/engineering/cabinet.xml
+++ b/src/main/webapp/templates/engineering/cabinet.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="49039e9c-d1b4-6340-12d7-3cf05d86f639">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</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="099fd60b-425b-db50-ffb0-6b813814b670">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/engineering/electrical_1.png b/src/main/webapp/templates/engineering/electrical_1.png
index f740de7f..a0ed8e73 100644
--- a/src/main/webapp/templates/engineering/electrical_1.png
+++ b/src/main/webapp/templates/engineering/electrical_1.png
Binary files differ
diff --git a/src/main/webapp/templates/engineering/electrical_2.png b/src/main/webapp/templates/engineering/electrical_2.png
index 18d03542..a641e68b 100644
--- a/src/main/webapp/templates/engineering/electrical_2.png
+++ b/src/main/webapp/templates/engineering/electrical_2.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/cross_functional_flowchart.png b/src/main/webapp/templates/flowcharts/cross_functional_flowchart.png
deleted file mode 100644
index fd18fd30..00000000
--- a/src/main/webapp/templates/flowcharts/cross_functional_flowchart.png
+++ /dev/null
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.png b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.png
new file mode 100644
index 00000000..8515c946
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/cross_functional_flowchart.xml b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.xml
index 6b3ccf45..6b3ccf45 100644
--- a/src/main/webapp/templates/flowcharts/cross_functional_flowchart.xml
+++ b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_1.xml
diff --git a/src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.png b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.png
new file mode 100644
index 00000000..2e53b1cf
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.xml b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.xml
new file mode 100644
index 00000000..7b047f31
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/cross_functional_flowchart_2.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="c7488fd3-1785-93aa-aadb-54a6760d102a">7Vxdc+MmFP01flyPvmU9rrNJ+pB2MpNO233EErboIuFBeB3vry/YoI9gO2xix3iLXiIuSEL3Hs65gJxReFM931OwLH8nBcSjwCueR+GXURD4URjxP8Ky2VmiLNsZFhQVslFneEI/oDR60rpCBWwGDRkhmKHl0JiTuoY5G9gApWQ9bDYnePjUJVhAzfCUA6xb/0YFK6XV97yu4jeIFqV89CSWFTOQf1tQsqrl80ZBON8eu+oKqHvJ9k0JCrLumcLbUXhDCWG7s+r5BmLhW+W23XV3B2rbflNYM5MLglkEJ36QzbygiCbp/JO8w3eAV9IXj9zxsrNsoxzUrFGFQc1L05JVmBt9fpqXCBcPYENW4uEN485QpWlJKPpBagZUY15NmQw972W/xZO4kpuFdetMWMhS6y9RwGAG8bT1+A3BhPKqmmz71TBKvkFl5IHwtkdbowIr+jJHGPdaypBxO+/OHagQFjj+C9IC1ECaZc8nsrjvOQCjRc1tOQ8G5JVTPTrK3ZAy+NwzyWjdQ1JBRje8iaqdSOTIkZXK4rqDaaKalD2ERqohkENj0d66gwc/kQgxREugoeVBgCLwfEPEHAGBDLLus4OYfd2J0mmBodP8+BxO8yeac2DB6UcWCWUlWZAa4NvO+mIY9Dz42iDg/v0sGPGF7Q5h5eF+DGJehnWhrsgxaBqU/1mielchL/N3pd5F/0LGNrIMVoxwU/ciD4Qs24D/xKh81+gzAI6Eb0NWNIcH2sRSfgBdwEP3SXZtRBSPwo9CDBj6PhSZk2Ir1gakjjWMuYwKIKxLxODTEmzffc2VfIisX5t5D3KZMRUnQyZOdFIJ93BKeA5KSV4PexdN//XQu2BruhsMox0nY57UdkeqBT/dF/z0HCLsacF2emKtnqQGejKxRk9SRyxnJpZWEOwjlsk1JRPBdcMgDO3JJvbF+e2Cwp1EN/9I+7bwVRTGsRObs4tNZiA2as3NArXJnNqcmWYii9PY0KWx18MsijWOU4tvDbWo/h7jFk4XS3FaPS/EtsZ4tqzqsTT2sSWGG8p5/ATGHkmDGCJi5M4IY6Q6DL4+V6h7fJajngkoTJeQIv6uYvh/oSWpZqvmsTNNB7sLC8DgGmwEolYMI4HhFsqbakZEb3mYAcYQ368HY0Xjxv8J+8WxPUmWr++0uOz6bEt1vj2BD7W4yz2TPYRk0Z6Jb7rTdJ5NkyBx2YEd2YFK045mB4FJdhDakx0oRnEzD0MKViz25gX0KBv3Jx5ZcrmZh69Tsk7FWiyG0R4kjnNM1nnJCWJcwBw12+xwL2KOpGTHQXPFQAheJGFxOJyC+vHltDk6pM363NQmbQ4v+0FD4D5osESbIxNtjky0ObZHm/VB6bTZBAXv2INKx17/CC+nzYG+JvwVNqfkG7c/cUEuMvm6yjf9vEqi+ROPneclA0TLkjFbyZs/EsTfr2tC5vOG9/MloNs+vJHhDL7acvnnqchO32kVcOmOJLpc/qlu6jKpq2CvxIS9UnsyKYPPBN0eyC+e60WRvfTnu8/Nzh3+WEv1L5jbR1p0ndpdRO3Uz3WOqZ2R2AXWiF2gJ9V/EIe368GbWpU/CjjT5KqbGmahUjjJgO30y87JYaBr4okXQByQLQCyWuX8CSRPsigdINluIIf6b0JPsmo3jke9dTsH6A8AtMlvWCz6rDjUd/ddKnBVgDNaJjbNPXu5QKy2F97FoDxSYNNrsBR82uwhWLUCGcWDp6op+d2B9n58tD0/2fXgY+ncfa59TSPIZPaWfRBj82L3H052WOz+jUx4+x8=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/flowcharts/data_flow_1.png b/src/main/webapp/templates/flowcharts/data_flow_1.png
index 4885eda2..e422ab1d 100644
--- a/src/main/webapp/templates/flowcharts/data_flow_1.png
+++ b/src/main/webapp/templates/flowcharts/data_flow_1.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/data_flow_2.png b/src/main/webapp/templates/flowcharts/data_flow_2.png
index 8ecf5ffa..f4701244 100644
--- a/src/main/webapp/templates/flowcharts/data_flow_2.png
+++ b/src/main/webapp/templates/flowcharts/data_flow_2.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/data_flow_3.png b/src/main/webapp/templates/flowcharts/data_flow_3.png
index 9d071f1a..bf277e72 100644
--- a/src/main/webapp/templates/flowcharts/data_flow_3.png
+++ b/src/main/webapp/templates/flowcharts/data_flow_3.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/epc.png b/src/main/webapp/templates/flowcharts/epc.png
index a44fa739..de0b1916 100644
--- a/src/main/webapp/templates/flowcharts/epc.png
+++ b/src/main/webapp/templates/flowcharts/epc.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/flowchart_1.png b/src/main/webapp/templates/flowcharts/flowchart_1.png
new file mode 100644
index 00000000..1c5be68c
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/flowchart_1.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/flowchart_1.xml b/src/main/webapp/templates/flowcharts/flowchart_1.xml
new file mode 100644
index 00000000..09eb1fc4
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/flowchart_1.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/flowcharts/flowchart_2.png b/src/main/webapp/templates/flowcharts/flowchart_2.png
new file mode 100644
index 00000000..70d3184c
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/flowchart_2.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/flowchart_2.xml b/src/main/webapp/templates/flowcharts/flowchart_2.xml
new file mode 100644
index 00000000..0148971f
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/flowchart_2.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/flowcharts/workflow_1.png b/src/main/webapp/templates/flowcharts/workflow_1.png
new file mode 100644
index 00000000..25fe05b7
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/workflow_1.png
Binary files differ
diff --git a/src/main/webapp/templates/flowcharts/workflow_1.xml b/src/main/webapp/templates/flowcharts/workflow_1.xml
new file mode 100644
index 00000000..701e8656
--- /dev/null
+++ b/src/main/webapp/templates/flowcharts/workflow_1.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="edf60f1a-56cd-e834-aa8a-f176f3a09ee4">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/index.xml b/src/main/webapp/templates/index.xml
index 73843b55..f0649065 100644
--- a/src/main/webapp/templates/index.xml
+++ b/src/main/webapp/templates/index.xml
@@ -4,34 +4,50 @@
<template url="business/bpmn.xml" libs="general;bpmn"/>
<template url="business/business_model_1.xml" libs="general;signs"/>
<template url="business/business_model_2.xml" libs="general"/>
+<template url="business/business_model_canvas_1.xml" libs="general;signs"/>
<template url="business/ishikawa_1.xml" libs="general"/>
<template url="business/ishikawa_2.xml" libs="general"/>
<template url="business/pert_1.xml" libs="general"/>
<template url="business/pert_2.xml" libs="general"/>
<template url="business/timeline_1.xml" libs="general"/>
<template url="business/timeline_2.xml" libs="general"/>
+<template url="business/timeline_3.xml" libs="general"/>
+<template url="business/timeline_4.xml" libs="general"/>
+<template url="charts/bar_chart_1.xml" libs="general"/>
<template url="charts/coc.xml" libs="general"/>
<template url="charts/org_chart_1.xml" libs="general"/>
<template url="charts/org_chart_2.xml" libs="general"/>
+<template url="charts/work_breakdown_structure.xml" libs="general"/>
<template url="engineering/cabinet.xml" libs="general;cabinets"/>
<template url="engineering/electrical_1.xml" libs="general;electrical"/>
<template url="engineering/electrical_2.xml" libs="general;electrical"/>
-<template url="flowcharts/cross_functional_flowchart.xml" libs="general;flowchart"/>
+<template url="flowcharts/cross_functional_flowchart_1.xml" libs="general;flowchart"/>
+<template url="flowcharts/cross_functional_flowchart_2.xml" libs="general;flowchart"/>
<template url="flowcharts/data_flow_1.xml" libs="general;uml"/>
<template url="flowcharts/data_flow_2.xml" libs="general;uml"/>
<template url="flowcharts/data_flow_3.xml" libs="general;uml"/>
<template url="flowcharts/epc.xml" libs="general;flowchart"/>
+<template url="flowcharts/flowchart_1.xml" libs="general;flowchart"/>
+<template url="flowcharts/flowchart_2.xml" libs="general;flowchart"/>
+<template url="flowcharts/workflow_1.xml" libs="general;flowchart"/>
<template url="layout/blog_wireframe.xml" libs="general;mockups"/>
<template url="layout/bootstrap.xml" libs="general;bootstrap"/>
-<template url="layout/wireframe.xml" libs="general;mockups"/>
-<template url="maps/concept_map.xml" libs="general"/>
+<template url="layout/wireframe_1.xml" libs="general;mockups"/>
+<template url="layout/wireframe_2.xml" libs="general;mockups"/>
+<template url="maps/concept_map_1.xml" libs="general"/>
+<template url="maps/concept_map_2.xml" libs="general"/>
+<template url="maps/living_beings_mind_map.xml" libs="general"/>
+<template url="maps/mind_map.xml" libs="general"/>
<template url="maps/site_map.xml" libs="general"/>
<template url="network/active_directory.xml" libs="general;citrix"/>
<template url="network/aws.xml" libs="general;aws3"/>
<template url="network/aws_3d.xml" libs="general;aws3d"/>
-<template url="network/azure.xml" libs="general;azure;mscae"/>
-<template url="network/cisco.xml" libs="general;cisco"/>
+<template url="network/azure_1.xml" libs="general;azure;mscae"/>
+<template url="network/azure_2.xml" libs="general;azure;mscae"/>
+<template url="network/cisco_1.xml" libs="general;cisco"/>
+<template url="network/cisco_2.xml" libs="general;cisco"/>
<template url="network/citrix.xml" libs="general;citrix"/>
+<template url="network/enterprise_1.xml" libs="general;citrix"/>
<template url="network/ibm_bda_reference_architecture.xml" libs="general;ibm"/>
<template url="network/ibm_cognitive_conversation.xml" libs="general;ibm"/>
<template url="network/ibm_cognitive_discovery.xml" libs="general;ibm"/>
@@ -45,11 +61,14 @@
<template url="network/veeam.xml" libs="general;veeam"/>
<template url="network/wireless_home_network.xml" libs="general;network;clipart"/>
<template url="other/block.xml" libs="general;"/>
+<template url="other/cycle_1.xml" libs="general;"/>
<template url="other/decision_tree.xml" libs="general;"/>
<template url="other/educational.xml" libs="general;"/>
<template url="other/floor_plan.xml" libs="general;floorplan"/>
<template url="other/infographic_1.xml" libs="general;mockups;signs"/>
<template url="other/infographic_2.xml" libs="general;mockups;signs"/>
+<template url="other/infographic_3.xml" libs="general;mockups;signs"/>
+<template url="other/infographic_4.xml" libs="general;mockups;signs"/>
<template url="other/lan_plan.xml" libs="general;floorplan"/>
<template url="software/class_1.xml" libs="general;uml"/>
<template url="software/class_2.xml" libs="general;uml"/>
@@ -78,4 +97,5 @@
<template url="venn/venn_3.xml" libs="general"/>
<template url="venn/venn_4.xml" libs="general"/>
<template url="venn/venn_5.xml" libs="general"/>
+<template url="venn/venn_6.xml" libs="general"/>
</templates>
diff --git a/src/main/webapp/templates/layout/blog_wireframe.png b/src/main/webapp/templates/layout/blog_wireframe.png
index ae4942b3..1f226da7 100644
--- a/src/main/webapp/templates/layout/blog_wireframe.png
+++ b/src/main/webapp/templates/layout/blog_wireframe.png
Binary files differ
diff --git a/src/main/webapp/templates/layout/bootstrap.png b/src/main/webapp/templates/layout/bootstrap.png
index 667ec7db..556f7626 100644
--- a/src/main/webapp/templates/layout/bootstrap.png
+++ b/src/main/webapp/templates/layout/bootstrap.png
Binary files differ
diff --git a/src/main/webapp/templates/layout/wireframe.png b/src/main/webapp/templates/layout/wireframe.png
deleted file mode 100644
index 4b07317f..00000000
--- a/src/main/webapp/templates/layout/wireframe.png
+++ /dev/null
Binary files differ
diff --git a/src/main/webapp/templates/layout/wireframe_1.png b/src/main/webapp/templates/layout/wireframe_1.png
new file mode 100644
index 00000000..a25dba5b
--- /dev/null
+++ b/src/main/webapp/templates/layout/wireframe_1.png
Binary files differ
diff --git a/src/main/webapp/templates/layout/wireframe.xml b/src/main/webapp/templates/layout/wireframe_1.xml
index 65d25da0..65d25da0 100644
--- a/src/main/webapp/templates/layout/wireframe.xml
+++ b/src/main/webapp/templates/layout/wireframe_1.xml
diff --git a/src/main/webapp/templates/layout/wireframe_2.png b/src/main/webapp/templates/layout/wireframe_2.png
new file mode 100644
index 00000000..2ed21d85
--- /dev/null
+++ b/src/main/webapp/templates/layout/wireframe_2.png
Binary files differ
diff --git a/src/main/webapp/templates/layout/wireframe_2.xml b/src/main/webapp/templates/layout/wireframe_2.xml
new file mode 100644
index 00000000..3907e858
--- /dev/null
+++ b/src/main/webapp/templates/layout/wireframe_2.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="03018318-947c-dd8e-b7a3-06fadd420f32">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/maps/concept_map.png b/src/main/webapp/templates/maps/concept_map.png
deleted file mode 100644
index a45f1f37..00000000
--- a/src/main/webapp/templates/maps/concept_map.png
+++ /dev/null
Binary files differ
diff --git a/src/main/webapp/templates/maps/concept_map_1.png b/src/main/webapp/templates/maps/concept_map_1.png
new file mode 100644
index 00000000..df84c501
--- /dev/null
+++ b/src/main/webapp/templates/maps/concept_map_1.png
Binary files differ
diff --git a/src/main/webapp/templates/maps/concept_map.xml b/src/main/webapp/templates/maps/concept_map_1.xml
index 75e62fab..75e62fab 100644
--- a/src/main/webapp/templates/maps/concept_map.xml
+++ b/src/main/webapp/templates/maps/concept_map_1.xml
diff --git a/src/main/webapp/templates/maps/concept_map_2.png b/src/main/webapp/templates/maps/concept_map_2.png
new file mode 100644
index 00000000..adbdc82e
--- /dev/null
+++ b/src/main/webapp/templates/maps/concept_map_2.png
Binary files differ
diff --git a/src/main/webapp/templates/maps/concept_map_2.xml b/src/main/webapp/templates/maps/concept_map_2.xml
new file mode 100644
index 00000000..6f379c49
--- /dev/null
+++ b/src/main/webapp/templates/maps/concept_map_2.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="ad52d381-51e7-2e0d-a935-2d0ddd2fd229">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/maps/living_beings_mind_map.png b/src/main/webapp/templates/maps/living_beings_mind_map.png
new file mode 100644
index 00000000..ccd29f98
--- /dev/null
+++ b/src/main/webapp/templates/maps/living_beings_mind_map.png
Binary files differ
diff --git a/src/main/webapp/templates/maps/living_beings_mind_map.xml b/src/main/webapp/templates/maps/living_beings_mind_map.xml
new file mode 100644
index 00000000..ee55b678
--- /dev/null
+++ b/src/main/webapp/templates/maps/living_beings_mind_map.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/maps/mind_map.png b/src/main/webapp/templates/maps/mind_map.png
new file mode 100644
index 00000000..b58ecc23
--- /dev/null
+++ b/src/main/webapp/templates/maps/mind_map.png
Binary files differ
diff --git a/src/main/webapp/templates/maps/mind_map.xml b/src/main/webapp/templates/maps/mind_map.xml
new file mode 100644
index 00000000..18c1bb3a
--- /dev/null
+++ b/src/main/webapp/templates/maps/mind_map.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">7Zzfs5o4FMf/Gl87EH76qFa3nWlnd9ad2ecIEdMbCBOC99q/foMGFGI77tUmYPFFOQQSzvn45eQQnTiL9O0PBvPdVxojMgFW/DZxPk4AAKEHxFtlOZwstjO1TpaE4VjazoY1/o6ksW5W4hgVrYacUsJx3jZGNMtQxFs2yBh9bTfbUtLuNYcJUgzrCBLV+i+O+U5abX963vEJ4WQnuw5BcNqxgdFLwmiZyf4mwNkeX6fdKazPJS+02MGYvl6YnOXEWTBK+elT+rZApHJu7bbTcasf7G3GzVDGbzogcL3TMXtISlQP+jg0fqjdgWLhHbmZ0Uy8zY/XiKqzWGLrW5nmnQY7nhKxZYuPzUVWTQncIDJv3LSghLLzUQWHjM+qCHZsK0yIPAPK4rpFRGBR4OhklE2qHr8hzg8SK1hyKkyU8R1NaAbJF0rzemSc0RdUj0EEC6y8ebBo9tTBd4RlSzO+gikmFdSfENkjjiMod8i+bF9uX57ScV3vY3XKHEY4S4TVE1snJ1eebYWuoCWLUBMcyZvwQIJqzAPfVcNsN/CIbyWiKeLsIJowRCDH+3YfUH47kqbdmRDxQULyQ2D8EZiBARNc0QWNwAQjMAMDxreMAhOOwAwMGM8xCsxUAWYW7xHjuKiursvOGZTK4a87zNFaOKLa+yoS2jtIuQxdy9iKmoDiWnzfG83V8SXskOAkqxAUIUCsPlBet62EG7JInjUQWzliWLgesXXTCDRMVL5Eb62I3RBpeYA7lSmmnA04ofVBWl4vkmtPas7uIq8OrEfgUZ/53Xpi69aTd4vFMvR8F7xfLNyf4NWmp8tWh+qNhRzk3yoqtXx0RMU3KSqePVIzSGo8o9SAkZpBUmN0Tl2P6YKaZboRieSh58kLqhm4O+JK8vJzBHQlLyIv6SQv3q3Ji/+Y5MVV0PhnhyjDqOg5G1srRKGtmQ1LIxt+Gw3PcjWjoZZuZ3mOIBnBMAuG7RrWDLVE+wUeaMlHMHqlGMDTrRhjKfaCFtufTo8Y/vIE9qbEtA5xpxRrtLLmjaXYwQEDjAKjlmJHYHoOjNGng75anP2TJTDD30VPNOt5xlIFOH5IOHs6/+0W773g5uL9Y1IWXy3DLoQvquH3Gw3f3WyQjtKItuS1g4Lv6UZBra3Oy7hSspEEo0/0AtvXTIJaL52JW/GhwH0vij0dC8C4KqgF0q+QvQh39v7R/8oKA8vTAENfsgdg6YbjSokUp0IkfCL6mW+Y+JTw5mJ7S8rWg1sxF38e2egmE7atm4xxGes1JerJRFVqemeiavTJvq/WTj9nwl1lKgbT97Tj6fRDmZfqlo+xMDo4+QiMyodaGF2jpNKOIdS5nk4/utMW7flHcO+i1FFAtAvI9GbKfoGABNcKoWlaZsIbA1AQG0C4eea5bqAsc/c+uNOLl1Z1UUuly/0A8lTfjvyq76ddARIGnbwVaF4CEqil0/933xnOAmUbzGZzLTeVhy5QroW+8xtOYPTmc6XIimIMRzkxvNLQstp64jq69eTe/w8Y9cSMnhj9wUOgVl/XOc0Kyvr/1Ob3ExVHe5Jy7zrVUVTMiIrRX2wGak32r79HMenXhAe4urXk3hWpo5aY0ZJQm5aIzfNfbh33XfyxmbP8Dw==</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/maps/site_map.png b/src/main/webapp/templates/maps/site_map.png
index b260a686..0aae2871 100644
--- a/src/main/webapp/templates/maps/site_map.png
+++ b/src/main/webapp/templates/maps/site_map.png
Binary files differ
diff --git a/src/main/webapp/templates/maps/site_map.xml b/src/main/webapp/templates/maps/site_map.xml
index 769e0fe9..dccafaae 100644
--- a/src/main/webapp/templates/maps/site_map.xml
+++ b/src/main/webapp/templates/maps/site_map.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="2309ab02-6768-196a-c498-d5f5fa538c8f">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</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram name="Page-1" id="2c0d36ab-eaac-3732-788b-9136903baeff">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/network/active_directory.png b/src/main/webapp/templates/network/active_directory.png
index 3ceb9c75..c9500a4f 100644
--- a/src/main/webapp/templates/network/active_directory.png
+++ b/src/main/webapp/templates/network/active_directory.png
Binary files differ
diff --git a/src/main/webapp/templates/network/aws.png b/src/main/webapp/templates/network/aws.png
index 1dc38a07..6f3c009c 100644
--- a/src/main/webapp/templates/network/aws.png
+++ b/src/main/webapp/templates/network/aws.png
Binary files differ
diff --git a/src/main/webapp/templates/network/aws_3d.png b/src/main/webapp/templates/network/aws_3d.png
index c1edb8c6..e96614c7 100644
--- a/src/main/webapp/templates/network/aws_3d.png
+++ b/src/main/webapp/templates/network/aws_3d.png
Binary files differ
diff --git a/src/main/webapp/templates/network/azure.png b/src/main/webapp/templates/network/azure.png
deleted file mode 100644
index 07312ae0..00000000
--- a/src/main/webapp/templates/network/azure.png
+++ /dev/null
Binary files differ
diff --git a/src/main/webapp/templates/network/azure_1.png b/src/main/webapp/templates/network/azure_1.png
new file mode 100644
index 00000000..6d12ea42
--- /dev/null
+++ b/src/main/webapp/templates/network/azure_1.png
Binary files differ
diff --git a/src/main/webapp/templates/network/azure.xml b/src/main/webapp/templates/network/azure_1.xml
index 968c5fd9..968c5fd9 100644
--- a/src/main/webapp/templates/network/azure.xml
+++ b/src/main/webapp/templates/network/azure_1.xml
diff --git a/src/main/webapp/templates/network/azure_2.png b/src/main/webapp/templates/network/azure_2.png
new file mode 100644
index 00000000..1cf0a6d6
--- /dev/null
+++ b/src/main/webapp/templates/network/azure_2.png
Binary files differ
diff --git a/src/main/webapp/templates/network/azure_2.xml b/src/main/webapp/templates/network/azure_2.xml
new file mode 100644
index 00000000..cad26f83
--- /dev/null
+++ b/src/main/webapp/templates/network/azure_2.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/network/cisco.png b/src/main/webapp/templates/network/cisco.png
deleted file mode 100644
index 08c30e61..00000000
--- a/src/main/webapp/templates/network/cisco.png
+++ /dev/null
Binary files differ
diff --git a/src/main/webapp/templates/network/cisco.xml b/src/main/webapp/templates/network/cisco.xml
deleted file mode 100644
index b075e84c..00000000
--- a/src/main/webapp/templates/network/cisco.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="1f012b56-ca57-1245-33d9-ee102debb750">7Vxdc+MmFP01fmxGAn0+btLNbmfamUwzbR93iIRtTWShQTh2+usr2SAZY3vJ1haa2ZsXWxeElXvOgcsFNMMPq+0XTurlHyyn5Qx5+XaGf50h5Ac4aD86y/veEqTp3rDgRS4rDYbn4l8qjZ60roucNlpFwVgpilo3ZqyqaCY0G+GcbfRqc1bqv1qTBTUMzxkpTes/RS6W0up73lDwlRaLpfzpJJQFLyR7XXC2ruTvzRCe7/72xSui2pL1myXJ2ebAhD/P8ANnTOy/rbYPtOx8q9y2v+/xTGn/3JxWwuaGKPd8LwqDefTihXMU/YIi+WDiXTmD5q1v5GXFqvbjfilWZXvlt19L8kLL+/7ffmAl40PFRhAuHouyq+2117TKP3X4DDVay0F5Izh77X3etT9vC1WjgzdbO6vEI1kVZUexvynPSUWkWfLJb715bzpE+qhha57RM15QnCN8QcWZOuG+Tuedg4alm79QtqKCv7cVOC2JKN50ZhFJ0EVfr7/1iRXtoyJPiinCkipSSmHs6U3sH1LeNUDdfjl4jMG0I4AlGTACMtiRIRiHDEF4RAY8IhkSIIMdGdC1yaDB+BHMggAws8MMTwYz2eYbKdfyV36rBOUVFSaWZdlGRDtklqTujFnJ1m3D95tlIehzTXY+2bRBmg7zDlyaK5hUENJdZGxVZOfx+584vVEu6Paih1VXl+hdXd/1bQ4CMhVGLQ9jMe8GoOAUhNR3bBeFFE1GSMgQ0mPB6YZ0dx1hqeSz2i66Cc1dVjQZu2totuaFeL+bq/s0iHPSLHsNHeHh4ShJ4x65U0jpmHagdOIo2knI7x13nlhTiIJVbdkLE4KtDip8KotFVyBYbS/mEaWLdOniMDGki1JTuVF8iyEwBOX2w9tF5caTUS4G5bpRbuQfKTcxB93RlIsxKLefWV5UbjIZ5QagXEdjrhdpyu0zAy6Ui2JQbp8gvKjcdDLKDUG5jsbcMNSVq5I2TqJlz0D7J1RuZKFc/+r5/x8HzQfQLEG7ep7+x0GDtRVb0KaTmw1gSmIJGprOIkhkRDZ/srWg3DKu4bvKjfyEoMYqqMGqp5VBDUqwEdTEiRnUhPgWqoU9DUN677Jq/cmoNoA5pCVo/nS62gD2CNgqzZsOaLC2aQvadCLRGIKa0YOaWN2igprUYVCDYWvPsPJxWbXTydRgWIy2BM2fzviIYfpgC9qEthDA9MEWtOns2EogqBk9qEHx0fJTGrsLahDMH4dF4ctBzXRWMhDMHy1B86eTXsOw0GsL2nT2aGBY6LUFbTpb4lIIakYPauJI38caqfMbLoIaNZU9YMBfjTX+rQPrHQO+kSr/VlNe1EvKSdnclaTeux8Y8X1G+OoEumREjMz9kemJ00TRTY54mWe8gBFjMyJF3+8jxmMEAkY4Z0TiIY0RfuSyjzAPwQAjRk+ORFhnhMoFO2GEebjiKozYMP7aTgX2EAEtbIIJpAcTfmTSQm140miBbkELc+c+0MINLXz9DA6KzYhiPFqY2x6BFm5ooUYDlWFXinVCC3PjCNDCTbSZHE0/zGBzPFaYK2/ACjenwRJ9DhIHLmlh5i6BFm46C7WfYQq0QDdKaAItPj6G6LRAJ960Mh4tbpTVBFp8eBDBR/PTwCUtzNTmEy8q+xWw88yoZTvAChtWBIGe8PZPvNwl9U1WqJ3G12WFmd4EVrgZQo5e+XMiaTEeK8wUJ7DCCStifQQJgxOJ79FYYWY4gRVOTvXGes4i9swDMFdiRXs5vAV9//ri4VXz+PN/</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/network/cisco_1.png b/src/main/webapp/templates/network/cisco_1.png
new file mode 100644
index 00000000..d20c9e6e
--- /dev/null
+++ b/src/main/webapp/templates/network/cisco_1.png
Binary files differ
diff --git a/src/main/webapp/templates/network/cisco_1.xml b/src/main/webapp/templates/network/cisco_1.xml
new file mode 100644
index 00000000..cbf4c176
--- /dev/null
+++ b/src/main/webapp/templates/network/cisco_1.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/network/cisco_2.png b/src/main/webapp/templates/network/cisco_2.png
new file mode 100644
index 00000000..b537f2af
--- /dev/null
+++ b/src/main/webapp/templates/network/cisco_2.png
Binary files differ
diff --git a/src/main/webapp/templates/network/cisco_2.xml b/src/main/webapp/templates/network/cisco_2.xml
new file mode 100644
index 00000000..a8ea276f
--- /dev/null
+++ b/src/main/webapp/templates/network/cisco_2.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="c37626ed-c26b-45fb-9056-f9ebc6bb27b6">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/network/citrix.png b/src/main/webapp/templates/network/citrix.png
index 1cc87a26..418a1c28 100644
--- a/src/main/webapp/templates/network/citrix.png
+++ b/src/main/webapp/templates/network/citrix.png
Binary files differ
diff --git a/src/main/webapp/templates/network/enterprise_1.png b/src/main/webapp/templates/network/enterprise_1.png
new file mode 100644
index 00000000..67f5f82d
--- /dev/null
+++ b/src/main/webapp/templates/network/enterprise_1.png
Binary files differ
diff --git a/src/main/webapp/templates/network/enterprise_1.xml b/src/main/webapp/templates/network/enterprise_1.xml
new file mode 100644
index 00000000..898d283e
--- /dev/null
+++ b/src/main/webapp/templates/network/enterprise_1.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="a45cf8ec-cd66-6f27-3ac3-be6e809c9e4a" name="Page-1">7Z1dc9s2FoZ/jWd2L1ZDfBHApe3Y28423U7cnbRXGVpmZDaSqJXoONlfv6BM0CQIkZAEgIoFd+pYlARKfB8AB+ccHF6g68W3f66T1eP7/CGdX8Do4dsFencBIWQEin/KI99fjgDEo5cjs3X2UB17PXCX/S+tDsqXPWUP6ab1wiLP50W2ah+c5stlOi1ax5L1On9uv+xzPm+fdZXM0s6Bu2ky7x79mD0Ujy9HGaSvx39Ks9mjPDOI+csz98n0y2ydPy2r811A9Hn78/L0IpFtVV9085g85M+NQ+jmAl2v87x4+Wvx7TqdlxdXXraX993ueLb+3Ot0WZi8oRLqazJ/qr76+yRbFukyWU7T6iMW3+Vl2X6xtHwruEBXz49Zkd6tkmn57LMgQRx7LBbz6un6q0Xlg2Kdf0mv83m+FkeW+VK85+pzNp/LQ+JCXV1es3dIHJ+tk4dMfAH15fmyqFABrHrcePvlDQZIXMCrr+m6yISWl/NsthTP3edFkS9kA9W3KT9ULj57VpSM4tfPKPUuP0h1cUR76bedFxjUson+kOaLtFh/Fy+Rb8CskrrqC0gy/vwKFiDVsccGVBhXB5MK5lnd+Kug4o9KU72+qKPvjyXqbcRoRLpaqVI60U7o0pKOapSrX9OUjkbgeOmwRrp4XpRfdpUsxd+z8u87MfxluXhYnvLladFw8xU/luA7e3GRr1oYUG8YYN7uwZR3MECRpgODCB1PARmgoCFs/N+nctq4mmfL9B/yg1yWZNAJYOV/UcQwhHz17fXFXY7QOXC0eyqg7jhi7eEExsYgkeNBir2DRAJIbkBCyryEcRckyDXzEgAWQKIdkO7Stfg+4thtsl4EdY9UN0bt6QYjjbpUN0xACwYj06qblYuB6Ld1Pk03m2w5CyIfKTKHBiIzncjIgsjc+1yAd84FL4fv129ydhjDXOVRGy2/ZoZc3XpkCwa2xmLLfCnELKAFOmhdrZPl9LE5vtiFTPybLMqLvbzflP/8LReXb5Mmm7+/LdtWhWenC82LyyxioEUZp6CDGSZcg5nk8SjMuj7RGjOxNo6aDPyQYp+WfxRQ2B5SWNfLhgnViM0sWEKg6yC9FldhnUyLfL0JAh8vMKXtKYPLS95arOKuvjCiFvTtelHrzvyDucJPc7BGiLbl5V15MdSZBMSGvF33aC0v+EHlPaneKxamLXlZ1LX46kBVeyq2EAIBXaelGJ03T4s0jM1W1G1PvZixjrhAF98iGFoQt+tIvJ7nTw8vZpYirnhrttqkL8qtyoPT7WuPEVrIAhHG5J11tetm5dvfZetquVo2sS4v7sCCDVoyr9TwMwAajXXjsxXrqutNlBLjILErievkEi8Sd32JPy+LdL1Mi6CwJYU5Vb0uHgWGOoeeImz3W3dEirc/4pmHZPO4naXLy5VUs+A0LZlpi96QhzWQWXyblUlnkzRbTRbpZpPM0uvHZLlM5yooCg63259+HHSZJ22JLVjMsdJdkWbBqzOpbIR3YNeH1u2mD7NUfuF0fp8/37we0AD+aneVFz1dPlyWCXiv13VTJOtCd0z2veptzYctSJoDwe6+b5hHtD3zbVZeIPl5G480WpdXo6X0Jn9aT6tDMklHNDpLFZkMiFin86TIvrbb18lbvfW3PBMt1iQRrMztVCHk5aNW73qFZLAhqAaZXr5fp6EtbfX3MQOw613rAJgttumZTeGrQ++yxUycYZ7di99TMZt8EmqWf+aL1VOxXRXcvs+XWZGvP/2eP6frTwCyb+L/yWo5G5xIou3PYSOHCXvWRxIloYTTzkCiCyFamRUMEgv3l1EYDc/5+ss2wHx7tc5E13vTAkLVN+ZRQF16odV++Gta3Of5lzctIInGE1CXGRgE3FdAPp6Auoy8IOCeAsYjCth1YAUBj86E8ilg1z0VBDwgXA/GU1CXyRYU3FdBoCgIpFnTkJBqQvDUQghPLjWDhDYNUci6cTpXnRAZ+JSCgvtaol4VdO6UOSEFd+RR2DdFvSroxB9zogp6s0W9KhgcMi6MUa8SBpeMC2vUq4TBKWNBQqRuYaPYn4LBK2NBQazuT/OpYHDLWFCQjKmgc7fMy5bjTx+S6dtWsbMZ2KOKMikgqHisinTEvoide2fORUUGRlTRuYemUvHtZ81wqFTPYB5ldO6mORsZQTSmjs6dNeejI1Cr2fjU0cBjE5Kb9xlc5ZaPei+CZr+YvMi2k5uxgfMmqLmPH4e0LR7EDXf/WVHTwJET1Dyib2rVBK76poFTJ6i5T+6w4hkgvDttgoi76pxdD4/c2dfdd/2D7vtS93b17QNzsu9LGX01eVXOdn3JU2v07fbboK8VfRHpjsfuBHbiFmpt4PiQl4uZt714geoWLOAv+VFW2Q8SHieh0g2hrD7lQ0L326jOQMJY2VEba8rSOVPQuSfofPYzAtWm9ekKIk6Sd1pd8aMwLOZirfHpDPokjkbsk06SeM5WSoDwiN3SSTrP2WpJqFLPSzrffUjJOso1S02UK618li+TebPeRLu6hN6v03sFuwUp2iUfdi87u2u+6dP6a11hbN9aEdLWa9aKINRYQONaEcZyhL1TFjpUTfUIHUqavUHBo4IceEQFw9YpG7bmmAoaOGFCXOOIAbVO12lFqTRFKW2ENeKwjcrGiCo7RU9NYGf9MWyjsjGikhEVDLuoLChIxlQw5OG4HVBBxLuTYl0NzvqkGHZUWdAQkKgtIvXoRYvDliobEtbZUWNIGNw1NiREI/ZCauCvCfPiXgFDRU0edavb15Eo2/MiDc4bKxrK+kF1mpu/SKG891SQ8LhBFY4oYXDZWDFtxpTQwGcT5sW99sbxtpqvB5oTI3I1MYZUGqvpbWT4FmvOuqbzejgfhaabIinzrd+0iqBTkAN4HGGdu3DOVkYCPS4gnbtxzlbGWLNR1ZmMzl055yKjkphIIn8zo2wjiHisiMr+C6LZlupMROcunDMVMfZoozInTpzWcuNWLDeek/n8TUsIoqhdicNnzj7T3PO1kRxcXZqTygbeNwFYYtm6WRwyVsl6AjBzkipzbpvPEFUqnnisVssMHC3hbo7mHZRoOmhkv4NWb1VuwqiWejz4bo5qQw7v5sgM3EMBQHMA4zEBpLYAVBtyCaCBYysAaA4g7QIoa6S5B5CrtyGSOS/7Aqg2VJteDgA0cMkFAM0BZGMCSJRCAoDTwwBUG6qXxw4ANHAmBgDNAeRjAggilUB2IIGdluqi7PYRlEXGAoJWEJSlmcZCkFoaBDst1VXjHCBo4MgNCBojKA32FoKxt2mYWBoE1YbqeJEDAA2c0AFAcwB1Y6A/AH9AO5Ab5EEGAM0BhKMCqM6c0aEAqg3F7gA0CCcEAM0B1PgCZZ0D/1Mwoge6YtSGcOTOBgzREKsA6nyB3gBESv04Ijf27wug2lAcYWcAhmiIVQB1vkB/ACo+ZEIPBVBpKAbuAAzREKsA6nyB3gDE3NIIqDbkcgQM0RCbAGKdG8afDahOwYeOgGpDLkfAEA2xCqDODeMNQIra+YgHj4BqQw5HQCBZDwTaIVDnh/FHIFYIPHQIVBtyOAQCeQeeQKAdAjV1ez0SSBQC2aEEKg3F0CGBMBBok0A8KoGxQiA/lECloRg5JDBEQ2wSKLfYjEQgHTDfjAlUG8IOCQzhEKu+GN0s7KB6/g5w2ID5Zkyg2hBxSGCIh1glUDcLeyOQU0sBObUhhwE5EIWAiFUCNfuTPBLIFALZoQQqDdWFUFwQGCIiVlNTdXagPwKVQEZ9A+u9CVQawtAhgf13PRra2LyTpramvZuazVlxt/lZl9QMRrz7EZDT3g5d9rwb1anKdNwdqzS9Hbha9YlLk3xvvGBVdr7N7sEAYLnCkqNBdYqd6ejqG2Qu3CsxL5/h4K4uA/1n3tV1zgI5xY/S1YHzKi+/JKsiX73pOgeUt1euXO4R8FDnAMi660HBIxRkdEwFnZfpPQcFFe8RiIBPCZ3UizkzCdXFL9cU5nWnIAk274DxAnV+5lGNlzhoNmRwajyzctvBOJrRoNnQ2lLjy6QO+tlBa0uopmyz1kpx8PWkyhmxt7K0euvsswGKORgEDgNKzYAdAkp9fZWKbg+o4P06CChze++0RyiKLI9QskxZCLS8ft5jUr40e5+Ig1qhelow4xMaAx7hl9/tCpckxhPceDpuN2+8LaX3JHGEdM86CNBAA+9gIPc4crEvcmMStdhse/w7Oa/GJTX7mxUk93QIm6z2oxmm7YabynX44bCoVaTUxuQDE/fQGyzM3P2VtwNTDe/1STKlZnSBiPQzpb6B430ZxLYZxIHBQQbhKTMI2pEJRmwTElzXw4TocmxOhRCm7MFkyDYh/Y7yc8m+IDpnuIPCVcbOcBic4UOaUd2ayVWxsf0TrZQidnHcckYOv0HeIs9eVw/u8EGkNNWbxh0Ggsd5UDNNybdRNUMGTt1wh6ChlA8A5X5o6XyXAWsfOR/IwL0ZNBzUsM7DGOH+6AB1JQtjp7L40ZWsPpnFDwC4jQ8DAy6XzhtsL6hRcPsNM3XKC2qBiJLPG+3rxotsMxX2vNsMpcUaG166bn3sOKY9MS8sk8n333/c1yyJsKewLwq7462yqnFh+GNVWGdgQlhMacwIFxC1DW5G0YTHMccQYEYPLh8ycBYO6EQ+I0w2yZMLdsO+eqvsauq8+mSX9rLLLLHbexYOvbEbduTbZFe77vEJL+uFl1uCt/csHHmDN9Q3tgkv1ayvZIVNLwNv1DudY0sDb+9ZCPPFbiiNbJVdOC67rJcqaInd/rPEvtjFBoGIwK45u5p0Np/s8l6qkCV2+89CvbEb8svtGrzjGg0w6sUK24F34CzMG7z9rJ5NUpVuwHRwS17jiCAO9Y2t1rXTeIBi6GtMwRhNIlZWI44hizhXQs04RpNyLEEoIpSRuorD3huu+k9Tut4RFbNm9RqH1bll2eVArxV6Y40LyB+9KGJabuogI5kAzhCmIKL44LK1Q2cpjcZqNkRiuUDcsRviRlbZ1VhzHtnldFINhhQRguLYCbsDZ/HHbogbWbUaNPF5j1ZD1E8VsMLu0FmwN3ZD3MjquKtZ0cTe7m+OAeilinAr7A6cRayiPbEbwkZW2dVscfLILuynKrbD7sBZuDd2Q9jIKruaqkIe2UX9VFE77PafBYg1nCd4SYgbWY0bjQsvHpjO7cDbfxYQAW/whsCRTXjl1WvCC70lShESTQjlgk2AMa+3Z0qqWDyJGQCEYxhBxhk9DN7+s4jF3ARFWPQQBuOIxcxddrW8dURg1wq7ugq32NvAS+JedrkldnvPAok/dkNszXlBOAex0x3TOY8mmFEWVb/UUoZoEiMMcPXr0Mha70nKUoaNJ1XDxCa5BnG1sNd3aK8vVLbJYZld4mOrLwnhJavZQrpyOP7uXIwhbc9pqEUW4qA1dR64ZIGMTCCHMZO/2mchHE2omF159cvhisUgvnTcHUI+ioFIEFJk+fJNj0GkPQRRiYaXIcgg0hJUPEBFHgGPKoYaScOTg67gjivTdO8S77BND2vfA2Dw9bHtQrEySS4Q1UOUruzWyRDVKeMK+olCjomKDdzzR65X/vPbnZ0pBpb/nd4UAzrdnng0FWT21hFDwl9Pi5WSTt6QOv2WFX+Ur5yQ6tGf8pml+LB/NB/8Wb+uJfE8uU/nV8n0y2x74oYon7c/lsYiZYH0V1oU36sDyVORi0OvV+OXPF9d7Fow3ZIreq0dmlQkm0zdJotsXiLwUzr/mhbZNFGgxD1QJvNsthTH5unnQh0CTUY9mfTk2j1pzqWB+/nIgeU6X05L7JIit+QOOdERRpaqqj2xzOcAY7VKVe+Y8SbtEV3PdBb02rskNFbIsl1WXiYKWaYnOmd68KlYsyx2TY/VkvOBni099ETpwRG3TE/ItXcdRazXj14KjOFWEK8dnSYUTRCPIK5+tZvfo75Y30nUOKK7CHjc9QD/dHMp/omThVi4XC3vN6vt0iCel+uFh+yr+HNW/vnv29ufr2/kE+JEjec6+AubtOijThq+DTu5OiQXLKUFnorjV6WFK9Y888vqiUX28LDtRc+PWZHerZItR8/rpPzcuXj15/m2lzyK16VL1WZvII7iLuKXN2X2lwNTmyoO4xh3TW05zbVsbQCsGNvdNPWbX3+/+fDbh5/vhKbRrze/f/z3h38FHQedMkhJkSEdGQHSrZkwsSGjQcZ2iN8Y6UgU5xqSbfhY+8oqbsHf3mNjajbuO7tziuZOJ7As08EgIqUzHdB24g9GaFI9EWNxZbiSGbdjxj76Bi0oHigE7fwGLdSbX/ji1Stc+Yj71lkGfuEhW1rfXabzZLPJpq0eA1rWdjn/HO4U7ill4skpvH/X1FrsDlJvzAfU/hWYzWgFbYYrohaW1XM1mYFLMy6ljXAkl1AToYUOvBI7qBQP13leNIdWYcw+vs8f0vIV/wc=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/network/ibm_bda_reference_architecture.png b/src/main/webapp/templates/network/ibm_bda_reference_architecture.png
index 5237c327..9a889fe0 100644
--- a/src/main/webapp/templates/network/ibm_bda_reference_architecture.png
+++ b/src/main/webapp/templates/network/ibm_bda_reference_architecture.png
Binary files differ
diff --git a/src/main/webapp/templates/network/ibm_cognitive_conversation.png b/src/main/webapp/templates/network/ibm_cognitive_conversation.png
index 4f5b838b..b168f5f3 100644
--- a/src/main/webapp/templates/network/ibm_cognitive_conversation.png
+++ b/src/main/webapp/templates/network/ibm_cognitive_conversation.png
Binary files differ
diff --git a/src/main/webapp/templates/network/ibm_cognitive_discovery.png b/src/main/webapp/templates/network/ibm_cognitive_discovery.png
index ab0f0bcf..fdc2142a 100644
--- a/src/main/webapp/templates/network/ibm_cognitive_discovery.png
+++ b/src/main/webapp/templates/network/ibm_cognitive_discovery.png
Binary files differ
diff --git a/src/main/webapp/templates/network/ibm_iot_architecture.png b/src/main/webapp/templates/network/ibm_iot_architecture.png
index 4611123b..601eadc9 100644
--- a/src/main/webapp/templates/network/ibm_iot_architecture.png
+++ b/src/main/webapp/templates/network/ibm_iot_architecture.png
Binary files differ
diff --git a/src/main/webapp/templates/network/ibm_microservices.png b/src/main/webapp/templates/network/ibm_microservices.png
index 40a9bfbb..05a9f229 100644
--- a/src/main/webapp/templates/network/ibm_microservices.png
+++ b/src/main/webapp/templates/network/ibm_microservices.png
Binary files differ
diff --git a/src/main/webapp/templates/network/ibm_private_cloud.png b/src/main/webapp/templates/network/ibm_private_cloud.png
index 9ea77317..38037207 100644
--- a/src/main/webapp/templates/network/ibm_private_cloud.png
+++ b/src/main/webapp/templates/network/ibm_private_cloud.png
Binary files differ
diff --git a/src/main/webapp/templates/network/ibm_vcenter_server_platform.png b/src/main/webapp/templates/network/ibm_vcenter_server_platform.png
index 9cac937b..6fa07847 100644
--- a/src/main/webapp/templates/network/ibm_vcenter_server_platform.png
+++ b/src/main/webapp/templates/network/ibm_vcenter_server_platform.png
Binary files differ
diff --git a/src/main/webapp/templates/network/internet.png b/src/main/webapp/templates/network/internet.png
index e039aa4b..62fd6706 100644
--- a/src/main/webapp/templates/network/internet.png
+++ b/src/main/webapp/templates/network/internet.png
Binary files differ
diff --git a/src/main/webapp/templates/network/lan.png b/src/main/webapp/templates/network/lan.png
index 1caf5da5..cc034b1d 100644
--- a/src/main/webapp/templates/network/lan.png
+++ b/src/main/webapp/templates/network/lan.png
Binary files differ
diff --git a/src/main/webapp/templates/network/telecomm.png b/src/main/webapp/templates/network/telecomm.png
index aa0e8d14..b9d1b1c5 100644
--- a/src/main/webapp/templates/network/telecomm.png
+++ b/src/main/webapp/templates/network/telecomm.png
Binary files differ
diff --git a/src/main/webapp/templates/network/veeam.png b/src/main/webapp/templates/network/veeam.png
index 1b0049e8..438fcc9e 100644
--- a/src/main/webapp/templates/network/veeam.png
+++ b/src/main/webapp/templates/network/veeam.png
Binary files differ
diff --git a/src/main/webapp/templates/network/wireless_home_network.png b/src/main/webapp/templates/network/wireless_home_network.png
index a3bdec06..b7e0ffcf 100644
--- a/src/main/webapp/templates/network/wireless_home_network.png
+++ b/src/main/webapp/templates/network/wireless_home_network.png
Binary files differ
diff --git a/src/main/webapp/templates/other/block.png b/src/main/webapp/templates/other/block.png
index b9142408..da09ef6e 100644
--- a/src/main/webapp/templates/other/block.png
+++ b/src/main/webapp/templates/other/block.png
Binary files differ
diff --git a/src/main/webapp/templates/other/cycle_1.png b/src/main/webapp/templates/other/cycle_1.png
new file mode 100644
index 00000000..c000c89c
--- /dev/null
+++ b/src/main/webapp/templates/other/cycle_1.png
Binary files differ
diff --git a/src/main/webapp/templates/other/cycle_1.xml b/src/main/webapp/templates/other/cycle_1.xml
new file mode 100644
index 00000000..879355eb
--- /dev/null
+++ b/src/main/webapp/templates/other/cycle_1.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="07fea595-8f29-1299-0266-81d95cde20df" name="Page-1">7ZrZcqM4FIafxpdNaQEBlzF22qnqtFP2TE/NpWIrWNUyookSO/P0czDCLLaTnpqQkIUbw68FLd/5kcADGq23XzOeri71UqgBQcvtgI4GhBBEffjJlYdC+YLdICikOJPLQsSVMJf/CCsiq97JpbhtZDRaKyPTprjQSSIWpqHxLNObZrYbrZp3TXksDoT5gqtD9S+5NCurYhZWCRMh45W9dUBsl6/54mec6bvE3m9A6M3uKJLXvKzLdvR2xZd6U5PoeECjTGtTnK23kVD56JbDVpQ7P5G6b3cmEvM7BZjrFkXuuboTZZuZgsLDGw11QBPNgx0W9utOlwlfbneTdgYZKEq3VeJuVpTOGiVqw1BJLLa/u7tdt4XblCeldj6dQm0ompxdfC/ToVP1LPt6sscqiv6Ovo2fqAHkg8aAVgzH6ZuRxlgRmNk0P12JLY91AllSkcm1MCKr1KtSgokfblbSiHnKF3mxDYQWaCuzVnCF826UqCC4UPxaqOEetsiOeKITkWc1mf4pov00UEJd1xvlUyeVOqbHGV9KYKZVUd7nc76WKo/kiVD3wsgFtwk2bAm11+16AbEhVzKGvo8WUHfecdu0MqjofuTuRWbE9iTFeB8b4DpCw5hlD5DFFnBJ4Hh+ELo+ZYELceoVNVj/IT5zHT8MiOsx7CJaMr+pQpti7OQlkUcYxVAXK7KsakFOvNAJWC2XzcOt2cT7dlUBByc25k7Fn3ck/loomUzyJM6vOmOknO8mHue74zc5wP5/4SDThhuZx8UoRI8AqGT6w3YuP5/Ycw1DIE3eGoKehyGKQqeNTUAcVju8A2x8cogJ9shzcMH+ty8T2vRl64DfLi7P/hifNLa3aGP22dKNjY16Y2Mecp/g8fVszO8I16vZdPRnNJ7N3xWwe2N9289dxsAga8SSJq+Mug4Ow+Kh66ESxl7wGnTE6/Ty+8WP6ex9+evHwBV0hzAvJ9X3cUiCHuEadoTrZDwbfvLaU16fWA9QRHq7rfFQV8vXs9mnwfYVWAwO2lqz9thUPfw8jO7gbGE6GkfTy6vp/L0tXN/JTmsHKqoO/GYWruXLhV6+L6qo6fJ9EcWn+euEFh+hFh8seGoj7h3y4NPnmH/6Of+PzH/9HWE3azLafsRR5DZfy7wgDMc+3nwwGEj4wm7gsoNFDkTlq/lBn78f9ACBzg2BMf/AEODB/0qGcOyrwcei4bGvSZ0AECDsoNouvbX/8WEp+UrWcOyd/CcML+YMlBInrG0RQtZCw0UvgwZcVv8o2aXV/rhDx/8C</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/other/decision_tree.png b/src/main/webapp/templates/other/decision_tree.png
index 2e6ea60c..7fc5f340 100644
--- a/src/main/webapp/templates/other/decision_tree.png
+++ b/src/main/webapp/templates/other/decision_tree.png
Binary files differ
diff --git a/src/main/webapp/templates/other/educational.png b/src/main/webapp/templates/other/educational.png
index c3491261..3b7ec1f4 100644
--- a/src/main/webapp/templates/other/educational.png
+++ b/src/main/webapp/templates/other/educational.png
Binary files differ
diff --git a/src/main/webapp/templates/other/floor_plan.png b/src/main/webapp/templates/other/floor_plan.png
index e8f057e7..ed6c16b0 100644
--- a/src/main/webapp/templates/other/floor_plan.png
+++ b/src/main/webapp/templates/other/floor_plan.png
Binary files differ
diff --git a/src/main/webapp/templates/other/infographic_1.png b/src/main/webapp/templates/other/infographic_1.png
index abc02df8..c78b33f1 100644
--- a/src/main/webapp/templates/other/infographic_1.png
+++ b/src/main/webapp/templates/other/infographic_1.png
Binary files differ
diff --git a/src/main/webapp/templates/other/infographic_1.xml b/src/main/webapp/templates/other/infographic_1.xml
index dff580b4..e093544e 100644
--- a/src/main/webapp/templates/other/infographic_1.xml
+++ b/src/main/webapp/templates/other/infographic_1.xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="1b6ddaa2-a5fa-0841-a249-ffc654eaa1b7">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</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="1622d65d-c77d-c4b6-e0e7-3c11208c8684">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/other/infographic_2.png b/src/main/webapp/templates/other/infographic_2.png
index 6af63448..8dafb4b9 100644
--- a/src/main/webapp/templates/other/infographic_2.png
+++ b/src/main/webapp/templates/other/infographic_2.png
Binary files differ
diff --git a/src/main/webapp/templates/other/infographic_2.xml b/src/main/webapp/templates/other/infographic_2.xml
index 8ae0a6e3..ea754a3b 100644
--- a/src/main/webapp/templates/other/infographic_2.xml
+++ b/src/main/webapp/templates/other/infographic_2.xml
@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="c9759b83-6cc0-f90f-368a-22ade40db6f5">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</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="5348f1db-0dfa-24cf-5d06-2057accb5106">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/other/infographic_3.png b/src/main/webapp/templates/other/infographic_3.png
new file mode 100644
index 00000000..46ced682
--- /dev/null
+++ b/src/main/webapp/templates/other/infographic_3.png
Binary files differ
diff --git a/src/main/webapp/templates/other/infographic_3.xml b/src/main/webapp/templates/other/infographic_3.xml
new file mode 100644
index 00000000..ad506f59
--- /dev/null
+++ b/src/main/webapp/templates/other/infographic_3.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/other/infographic_4.png b/src/main/webapp/templates/other/infographic_4.png
new file mode 100644
index 00000000..95fbcf86
--- /dev/null
+++ b/src/main/webapp/templates/other/infographic_4.png
Binary files differ
diff --git a/src/main/webapp/templates/other/infographic_4.xml b/src/main/webapp/templates/other/infographic_4.xml
new file mode 100644
index 00000000..7a98ebd5
--- /dev/null
+++ b/src/main/webapp/templates/other/infographic_4.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.2" editor="www.draw.io" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/other/lan_plan.png b/src/main/webapp/templates/other/lan_plan.png
index dc37e9a9..8d0f59e1 100644
--- a/src/main/webapp/templates/other/lan_plan.png
+++ b/src/main/webapp/templates/other/lan_plan.png
Binary files differ
diff --git a/src/main/webapp/templates/software/class_1.png b/src/main/webapp/templates/software/class_1.png
index 6e74006d..9df37a3e 100644
--- a/src/main/webapp/templates/software/class_1.png
+++ b/src/main/webapp/templates/software/class_1.png
Binary files differ
diff --git a/src/main/webapp/templates/software/class_2.png b/src/main/webapp/templates/software/class_2.png
index f8d0d565..fc8a4e21 100644
--- a/src/main/webapp/templates/software/class_2.png
+++ b/src/main/webapp/templates/software/class_2.png
Binary files differ
diff --git a/src/main/webapp/templates/software/component.png b/src/main/webapp/templates/software/component.png
index 2966b4d4..f3c0f640 100644
--- a/src/main/webapp/templates/software/component.png
+++ b/src/main/webapp/templates/software/component.png
Binary files differ
diff --git a/src/main/webapp/templates/software/data_flow_1.xml b/src/main/webapp/templates/software/data_flow_1.xml
new file mode 100644
index 00000000..25ab5c4f
--- /dev/null
+++ b/src/main/webapp/templates/software/data_flow_1.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="device"><diagram name="Page-1" id="5d7acffa-a066-3a61-03fe-96351882024d">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/software/database_1.png b/src/main/webapp/templates/software/database_1.png
index c4ea6c77..8edb4d06 100644
--- a/src/main/webapp/templates/software/database_1.png
+++ b/src/main/webapp/templates/software/database_1.png
Binary files differ
diff --git a/src/main/webapp/templates/software/database_2.png b/src/main/webapp/templates/software/database_2.png
index 95649a95..ca7ec0e2 100644
--- a/src/main/webapp/templates/software/database_2.png
+++ b/src/main/webapp/templates/software/database_2.png
Binary files differ
diff --git a/src/main/webapp/templates/software/database_3.png b/src/main/webapp/templates/software/database_3.png
index ab01b810..e9f3ad50 100644
--- a/src/main/webapp/templates/software/database_3.png
+++ b/src/main/webapp/templates/software/database_3.png
Binary files differ
diff --git a/src/main/webapp/templates/software/eip.png b/src/main/webapp/templates/software/eip.png
index d1b3c7b2..eeb85152 100644
--- a/src/main/webapp/templates/software/eip.png
+++ b/src/main/webapp/templates/software/eip.png
Binary files differ
diff --git a/src/main/webapp/templates/software/entity_relationship.png b/src/main/webapp/templates/software/entity_relationship.png
index 2799c943..3646a09d 100644
--- a/src/main/webapp/templates/software/entity_relationship.png
+++ b/src/main/webapp/templates/software/entity_relationship.png
Binary files differ
diff --git a/src/main/webapp/templates/tables/authority_matrix.png b/src/main/webapp/templates/tables/authority_matrix.png
index cc941341..083ec2c0 100644
--- a/src/main/webapp/templates/tables/authority_matrix.png
+++ b/src/main/webapp/templates/tables/authority_matrix.png
Binary files differ
diff --git a/src/main/webapp/templates/tables/gantt_1.png b/src/main/webapp/templates/tables/gantt_1.png
index 120380ee..09e570f7 100644
--- a/src/main/webapp/templates/tables/gantt_1.png
+++ b/src/main/webapp/templates/tables/gantt_1.png
Binary files differ
diff --git a/src/main/webapp/templates/tables/gantt_1.xml b/src/main/webapp/templates/tables/gantt_1.xml
index aed521a3..161e5eee 100644
--- a/src/main/webapp/templates/tables/gantt_1.xml
+++ b/src/main/webapp/templates/tables/gantt_1.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="6d05d945-a31f-5f71-e534-1321e6440cac">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</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" version="8.6.5" editor="www.draw.io" type="device"><diagram name="Page-1" id="8378b5f6-a2b2-b727-a746-972ab9d02e00">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/tables/gantt_2.png b/src/main/webapp/templates/tables/gantt_2.png
index dbf86d0c..c13932fe 100644
--- a/src/main/webapp/templates/tables/gantt_2.png
+++ b/src/main/webapp/templates/tables/gantt_2.png
Binary files differ
diff --git a/src/main/webapp/templates/tables/gantt_2.xml b/src/main/webapp/templates/tables/gantt_2.xml
index f1ab7567..05a1138a 100644
--- a/src/main/webapp/templates/tables/gantt_2.xml
+++ b/src/main/webapp/templates/tables/gantt_2.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile type="google" userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io"><diagram name="Page-1" id="9a4a6cd1-a997-1cf7-e485-8c93f59a045c">7ZvNc6IwFMD/Go/bSUgEcmztx05n2j24M3tOISIjEidi1f3rFyUIIWH1UDFScxFevuD3XpL3Qhyg0XzzIuhi+sZDlgwcEG4G6HHgOBAjnP/sJNtCggkpBJGIQ1moEozjv0wKgZSu4pAtlYIZ50kWL1RhwNOUBVkhk3WpEHytFpvwRO11QSOmVNoJxgFNyue4G1byP3GYTQu577iV/CeLo6nsG0JXvuEHDWaR4KtU9jhw0GSfiuw5LduSPS+nNOTrmgg9DdBIcJ4VV/PNiCU7uiW4sl62LZ92gB6m2TzJb2B+uc9+bqkMT6mcv51gqUK1rT1PcvqkyUo2+JsuZ7lE74kmcZTmlwmb5G0/LDPBZ2zEEy72+Wi0T8eeR7b7yUTGNjWRfL4XxucsE9u8iMxFDrgDtYSKBqRlDskdqSVP6ndd6RzBRpGixLSm/UYPAErzp9IMo8NDVSjzC0nTTNYHbWQdi8gqLH0VA/R0lmUNld4X0Gq1Q2QNrYYdEYUdBKfAU4ucByVpNTx8JSgbnDC6GMpWqxxag7JBwlVRYjXXYJQNVeDzkMyHRxtK90pQusbc7lE6bSDf6ZxpLCdxktTQPe+TCWrxVoec0mnasZ3wNDOV3MnHsitw9tUJg+6WI9cLCMDYoQCQCRqSH45Prt1+fUvsV2fbvmJdCVsH2MsWamxtYepidYC7+gD38ZkGONaovNK0R5Nnk61h8vQ6mzs9X6P9zD56RNuDNtHWV6o3KvpE27eItiHMv1/0ibY/tIm2vpq90W2PaJPjTm+HtPVQ43WV9inGIMQm3MiAO+mTdUPg2sRbdwLvV1GfcENkE259M23MFlmfeDvAJt6uxvtX0C/cnk24PQ33O//sE25kU0zp6zHlIwv6hBvbFFQS3RXUWFuyjeTrnM62jWQApTtxtoI6fJO5ECnd/bKWlHNZUrrnZC0pwyzVJSnd57GWVJfb3QZSurtiLakLz+i6p2ErKefCM7q+86yRWk/jjI0XNNjdrwVdqFBU72t3uK3hwR1IRoKGMas8s5SnrHTKivOIEP/HeSs1FuRNMGHSmTyZ0tWnrsPZybPrCRnOYtz0VDjUDZ/bMPPAzsYTKo813fR07KOEyZXtLDhC5YnOm56Ofc4wOdJdTnwnBGffU1HaVrHJke9y6jshOLxpqjWQ6HJMnRCcflNNNfenTYFMl2PqhOD4m2qquddqCqS+yJ/Ib6s/B+3zav/BQk//AA==</diagram></mxfile> \ No newline at end of file
+<mxfile type="device" userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" version="8.6.5" editor="www.draw.io"><diagram name="Page-1" id="fc2ac565-0d4e-3f0d-88b0-a54af1634ed7">7Ztfc6IwEMA/jY/XAQKEPLb2z01n2nvwZu45xQiMSJyIVe/TH0pQ44aTh4KRyouwCQn+drPZDWGAhrP1i6Dz+I2PWTpwrPF6gB4HjoM83yt+tpJNKbExCkpJJJKxlB0Eo+Qvk0JLSpfJmC2UijnnaZ7MVWHIs4yFeSmT91Ih+EqtNuGp2uucRgwIRiFNK+mdd5D/ScZ5LOW2Tw4FP1kSxbLzwMFlwQcNp5Hgy0z2OHDQZHeUxTNatSUfdxHTMV8didDTAA0F53l5NlsPWbrFW4Gr7ss31dMO0EOcz9Liwi5Od8XPNTfbTW4u/pxgmUK1rj0sOX3SdCkb/E0X00ICe6JpEmXFacomRdsPi1zwKRvylItdORrujnPPI9v9ZCJn6yORfL4XxmcsF5uiiix1CL6zjg5UNlCZpkvuyNGBpRpXB6Uj+6RKWSM+0r5jKV1YtittUdphtH+qA8viROLUow2sOrSOQWhVmFjl4CAIs7JfFd8X4Kq1RGQOLl8xJKLCI03gKVXsdlCSWstzrwNlMY8onFzvYihrrdIzB6XqH30VJVI5+cFZ/+i2g9K2as3SvxKWnsrSOz/XtMTSqSP5TmcMwJwkaXrE7nl36KiWf2tfUgVOW7gTnuW6mlv5SHZltT9BIau7GcnHIbFc16GWRSbIIz+cgFy7BWNTLBjCrZ+1rgUuMRiuDeCaAtW3T8a4B8d44LY0xl2A5ZVmPXKgAK7GgeLO/CcOAO5n9tEn3IFRuOF09UZFj3BjzyTcmoT/ft4n3Ps1MjNwwyntjW76hLtB8NshbphzvC6zPiUbxDeKN9LwTvtk37aFjAIOY8H7ZdQn3rZlFG+4tDZi87xXwLFRwH0A/FfYK96OaxRvDHi/888+8UZGZZcBzC4fWdgr3kallwRGhAC2KWtKGIJqbU1JQwrGcsaSIpclBYMwU0ntN7tciBQMn4wlpXFTXZKCcY+xpLpc+9aQghGLsaQu7NFhrGEsqQt7dLgIDUit4iRnozkNt9crQecqFDX+2u54O4nh9iQjQccJO8RmGc9YFZaVmxRt9z/hW6WxsGiCCZ3O5GaVzl587SeZ1hWFNNszbooqWZ2G3RrfY3c2olC11+mmqLMvKDSur7P8CFX7PG96OvdmQxdKd+n5GqRn31NRYMlYF8p36foapIc3TdWmEl2OqQbp6TfV1OkqtS6V6XJMNUiPv6mmTtdbdanUF8UTxeXhm6Fd2dG3WejpHw==</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/tables/gantt_3.png b/src/main/webapp/templates/tables/gantt_3.png
index 8eb2772f..c45358e0 100644
--- a/src/main/webapp/templates/tables/gantt_3.png
+++ b/src/main/webapp/templates/tables/gantt_3.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/activity_diagram_1.png b/src/main/webapp/templates/uml/activity_diagram_1.png
index 46b02f3d..21a848ff 100644
--- a/src/main/webapp/templates/uml/activity_diagram_1.png
+++ b/src/main/webapp/templates/uml/activity_diagram_1.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/activity_diagram_1.xml b/src/main/webapp/templates/uml/activity_diagram_1.xml
index e0024ff2..4cc037bc 100644
--- a/src/main/webapp/templates/uml/activity_diagram_1.xml
+++ b/src/main/webapp/templates/uml/activity_diagram_1.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" type="google" version="@DRAWIO-VERSION@" editor="www.draw.io"><diagram name="Page-1" id="dd4fdf45-0a81-a461-4935-abd9e4a15d39">3Vvbkps4EP0aP84UQuDLYzKX7MtWpWq2ajePDMiGGoxYIY/tfP1KIDCoZUe2uaR2XmJaQqCjo+7TajLDT9vDNxbk8Z80IunMdaLDDD/PXBd52BP/SMuxsnirVWXYsCRSnU6Gt+QnUUZHWXdJRIpOR05pypO8awxplpGQd2wBY3Tf7bamafepebAhwPAWBim0/p1EPFZWNF+dGv4gySZWj16686rhPQg/NozuMvW8mYvX5V/VvA3qsdREiziI6L5lwi8z/MQo5dWv7eGJpBLbGrbqvtczrc17M5Jxmxvc6obPIN2pqf8VMxJEwqbGKvixRqXYJ9s0yMTV132ccPKWB6Fs2gsSwAer+z8J4+TQMqkX+UbolnB2FF1Ua43JsXu5Py2Au1S2uIW9v1DGQC36phn5NHHxQ83djIMPcACzFzcI+snJi0XLpbHgAeNvPODSuE7S9ImmlJW9sVP+yc6c0Q/SalmvVQuEzL0WMuR0MfMgZtgAGe4BsbkFYpHYVOqSpO90/3IyfC0NoiGmLPlJMx6IB32VM0/ENvySJptMNL5TzulW9s6iL3JfCxvNSVZZlN9YmlB+fVUoi36viZzFMxJX5dYkcgrOWfgLumMh6fBCLPSGqF6LyiQnd88SmbBXg3yniXil0wjI74yAkDZE9XbqLm0FmxeyWtQFWNQkEqulL2wPzJ075jnt2+7WtNt7oO4SzHJXECYHDXlCsxGma3Jug013ZbFTwfYaakMt4IZaWm4oRtKAJ5/dEH0PMDXgLWRyWvBSV2y3gYjhwzMB1y5mDCYgBCY8IRWWkAr1xCfgAlRCPcSzi9DBgHYHmDVyt0SqNvUcA/UaozXqZwKZ7gVXGqerCYFABgYC0UMf6ExEFIgHx1a3XHYozr8w1t7X74hp8aMa8NZoiwHlGvENyTew+MaaTBlVfSOIBNx8w8tvfC1oGg1HVN/IG8JdTSu/scGrYUOM8C3d2qG7Khqx7d2W35Xflr7mBn+AYBZqKb+vZq6Wa48qvxFMHcOYhB8zeVAjZfhMJpcYSfpkZH+SY8UISIyqzBHMt+AuHkaPmTabIdmt12oCQQaztEaVO//uyG6MfTGuOp8uUTOxYW5gw2SpmgszF8UBh2xzfgRAsZhu33cFVAbyMDYcXBkgX3crkEgmOXXpdMgaK5jKHAn0ndfLg0DJgpSs+UBq4ZDwfyRFH3119aMk7CUyyzaBUHXbwq+vf5yGkZffCUsEkoRZb4Cm8NDaAO6V2uNBjdFz4oR0d9NTvtPkUfVzlv0mPIaMJ6PDE5PTfEINa+JRnQKMzSNtfbHjW/HolqW2SVAmDWY1fBMEM4tqU53kpkmZ8lfA1LXI+cXwxajIieU5Nn5enYfnilimHYMgd/EIo5lviGbI7wGs/2GhyeQlTOL7ymijL5Seqf7aQegnXkjXI/05iPpJrXWNkiIPeBi38r9G8jeWPWUfZbGGq7Oy/pMA5E2YBWCodEOWlGRtoVAQc6mqdhsZ5eaTQnFrReY697wPKad7NuKtDNmz6Ui5F6Sgzr0UYjLa8qSXN7ADJGYUFHF5YfjCwhRvDLUNPFm8wRax2MiUs1BpOZWy388n1+vyCa8MgQayyeshzng2tbGr48wpNYF5yUDFIQMda1/boaNnScexqkP6YfpScxG2xSE9WcL6QL0lS5rvc/pNluCmbapD9RKPVh3yl11MR60OYZg15oyGpChMQuGXcsC7dvJa0uQ5Y6oBmw/TJipLdw5e3BsPXjzomawPWcbyTA+aKvb0D7BsXdMD0usuejWqJ9/0gLTnKB71Vrm2KVy0aGmjvW6PeAYO1T7j9+WQu3rUVIsti3R/BEfqMUuDVRi40KAyL1PmG+vy97trPQv2HRishirL4+lKOAqnjuwzVM/xdCUcmPCPhQ2C2Ji+lxqtvCUuT5/4V7vy9P8o8Mt/</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" type="device" version="8.6.5" editor="www.draw.io"><diagram name="Page-1" id="e7e014a7-5840-1c2e-5031-d8a46d1fe8dd">3Vvbkps4EP0aP84UQuDLYzKX7MtWpWq2ajePDMiGGoxYIY/tfP1KIG5q2ZFtDKmdl5gGBDo63X1aTWb4aXv4xoI8/pNGJJ25TnSY4eeZ66L5Yin+kZZjZVkiZdiwJFIXtYa35CdRRkdZd0lEit6FnNKUJ3nfGNIsIyHv2QLG6L5/2Zqm/afmwYYAw1sYpND6dxLxWFnRfNWe+IMkm1g9eunOqxPvQfixYXSXqefNXLwu/6rT26AeS020iIOI7jsm/DLDT4xSXv3aHp5IKrGtYavuez1xtnlvRjJuc4Nb3fAZpDs19b9iRoJI2NRYBT/WqBT7ZJsGmTj6uo8TTt7yIJSn9oIE8MHq/k/CODl0TOpFvhG6JZwdxSUNbbxHv7pJ0Qa5ijb7dhHcpYIu7uDvL5QxUAu/aUZvJy9+qPmbsfABFgABcYOgoARALFwujQUPGH/jAZfGdZKmTzSlrLwaO+WfvJgz+kE6Z9ZrdQbC5l4Mm+P0QPMcgBk2QIYHQGxugVgkHEsdkvSd7l9aw9fSIE7ElCU/acYD8aCvcuaJcMUvabLJxMl3yjndyquz6Iv0bWGjOckqi4odSxPKr68KZXHdayJn8YzEUemeRE7BOQl/QXcsJD1eiIXeEHXVojLJyd2yRCbs1SDfaSJeqR0BaZ6BtCGqt1N3aSvYvJDVoi7AoiaRWC19YQdg7twxz2nfDbkmbx+Aukswy11BmBw05AnNRphukwPGmO7KwlOBe93LoRbQoZaWDsVIGvDks5+mbwGmBryDTE4LXmqL7TYQefz+TMB1iBmDCQiBCU9IhSWkQj3xCbgA1dAA+ewsdDCh3QBmjdw1mapLPcdAvcZojfqJRKZHwZXG6WpCIJGBgUD20Ac6kREF4sGxc1kuLyhOvzDW3tfvCWrxoxrw2myLAeUaAQ7Jd2cB7nnTCnAEwYD+d38Fji/FbW5WdyMIcOTdI2JNq8CxIbBhQ5rwLSPbob8qtR9fLMH9vmtYhpsrQgKChailAr+Yua4WQ8dU4AhWj2FMwo+Z3K+RSnwm60uMJH0ysm8VWTECEqOKcwRLLujF95FkJmcz1Lv1Wk2gyWCh1ghz598d2Y3hF+MK9OlqNRMb5gY2TFatubB4URxwyDbnRwAUi+n2fVdAZSD3ZMO7KwPk62EFEskkp85tEFljBauZI4Gx83J5EChZkJI1v5NaOCT8H0lRIUerox8lYc+RWZ4TCFW3Lfz6+Ec7jDz8TlgikCTM2gGa/kPHAdwLtceDGmPg2gnp4WagkqcppernLIeteQxFT0bvT0xO8wk1rIlHdQkwNo+09cWOb8Wja5bapkCZNJnV8E2QzCwaTnWRmyZl1V8BU7ck52fTF6OiJpZb2fh5dRqeC3KZthOC3MUjzGa+IZshfwCw/oe9JlOUMInvC7ONvlB6pfrrAKFveiFdjwwXIOonddY1Soo84GHcqf8ayd9Y9pR9lP0arrbLhi8CkDdhFYCh0g1ZUpK1g0JBzN2qOmxklJs3C8WtFZnr2vM2pJz+3oi3MlTPpl3lQZCCOvdcisloJ5Ked2AHSMwoKOLywPChhSnfGNobeLJ8gy1ysZEpJ6HSaiplv51PrtfnE14ZEg1kkzdAnvFs2mMX55m2NIF1yZ36QwY61rG2R0fPko5jNYj0zfSlFiJs+0N6sYT1gQYrlrTY5wxbLEGnbRpE9RKP1iBauNM2iDAsHHNGQ1IUJq3wS0XgXTp/rW7ynDEFgc3naRM1p3t7L+6Vey8eDE7W+yxjBacHTRh7+mdYttHpAemtF70hNVB4ekDacxSPButf2/QuOrS0kV/XJz0Dh+qY8ftyyF09asLFlkV6PIIjDViowUYMXGjQnJdV85Wt+dvDtV4I+/WoI3Tm8XRdHIVTT/kZGuh4ui4OrPnHwgZBbExfTY3W4RKH7cf+lVe2/6MCv/wH</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/uml/activity_diagram_2.png b/src/main/webapp/templates/uml/activity_diagram_2.png
index ce9c576e..cda47100 100644
--- a/src/main/webapp/templates/uml/activity_diagram_2.png
+++ b/src/main/webapp/templates/uml/activity_diagram_2.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/sequence_1.png b/src/main/webapp/templates/uml/sequence_1.png
index 61be0f41..ceef833b 100644
--- a/src/main/webapp/templates/uml/sequence_1.png
+++ b/src/main/webapp/templates/uml/sequence_1.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/sequence_2.png b/src/main/webapp/templates/uml/sequence_2.png
index d24e01b8..0e85e7cd 100644
--- a/src/main/webapp/templates/uml/sequence_2.png
+++ b/src/main/webapp/templates/uml/sequence_2.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/state_machine.png b/src/main/webapp/templates/uml/state_machine.png
index 0f6c219f..55c83f9d 100644
--- a/src/main/webapp/templates/uml/state_machine.png
+++ b/src/main/webapp/templates/uml/state_machine.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/sysml.png b/src/main/webapp/templates/uml/sysml.png
index 2f534e0c..b5a832ba 100644
--- a/src/main/webapp/templates/uml/sysml.png
+++ b/src/main/webapp/templates/uml/sysml.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/uml_1.png b/src/main/webapp/templates/uml/uml_1.png
index 169d42ca..c8f073d3 100644
--- a/src/main/webapp/templates/uml/uml_1.png
+++ b/src/main/webapp/templates/uml/uml_1.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/uml_2.png b/src/main/webapp/templates/uml/uml_2.png
index 09a30f7b..ee27b10b 100644
--- a/src/main/webapp/templates/uml/uml_2.png
+++ b/src/main/webapp/templates/uml/uml_2.png
Binary files differ
diff --git a/src/main/webapp/templates/uml/uml_2.xml b/src/main/webapp/templates/uml/uml_2.xml
index ef787acd..4f56a536 100644
--- a/src/main/webapp/templates/uml/uml_2.xml
+++ b/src/main/webapp/templates/uml/uml_2.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="f3a3c2fb-4351-6c25-5584-09ee98ade88b">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</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36" version="8.6.5" editor="www.draw.io" type="device"><diagram name="Page-1" id="b5b7bab2-c9e2-2cf4-8b2a-24fd1a2a6d21">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</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/venn/spider_1.png b/src/main/webapp/templates/venn/spider_1.png
index bacc736a..4818fc6f 100644
--- a/src/main/webapp/templates/venn/spider_1.png
+++ b/src/main/webapp/templates/venn/spider_1.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/spider_2.png b/src/main/webapp/templates/venn/spider_2.png
index df9cf497..a6289b15 100644
--- a/src/main/webapp/templates/venn/spider_2.png
+++ b/src/main/webapp/templates/venn/spider_2.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_1.png b/src/main/webapp/templates/venn/venn_1.png
index fc0e7163..8749cf37 100644
--- a/src/main/webapp/templates/venn/venn_1.png
+++ b/src/main/webapp/templates/venn/venn_1.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_1.xml b/src/main/webapp/templates/venn/venn_1.xml
index 08417fb4..955c2c6d 100644
--- a/src/main/webapp/templates/venn/venn_1.xml
+++ b/src/main/webapp/templates/venn/venn_1.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="e76a46b4-ccae-9570-520f-7df6e29d920a">zZfLbqMwFIafhm0FGEhYTmjpzKKbdqRZe8ABq8YncpzbPP0cggkXU6lSUlI24fy+nPN/tozjkKQ6Piu6KV8gZ8Lx3fzokEfH972ABPhTK6dGCeK4EQrFc9OpE974P2ZE16g7nrPtoKMGEJpvhmIGUrJMDzSqFByG3dYghlk3tDAZ3U54y6ho63gIO/0Pz3XZ6Es/6vSfjBdlm9uLjMO/NHsvFOykyej4ZH1+muaKtnOZzNuS5nDoSeTJIYkC0M1bdUyYqOm24Jpx6QetF4OKSf2ZAX4zYE/FjrUVn+vSp5YGDkDwGKzWXIgEBKhzA3HdRZrixCvY0IzrerFDF8OtVvDO2o4SJLOrMoXumdLs2JNMlc8MKqbVCbuY1gsxs6fa8NAtT+garewtzUWkZlMUl6k7LPhiyExTCq6glKYuPjNRCskdKYVX7aUomo0SWQ4pEW9OTJGF6ZfcoxkO0uKFhnQNC6Q2x6S3xJgKXkgMMhzGEMyq9s7xAPthGiqe5+ImqILRhiI2Ki+eQLW4AamFReqV7UHsvieqxT1RLS1UvxXN+fckFY5IhdGMpGKL1AsXXFMzywSoEZjr/Ufe+JS2/QcT9oMb2G9T9/wnINeC4z1qLv9BPPQfTHymvsy/Z/svKWxnMz8+JmY1b1/30CCVGbvb3ifhl9nHsLtIn9t6/1fI038=</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">1ddNc6IwGAfwT8N1B5KAcFTb7vbQS7sze85ChExDHifGt/30+yBB0eBMZ2odykXyzwvhF4wS0Hm9+2n4snqBQqiAhMUuoA8BISSNCX40yb5NIpqFbVIaWbjsFLzJf8KFXbO1LMTqrKEFUFYuz8MctBa5Pcu4MbA9b7YAdX7VJS+FF7zlXPnpH1nYyqVRkp0qfglZVu7SKZm0FX95/l4aWGt3vYDQxeFoq2vejeVudFXxAra9iD4GdG4AbHtW7+ZCNbgdW9vv6Urtcd5GaPuRDiSKqeu04Wotulkf5mb3nQd2QnoszBZSqTkoMIcK+hSmkzDGHJY8l7ZZ7yTE4soaeBddQw266VvZWmEpaoYBbfvDHA7M3VSEsWJ39ZaiIxQ+gQJqYc0em7gOlGY/4raTe/xomHbJ9rSacejWoOot5DHk7gkqj+OfFPHEQV5HJZ9Ajch0OhsXajS5RI3ub0o/YSrSOGFkVKYsHYEp80yf9QZvQIL2cPFWrSNxWzZhWOZKlhoLOXYT6DRrVCRuplNXUcuiUPdzJdmlK27QA7BRNgA7uZFr7Lm+ig2o9XeGTcYAm3iwvw0v5Hd2ZZ5rHN/ddeK5vkglLXcjDbB6jB/Q6i1FlNxGL068bTQb0mMDeOxGeKmHNwe9UBL/mo4bj7FLPDb4I/SVeJmPV3FYjVzO3wzvLtcN05NDHa5zMXI7/ytL2RfaYfH0RnWo67230sf/</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/venn/venn_2.png b/src/main/webapp/templates/venn/venn_2.png
index 1e34e9aa..20c6cca1 100644
--- a/src/main/webapp/templates/venn/venn_2.png
+++ b/src/main/webapp/templates/venn/venn_2.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_2.xml b/src/main/webapp/templates/venn/venn_2.xml
index dfe66661..a1785b76 100644
--- a/src/main/webapp/templates/venn/venn_2.xml
+++ b/src/main/webapp/templates/venn/venn_2.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="227c24c3-7343-7ad5-a36d-1662d6be695c">1VrBUuM4EP2aHFfVUrda3UcIMHvZE1u15yyYJDUhpoIZYL9+28Qe4sgzS20S4zFUEbckYr9+enote4LT+5cvm9nD4o/ytlhNAty+TPBiEoInJPtTR163EVLdBuab5W3T6T1wvfynaILQRJ+Wt8Vjp2NVlqtq+dAN3pTrdXFTdWKzzaZ87na7K1fdb32YzYsscH0zW+XRv5a31aKJetb3ht+L5XzRfLUE3jb8Pbv5Ot+UT+vm+yYB796ObfP9rP1fzY0+Lma35fNOCC8nON2UZbX9dP8yLVY1ti1s23FXP2j9ft2bYl19ZABuB3ybrZ6K9orfrqt6bbGwAQa7nZw/L5ZVcf0wu6lbni3zFtuU1axalmuLeIwWuFuuVtNyVW7eRuPVlQCAxUsbt6xqPsT69LHalF+LtuO6XBf5pTd3863YVMXLTqi5lS9FeV9Um1fr0rRS8E45sP1GRsa0/QevLbmCA/YiGkRJYtP6vJNgjU4gULR8ip002V7sZDoAuZBUExodkkBsWdcwbv79ot5Rtw8N8P1JoEOTsIc5ACLzQJijBycGiGeMmBiwg7mAS56FKQbwPrDPMMcEOcqe4HBY4xG5/RtCH7evrhAHwtkHdULeYxBmFMm57S0XFFMMqD7FHGgRB0ZY47Y1Cyr34B7ZYYpKKggpkPDhaeAjs3s6hY8qSlee4hGyYJA4juKZozEaTGc6aQg+uRBDFFLwERAoS0NQ7wIBEailESmlnjSEI9Bfjkl/6qE/gNoxEP2DikMiTKJekwl4F3cQJ2KwYlQjh8ac/sG0ncAmiI2FSEmpB3ew9NkkS4ykaLcXDk+DHjENn61BCA52j7gvQt3mloK7IqROd4+eJJB3wpI4JbID22l7SA5aW3m6JAxochA6oDNkIFPPioom/mpstLWBbR0mOgKq4Zf2LV0YzZy4mDjWH8w+BsGPwZocBRNxW4/Rfnw6AqwHe/L/v2AeH1Y2Rw4pAYOgYRT509h6sMv+uQYMuhr+hxDXSpxUjMRibkRi7kI+oMPWxTy7uXefKNm6qUfIQW7Jz7IkGARVjVsN43r+Z/lQ+4+3yrJcV9dNP9+eb7cO2uQeBKp0qRvAKRLWtK0RjdKzmvVQ9xjWzeee+Xy0OLE6IPbEGgUY22k1BEwpg2k6Wph8MN9vHpUhMnqr1AbEKS8FLsaLU7J5F1GiFU9ekdOA0y736pejxanWJ1T1BlK9QoaelfVUOIXcTo9IxkPcIxTtWZDc2Z0MKJ8BNSIdj7zHKErOQDI3q8lqtwg9e0inAiovJUak5OaAnJUGPpgnpRjbjbOWX9jl14DzMK8URqTrxLGzMUwd1NCzq3fRrAMqeh0QtbwQGJHK4556IXZ3FIdzDT3752cjmpTI9YOYesYBWpmo2azcK5EGJFiPex8RcDF196yzEn3A9TE38GdjgoqwK2HY1bDPdBa5pT+fjkjGSH+OnFC9uSApinn9FIeU/9zk/0LA2ZTZ9WikPVs7JwIOc9d/PiK7EYGcMIr6pPV+xN6DOWGH5IWtn69fEBhuqmJPEXAxJsbF/r3AFrkojlTrZ2qC3nPPaxMnQy6vCs5GxLig6EQ8BfIpeoH9Z8HYLdAHxC2vC8Ykcah7zm1vpu4p3Mlws9P3F63e2nbeZsPLfwE=</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">3Vpdc+o4DP01PK5HtiTLfgTa7r7sU3dmn1NIgbmUdNJ02+6vXwVCIXXa2w8KN5t2BiLLJJwjH0kOAxzfPP5eZrfzP4tpvhw4mD4O8GzgnAvs9KW2PG0sFiNsLLNyMW1sO8Pl4t+8MW7d7hfT/K7lWBXFslrcto2TYrXKJ1XLlpVl8dB2uy6W7aveZrM8MVxOsmVq/XsxreaN1fq4G/gjX8zmzaWDk83AVTb5MSuL+1VzvYHD6/WxGb7Jtp/VfNG7eTYtHvZMeD7AcVkU1ebdzeM4X9bgbmHbzLt4ZfT5vst8Vb1ngrNMzaR/suV9vr3r9b1VT1s8dJJCryejh/miyi9vs0k98qD0q60sqqxaFCu1/IaghuvFcjkulkW5no0XEARY7YXOW1R1UPja7a4qix/51nFVrOoLzKubpZ5ZfdvcV15W+eOr388+o6bhmBc3eVU+qUszAR0YJGvRBe8xhIamJi4de+MdWmJhh9GGzejDjnKdYiAAB+etcMDoNy7zPfKtfgoKR4oBQRyFxidrgnD2fFc7IvRNw8XrvLgD8mKRU17OA3u9yil48dYZ8s7rP3v0mPLC3oYQXYikd4kJMTayCeCoZiboSUx5cUDGSYyCunJFSbSH4QW/yssLGtwFj2R8EhoYrIZujNYjo3hAavOAbJz1wRM7sNb5dH0IdCwIgsMgTQdG2rrhcPReIdpfPXxw5AmjsRys96zYwhbapy2s1qgkcaAIlgGBEuRdtMYREEFUYUMS6SDCHYgIPmSKoI4UIejHw3CSNUAq8YEIJUQbRQWnzYRHg0GBRo4AELmDCDYEmkN0KjBJpA4iQIwLZMUjRYQY3WF48Qkvw4QYRaaqkayBXc3+Km5rDtbZoFhVl40fbM83pZilNsz10H5CXx8Hgl+c4TbkNiigIuAhYBDkDtnpUJ1DxbokmI76hqkwvMBUA1Qzquq7RAGNxChHxTQkmI77hmmAYLRYUUmNWnVwbAu2lpenjNmY4HvWN3y9ULsUacevgPGaK9UBI9oOGf5GeBkSeM/7Bi9TIgmxXWO4o0oCp13nsHeawExGpF7wgNo+xnbpoDJrjhunacc46h2m4jmpB06prZy2e8P+oepdeENdXTwpwmmbNxr3TmC1S34DYcRgBGwQDpHrzaKjApy2b6P/G77hlPUtp33YqH8FWNRO16N2wRKBvH1RLSBpl2yDr/eM6n27o+Lb0ZOd9S+C067MOhNjhMgc0Fp/3GohbcqGvQta0hpL1z4plMI2gH9ROuhwUM0gGzVoyXVs8H8jwB1dWe+CVtuDN0pcolPKrk/7snT76937kh27kteffHA1K7PpIt9x0njsM8jfS5tCbBj2jhfbFYxGl45oX20hQMeyiLUw7Y6OPU2lPvggXoT0wG2++CqnaV+Ybr99hdP8kw+9jk1eW8fgJ3xRxyrTkhOi1va6bH2tfnQYgtImM+2GPvb865qvZNI3RtgbUFhJM7eAvJcSMeRULYM2Wfpn5TCUpC1qmsg/+KAsy64+IXwnpYSADUatVEEi+WA7utgjLpO0qU1z/1d0TNBPsk88Mft1khAxGRcQIDB6iIgd5e/P05C6OLCi3ImKI22Lrg/Qp6e7H9ysx/Z+1oTn/wE=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/venn/venn_3.png b/src/main/webapp/templates/venn/venn_3.png
index 28e59ea6..9b73a849 100644
--- a/src/main/webapp/templates/venn/venn_3.png
+++ b/src/main/webapp/templates/venn/venn_3.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_3.xml b/src/main/webapp/templates/venn/venn_3.xml
index 9ffc477a..9aac452d 100644
--- a/src/main/webapp/templates/venn/venn_3.xml
+++ b/src/main/webapp/templates/venn/venn_3.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="efb738a8-7c80-c7f2-682c-5790327b83c8">7ZpLb6MwEIB/TY6VwAZCjk362MuuVspqqz06YMCqgyPjvPrr105MAtikrNSEVksOLTM2YM/nx8yYEZwtd88crbLvLMZ0BJx4N4IPIwBcD3ryn9LsjxpvMjkqUk5iXemsmJM3rJWO1q5JjItaRcEYFWRVV0Ysz3EkajrEOdvWqyWM1t+6Qik2FPMIUVP7QmKRaa3rOOeCb5ikmX516OuCBYpeU87WuX7fCMDk8DsWL1H5LF2/yFDMthUVfBzBGWdMHK+Wuxmmyral2Y73PbWUntrNcS663ADGrheHwE2i0EcwnNwBeHzEBtE1LvtwaKnYl9aRj5AgpDDdZkTg+QpFqmQrx4LUZWJJpeTKy4MhcKylU18dKURsSSJ9XQjOXvGMUcYPL4AhWMAgOJWUCKR1pgmhtFIz9nEYe0rPcqHHEQBartRzDj+pZ7KxRKhh6SvRtJc24QZzgXcVlbbfM2ZLLPheVtGlINAs9ViHE/8ob88jx5/oOlll0HjlaEJ6tKanZ5+JyQsNrSNA9xPwi8eTheN04ZckOIiifvk5fo2fZ+LzAgu+E9MPxfcZpl8QhXiRdJp+CIdJv/i8DvjGN8PnGfhmGZZcmgxl50QdVp1CznLcMLdWIUrSXIqRNBmW+qkyFZFb170uWJI4pm2jo+OQ6IoT8UhX+yic4wbOYGzhacEJrkHTN2ki/pVZhp1Ynu7SfbR4Ff/M1fXrXE9yH1wDg+s94SuKJJT34XJckDe0oKWlVozk4tA6fzryH5Ql14IVR1O6FcoUJ8LCWDAFs1ALY57+UsLDXdOjucTto0mFXoMUMEmdHOEqKngNVBMD1ZxQ1bkvPAsvragfANAPPtESWkZ0FYAvGca0GAC2uzQNgB7sE6AZUPxgqoeM0rUgLB9AXvBN66FhvzMRGCAfGOPDRLywko7rExH0ys8MDV9IHqtc10CwdQaG9RnohiZBW27mOgQt0SHLi/USFypJuVZJ1IFkG0mvkWazuaW2QP86KM3Q8DFPSacA4r8lOGmsprZUzc0AmjGgp5oy+KbvZEvHzrsQXXgzimPTp+Fkc1hPlWfqcIbiAWc7TthIt/mWtIxry35fB2do4Hyi+wFfe7a0sSm6vUaKZq7mN85IRIdN8UKI0ci2eRa35mYEgSVZQ/J0WEAvnVd8pv0QmMmaPxLLwK+VX9A8vbeE+DfkZ+Zo5gJjLidh6ZwOLLuf5Lu9sjSj/SmJ9l98O+x2guhf42DKh3W8YXm20MtWaSYA7jdMVlffgKm/W4xEJpF8YdbXXnpBI/awbZ3gZkDNhMDP9YJKwwBHcJQXK8aHU8cLs7O5+Fo+g7vd7DTzAjPEUzbwa+fnNo79r5edk+L5C9dDWeUzYvj4Fw==</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">7ZvLctowFIafhmU71s2Wl4WGZtNVFl0rWIAnwmIcJUCfvjLIBnzMDG1lDQtlE3Qk3/T90pF+w4TMNvsftdiuf+pCqglOiv2EfJ9gjDnD9l8TOZwiiOTJKbKqy8LFzoGX8rd0wbbZR1nI96uGRmtlyu11cKGrSi7MVUzUtd5dN1tqdX3VrVhJEHhZCAWjv8rCrF0Upfm54lmWq7W7NMfZqeJVLN5Wtf6o3PUmmCyPf6fqjWjP5R70fS0KvbsIkacJmdVam9OnzX4mVdO5bbedjpvfqO3uu5aVuecAjFjKTgd9CvUh27s+3ps5tP1hD7JdbwvT3bo08mUrFk3NzuK3sbXZKFtC9uPx0WXhSt3TJbagxKtU065/Zlrp2lZVumrO+25q/SbboO02yVlKcVfTYiA2siyVGmq51JWZi02pGtk9S/UpTbkQrsKJDFFXvjgBnrNpNrNxocpVZWML23vSVk61fdDSNKcjyfHpjDClbpp8QZTZiOs6WRu5v4kAdWDtiJF6I019sE3cAYRkXx2CQwvFEdidtUepU8z6QnaoHVbC6X3Vnf3M3H5w2G9LIH1ICSAsxCu7RwJdy5ASQEfR+VBAkvQUQBIWWAHZYyogzfOC3KWAtmVIBWTUkwAYEEALJJgA+EMKYJ7wLLlrCuhaBs0CmackQFHeTwKUBFZA/pAKyEi6EPweBXQtgyqAeBIA5iAH5GEFkCUDAiAIiMA+pLmmfQ3Nkbyk40KgX5sus2jUN1exKYtC3ZLXWVPJ32nqv/XgY4rP+gMc8QG+A3ixJ7poiC4c4pHuP9BN0/4a3m55g9LFQ3RJpOuDrt3d9+dmToPSJUN0aaTrgy7LWY9uSgcW3yPSpUN0WaTrJe/S/thlQ+uqEelCew3FketnzcyBc8bCsoW+GY0rKj+zctaflRkKyxY6Yiyup0ba69Ik7HoKml00wvUEN+tPyhQNOFkjwoU+FqPRxfADNwcZNw+6VubQo0Jx5I4Fl9CgKZdDi4rguFYeaZdL06A5l0OHyuor7nL90AXfIaA0LF3oUKE4LXthmyWAbdjVMof+FIr+lK83B6Q/LxMcNukO+FM4wvWUdMFb/TQsXGhQtd/NjGx9v/ILbD5yaFDhmHL9sGUg5bKwKRcaVCxaGH52uWCpTDAPyhb6UyjuhLylXAbWU2FNjHzAoYrz8lg5l7S2QiC40KGKbMfa5hI0mrVsi+ff2BzrLn7JRJ7+AA==</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/venn/venn_4.png b/src/main/webapp/templates/venn/venn_4.png
index 5956af7e..e34b2771 100644
--- a/src/main/webapp/templates/venn/venn_4.png
+++ b/src/main/webapp/templates/venn/venn_4.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_4.xml b/src/main/webapp/templates/venn/venn_4.xml
index 394365e0..429649af 100644
--- a/src/main/webapp/templates/venn/venn_4.xml
+++ b/src/main/webapp/templates/venn/venn_4.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="c3cad289-d560-70ba-9eab-9946d79d6b94">7ZhJj5swGIZ/DceRAGMCx2abHqaHKpV69oABawxGxmSZX18DhuA6M81EWaSKXOLv/YyX9/GCsMAi3z9zVGY/WIyp5drx3gJLy3UdD3jyr1EOneKFYSeknMSq0lHYkHesRFupNYlxpVUUjFFBSl2MWFHgSGga4pzt9GoJo3qvJUqxIWwiRE31N4lFplTHto+J75ikmeo6gCrxiqK3lLO6UP1ZLkjaX5fOUd+Wql9lKGa7kQRWFlhwxkRXyvcLTBtve9u659YfZIdxc1yIcx5wZ44XB66TRAFEIAifXNA1sUW0xv0c2pGKQ++ObEKCkMF8lxGBNyWKmsxOrgWpZSKnMnJksTUCxyoa5mrLIGI5iVS5Epy94QWjjLcdANsOQ/uY6RH4UkkIpX3NghXNIBJWCLWEGgPbWGus+Und9EbZtcVc4P1IUl49Y5ZjwQ+yisq6vuKm1jUIYRfvjqsEhqpONlogXr9ykFqZ6dD2kY4sKEBnwnImVp+wsqHGyjNRef4JVAO/q6KattUnqLwzUM3uhgoaqBYZlgz+5iUnJ3QwuuO9j6a1iJK0kGEkLcNSnzdWEXn9fFOJnMQx/WglnIl/zC8w+a3XQccP8UhVG55Sczxxm3x9F4b6iTmcoGO2J9C6tyDrG2TXqBJngOW4Iu/olfYulYwUoh0ZnFtw2bhYC1Z1NjojwhQn4gRfwRqQleRKivRXEyyfvC8wuzalmfNvSqc2oHcLSq5nYPpZS0PF4f/fgvAWdKGjH69+eMc9GDvARWGSOLPIcbGka8B9IXgCexWwwyX5CLDmG85qX+KiItsJ72V4/Zl+KkPwQLzmobyh0ryJ7CVkga9vXOg9kKz5vvvC6mq6bC89k+/2wivD45eiNjf6HAdWfwA=</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">7ZxNk6IwEIZ/jdctkvB5FES97GkOe2YkKjXRWMiszv76DRr8aqZqdyuJO1TPZaADAfJ0J503KUcs2xxndbFbf5clFyPqlccRm4wopXFA1b/W8nG2EJZ4Z8uqrkptuxpeql9cG7vL3quS7+8ubKQUTbW7Ny7kdssXzZ2tqGt5uL9sKcX9U3fFigPDy6IQ0PqjKpu1tpIwuRbMebVa60fHNDoXvBaLt1Ut37f6eSPKlqe/c/Gm6OrSH7pfF6U83JhYPmJZLWVzPtocMy7axu2a7Xzf9JPSy3vXfNv8yQ2UBImG9bMQ77x769O7NR9de6ibVNOrk/Swrhr+sisWbclB4Ve2dbMR6oyow2K/O/NYVkeunpGe2qI9OhVfPtdTJ6J45SK9NFgmhaxV0VZu2wftm1q+8V5jh4Qpy7ISortINTZdBq/RQtlXdVFWqhEeKljKbTMtNpVoPXPOxU/eVItCF2g/JL4+v6l3nPuE0fYDRbXaKttC1c1VYSpVW1RNWx1rP0q3Ja8bfvyUCbmQViHE5YY39Ye6RN/gM/9bcL5Jxw+LWWc5XN2RddGyvvHEi7HQIbC61H91A3WgPeFzr2DoFf+5VxDm3iv8AXmF6s2Tk/0Le0VAgFdE7r0iGJBXRCzMxvHX9goGvIIG7r0iHJBXDKGvYD7IK3z3XhENyCumXhx5wdC84hkjSDwgr8jjIPTp1/YKmFc8o69IBuQVQ8grAtBXuM8rQs8DXjEHbqG+sbnn30vtlpE2gWZsW0yREGNdsKnKUnzmcFen8v7Oqf4VP50GaZQZGgoSgJf24fV76FJDcAmAO0O4RuDSR7i+5xouVBqnCNdO5Aa9SZxNuFAwzBGukVE3fIQb9o66NuFC3W+CcE3AjUBK5T5yoXyXIVwTcGMwi3I/5kIVLkW4diLXfbYMxbQxwrUz5pJe/cMmXKiJzZGumbXUKHkMXeKaLtS2xtgxG6Ebwo7ZNV0CNapxikmVGbwRwJu4xgtVKqRrKKsCAy+jsWO6UKZKM5zumsH7fBWSQKEK6doKXr9356JNulCpypGupbwqcD7w9khVE5SZLeVVgfO0GYpVOa4QmZnyxs8PXqhWTRCvGbxQrwpcrxERqFflU1y8NxO9waNg5b5vhoIV0jVDl4GR148dz3kpFKymM9xWZSZ44Sqg6+ClULBCuraCl7leBqRQsJrhUpGtkde52kyhYDVOMXot5c3U9TovhYpVipqGIU0DRK/vHG+vZIXTXjN8PZBaJa4zZ6hZTXDea6p7hstFzkdfqFrlODUythEH8HXeP0PZaorZszW+LHTNt2+jFcavof6ZPOZXzPVyPuvdaoV8LeVX7vlC6WqM23GszY+c988MildphvMjQ3yh9Ox6WZD1qVcZDsCGBuCQPAZw76+C2QQM9au2g8ZJkjnG1OWeSXV6/f3JU9nNr3yy/Dc=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/venn/venn_5.png b/src/main/webapp/templates/venn/venn_5.png
index f0744cf9..a8688e34 100644
--- a/src/main/webapp/templates/venn/venn_5.png
+++ b/src/main/webapp/templates/venn/venn_5.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_5.xml b/src/main/webapp/templates/venn/venn_5.xml
index b4aec377..3fb5e010 100644
--- a/src/main/webapp/templates/venn/venn_5.xml
+++ b/src/main/webapp/templates/venn/venn_5.xml
@@ -1,2 +1 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36" version="@DRAWIO-VERSION@" editor="www.draw.io" type="google"><diagram name="Page-1" id="87d1ec25-4429-ffd9-4d53-048f4959abbf">7ZlLb6MwEIB/TY6VAPM8Nkkfh91TVurZMQNYdXAEzqu/fm1iCMRUjdqG7KLmEmb8wJ7PMx6bCZqt9k8FXme/eQxs4ljxfoLmE8exXeTKP6U5HDVuFB0VaUFjXemkWNA30EpLazc0hrJTUXDOBF13lYTnORDR0eGi4LtutYSz7lvXOAVDsSCYmdoXGotMa23LOhU8A00z/erQ0wVLTF7Tgm9y/b6Jg5Lqdyxe4bovXb/McMx3LRV6mKBZwbk4Pq32M2DKtrXZju0e3yltxl1ALi5p4AS2G4eOnZDQwyiM7nQPW8w2UE+hGqg41MaRPUgOUpjuMipgscZElezkUpC6TKyYlGz5WNkBYi01U7WkQPiKEv1cioK/wowzXlQvQPMgmlqnkpqALzUJZaxVM0nAJ0TpeS70MlJGrORWPav6ST2Xg6VCrUpPiaa56vlDIWDfUmnzPQFfgSgOsooudSzv2KRe6lrcndaN62vaWWvJeJFWYr1W06brEy/5oJFdiA/9A/giP0D3/iX4wI49CG6Kz70AXzAYPs/ANwUoDIRybqLLqgsh5zmcWVurMKNpLkUiLSY7RlNlKSoD370uWNE4Zu8tjgtXRJtmaNJs3BsXRFdrWuk59sSxLztmE7zbaHvIOtcA6xtgX6gE8jHYAkr6hpesttKa01xUI/OmE2+urLgRvDya0W4RZpCIHr6CK5Cl8qM8/aOE+Z37MbPGp7+bUoisLiXbpBT2UHK/g1JsIwdHSWIHxHagL3o+7NeQl3R7Car/yQcbnicf9K7hhH7QxeuhAZ3wHK9r4J2pxNCxeM4OIwPcE2SvAhj53SjruTcEbG6fv7g0uzoBMLzlY9tIHx91WnRlxp59FqOD4Rj7IQlcHwcBwks7WULPAeUZ5ynfji5NuhVdFN2QrvNOAmxNZcOfGP3JTDjqEna8GxI2c6wZlxlWKdT8fvh+B193wD3Y4GsmWVOG43h04XmwBMs723wHzKANuGaCtcj5shwZ2qEOR4F75rdOz+XTUGjNG4pZBtKo40J7q5CM/Bt6bWCgfeJQVoORY1GfR3g8Ms5DJc/uWXR2eo5G9mCgQwP0s0yseDVgBkRsCviJ1Z+8yDrPoXscejjQkbkP7wCEuspSh6WSb8aWbg3G2f843Wq+JHyRsxRPX3qrstbndPTwFw==</diagram></mxfile> \ No newline at end of file
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">7VpNl9ogFP01WU5PAvnQpfGjs+lqek7XaDByhoSUoGb66wsJMSpJ6+lopmZ0IzzgQd699xFQC06T4itH2eYbizC1gB0VFpxZAICRB+SXsrxVFgeO7coScxJpW2N4Ib+wNtbdtiTC+UlHwRgVJDs1rlia4pU4sSHO2f6025rR01kzFGPD8LJC1LT+IJHYaKvjj5uGZ0zijZ56BIKqYYlWrzFn21TPZwG4Lj9Vc4JqX/pB8w2K2P7IBOcWnHLGRFVKiimmKrh12Kpxi47Ww7o5TsUlA4DjQ68atEN0i+tV+1QODyOyU2sUbzou/s+tWlgocCGeECVxasGJgkHOhrksyLYy3Kl4yktQVavjZ0UzVpZi/V3OseTnFrnacuLaCk7WAOQDSBrISrjfEIFfMrRSLXtJRWnbiITKmiOLKM8qbqxJgeXzhiUuqlQ2H0KvVh1TlOe6TNES0/AA5JRRxmVTylI1aS44e8WtxpoqyvuaUFp3kiRY2KPA9tREHEVEhuvMgQrZAiWEKsU8Y7rDgqyQbtD6cHxdP/ILFl4YTNXDVmjMNBQwZDIuRCh3nnqoHebKI53ofoKpaOWqUxor594h1qorLjoJ5RxoKvWPWYIFf5Nd9IAAuF80obT4AdRO9o2SXN1lc6Sh2oa0duOD74a/sqAp3E1nv4XOQ6BQAP3pZNQDhSheC5NAQ6RKcK3M15n2yqzWkflkRNPWSS51xMuINFmzcvhIpoNJptA3FGLD2nKkEWDbpkgOxveqZGSoJKOKJoPg0uCyKrTPOQOd/jkzNjgjSDIQyjhgMgn7SD9Vfu+BM66xE38AZ1z7vnfjPWcSlM+3G0/mrgPBf7QbL5kQLGmEEup6JZc+dmkX9K8ex1DPm8EvpZdTIrVCfgywNhkYnAc9IVFEu5jbsNP+d3a+m0fXSJSuAbXbBrXbivR1gAYG0MUD6NsDDf2+gYYXAH2XO0ZvL1BdO8YA7zJc12BLvl2tsATy78mBY/l+g5ZlBxWfjJFUlOvxQsubqYhuBct15M1DzR/Pw99VZfbkduDXCfSNlB2MDaRaU3hwQ2W33bg/hH0nwm4/Gt1S2kO90f7wk8Mw6WLeapsngbvki+d7TjB/8OXKfDHvd9eI0C03r+s++5vD+Byr+sfGI6T8G743mLeqKRPSQJG4BKyhnQHhjc+AxpuixLvfM6Bn3ok+sL4F1p7xq4kb9Hze98wbPMpy8cD62lhDQ9f9Y21e4ulM/kC8F8Tbdu4r4S2rzf/3yrajf0nC+W8=</diagram></mxfile> \ No newline at end of file
diff --git a/src/main/webapp/templates/venn/venn_6.png b/src/main/webapp/templates/venn/venn_6.png
new file mode 100644
index 00000000..32d6003b
--- /dev/null
+++ b/src/main/webapp/templates/venn/venn_6.png
Binary files differ
diff --git a/src/main/webapp/templates/venn/venn_6.xml b/src/main/webapp/templates/venn/venn_6.xml
new file mode 100644
index 00000000..31c3c6c5
--- /dev/null
+++ b/src/main/webapp/templates/venn/venn_6.xml
@@ -0,0 +1 @@
+<mxfile userAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.170 Safari/537.36" version="8.6.4" editor="www.draw.io" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">7VtNk6I6FP01binyBWEJaL9ZvFc1Vb2YNS1RqUFjId3a8+snkYCGYPe87jaOKVzQcPPVuefcJPegE5SuD/9U2Xb1H89ZOYF+fpig6QRCSAkUf6TltbEAFPmNZVkVubKdDI/FL6aMbbXnImc7rWLNeVkXW90455sNm9eaLasqvterLXipj7rNlswwPM6z0rT+KPJ6pawgiE4F31ixXKmhKQybgqds/nNZ8eeNGm8C0eL4aYrXWduXmuhuleV8f2ZCswlKK87r5m59SFkpndu6rWn3cKG0+78rtqn/pAEEAUFNo5esfFbTj9U/V7+2DhGthO/FQ7JfFTV73GZzWbIX+Avbql6X4gmI22y3bQBZFAcmBkmOzpB3x+Juvr54WJbZbqfuy+yJlUnnvZSXvBJFG76Rg+7qiv9kg8YWH+G6ZFGUZVtJeF7AFU2RHKjK8kJ4pNfBgm/qh2xdlJKm31j5wupinqkCRUpI1PNZv/CBJGEqJ1sWy42wlWwhppxw4ZWilp2Rbkrf+a6oCy5rVQ1fkhdWyXHKf3vl6yLPpb+7CrHqvitQQIlidrgIOOhoJOKT8TWrq1dRpQ1OnzRN2tAMgacs+xPTsep3dcbx1pap2Fp2fZ/4JW4UxS7TDRt0S9ygmz+jPqUj3d6iGyS26UYMus3coBsJCAhnI910umFPJxyObBMuMAiXukG4B5+GPhkJ99b6hpBtuoUG3aZu0C2eYYDgSLe36IaBbbpRg24G2yQHthcnq1K27Kmt7v9fJ6AQ9RZ5APwBN5BowA8BoB5FhMAopIgGEfoat0Tvu+VWQShX7uPnXhf+P4qbjpsXaSMzHXGhJAQYymvQO5lCj+CIguZi0gkFgQdPrTEyyXWhyifJFfgukwvAOE7unlxigfU62OUVauSigReFgnrtJfqL2AWcZtdtJaCvWrr8yAtwcEavv4g/0GX+3DjJ/ix/7mD5MdVnh+hz4xzmi5YfTD0/xNHpcy8HJ1NqNqUY4ZpaZ9Eg1OfAKlPr+7lwJaveyvyGaHuipn9OTfBuNn1GDUAHqIEwJtMvBB9SDW7iAwNh7JuQtnndZzE09ds4SU0J965hxNeHEbXNuqg1N4FrwmiqogJGU6kaYXwHRow1GBEckH+uCOOA2jiLzfd3I4zvpYthLxqpVRhNFc985X/XGFrYGGGINAyx3X3RVBwdC0MLEBLQ2xTxoJx+PRRDU9pzbE+0gKJUR/T3AZbPqKEpoTl2QLWxnOpphv1QNHUs1w42gYXzKdVhFAm9VRBNNSlxLOW3AGI/5UeB3eV0QLZxbFe0ACIM9bMNgXZBNHWbqWObogUQQfuF+BtFoqnazBxLFG2ASPRIBO07D0sgmppNnDgWijYkm956Ci3nGAOSjWtHGxv6aajrp5DaRXFAtXHtbGNFBdcPqNi3mmVQU7VJXTvc2FhR+9+djuyiaKo2U9dONxZQBP190e6KSk3ZJhmD8SPymw4jCu3CaAo36RiNH1lToQ6j3ffD1JRu4jEcP5Rt6C8XEbhaOIrH0+/Nj2Vnv+pHs98=</diagram></mxfile> \ No newline at end of file